zo

package
v0.0.0-...-42c4776 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Routes = map[myrouter.RouteKey]func(w http.ResponseWriter, r *http.Request, ps common.QueryMap){
	{Path: "/api/v2/me/zos", Method: http.MethodGet, NeedAuth: true}:           hfs.Finds,
	{Path: "/api/v2/me/zos/:zo_id", Method: http.MethodGet, NeedAuth: true}:    hf.Find,
	{Path: "/api/v2/me/zos", Method: http.MethodPost, NeedAuth: true}:          hc.Create,
	{Path: "/api/v2/me/zos/:zo_id", Method: http.MethodPut, NeedAuth: true}:    hu.Update,
	{Path: "/api/v2/me/zos/:zo_id", Method: http.MethodDelete, NeedAuth: true}: hd.Delete,
}

Functions

This section is empty.

Types

type Create

type Create interface {
	Create(w http.ResponseWriter, r *http.Request, ps common.QueryMap)
}

func NewCreate

func NewCreate(uc u.Create) Create

type Delete

type Delete interface {
	Delete(w http.ResponseWriter, r *http.Request, ps common.QueryMap)
}

func NewDelete

func NewDelete(uc u.Delete) Delete

type Find

type Find interface {
	Find(w http.ResponseWriter, r *http.Request, ps common.QueryMap)
}

func NewFind

func NewFind(uc u.Find) Find

type Finds

type Finds interface {
	Finds(w http.ResponseWriter, r *http.Request, ps common.QueryMap)
}

func NewFinds

func NewFinds(uc u.Finds) Finds

type PostRequest

type PostRequest struct {
	AchievementDate time.Time `json:"achievementdate"`
	Exp             int       `json:"exp"`
	CategoryId      int       `json:"category_id"`
	Message         string    `json:"message"`
}

type PostResponse

type PostResponse struct {
	*myhttp.ResponseBase
	Zo Zo `json:"zo"`
}

func NewZoResponse

func NewZoResponse(res *myhttp.ResponseBase, zo d.Zo) *PostResponse

type SimpleResponse

type SimpleResponse struct {
	*myhttp.ResponseBase
}

func NewSimpleResponse

func NewSimpleResponse(res *myhttp.ResponseBase) *SimpleResponse

type Update

type Update interface {
	Update(w http.ResponseWriter, r *http.Request, ps common.QueryMap)
}

func NewUpdate

func NewUpdate(uc u.Update) Update

type Zo

type Zo struct {
	Id              int          `json:"id"`
	AchievementDate time.Time    `json:"achievementdate"`
	Exp             int          `json:"exp"`
	CategoryId      int          `json:"category_id"`
	Message         string       `json:"message"`
	CreatedAt       time.Time    `json:"createdat"`
	UpdatedAt       sql.NullTime `json:"updatedat"`
	UserId          int          `json:"user_id"`
}

func ToResponse

func ToResponse(zo d.Zo) Zo

type ZosResponse

type ZosResponse struct {
	*myhttp.ResponseBase
	Zos []Zo `json:"zos"`
}

func NewZosResponse

func NewZosResponse(res *myhttp.ResponseBase, zos []d.Zo) *ZosResponse

Jump to

Keyboard shortcuts

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