admin

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRouter

func RegisterRouter(g *gin.RouterGroup)

Types

type Handler

type Handler struct {
}

func (*Handler) Add

func (*Handler) Add() gin.HandlerFunc

func (*Handler) Delete

func (*Handler) Delete() gin.HandlerFunc

func (*Handler) List

func (*Handler) List() gin.HandlerFunc

type RAdmin

type RAdmin struct {
	ID       uint   `json:"user_id"`
	Username string `json:"username"`
}

func BindAdmin

func BindAdmin(u *cpt.User) *RAdmin

func BindList

func BindList(users []cpt.User) []*RAdmin

type ReqAdd

type ReqAdd struct {
	UsersID []uint `json:"users_id"`
}

type ReqDelete

type ReqDelete struct {
	UsersID []uint `json:"users_id"`
}

type RespAdd

type RespAdd struct {
	Response
	Details []*RespAddDeleteDetail `json:"details"`
}

type RespAddDeleteDetail

type RespAddDeleteDetail struct {
	Response
	UserID uint `json:"user_id"`
}

type RespDelete

type RespDelete struct {
	Response
	Details []*RespAddDeleteDetail `json:"details"`
}

type RespList

type RespList struct {
	Response
	Admins []*RAdmin `json:"admins"`
}

Jump to

Keyboard shortcuts

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