data

package
v0.0.0-...-2fb4a12 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: MIT Imports: 2 Imported by: 0

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

type Achievements

type Achievements []*Achievement

Achievements is a collection of Achievement

Jump to

Keyboard shortcuts

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