Documentation ¶
Index ¶
Constants ¶
View Source
const MicroserviceUserPath = "http://microservice-user:9090"
Variables ¶
View Source
var ErrorCharacterNotFound = fmt.Errorf("character not found")
Character specific errors
View Source
var ErrorUserNotFound = fmt.Errorf("user not found")
ErrorUserNotFound : User specific errors
Functions ¶
This section is empty.
Types ¶
type Character ¶
type Character struct { ID string `json:"id" bson:"_id"` UserID string `json:"user_id" bson:"user_id" validate:"required"` Name string `json:"name" validate:"required,name"` Alive bool `json:"alive"` GamesWon int `json:"games_won" bson:"games_won"` GamesPlayed int `json:"games_played" bson:"games_played"` EnemiesKilled int `json:"enemies_killed" bson:"enemies_killed"` CreatedOn string `json:"created_on" bson:"created_on"` UpdatedOn string `json:"updated_on" bson:"updated_on"` }
Character defines the structure for an API character.
func (*Character) ValidateCharacter ¶
Click to show internal directories.
Click to hide internal directories.