Documentation ¶
Index ¶
- Constants
- func FormatHomeConfig(hcf HomeConfigFormatted) []byte
- func FormatWorldConfig(wcf WorldConfigFormatted) []byte
- func MakeDefaultHomeConfig(conf *config.Home) []byte
- func MakeDefaultWorldConfig(conf *config.World) []byte
- type Configurator
- type ExDb
- type Extractor
- type HomeConfigFormatted
- type HomeConfigurator
- type LocalHomeConfig
- func (l *LocalHomeConfig) Auth(username, password string) error
- func (l *LocalHomeConfig) Begin(wc *WorldConfigurator, name string) error
- func (l *LocalHomeConfig) Check() (*ValidationCheck, error)
- func (l *LocalHomeConfig) Confirm(check *ValidationCheck) error
- func (l *LocalHomeConfig) Enlist() error
- func (l *LocalHomeConfig) MustAuth() bool
- type Registrar
- type RegistrarParams
- type RemoteHomeserverRegistrar
- func (rhr *RemoteHomeserverRegistrar) Auth(username, password string) error
- func (rhr *RemoteHomeserverRegistrar) Begin(wc *WorldConfigurator, address string) error
- func (rhr *RemoteHomeserverRegistrar) Check() (*ValidationCheck, error)
- func (rhr *RemoteHomeserverRegistrar) Confirm(check *ValidationCheck) error
- func (rhr *RemoteHomeserverRegistrar) Enlist() error
- func (rhr *RemoteHomeserverRegistrar) MustAuth() bool
- type ValidationCheck
- type WorldConfigFormatted
- type WorldConfigurator
- func (w *WorldConfigurator) ConfigExists() bool
- func (wc *WorldConfigurator) CreateDB() error
- func (w *WorldConfigurator) GenerateConfigDir() error
- func (w *WorldConfigurator) LoadConfig(confName string) (err error)
- func (w *WorldConfigurator) NewExtractor() (*Extractor, error)
- func (w *WorldConfigurator) RegistrarAuth(username, password string) error
- func (wc *WorldConfigurator) RegistrarBegin(location string) error
- func (w *WorldConfigurator) RegistrarCheck() (*ValidationCheck, error)
- func (w *WorldConfigurator) RegistrarConfirm(vc *ValidationCheck) error
- func (w *WorldConfigurator) RegistrarEnlist() error
- func (w *WorldConfigurator) RegistrarMustAuth() bool
- func (w *WorldConfigurator) RemoveConfigDir() error
- func (w *WorldConfigurator) SetConfigName(confName string)
- func (wc *WorldConfigurator) SetName(name string)
- func (wc *WorldConfigurator) SetRealmType(t config.RealmType) error
- func (wc *WorldConfigurator) SetRegistrar(reg Registrar) error
- func (wc *WorldConfigurator) SetVolume(path string) error
- type WorldOptions
Constants ¶
View Source
const DBPackName = "!db.zip"
View Source
const DefaultHomeTemplate = `` /* 930-byte string literal not displayed */
View Source
const DefaultWorldTemplate = `` /* 1544-byte string literal not displayed */
View Source
const MapPackName = "!maps.zip"
Variables ¶
This section is empty.
Functions ¶
func FormatHomeConfig ¶
func FormatHomeConfig(hcf HomeConfigFormatted) []byte
func FormatWorldConfig ¶
func FormatWorldConfig(wcf WorldConfigFormatted) []byte
func MakeDefaultHomeConfig ¶
func MakeDefaultWorldConfig ¶
Types ¶
type Configurator ¶
type Configurator struct {
Dir string
}
func NewConfigurator ¶
func NewConfigurator(d string) *Configurator
func (*Configurator) ListHomeConfigs ¶
func (c *Configurator) ListHomeConfigs() ([]string, error)
List all home configs in the chosen Gophercraft root directory. On a typical deployment, it will return []string{"Home"}, nil
func (*Configurator) ListWorldConfigs ¶
func (c *Configurator) ListWorldConfigs() ([]string, error)
List all home configs in the chosen Gophercraft root directory. On a typical deployment, it will return []string{"Home"}, nil
func (*Configurator) NewHomeConfigurator ¶
func (co *Configurator) NewHomeConfigurator() *HomeConfigurator
func (*Configurator) NewWorldConfigurator ¶
func (co *Configurator) NewWorldConfigurator() *WorldConfigurator
type Extractor ¶
func (*Extractor) AuthorPack ¶
func (*Extractor) ExtractDatabases ¶
func (*Extractor) ExtractMaps ¶
type HomeConfigFormatted ¶
type HomeConfigurator ¶
type HomeConfigurator struct { Configurator *Configurator Config *config.Home }
func (*HomeConfigurator) CreateDB ¶
func (hc *HomeConfigurator) CreateDB() error
func (*HomeConfigurator) GenerateConfig ¶
func (hc *HomeConfigurator) GenerateConfig() error
func (*HomeConfigurator) RegisterAccount ¶
func (hc *HomeConfigurator) RegisterAccount(username, password string, tier rpcnet.Tier) error
func (*HomeConfigurator) SetDirName ¶
func (hc *HomeConfigurator) SetDirName(dirName string)
type LocalHomeConfig ¶
type LocalHomeConfig struct { *WorldConfigurator HomeConfigName string }
Uses locally-stored Home config to register a World Has the advantage that the home server doesn't have to be online to work
func (*LocalHomeConfig) Auth ¶
func (l *LocalHomeConfig) Auth(username, password string) error
func (*LocalHomeConfig) Begin ¶
func (l *LocalHomeConfig) Begin(wc *WorldConfigurator, name string) error
func (*LocalHomeConfig) Check ¶
func (l *LocalHomeConfig) Check() (*ValidationCheck, error)
func (*LocalHomeConfig) Confirm ¶
func (l *LocalHomeConfig) Confirm(check *ValidationCheck) error
func (*LocalHomeConfig) Enlist ¶
func (l *LocalHomeConfig) Enlist() error
func (*LocalHomeConfig) MustAuth ¶
func (l *LocalHomeConfig) MustAuth() bool
type Registrar ¶
type Registrar interface { Begin(wc *WorldConfigurator, location string) error Check() (*ValidationCheck, error) Confirm(check *ValidationCheck) error MustAuth() bool Auth(username, password string) error Enlist() error }
type RegistrarParams ¶
type RegistrarParams struct {
DBDriver, DBURL string
}
type RemoteHomeserverRegistrar ¶
type RemoteHomeserverRegistrar struct { WorldConfigurator *WorldConfigurator Address string ValidFingerprint string Token string Client rpcnet.HomeServiceClient }
talks to Home server over GRPC to enlist a World
func (*RemoteHomeserverRegistrar) Auth ¶
func (rhr *RemoteHomeserverRegistrar) Auth(username, password string) error
func (*RemoteHomeserverRegistrar) Begin ¶
func (rhr *RemoteHomeserverRegistrar) Begin(wc *WorldConfigurator, address string) error
func (*RemoteHomeserverRegistrar) Check ¶
func (rhr *RemoteHomeserverRegistrar) Check() (*ValidationCheck, error)
func (*RemoteHomeserverRegistrar) Confirm ¶
func (rhr *RemoteHomeserverRegistrar) Confirm(check *ValidationCheck) error
func (*RemoteHomeserverRegistrar) Enlist ¶
func (rhr *RemoteHomeserverRegistrar) Enlist() error
func (*RemoteHomeserverRegistrar) MustAuth ¶
func (rhr *RemoteHomeserverRegistrar) MustAuth() bool
type ValidationCheck ¶
type WorldConfigFormatted ¶
type WorldConfigurator ¶
type WorldConfigurator struct { Configurator *Configurator Config *config.World GamePath string ConfigName string Registrar Registrar }
func (*WorldConfigurator) ConfigExists ¶
func (w *WorldConfigurator) ConfigExists() bool
func (*WorldConfigurator) CreateDB ¶
func (wc *WorldConfigurator) CreateDB() error
func (*WorldConfigurator) GenerateConfigDir ¶
func (w *WorldConfigurator) GenerateConfigDir() error
func (*WorldConfigurator) LoadConfig ¶
func (w *WorldConfigurator) LoadConfig(confName string) (err error)
func (*WorldConfigurator) NewExtractor ¶
func (w *WorldConfigurator) NewExtractor() (*Extractor, error)
func (*WorldConfigurator) RegistrarAuth ¶
func (w *WorldConfigurator) RegistrarAuth(username, password string) error
func (*WorldConfigurator) RegistrarBegin ¶
func (wc *WorldConfigurator) RegistrarBegin(location string) error
func (*WorldConfigurator) RegistrarCheck ¶
func (w *WorldConfigurator) RegistrarCheck() (*ValidationCheck, error)
func (*WorldConfigurator) RegistrarConfirm ¶
func (w *WorldConfigurator) RegistrarConfirm(vc *ValidationCheck) error
func (*WorldConfigurator) RegistrarEnlist ¶
func (w *WorldConfigurator) RegistrarEnlist() error
func (*WorldConfigurator) RegistrarMustAuth ¶
func (w *WorldConfigurator) RegistrarMustAuth() bool
func (*WorldConfigurator) RemoveConfigDir ¶
func (w *WorldConfigurator) RemoveConfigDir() error
func (*WorldConfigurator) SetConfigName ¶
func (w *WorldConfigurator) SetConfigName(confName string)
func (*WorldConfigurator) SetName ¶
func (wc *WorldConfigurator) SetName(name string)
func (*WorldConfigurator) SetRealmType ¶
func (wc *WorldConfigurator) SetRealmType(t config.RealmType) error
func (*WorldConfigurator) SetRegistrar ¶
func (wc *WorldConfigurator) SetRegistrar(reg Registrar) error
func (*WorldConfigurator) SetVolume ¶
func (wc *WorldConfigurator) SetVolume(path string) error
type WorldOptions ¶
type WorldOptions struct {
RealmName string
}
Source Files ¶
- config_home_format.go
- config_world_format.go
- configurator.go
- configurator_home.go
- configurator_world.go
- configurator_world_registrar.go
- extractor.go
- extractor_db.go
- extractor_maps.go
- extractor_util.go
- list_home_configs.go
- list_world_configs.go
- message.go
- registrar.go
- registrar_local_config.go
- registrar_remote_server.go
Click to show internal directories.
Click to hide internal directories.