models

package
v0.0.0-...-d66610b Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CasbinRule

type CasbinRule struct {
	PType string `gorm:"type:varchar(100);DEFAULT:NULL"`
	V0    string `gorm:"type:varchar(100);DEFAULT:NULL"`
	V1    string `gorm:"type:varchar(100);DEFAULT:NULL"`
	V2    string `gorm:"type:varchar(100);DEFAULT:NULL"`
	V3    string `gorm:"type:varchar(100);DEFAULT:NULL"`
	V4    string `gorm:"type:varchar(100);DEFAULT:NULL"`
	V5    string `gorm:"type:varchar(100);DEFAULT:NULL"`
}

func (CasbinRule) TableName

func (CasbinRule) TableName() string

type ChangePassword

type ChangePassword struct {
	CurrentPassword string `json:"current_password" form:"current_password" binding:"required" example:"password"` // รหัสผ่านปัจจุบัน
	NewPassword     string `json:"new_password" form:"new_password" binding:"required" example:"password123"`      // รหัสผ่านใหม่
}

type District

type District struct {
	gorm.Model
	Code       int    `json:"code" form:"code"`
	NameTH     string `json:"nameTH" form:"nameTH"`
	NameEN     string `json:"nameEN" form:"nameEN"`
	ProvinceID int    `json:"provinceID" form:"provinceID"`
}

func (District) Serialize

func (d District) Serialize() map[string]interface{}

type Profile

type Profile struct {
	gorm.Model
	UserId                     int        `json:"userId" form:"userId"  gorm:"unique_index;DEFAULT:null"`
	Status                     string     `json:"status" form:"status" sql:"type:enum('A','I');DEFAULT:'A'"`
	IsSpecialist               *bool      `json:"isSpecialist" form:"isSpecialist" gorm:"DEFAULT:false"`
	StatusReqform              string     `json:"statusReqform" form:"statusReqform" sql:"type:enum('edit','checking','verify','approved');DEFAULT:'checking'"`
	IdCard                     string     `json:"idCard" form:"idCard"`
	GovCard                    string     `json:"govCard" form:"govCard"`
	CardExpire                 *time.Time `json:"cardExpire" form:"cardExpire" gorm:"type:date"`
	PrefixName                 string     `json:"prefixName" form:"prefixName"`
	FirstName                  string     `json:"firstName" form:"firstName"`
	LastName                   string     `json:"lastName" form:"lastName"`
	BirthDate                  *time.Time `json:"birthDate" form:"birthDate" gorm:"type:date"`
	Race                       string     `json:"race" form:"race"`
	Nation                     string     `json:"nation" form:"nation"`
	DomicileNo                 string     `json:"domicileNo" form:"domicileNo"`
	DomicileMoo                string     `json:"domicileMoo" form:"domicileMoo"`
	DomicileSoi                string     `json:"domicileSoi" form:"domicileSoi"`
	DomicileRoad               string     `json:"domicileRoad" form:"domicileRoad"`
	DomicileProvince           int        `json:"domicileProvince" form:"domicileProvince"`
	DomicileDistrict           int        `json:"domicileDistrict" form:"domicileDistrict"`
	DomicileSubDistrict        int        `json:"domicileSubDistrict" form:"domicileSubDistrict"`
	DomicileZipcode            string     `json:"domicileZipcode" form:"domicileZipcode"`
	DomicileTel                string     `json:"domicileTel" form:"domicileTel"`
	DomicileFax                string     `json:"domicileFax" form:"domicileFax"`
	DomicileEmail              string     `json:"domicileEmail" form:"domicileEmail"`
	AddressNo                  string     `json:"addressNo" form:"addressNo"`
	AddressMoo                 string     `json:"addressMoo" form:"addressMoo"`
	AddressSoi                 string     `json:"addressSoi" form:"addressSoi"`
	AddressRoad                string     `json:"addressRoad" form:"addressRoad"`
	AddressSubDistrict         int        `json:"addressSubDistrict" form:"addressSubDistrict"`
	AddressDistrict            int        `json:"addressDistrict" form:"addressDistrict"`
	AddressProvince            int        `json:"addressProvince" form:"addressProvince"`
	AddressZipcode             string     `json:"addressZipcode" form:"addressZipcode"`
	AddressTel                 string     `json:"addressTel" form:"addressTel"`
	AddressFax                 string     `json:"addressFax" form:"addressFax"`
	AddressEmail               string     `json:"addressEmail" form:"addressEmail"`
	ContactNo                  string     `json:"contactNo" form:"contactNo"`
	ContactMoo                 string     `json:"contactMoo" form:"contactMoo"`
	ContactSoi                 string     `json:"contactSoi" form:"contactSoi"`
	ContactRoad                string     `json:"contactRoad" form:"contactRoad"`
	ContactSubDistrict         int        `json:"contactSubDistrict" form:"contactSubDistrict"`
	ContactDistrict            int        `json:"contactDistrict" form:"contactDistrict"`
	ContactProvince            int        `json:"contactProvince" form:"contactProvince"`
	ContactZipcode             string     `json:"contactZipcode" form:"contactZipcode"`
	ContactTel                 string     `json:"contactTel" form:"contactTel"`
	ContactFax                 string     `json:"contactFax" form:"contactFax"`
	ContactEmail               string     `json:"contactEmail" form:"contactEmail"`
	WorkOccupation             string     `json:"workOccupation" form:"workOccupation"`
	WorkPosition               string     `json:"workPosition" form:"workPosition"`
	WorkPlaces                 string     `json:"workPlaces" form:"workPlaces"`
	WorkRoad                   string     `json:"workRoad" form:"workRoad"`
	WorkSubDistrict            int        `json:"workSubDistrict" form:"workSubDistrict"`
	WorkDistrict               int        `json:"workDistrict" form:"workDistrict"`
	WorkProvince               int        `json:"workProvince" form:"workProvince"`
	WorkZipcode                string     `json:"workZipcode" form:"workZipcode"`
	WorkTel                    string     `json:"workTel" form:"workTel"`
	WorkFax                    string     `json:"workFax" form:"workFax"`
	WorkEmail                  string     `json:"workEmail" form:"workEmail"`
	BossFirstName              string     `json:"bossFirstName" form:"bossFirstName"`
	BossLastName               string     `json:"bossLastName" form:"bossLastName"`
	BossNo                     string     `json:"bossNo" form:"bossNo"`
	BossMoo                    string     `json:"bossMoo" form:"bossMoo"`
	BossSoi                    string     `json:"bossSoi" form:"bossSoi"`
	BossRoad                   string     `json:"bossRoad" form:"bossRoad"`
	BossSubDistrict            int        `json:"bossSubDistrict" form:"bossSubDistrict"`
	BossDistrict               int        `json:"bossDistrict" form:"bossDistrict"`
	BossProvince               int        `json:"bossProvince" form:"bossProvince"`
	BossZipcode                string     `json:"bossZipcode" form:"bossZipcode"`
	BossTel                    string     `json:"bossTel" form:"bossTel"`
	BossFax                    string     `json:"bossFax" form:"bossFax"`
	BossEmail                  string     `json:"bossEmail" form:"bossEmail"`
	WorkExperience             string     `json:"workExperience" form:"workExperience"`
	SplTypeID                  int        `json:"splTypeID" form:"splTypeID"`
	SplSubTypeID               int        `json:"splSubTypeID" form:"splSubTypeID"`
	RegisQualification         string     `json:"regisQualification" form:"regisQualification"`
	RegisDocument              string     `json:"regisDocument" form:"regisDocument"`
	RegisEver                  string     `json:"regisEver" form:"regisEver"`
	RegisEverYear              string     `json:"regisEverYear" form:"regisEverYear"`
	RegisEverPass              string     `json:"regisEverPass" form:"regisEverPass"`
	RegisEverPassNo            string     `json:"regisEverPassNo" form:"regisEverPassNo"`
	RegisEverNopass            string     `json:"regisEverNopass" form:"regisEverNopass"`
	RegisEverNopassDesc        string     `json:"regisEverNopassDesc" form:"regisEverNopassDesc"`
	FileAttachIdcardURL        string     `json:"fileAttachIdcardURL" form:"fileAttachIdcardURL"`
	FileAttachHouseURL         string     `json:"fileAttachHouseURL" form:"fileAttachHouseURL"`
	FileAttachGovCardURL       string     `json:"fileAttachGovCardURL" form:"fileAttachGovCardURL"`
	FileAttachQualificationURL string     `json:"fileAttachQualificationURL" form:"fileAttachQualificationURL"`
	Remark                     string     `json:"remark" form:"remark"`

	SplSubType SplSubType `json:"SplSubType" form:"SplSubType"`
}

func (Profile) Serialize

func (p Profile) Serialize() map[string]interface{}

func (Profile) SerializeList

func (p Profile) SerializeList() map[string]interface{}

type ProfileRequest

type ProfileRequest struct {
	UserId                  int                   `json:"userId" form:"userId"`
	Status                  string                `json:"status" form:"status"`
	IsSpecialist            *bool                 `json:"isSpecialist" form:"isSpecialist"`
	IdCard                  string                `json:"idCard" form:"idCard"`
	GovCard                 string                `json:"govCard" form:"govCard"`
	CardExpire              *time.Time            `json:"cardExpire" form:"cardExpire"`
	PrefixName              string                `json:"prefixName" form:"prefixName"`
	FirstName               string                `json:"firstName" form:"firstName"`
	LastName                string                `json:"lastName" form:"lastName"`
	BirthDate               *time.Time            `json:"birthDate" form:"birthDate"`
	Race                    string                `json:"race" form:"race"`
	Nation                  string                `json:"nation" form:"nation"`
	DomicileNo              string                `json:"domicileNo" form:"domicileNo"`
	DomicileMoo             string                `json:"domicileMoo" form:"domicileMoo"`
	DomicileSoi             string                `json:"domicileSoi" form:"domicileSoi"`
	DomicileRoad            string                `json:"domicileRoad" form:"domicileRoad"`
	DomicileProvince        int                   `json:"domicileProvince" form:"domicileProvince"`
	DomicileDistrict        int                   `json:"domicileDistrict" form:"domicileDistrict"`
	DomicileSubDistrict     int                   `json:"domicileSubDistrict" form:"domicileSubDistrict"`
	DomicileZipcode         string                `json:"domicileZipcode" form:"domicileZipcode"`
	DomicileTel             string                `json:"domicileTel" form:"domicileTel"`
	DomicileFax             string                `json:"domicileFax" form:"domicileFax"`
	DomicileEmail           string                `json:"domicileEmail" form:"domicileEmail"`
	AddressNo               string                `json:"addressNo" form:"addressNo"`
	AddressMoo              string                `json:"addressMoo" form:"addressMoo"`
	AddressSoi              string                `json:"addressSoi" form:"addressSoi"`
	AddressRoad             string                `json:"addressRoad" form:"addressRoad"`
	AddressSubDistrict      int                   `json:"addressSubDistrict" form:"addressSubDistrict"`
	AddressDistrict         int                   `json:"addressDistrict" form:"addressDistrict"`
	AddressProvince         int                   `json:"addressProvince" form:"addressProvince"`
	AddressZipcode          string                `json:"addressZipcode" form:"addressZipcode"`
	AddressTel              string                `json:"addressTel" form:"addressTel"`
	AddressFax              string                `json:"addressFax" form:"addressFax"`
	AddressEmail            string                `json:"addressEmail" form:"addressEmail"`
	ContactNo               string                `json:"contactNo" form:"contactNo"`
	ContactMoo              string                `json:"contactMoo" form:"contactMoo"`
	ContactSoi              string                `json:"contactSoi" form:"contactSoi"`
	ContactRoad             string                `json:"contactRoad" form:"contactRoad"`
	ContactSubDistrict      int                   `json:"contactSubDistrict" form:"contactSubDistrict"`
	ContactDistrict         int                   `json:"contactDistrict" form:"contactDistrict"`
	ContactProvince         int                   `json:"contactProvince" form:"contactProvince"`
	ContactZipcode          string                `json:"contactZipcode" form:"contactZipcode"`
	ContactTel              string                `json:"contactTel" form:"contactTel"`
	ContactFax              string                `json:"contactFax" form:"contactFax"`
	ContactEmail            string                `json:"contactEmail" form:"contactEmail"`
	WorkOccupation          string                `json:"workOccupation" form:"workOccupation"`
	WorkPosition            string                `json:"workPosition" form:"workPosition"`
	WorkPlaces              string                `json:"workPlaces" form:"workPlaces"`
	WorkRoad                string                `json:"workRoad" form:"workRoad"`
	WorkSubDistrict         int                   `json:"workSubDistrict" form:"workSubDistrict"`
	WorkDistrict            int                   `json:"workDistrict" form:"workDistrict"`
	WorkProvince            int                   `json:"workProvince" form:"workProvince"`
	WorkZipcode             string                `json:"workZipcode" form:"workZipcode"`
	WorkTel                 string                `json:"workTel" form:"workTel"`
	WorkFax                 string                `json:"workFax" form:"workFax"`
	WorkEmail               string                `json:"workEmail" form:"workEmail"`
	BossFirstName           string                `json:"bossFirstName" form:"bossFirstName"`
	BossLastName            string                `json:"bossLastName" form:"bossLastName"`
	BossNo                  string                `json:"bossNo" form:"bossNo"`
	BossMoo                 string                `json:"bossMoo" form:"bossMoo"`
	BossSoi                 string                `json:"bossSoi" form:"bossSoi"`
	BossRoad                string                `json:"bossRoad" form:"bossRoad"`
	BossSubDistrict         int                   `json:"bossSubDistrict" form:"bossSubDistrict"`
	BossDistrict            int                   `json:"bossDistrict" form:"bossDistrict"`
	BossProvince            int                   `json:"bossProvince" form:"bossProvince"`
	BossZipcode             string                `json:"bossZipcode" form:"bossZipcode"`
	BossTel                 string                `json:"bossTel" form:"bossTel"`
	BossFax                 string                `json:"bossFax" form:"bossFax"`
	BossEmail               string                `json:"bossEmail" form:"bossEmail"`
	WorkExperience          string                `json:"workExperience" form:"workExperience"`
	SplTypeID               int                   `json:"splTypeID" form:"splTypeID"`
	SplSubTypeID            int                   `json:"splSubTypeID" form:"splSubTypeID"`
	RegisQualification      string                `json:"regisQualification" form:"regisQualification"`
	RegisDocument           string                `json:"regisDocument" form:"regisDocument"`
	RegisEver               string                `json:"regisEver" form:"regisEver"`
	RegisEverYear           string                `json:"regisEverYear" form:"regisEverYear"`
	RegisEverPass           string                `json:"regisEverPass" form:"regisEverPass"`
	RegisEverPassNo         string                `json:"regisEverPassNo" form:"regisEverPassNo"`
	RegisEverNopass         string                `json:"regisEverNopass" form:"regisEverNopass"`
	RegisEverNopassDesc     string                `json:"regisEverNopassDesc" form:"regisEverNopassDesc"`
	FileAttachIdcard        *multipart.FileHeader `json:"fileAttachIdcard" form:"fileAttachIdcard"`
	FileAttachHouse         *multipart.FileHeader `json:"fileAttachHouse" form:"fileAttachHouse"`
	FileAttachGovCard       *multipart.FileHeader `json:"fileAttachGovCard" form:"fileAttachGovCard"`
	FileAttachQualification *multipart.FileHeader `json:"fileAttachQualification" form:"fileAttachQualification"`
	Remark                  string                `json:"remark" form:"remark"`
}

type Province

type Province struct {
	gorm.Model
	Code   int    `json:"code" form:"code"`
	NameTH string `json:"nameTH" form:"nameTH"`
	NameEN string `json:"nameEN" form:"nameEN"`
}

func (Province) Serialize

func (p Province) Serialize() map[string]interface{}

type RegisterUser

type RegisterUser struct {
	Username  string `json:"username" form:"username"  binding:"required,min=6,max=50"`
	Password  string `json:"password" form:"password"  binding:"required,min=6,max=20"`
	FirstName string `json:"firstName" form:"firstName"  binding:"required"`
	LastName  string `json:"lastName" form:"lastName"  binding:"required"`
	Email     string `json:"email" form:"email"  binding:"required,email"`
}

type Role

type Role struct {
	gorm.Model
	Name        string `json:"name" gorm:"unique" example:"user"`
	NameTH      string `json:"nameTh" example:"ผู้ใช้งานทั่วไป"`
	Description string `json:"description" example:"Only for standard users"`
}

func (Role) Serialize

func (r Role) Serialize() map[string]interface{}

type SplSubType

type SplSubType struct {
	gorm.Model
	NameTH    string `json:"nameTH" form:"nameTH"`
	NameEN    string `json:"nameEN" form:"nameEN"`
	SplTypeID int    `json:"splTypeID" form:"splTypeID"`

	SplType SplType `json:"splType" form:"splType"`
}

func (SplSubType) Serialize

func (s SplSubType) Serialize() map[string]interface{}

type SplType

type SplType struct {
	gorm.Model
	NameTH string `json:"nameTH" form:"nameTH"`
	NameEN string `json:"nameEN" form:"nameEN"`
}

func (SplType) Serialize

func (s SplType) Serialize() map[string]interface{}

type Status

type Status struct {
	gorm.Model
	Code string `json:"shortName" form:"shortName" gorm:"type:varchar(1);not null"`
	Name string `json:"status" form:"status" gorm:"type:varchar(50);not null"`
}

type SubDistrict

type SubDistrict struct {
	gorm.Model
	Code       int    `json:"code" form:"code"`
	NameTH     string `json:"nameTH" form:"nameTH"`
	NameEN     string `json:"nameEN" form:"nameEN"`
	ZipCode    int    `json:"zipCode" form:"zipCode"`
	DistrictID int    `json:"districtID" form:"districtID"`
}

func (SubDistrict) Serialize

func (s SubDistrict) Serialize() map[string]interface{}

type SwagChangePasswordResponse

type SwagChangePasswordResponse struct {
	Success bool        `json:"success" example:"true"`                         // ผลการเรียกใช้งาน
	Message string      `json:"message" example:"Change Password Successfully"` // ข้อความตอบกลับ
	Data    interface{} `json:"data" `                                          // ข้อมูล
}

type SwagCreateBase

type SwagCreateBase struct {
	Success bool   `json:"success" example:"true"`                 // ผลการเรียกใช้งาน
	Message string `json:"message" example:"Created Successfully"` // ข้อความตอบกลับ
}

type SwagCreateUserResponse

type SwagCreateUserResponse struct {
	SwagCreateBase
	Data SwagUser `json:"data"`
}

type SwagDeleteBase

type SwagDeleteBase struct {
	Success bool        `json:"success" example:"true"`                 // ผลการเรียกใช้งาน
	Message string      `json:"message" example:"Deleted Successfully"` // ข้อความตอบกลับ
	Data    interface{} `json:"data" `                                  // ข้อมูล
}

type SwagError400

type SwagError400 struct {
	Success bool        `json:"success" example:"false"`       // ผลการเรียกใช้งาน
	Message string      `json:"message" example:"Bad Request"` // ข้อความตอบกลับ
	Data    interface{} `json:"data" `                         // ข้อมูล
}

type SwagError404

type SwagError404 struct {
	Success bool        `json:"success" example:"false"`     // ผลการเรียกใช้งาน
	Message string      `json:"message" example:"Not Found"` // ข้อความตอบกลับ
	Data    interface{} `json:"data" `                       // ข้อมูล
}

type SwagError500

type SwagError500 struct {
	Success bool        `json:"success" example:"false"`                 // ผลการเรียกใช้งาน
	Message string      `json:"message" example:"Internal Server Error"` // ข้อความตอบกลับ
	Data    interface{} `json:"data" `                                   // ข้อมูล
}

type SwagGetAllUsersResponse

type SwagGetAllUsersResponse struct {
	SwagGetBase
	Data     []SwagUser   `json:"data"`
	PageMeta SwagPageMeta `json:"pageMeta"`
}

type SwagGetBase

type SwagGetBase struct {
	Success bool   `json:"success" example:"true"`       // ผลการเรียกใช้งาน
	Message string `json:"message" example:"Data Found"` // ข้อความตอบกลับ
}

type SwagGetRoleResponse

type SwagGetRoleResponse struct {
	SwagGetBase
	Data Role `json:"data"`
}

type SwagGetUserResponse

type SwagGetUserResponse struct {
	SwagGetBase
	Data SwagUser `json:"data"`
}

type SwagID

type SwagID struct {
	ID uint `json:"id" example:"1"` // ID
}

type SwagLogin

type SwagLogin struct {
	Success bool     `json:"success" example:"true"`                        // ผลการเรียกใช้งาน
	Message string   `json:"message" example:"User logged in successfully"` // ข้อความตอบกลับ
	Token   string   `json:"token" example:"eyJhbGciOiJIUzI1NiIsI"`         // token
	Data    SwagUser `json:"data" `
}

type SwagPageMeta

type SwagPageMeta struct {
	CurrentItemsCount int    `json:"currentItemsCount" example:"1"`
	CurrentPageNumber int    `json:"currentPageNumber" example:"1"`
	HasNextPage       bool   `json:"hasNextPage" example:"false"`
	HasPrevPage       bool   `json:"hasPrevPage" example:"false"`
	NextPageNumber    int    `json:"nextPageNumber" example:"1"`
	NextPageUrl       string `json:"nextPageUrl" example:"/api/v1/users/addresses?page=1&pageSize=10"`
	Offset            int    `json:"offset" example:"0"`
	PrevPageNumber    int    `json:"prevPageNumber" example:"1"`
	PrevPageUrl       string `json:"prevPageUrl" example:"/api/v1/users/addresses?page=1&pageSize=10"`
	RequestedPageSize int    `json:"requestedPageSize" example:"10"`
	TotalPagesCount   int    `json:"totalPagesCount" example:"1"`
	TotalItemsCount   int    `json:"totalItemsCount" example:"1"`
}

type SwagUpdateBase

type SwagUpdateBase struct {
	Success bool   `json:"success" example:"true"`                 // ผลการเรียกใช้งาน
	Message string `json:"message" example:"Updated Successfully"` // ข้อความตอบกลับ
}

type SwagUpdateUserResponse

type SwagUpdateUserResponse struct {
	SwagUpdateBase
	Data SwagUser `json:"data"`
}

type SwagUploadAvatarResponse

type SwagUploadAvatarResponse struct {
	Success bool        `json:"success" example:"true"`                         // ผลการเรียกใช้งาน
	Message string      `json:"message" example:"Uploaded Avatar Successfully"` // ข้อความตอบกลับ
	Data    interface{} `json:"data" `                                          // ข้อมูล
}

type SwagUser

type SwagUser struct {
	SwagID
	SwagUserBody
}

type SwagUserBody

type SwagUserBody struct {
	Username  string `json:"username" example:"user01"`        // Username
	FirstName string `json:"firstName" example:"john"`         // ชื่อ
	LastName  string `json:"lastName" example:"doe"`           // นามสกุล
	Email     string `json:"email" example:"user01@email.com"` // อีเมล์
	Slug      string `json:"slug" example:"user01"`            // Slug
	Avatar    string `json:"avatar" example:"user01.png"`      // รูป Avatar
}

type SwagUserBodyIncludePassword

type SwagUserBodyIncludePassword struct {
	SwagUserBody
	SwagUserPassword
}

type SwagUserPassword

type SwagUserPassword struct {
	Password string `json:"password" example:"pass1234"` // รหัสผ่าน
}

type UploadAvatar

type UploadAvatar struct {
	Avatar string `json:"avatar" form:"avatar" binding:"required" example:"avatar.png"` // รูปภาพ
}

type User

type User struct {
	gorm.Model
	Username  string `json:"username" form:"username" gorm:"type:varchar(50);not null;unique_index" binding:"required,min=6,max=50"`
	Password  string `json:"password" form:"password" gorm:"not null" binding:"required,min=6,max=20"`
	FirstName string `json:"firstName" form:"firstName" gorm:"type:varchar(100);not null" binding:"required"`
	LastName  string `json:"lastName" form:"lastName" gorm:"type:varchar(100);not null" binding:"required"`
	Email     string `json:"email" form:"email" gorm:"type:varchar(100);unique_index" binding:"required,email"`
	Slug      string `json:"slug" form:"slug" uri:"slug"  gorm:"type:varchar(50);unique_index"`
	Status    string `json:"status" form:"status" sql:"type:enum('A','I');DEFAULT:'A'"`
	Avatar    string `json:"avatar" form:"avatar"`
	RoleID    int    `json:"roleId" form:"roleId"`

	Role    Role `json:"role" `
	Profile Profile
}

func (*User) BeforeSave

func (u *User) BeforeSave(db *gorm.DB) (err error)

func (*User) GenerateJwtToken

func (u *User) GenerateJwtToken() string

GenerateJwtToken -- Generate JWT token associated to this user

func (*User) GetUserStatusAsString

func (user *User) GetUserStatusAsString() string

func (*User) IsAdmin

func (user *User) IsAdmin() bool

func (*User) IsNotAdmin

func (user *User) IsNotAdmin() bool

func (*User) IsStaff

func (user *User) IsStaff() bool

func (User) Serialize

func (u User) Serialize() map[string]interface{}

Jump to

Keyboard shortcuts

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