structs

package
v1.7.5 Latest Latest
Warning

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

Go to latest
Published: May 29, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AR2JSON

func AR2JSON(r *AccessTokenResp) []byte

func ARR2JSON

func ARR2JSON(r *AccessAndRefreshTokenResp) []byte

func EC2JSON

func EC2JSON(r *ExchangeCodeResponse) []byte

func ER2JSON

func ER2JSON(r *ErrorResp) []byte

func ID2JSON

func ID2JSON(id *IDResp) []byte

func U2JSON

func U2JSON(u *User) []byte

func UI2JSON

func UI2JSON(u *UserInfo) []byte

func UL2JSON

func UL2JSON(us *[]UserInfo) []byte

Types

type AccessAndRefreshTokenResp

type AccessAndRefreshTokenResp struct {
	AccessToken  string `json:"accessToken"`
	RefreshToken string `json:"refreshToken"`
}

type AccessTokenResp

type AccessTokenResp struct {
	AccessToken string `json:"accessToken"`
}

type AuthError

type AuthError struct {
	Msg    string
	Status int
}

AuthError simple error

func (AuthError) Error

func (e AuthError) Error() string

type ErrorResp

type ErrorResp struct {
	Error string `json:"error"`
}

type ExchangeCodeResponse

type ExchangeCodeResponse struct {
	Code string `json:"code"`
}

type IDResp

type IDResp struct {
	ID int64 `json:"id"`
}

type User

type User struct {
	ID            int64  `bson:"_id" xorm:"varchar(200)"`
	Username      string `bson:"username" xorm:"varchar(50)"`
	FirstName     string `bson:"firstName" xorm:"varchar(50)"`
	LastName      string `bson:"lastName" xorm:"varchar(50)"`
	Email         string `bson:"email" xorm:"varchar(50)"`
	Password      string `bson:"password" xorm:"varchar(60)"`
	InviteCode    string `bson:"inviteCode" xorm:"varchar(60)"`
	RecoveryCode  string `bson:"recoveryCode" xorm:"varchar(60)"`
	ResettingCode string `bson:"resettingCode" xorm:"varchar(60)"`
}

User structure

type UserInfo

type UserInfo struct {
	ID        int64  `json:"id"`
	Username  string `json:"username"`
	FirstName string `json:"firstName"`
	LastName  string `json:"lastName"`
	Email     string `json:"email"`
}

UserInfo structure

Jump to

Keyboard shortcuts

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