defs

package
v0.0.0-...-6d0f0b9 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorRequestBodyParseFailed = ErrorRespones{HttpSC: 400, Error: Err{Error: "Request body is not correct", ErrorCode: "001"}}
	ErrorNotAuthUser            = ErrorRespones{HttpSC: 401, Error: Err{Error: "user authentication failed", ErrorCode: "002"}}
)

Functions

This section is empty.

Types

type ArticleInfo

type ArticleInfo struct {
	Id           string
	AuthorId     int
	Name         string
	DisplayCtime string
	Contents     string
	Title        string
}

type Comment

type Comment struct {
	ArticleId string
	AuthorId  int

	DisplayCtime string
	// contains filtered or unexported fields
}

type Err

type Err struct {
	Error     string `json:"error"`
	ErrorCode string `json:"error_code"` // 系统内的err非webstatus
}

type ErrorRespones

type ErrorRespones struct {
	HttpSC int
	Error  Err
}

type SignClaim

type SignClaim struct {
	User          string `json:"user"`
	Addr          string `json:"addr"`
	AuthLevel     int    `json:"auth_lv"`
	SystemLevel   int    `json:"system_lv"`
	SecurityLevel int    `json:"security_lv"`
	jwt.StandardClaims
}

type SimpleSession

type SimpleSession struct {
	UserName string
	TTL      int64
}

type UserCredential

type UserCredential struct {
	// 反点代表tag,解析时会自动转换json
	UID      string `json:"uid"`
	Username string `json:"user_name"`
	Pwd      string `json:"pwd"`
	Email    string `json:"email"`
	Phone    string `json:"phone"`
	Token    string `json:"token"`
}

requests

Jump to

Keyboard shortcuts

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