Documentation
¶
Index ¶
Constants ¶
View Source
const ( TokenTypeAccess = "access" TokenTypeRefresh = "refresh" )
View Source
const (
RoleUser = "user"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Note ¶
type Note struct { mgm.DefaultModel `bson:",inline"` Author primitive.ObjectID `json:"author" bson:"author"` Title string `json:"title" bson:"title"` Content string `json:"content" bson:"content"` }
func (*Note) CollectionName ¶
type Token ¶
type Token struct { mgm.DefaultModel `bson:",inline"` User primitive.ObjectID `json:"user" bson:"user"` Token string `json:"token" bson:"token"` Type string `json:"type" bson:"type"` ExpiresAt time.Time `json:"expires_at" bson:"expires_at"` Blacklisted bool `json:"blacklisted" bson:"blacklisted"` }
func (*Token) CollectionName ¶
func (*Token) GetResponseJson ¶
type User ¶
type User struct { mgm.DefaultModel `bson:",inline"` Email string `json:"email" bson:"email"` Password string `json:"-" bson:"password"` Name string `json:"name" bson:"name"` Role string `json:"role" bson:"role"` MailVerified bool `json:"mail_verified" bson:"mail_verified"` }
func (*User) CollectionName ¶
type UserClaims ¶
Click to show internal directories.
Click to hide internal directories.