Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorAchievementNotFound = fmt.Errorf("Achievement not found")
ErrorAchievementNotFound : Achievement specific errors
Functions ¶
This section is empty.
Types ¶
type Achievement ¶
type Achievement struct { ID string `json:"id" bson:"_id"` Name string `json:"name" validate:"required"` Description string `json:"description"` Condition string `json:"condition" validate:"required"` SpriteID string `json:"sprite_id"` CreatedOn string `json:"-"` UpdatedOn string `json:"-"` }
Achievement defines the structure for an API achievement. Formatting done with json tags to the right. "-" : don't include when encoding to json
func (*Achievement) ValidateAchievement ¶
func (achievement *Achievement) ValidateAchievement() error
ValidateAchievement a achievement with json validation
Click to show internal directories.
Click to hide internal directories.