admin

package
v0.0.0-...-fb119ec Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Accepted

func Accepted(c *gin.Context)

func BadRequest

func BadRequest(c *gin.Context)

func CreateGame

func CreateGame(c *gin.Context)

func CreateUpdateUserGame

func CreateUpdateUserGame(c *gin.Context)

func CreateUser

func CreateUser(c *gin.Context)

func DeleteGame

func DeleteGame(c *gin.Context)

func DeleteUser

func DeleteUser(c *gin.Context)

func DeleteUserGame

func DeleteUserGame(c *gin.Context)

func InternalServerError

func InternalServerError(c *gin.Context, err error, message string)

func Ok

func Ok(c *gin.Context)

func OkWithData

func OkWithData(c *gin.Context, data interface{})

func ReadGame

func ReadGame(c *gin.Context)

func ReadUser

func ReadUser(c *gin.Context)

func UpdateGame

func UpdateGame(c *gin.Context)

func UpdateUser

func UpdateUser(c *gin.Context)

Types

type Game

type Game struct {
	Id       bson.ObjectId `bson:"_id,omitempty" json:"_id,omitempty"`
	Name     string        `form:"name" json:"name" binding:"required"`
	Route    string        `form:"route" json:"route" binding:"required"`
	Url      string        `form:"url" json:"url" binding:"required"`
	IsSystem bool          `form:"is-system" json:"isSystem" bson:"isSystem,omitempty"`
}

type User

type User struct {
	Username string              `json:"username"`
	MaxWords int                 `json:"maxWords"`
	Games    map[string]UserGame `json:"userGames"`
}

type UserForm

type UserForm struct {
	Id       string `form:"id"`
	Username string `form:"username"`
	MaxWords int    `form:"max-words"`
}

type UserGame

type UserGame struct {
	Game    string      `json:"game"`
	Weight  int         `json:"weight"`
	Options interface{} `json:"options"`
}

type UserGameForm

type UserGameForm struct {
	UserId  string      `form:"user-id" binding:"required"`
	Game    string      `form:"game" binding:"required"`
	Weight  int         `form:"weight"`
	Options interface{} `form:"options"`
}

Jump to

Keyboard shortcuts

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