login

package
v0.0.0-...-769df87 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2018 License: MIT Imports: 19 Imported by: 1

Documentation

Index

Constants

View Source
const (
	LoginResSuccess           = 0
	LoginResBlocked           = 3
	LoginResIncorrectPassword = 4
	LoginResUnFind            = 5
	LoginResBanned            = 6
	LoginResIsLogged          = 7
	LoginResServerBusy        = 10
	LoginResGenderNeeded      = 11
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LogLevel           string                  `toml:"log-level"`
	ListenClients      string                  `toml:"listen-clients"`
	DataSource         models.DataSourceConfig `toml:"data-source"`
	SendOps            string                  `toml:"send-ops"`
	RecvOps            string                  `toml:"recv-ops"`
	TestServer         bool                    `toml:"test-server"`
	ServerID           int                     `toml:"server-id"`
	ServerName         string                  `toml:"server-name"`
	ChannelCount       int                     `toml:"channel-count"`
	MaxCharactersLimit int                     `toml:"max-characters-limit"`
}

func (*Config) LoadFromFile

func (c *Config) LoadFromFile(f string) error

type LoginServer

type LoginServer struct {
	// contains filtered or unexported fields
}

func NewLoginServer

func NewLoginServer(cfg *Config) *LoginServer

func (*LoginServer) Serve

func (s *LoginServer) Serve(ctx *gosync.Context) error

Serve starts serving and blocked until shutdown or error occurs

func (*LoginServer) Stop

func (s *LoginServer) Stop()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL