Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrWrongIP is raised when a source IP doesn't match with token-associated IP. ErrWrongIP = errors.New("ip don't match") // ErrInvalidTS is raised when a packet has a TS out of valid range. ErrInvalidTS = errors.New("packet TS is out of valid range") // ErrWrongCredentials is raised when user logs with invalid username/password. ErrWrongCredentials = errors.New("invalid credentials") // ErrInsufficientACLs is raised when a user apply an action without valid rights. ErrInsufficientACLs = errors.New("insufficient rights") // ErrInvalidAction is raised when an action is not possible following game rules. ErrInvalidAction = errors.New("action is not possible") // ErrMultipleLogin is raised zhen an account is already logged. ErrMultipleLogin = errors.New("account already logged") )
Functions ¶
This section is empty.
Types ¶
type ACL ¶
type ACL uint8
ACL is a enum for different rights between entities.
const ( // Read right gives access to retrieve the value. Read ACL = 0 // Update right gives access to update an already existing value. Update ACL = 1 // Set right gives access to create a new entity. Set ACL = 2 // Delete right gives access to delete an already existing entity. Delete ACL = 3 // Owner right gives access to all rights. Owner ACL = 4 )
type Token ¶
type Token struct { ID ulid.ID `json:"ID"` IP *net.UDPAddr `json:"-"` Account ulid.ID `json:"-"` Ping uint64 `json:"-"` CorePool ulid.ID `json:"-"` SyncPool ulid.ID `json:"-"` PC ulid.ID `json:"-"` Entity ulid.ID `json:"-"` }
Token represents a user connection. Creation is made by secure https only.
type TokenHCMapper ¶
type TokenHCMapper interface { SetTokenHC(ulid.ID, int64) error ListTokenHC(TokenHCSubset) ([]ulid.ID, error) }
TokenHCMapper is the service gate for Token health check.
type TokenHCSubset ¶
type TokenHCSubset struct {
MaxTS int64
}
TokenHCSubset retrieves token healthchecks based on last tick.
type TokenMapper ¶
type TokenMapper interface { SetToken(Token) error GetToken(TokenSubset) (Token, error) DelToken(TokenSubset) error }
TokenMapper is the service gate for Token resource.
Click to show internal directories.
Click to hide internal directories.