models

package
v0.0.0-...-476e770 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	UserAuthErrorUserNotVerified = "Auth/usersNotVerifide"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangePasswordModel

type ChangePasswordModel struct {
	CurrentPassword string `json:"currentPassword"`
	NewPassword     string `json:"newPassword"`
	ConfirmPassword string `json:"confirmPassword"`
}

type CreateMultipleSettingsModel

type CreateMultipleSettingsModel struct {
	List []CreateSettingGroupModel `json:"list"`
}

type CreateResetPassLinkModel

type CreateResetPassLinkModel struct {
	Email string `json:"email"`
}

type CreateSettingGroupModel

type CreateSettingGroupModel struct {
	Type string                  `json:"type"`
	List []SettingGroupItemModel `json:"list"`
}

type CreateVerifyTokenTokenModel

type CreateVerifyTokenTokenModel struct {
	Code      string `json:"code"`
	Token     string `json:"token"`
	Recaptcha string `json:"g-recaptcha-response"`
}

type GetSettingsModel

type GetSettingsModel struct {
	Type    string      `json:"type"`
	UserIds []uuid.UUID `json:"userIds"`
}

type LoginModel

type LoginModel struct {
	Username     string `bson:"username" json:"username"`
	Password     string `bson:"password" json:"password" `
	ResponseType string `bson:"responseType" json:"responseType" `
	State        string `bson:"state" json:"state" `
}

type MyProfileModel

type MyProfileModel struct {
	ObjectId       uuid.UUID                     `json:"objectId"`
	FullName       string                        `json:"fullName"`
	Avatar         string                        `json:"avatar"`
	Banner         string                        `json:"banner"`
	TagLine        string                        `json:"tagLine"`
	Birthday       int64                         `json:"birthday"`
	WebUrl         string                        `json:"webUrl"`
	CompanyName    string                        `json:"companyName"`
	FacebookId     string                        `json:"facebookId"`
	InstagramId    string                        `json:"instagramId"`
	TwitterId      string                        `json:"twitterId"`
	AccessUserList []string                      `json:"accessUserList"`
	Permission     constants.UserPermissionConst `json:"permission"`
}

type ProfileUpdateModel

type ProfileUpdateModel struct {
	FullName   string `json:"fullName" bson:"fullName"`
	Avatar     string `json:"avatar" bson:"avatar"`
	Banner     string `json:"banner" bson:"banner"`
	TagLine    string `json:"tagLine" bson:"tagLine"`
	SocialName string `json:"socialName" bson:"socialName"`
}

type SettingGroupItemModel

type SettingGroupItemModel struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type SignupTokenModel

type SignupTokenModel struct {
	User         UserSignupTokenModel `json:"user"`
	VerifyType   string               `json:"verifyType"`
	Recaptcha    string               `json:"g-recaptcha-response"`
	ResponseType string               `json:"responseType"`
}

type UserAuthError

type UserAuthError struct {
	Code string
}

UserAuthError is a custom error from Go built-in error

func (UserAuthError) Error

func (e UserAuthError) Error() string

Error get message by error code

func (UserAuthError) ErrorResponse

func (e UserAuthError) ErrorResponse() []byte

ErrorResponseF get error in json format for api response

type UserAuthQueryModel

type UserAuthQueryModel struct {
	UserUID      uuid.UUID `json:"uid"`
	Username     string    `json:"username"`
	Password     []byte    `json:"password"`
	AccessToken  string    `json:"access_token"`
	Role         string    `json:"role"`
	TokenExpires int       `json:"token_expires"`
	CreatedDate  time.Time `json:"created_date"`
	LastUpdated  time.Time `json:"last_updated"`
}

type UserProfileModel

type UserProfileModel struct {
	ObjectId       uuid.UUID                     `json:"objectId" bson:"objectId"`
	FullName       string                        `json:"fullName" bson:"fullName"`
	SocialName     string                        `json:"socialName" bson:"socialName"`
	Avatar         string                        `json:"avatar" bson:"avatar"`
	Banner         string                        `json:"banner" bson:"banner"`
	TagLine        string                        `json:"tagLine" bson:"tagLine"`
	CreatedDate    int64                         `json:"created_date" bson:"created_date"`
	LastUpdated    int64                         `json:"last_updated" bson:"last_updated"`
	Email          string                        `json:"email" bson:"email"`
	Birthday       int64                         `json:"birthday" bson:"birthday"`
	WebUrl         string                        `json:"webUrl" bson:"webUrl"`
	CompanyName    string                        `json:"companyName" bson:"companyName"`
	VoteCount      int64                         `json:"voteCount" bson:"voteCount"`
	ShareCount     int64                         `json:"shareCount" bson:"shareCount"`
	FollowCount    int64                         `json:"followCount" bson:"followCount"`
	FollowerCount  int64                         `json:"followerCount" bson:"followerCount"`
	PostCount      int64                         `json:"postCount" bson:"postCount"`
	FacebookId     string                        `json:"facebookId" bson:"facebookId"`
	InstagramId    string                        `json:"instagramId" bson:"instagramId"`
	TwitterId      string                        `json:"twitterId" bson:"twitterId"`
	AccessUserList []string                      `json:"accessUserList" bson:"accessUserList"`
	Permission     constants.UserPermissionConst `json:"permission" bson:"permission"`
}

type UserRegisterModel

type UserRegisterModel struct {
	ObjectId        uuid.UUID `json:"objectId"`
	Username        string    `bson:"username" json:"username"`
	Password        string    `json:"password"`
	ConfirmPassword string    `json:"confirmPassword"`
}

type UserSignupTokenModel

type UserSignupTokenModel struct {
	Fullname string `json:"fullName"`
	Email    string `json:"email" `
	Password string `json:"password" `
}

type VerifySignupModel

type VerifySignupModel struct {
	Code         string `json:"code"`
	Token        string `json:"verificaitonSecret"`
	ResponseType string `json:"responseType"`
}

Jump to

Keyboard shortcuts

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