service

package
v0.0.0-...-dbef559 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: GPL-2.0 Imports: 23 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBC = errors.New("bad credentials")

ErrBC user sent bad userName and password combination

View Source
var ErrCC = errors.New("context was canceled")

ErrCC ctx.Done() signal was received

View Source
var ErrDBE = errors.New("database exception")

ErrDBE database exception

View Source
var ErrUNF = errors.New("user not found")

ErrUNF user does not exist in the database

View Source
var ErrWTO = errors.New("world timed out")

ErrWTO world service timed out

Functions

func Migrate

func Migrate(cmd *cobra.Command, args []string)

Migrate schemas and models

func Start

func Start(cmd *cobra.Command, args []string)

Start the login service that is, use networking library to handle TCP connection configure networking library to use handlers implemented in this package for packets

Types

type LoginCommand

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

LoginCommand wrapper for networking command any information scoped to this service and its handlers can be added here

type RPCClients

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

RPCClients that this service will use to communicate with other services

type User

type User struct {
	gorm.Model
	UserName string `gorm:"type:varchar(260);unique_index;not null"`
	Password string `gorm:"type:varchar(36);not null"`
}

User model for schema: accounts

func (User) TableName

func (User) TableName() string

TableName schema identifier

Jump to

Keyboard shortcuts

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