webapi

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteConfigRequest

type DeleteConfigRequest struct {
}

type DeleteConfigResponse

type DeleteConfigResponse struct {
}

type DeleteLogRequest

type DeleteLogRequest struct {
}

type DeleteLogResponse

type DeleteLogResponse struct {
}

type DeleteMetaRequest

type DeleteMetaRequest struct {
}

type DeleteMetaResponse

type DeleteMetaResponse struct {
}

type DeleteSessionRequest

type DeleteSessionRequest struct {
}

type DeleteSessionResponse

type DeleteSessionResponse struct {
}

type GetLogResponse

type GetLogResponse struct {
	ID       uint      `json:"id" validate:"required"`
	CreateAt time.Time `json:"created_at" validate:"required"`
	Level    uint32    `json:"level" validate:"required"`
	Func     string    `json:"func"`
	File     string    `json:"file" `
	Msg      string    `json:"msg" `
	Stack    string    `json:"stack"`
	Fields   string    `json:"fields" `
}

func GetLogs

func GetLogs(logs []model.Log) []GetLogResponse

type Meta

type Meta struct {
	Title string `json:"title" validate:"required"`
	Desc  string `json:"desc"`
}

type Notice

type Notice struct {
	ID    uint   `json:"id" validate:"required"`
	Title string `json:"title" validate:"required"`
	Text  string `json:"text" `
}

func GetNotice

func GetNotice(notice model.Notice) Notice

func GetNotices

func GetNotices(notices []model.Notice) []Notice

type Plan

type Plan struct {
	ID             uint   `json:"id" validate:"required"`
	Name           string `json:"name" validate:"required"`
	BandwidthLimit uint   `json:"bandwidth_limit" validate:"required"`
	TrafficLimit   uint   `json:"traffic_limit" validate:"required"`
}

func GetPlan

func GetPlan(plan model.Plan) Plan

func GetPlans

func GetPlans(plans []model.Plan) []Plan

type PostConfigRequest

type PostConfigRequest struct {
}

type PostConfigResponse

type PostConfigResponse struct {
}

type PostLogRequest

type PostLogRequest struct {
}

type PostLogResponse

type PostLogResponse struct {
}

type PostMetaRequest

type PostMetaRequest struct {
}

type PostMetaResponse

type PostMetaResponse struct {
}

type PostNoticeRequest

type PostNoticeRequest struct {
	Title string `json:"title" validate:"required"`
	Text  string `json:"text" `
}

type PostPlanRequest

type PostPlanRequest struct {
	Name           string `json:"name" validate:"required"`
	BandwidthLimit uint   `json:"bandwidth_limit" validate:"required"`
	TrafficLimit   uint   `json:"traffic_limit" validate:"required"`
}

type PostSessionRequest

type PostSessionRequest struct {
	Username string `json:"username" validate:"required"`
	Password string `json:"password" validate:"base64,required"`
}

type PostSessionResponse

type PostSessionResponse struct {
	OK       bool   `json:"ok"`
	ErrorMsg string `json:"errorMsg"`
}

type PostUserRequest

type PostUserRequest struct {
	Username string `json:"username" validate:"required"`
	Password string `json:"password" validate:"base64,required"`
	Captcha  string `json:"captcha" validate:"numeric,gte=0,lte=99999,required"`
}

type PostUserResponse

type PostUserResponse struct {
	OK       bool   `json:"ok"`
	ErrorMsg string `json:"errorMsg"`
}

type PutConfigRequest

type PutConfigRequest struct {
}

type PutConfigResponse

type PutConfigResponse struct {
}

type PutLogRequest

type PutLogRequest struct {
}

type PutLogResponse

type PutLogResponse struct {
}

type PutMetaRequest

type PutMetaRequest struct {
}

type PutMetaResponse

type PutMetaResponse struct {
}

type PutSessionRequest

type PutSessionRequest struct {
}

type PutSessionResponse

type PutSessionResponse struct {
}

type User

type User struct {
	ID                 uint      `json:"id" validate:"required"`
	Username           string    `json:"username" validate:"required"`
	Role               uint      `json:"role" validate:"required"`
	PlanID             uint      `json:"plan_id" validate:"required"`
	PlanName           string    `json:"plan_name" validate:"required"`
	PlanBandwidthLimit uint      `json:"plan_bandwidth_limit" validate:"required"`
	PlanTrafficLimit   uint      `json:"plan_traffic_limit" validate:"required"`
	TrafficUsed        uint      `json:"traffic_used" validate:"required"`
	PlanStart          time.Time `json:"plan_start" validate:"required"`
	PlanReset          time.Time `json:"plan_reset" validate:"required"`
	PlanEnd            time.Time `json:"plan_end" validate:"required"`
}

func GetUsers

func GetUsers(users []model.User) []User

Jump to

Keyboard shortcuts

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