web

package
v0.0.0-...-c160ba3 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRoutes

func AddRoutes(m *mux.Router)

func Captcha

func Captcha(w http.ResponseWriter, r *http.Request)

func CurrentUser

func CurrentUser(w http.ResponseWriter, r *http.Request)

func E400

func E400(w http.ResponseWriter, r *http.Request)

func E401

func E401(w http.ResponseWriter, r *http.Request)

func E403

func E403(w http.ResponseWriter, r *http.Request)

func E500

func E500(w http.ResponseWriter, r *http.Request)

func GetNotice

func GetNotice(w http.ResponseWriter, r *http.Request)

func GetRule

func GetRule(w http.ResponseWriter, r *http.Request)

func ListUsers

func ListUsers(w http.ResponseWriter, r *http.Request)

func Login

func Login(w http.ResponseWriter, r *http.Request)

func Logout

func Logout(w http.ResponseWriter, r *http.Request)

func Register

func Register(w http.ResponseWriter, r *http.Request)

Types

type Error

type Error struct {
	Data         map[string]interface{} `json:"data"`
	ErrorCode    string                 `json:"errorCode"`
	ErrorMessage string                 `json:"errorMessage"`
	Success      bool                   `json:"access"`
}

type Geographic

type Geographic struct {
	Provice Tag `json:"province"`
	City    Tag `json:"city"`
}

type LoginRequest

type LoginRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
	Type     string `json:"type"`
}

type Notice

type Notice struct {
	ID          string `json:"id"`
	Avatar      string `json:"avatar"`
	Description string `json:"description"`
	Extra       string `json:"extra"`
	Status      string `json:"status"`
	Datetime    string `json:"datetime"`
	Type        string `json:"type"`
	Title       string `json:"title"`
	Read        bool   `json:"read"`
	ClickClose  bool   `json:"ClickClose"`
}

type RuleList

type RuleList struct {
	Data    []RuleListItem `json:"data"`
	Total   int            `json:"total"`
	Success bool           `json:"success"`
}

type RuleListItem

type RuleListItem struct {
	Key       int    `json:"key"`
	Disabled  bool   `json:"disabled"`
	Href      string `json:"href"`
	Avatar    string `json:"avatar"`
	Name      string `json:"name"`
	Owner     string `json:"owner"`
	Desc      string `json:"desc"`
	CallNo    int    `json:"callNo"`
	Status    int    `json:"status"`
	UpdatedAt string `json:"updatedAt"`
	CreatedAt string `json:"createdAt"`
	Progress  int    `json:"progress"`
}

type Tag

type Tag struct {
	Key   string `json:"key"`
	Label string `json:"label"`
}

type User

type User struct {
	Name        string     `json:"name"`
	Avatar      string     `json:"avatar"`
	UserID      string     `json:"userid"`
	Email       string     `json:"email"`
	Signature   string     `json:"signature"`
	Title       string     `json:"title"`
	Group       string     `json:"group"`
	Tags        []Tag      `json:"tags"`
	NotifyCount int        `json:"notifyCount"`
	UnreadCount int        `json:"unreadCount"`
	Country     string     `json:"country"`
	Access      string     `json:"access"`
	Geographic  Geographic `json:"geographic"`
	Address     string     `json:"address"`
	Phone       string     `json:"phone"`
}

type UserInfo

type UserInfo struct {
	Key     string `json:"key"`
	Name    string `json:"name"`
	Age     int    `json:"age"`
	Address string `json:"address"`
}

Jump to

Keyboard shortcuts

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