func (c *ClientConfig) Check() error {
	if c.UserID == "" || c.HomeserverURL == "" || c.AccessToken == "" {
		return errors.New(`Must supply a "UserID", a "HomeserverURL", and an "AccessToken"`)
	}
	if _, err := url.Parse(c.HomeserverURL); err != nil {
		return err
	}
	return nil
}
Check that the client has supplied the correct fields.
package api
import (
	"encoding/json"
	"errors"
	"net/url"
	"maunium.net/go/mautrix/id"
)
type ConfigureAuthRealmRequest struct {
	ID string
	Type string
	Config json.RawMessage
}
type RequestAuthSessionRequest struct {
	RealmID string
	UserID id.UserID
	Config json.RawMessage
}
type ConfigureServiceRequest struct {
	ID string
	Type string
	UserID id.UserID
	Config json.RawMessage
}
type ClientConfig struct {
	UserID id.UserID
	HomeserverURL string
	AccessToken string
	DeviceID id.DeviceID
	Sync bool
	AutoJoinRooms bool
	DisplayName string
	AcceptVerificationFromUsers []string
}
type IncomingDecimalSAS struct {
	UserID id.UserID
	SAS [3]uint
	OtherUserID id.UserID
	OtherDeviceID id.DeviceID
}
type Session struct {
	SessionID string
	RealmID   string
	UserID    id.UserID
	Config    json.RawMessage
}
type ConfigFile struct {
	Clients  []ClientConfig
	Realms   []ConfigureAuthRealmRequest
	Services []ConfigureServiceRequest
	Sessions []Session
}
func (c *ConfigureServiceRequest) Check() error {
	if c.ID == "" || c.Type == "" || c.UserID == "" || c.Config == nil {
		return errors.New(`Must supply an "ID", a "Type", a "UserID" and a "Config"`)
	}
	return nil
}
func (c *ConfigureAuthRealmRequest) Check() error {
	if c.ID == "" || c.Type == "" || c.Config == nil {
		return errors.New(`Must supply a "ID", a "Type" and a "Config"`)
	}
	return nil
}
func (c *Session) Check() error {
	if c.SessionID == "" || c.UserID == "" || c.RealmID == "" || c.Config == nil {
		return errors.New(`Must supply a "SessionID", a "RealmID", a "UserID" and a "Config"`)
	}
	return nil
}