Documentation ¶
Index ¶
Constants ¶
View Source
const ( TenantDefault = "Default" TIDDefault = "1" TenantCommon = "Common" TIDCommon = "99" Expiration = 120 ExpirationHour = 24 ADMIN = 1 MANAGER = 2 SUPERVISOR = 3 OPERATOR = 4 AGENT = 5 STAFF = 6 USER = 99 )
View Source
const ( UserStatusNotActive = 1 UserStatusActive = 2 UserStatusSuspend = 3 UserStatusOnlyName = 4 UserColl = "user" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomClaims ¶
type CustomClaims struct { UserID string `json:"userid"` TID string `json:"tid"` Role int `json:"role"` jwt.StandardClaims }
type LoginRequest ¶
type LoginResponse ¶
type LoginResponse struct { ID string `json:"id" bson:"_id"` Username string `json:"username" bson:"username"` Name string `json:"name" bson:"name"` Role int `json:"role" bson:"role"` Image string `json:"image" bson:"image"` Active int `json:"active" bson:"active"` TID string `json:"tid" bson:"tid"` Token string `json:"token" bson:"token"` }
type RegMailResponse ¶
type SearchRequest ¶
type User ¶
type User struct { ID string `json:"id" bson:"_id"` Username string `json:"username" bson:"username"` Password string `json:"-" bson:"password"` Name string `json:"name" bson:"name"` Role int `json:"role" bson:"role"` Image string `json:"image" bson:"image"` Active int `json:"active" bson:"active"` Verified int `json:"verified" bson:"verified"` RegBy string `json:"regby" bson:"regby"` TID string `json:"tid" bson:"tid"` Created time.Time `json:"created" bson:"created"` Updated time.Time `json:"updated" bson:"updated"` }
type UserFindRequest ¶
type UserFindRequest struct {
Username string
}
type UserRequest ¶
type UserRequest struct { Username string `json:"username" bson:"username"` Password string `json:"password" bson:"password"` Name string `json:"name" bson:"name"` Role int `json:"role" bson:"role"` Image string `json:"image" bson:"image"` Active int `json:"active" bson:"active"` RegBy string `json:"regby" bson:"regby"` TID string `json:"tid" bson:"tid"` }
type UserSearchRequest ¶
type UserSearchRequest struct { Limit int Page int Sortby string `json:"sortby,omitempty"` Order string `json:"order,omitempty"` TID string `json:"tid,omitempty"` Username string `json:"username,omitempty"` Name string `json:"name,omitempty"` Role int `json:"role,omitempty"` Active int `json:"active,omitempty"` Verified int `json:"verified,omitempty"` RegBy string `json:"regby,omitempty"` }
Click to show internal directories.
Click to hide internal directories.