Documentation ¶
Index ¶
- type Database
- type DatabaseHandle
- type KingRequest
- type Server
- func (s *Server) ClashKings(ctx context.Context, scenario *gotKings.Scenario) (result *gotKings.GOTResult, err error)
- func (s *Server) GetCharacter(ctx context.Context, charReq *gotKings.CharacterReq) (charInfo *gotKings.CharacterInfo, err error)
- func (s *Server) GetHistory(ctx context.Context, format *gotKings.BoolResult) (result *gotKings.ScenarioResult, err error)
- func (s *Server) MakeKing(ctx context.Context, charInfo *gotKings.CharacterInfo) (success *gotKings.BoolResult, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatabaseHandle ¶
DatabaseHandle attempt to abstract all the low level functionality of dealing with the database connection
func (*DatabaseHandle) Connect ¶
func (db *DatabaseHandle) Connect(dbAddress string) error
Connect attempts to connect to the providecd dbName and dbAddress
type KingRequest ¶
type KingRequest struct {
// contains filtered or unexported fields
}
type Server ¶
type Server struct {
DBHandle *DatabaseHandle
}
Server is the entry point for creating the handler for user game of thrones requests
func (*Server) ClashKings ¶
func (s *Server) ClashKings(ctx context.Context, scenario *gotKings.Scenario) (result *gotKings.GOTResult, err error)
ClashKings attempts to make 2 kings attack each other which will determine what happens to them
func (*Server) GetCharacter ¶
func (s *Server) GetCharacter(ctx context.Context, charReq *gotKings.CharacterReq) (charInfo *gotKings.CharacterInfo, err error)
GetCharacter returns information on a given king
func (*Server) GetHistory ¶
func (s *Server) GetHistory(ctx context.Context, format *gotKings.BoolResult) (result *gotKings.ScenarioResult, err error)
GetHistory attempts to retreive the kings action history
func (*Server) MakeKing ¶
func (s *Server) MakeKing(ctx context.Context, charInfo *gotKings.CharacterInfo) (success *gotKings.BoolResult, err error)
MakeKing is the entry to creating a new Westeros King
Click to show internal directories.
Click to hide internal directories.