auth

package
v0.0.0-...-e3fbaf4 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credential

type Credential struct {
	Id          primitive.ObjectID `json:"_id" bson:"_id,omitempty"`
	UserId      string             `json:"user_id" bson:"user_id"`
	RoleCode    int                `json:"role_code" bson:"role_code"`
	AccessToken string             `json:"access_token" bson:"access_token"`
	CreatedAt   time.Time          `json:"created_at" bson:"created_at"`
	UpdatedAt   time.Time          `json:"updated_at" bson:"updated_at"`
}

type CredentialRes

type CredentialRes struct {
	Id          string    `json:"_id" bson:"_id,omitempty"`
	UserId      string    `json:"user_id" bson:"user_id"`
	RoleCode    int       `json:"role_code" bson:"role_code"`
	AccessToken string    `json:"access_token" bson:"access_token"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

type InsertUserRole

type InsertUserRole struct {
	UserId   string `json:"user_id" validate:"required"`
	RoleCode []int  `json:"role_id" validate:"required"`
}

type ProfileIntercepter

type ProfileIntercepter struct {
	*user.UserProfile
	Credential *CredentialRes `json:"credential"`
}

type RefreshTokenReq

type RefreshTokenReq struct {
	RefreshToken string `json:"refresh_token" form:"refresh_token" validate:"required.max=500"`
}

type Role

type Role struct {
	Id    primitive.ObjectID `json:"_id" bson:"_id,omitempty"`
	Title string             `json:"title" bson:"title"`
	Code  int                `json:"code" bson:"code"`
}

type UserLoginReq

type UserLoginReq struct {
	Email    string `json:"email" form:"email" validate:"required,email,max=255"`
	Password string `json:"password" form:"password" validate:"required,max=32"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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