dto

package
v1.20.2 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppleLoginCallbackRequest

type AppleLoginCallbackRequest struct {
	Code    string `form:"code"`
	IDToken string `form:"id_token"`
	State   string `form:"state"`
}

type AuthMethodConfig

type AuthMethodConfig struct {
	Id      int64       `json:"id"`
	Method  string      `json:"method"`
	Config  interface{} `json:"config"`
	Enabled bool        `json:"enabled"`
}

type AuthPlatformInfoSnapshot

type AuthPlatformInfoSnapshot = integration.Info // @name dto.PlatformInfo

type AuthPlatformResponse

type AuthPlatformResponse struct {
	List []AuthPlatformInfoSnapshot `json:"list"`

} // @name dto.PlatformResponse

type BatchDeleteUserRequest

type BatchDeleteUserRequest struct {
	Ids []int64 `json:"ids" validate:"required"`
}

type BindOAuthCallbackRequest

type BindOAuthCallbackRequest struct {
	Method   string      `json:"method" validate:"required,oneof=google apple telegram github"`
	Callback interface{} `json:"callback" validate:"required"`
}

type BindOAuthRequest

type BindOAuthRequest struct {
	Method   string `json:"method" validate:"required,oneof=google apple telegram github"`
	Redirect string `json:"redirect" validate:"required"`
}

type BindOAuthResponse

type BindOAuthResponse struct {
	Redirect string `json:"redirect"`
}

type BindTelegramResponse

type BindTelegramResponse struct {
	Url       string `json:"url"`
	ExpiredAt int64  `json:"expired_at"`
}

type CheckUserRequest

type CheckUserRequest struct {
	Email string `form:"email" validate:"required,email"`
}

type CheckUserResponse

type CheckUserResponse struct {
	Exist bool `json:"exist"`
}

type CheckVerificationCodeRequest

type CheckVerificationCodeRequest struct {
	Method  string `json:"method" validate:"required,oneof=email mobile"`
	Account string `json:"account" validate:"required"`
	Code    string `json:"code" validate:"required"`
	Type    uint8  `json:"type" validate:"required,oneof=1 2"`
}

type CheckVerificationCodeRespone

type CheckVerificationCodeRespone struct {
	Status bool `json:"status"`
}

type CreateUserAuthMethodRequest

type CreateUserAuthMethodRequest struct {
	UserId         int64  `json:"user_id"`
	AuthType       string `json:"auth_type"`
	AuthIdentifier string `json:"auth_identifier"`
}

type CreateUserRequest

type CreateUserRequest struct {
	Email              string `json:"email"`
	Telephone          string `json:"telephone"`
	TelephoneAreaCode  string `json:"telephone_area_code"`
	Password           string `json:"password"`
	ProductId          int64  `json:"product_id"`
	Duration           int64  `json:"duration"`
	ReferralPercentage uint8  `json:"referral_percentage"`
	OnlyFirstPurchase  bool   `json:"only_first_purchase"`
	RefererUser        string `json:"referer_user"`
	ReferCode          string `json:"refer_code"`
	Balance            int64  `json:"balance"`
	Commission         int64  `json:"commission"`
	GiftAmount         int64  `json:"gift_amount"`
	IsAdmin            bool   `json:"is_admin"`
}

type DeleteUserAuthMethodRequest

type DeleteUserAuthMethodRequest struct {
	UserId   int64  `json:"user_id"`
	AuthType string `json:"auth_type"`
}

type DeleteUserDeivceRequest

type DeleteUserDeivceRequest struct {
	Id int64 `json:"id"`
}

type DeviceLoginRequest

type DeviceLoginRequest struct {
	Identifier string `json:"identifier" validate:"required,max=255"`
	Invite     string `json:"invite,optional"`
	IP         string `header:"X-Original-Forwarded-For" swaggerignore:"true"`
	UserAgent  string `header:"User-Agent" json:"-" swaggerignore:"true"`
	CfToken    string `json:"cf_token,optional"`
}

type GetAuthMethodConfigRequest

type GetAuthMethodConfigRequest struct {
	Method string `form:"method"`
}

type GetAuthMethodListResponse

type GetAuthMethodListResponse struct {
	List []AuthMethodConfig `json:"list"`
}

type GetDetailRequest

type GetDetailRequest struct {
	Id int64 `form:"id" validate:"required"`
}

type GetDeviceListResponse

type GetDeviceListResponse struct {
	List  []UserDevice `json:"list"`
	Total int64        `json:"total"`
}

type GetLoginLogRequest

type GetLoginLogRequest struct {
	Page int `form:"page" validate:"required,gt=0"`
	Size int `form:"size" validate:"required,gt=0,lte=100"`
}

Cross-domain view types are module-owned snapshots. They deliberately duplicate JSON shapes instead of coupling one module's API to another.

type GetLoginLogResponse

type GetLoginLogResponse struct {
	List  []UserLoginLog `json:"list"`
	Total int64          `json:"total"`
}

type GetOAuthMethodsResponse

type GetOAuthMethodsResponse struct {
	Methods []UserAuthMethod `json:"methods"`
}

type GetUserAuthMethodRequest

type GetUserAuthMethodRequest struct {
	UserId int64 `json:"user_id"`
}

type GetUserAuthMethodResponse

type GetUserAuthMethodResponse struct {
	AuthMethods []UserAuthMethod `json:"auth_methods"`
}

type GetUserListRequest

type GetUserListRequest struct {
	Page               int    `form:"page" validate:"required,gt=0"`
	Size               int    `form:"size" validate:"required,gt=0,lte=100"`
	Search             string `form:"search,omitempty"`
	UserId             *int64 `form:"user_id,omitempty"`
	Unscoped           bool   `form:"unscoped,omitempty"`
	SubscribeId        *int64 `form:"subscribe_id,omitempty"`
	UserSubscribeId    *int64 `form:"user_subscribe_id,omitempty"`
	UserSubscribeToken string `form:"user_subscribe_token,omitempty"`
}

type GetUserListResponse

type GetUserListResponse struct {
	Total int64  `json:"total"`
	List  []User `json:"list"`
}

type GetUserLoginLogsRequest

type GetUserLoginLogsRequest struct {
	Page   int   `form:"page" validate:"required,gt=0"`
	Size   int   `form:"size" validate:"required,gt=0,lte=100"`
	UserId int64 `form:"user_id"`
}

type GetUserLoginLogsResponse

type GetUserLoginLogsResponse struct {
	List  []UserLoginLog `json:"list"`
	Total int64          `json:"total"`
}

type KickOfflineRequest

type KickOfflineRequest struct {
	Id int64 `json:"id"`
}

type LoginResponse

type LoginResponse struct {
	Token string `json:"token"`
}

type OAthLoginRequest

type OAthLoginRequest struct {
	Method   string `json:"method" validate:"required"` // google, facebook, apple, telegram, github etc.
	Redirect string `json:"redirect"`
}

type OAuthLoginGetTokenRequest

type OAuthLoginGetTokenRequest struct {
	Method   string      `json:"method" validate:"required"` // google, facebook, apple, telegram, github etc.
	Callback interface{} `json:"callback" validate:"required"`
	Invite   string      `json:"invite,optional"`
	CfToken  string      `json:"cf_token,optional"`
}

type OAuthLoginResponse

type OAuthLoginResponse struct {
	Redirect string `json:"redirect"`
}

type ResetPasswordRequest

type ResetPasswordRequest struct {
	Identifier string `json:"identifier"`
	Email      string `json:"email" validate:"required,email"`
	Password   string `json:"password" validate:"required,min=8,max=128"`
	Code       string `json:"code,optional"`
	IP         string `header:"X-Original-Forwarded-For" swaggerignore:"true"`
	UserAgent  string `header:"User-Agent" swaggerignore:"true"`
	LoginType  string `header:"Login-Type" swaggerignore:"true"`
	CfToken    string `json:"cf_token,optional"`
}

type SendCodeRequest

type SendCodeRequest struct {
	Email string `json:"email" validate:"required,email"`
	Type  uint8  `json:"type" validate:"required,oneof=1 2"`
}

type SendCodeResponse

type SendCodeResponse struct {
	Code   string `json:"code,omitempty"`
	Status bool   `json:"status"`
}

type SendSmsCodeRequest

type SendSmsCodeRequest struct {
	Type              uint8  `json:"type" validate:"required,oneof=1 2"`
	Telephone         string `json:"telephone" validate:"required"`
	TelephoneAreaCode string `json:"telephone_area_code" validate:"required"`
}

type TelephoneCheckUserRequest

type TelephoneCheckUserRequest struct {
	Telephone         string `form:"telephone" validate:"required"`
	TelephoneAreaCode string `json:"telephone_area_code" validate:"required"`
}

type TelephoneCheckUserResponse

type TelephoneCheckUserResponse struct {
	Exist bool `json:"exist"`
}

type TelephoneLoginRequest

type TelephoneLoginRequest struct {
	Identifier        string `json:"identifier"`
	Telephone         string `json:"telephone" validate:"required"`
	TelephoneCode     string `json:"telephone_code"`
	TelephoneAreaCode string `json:"telephone_area_code" validate:"required"`
	Password          string `json:"password"`
	IP                string `header:"X-Original-Forwarded-For" swaggerignore:"true"`
	UserAgent         string `header:"User-Agent" swaggerignore:"true"`
	LoginType         string `header:"Login-Type" swaggerignore:"true"`
	CfToken           string `json:"cf_token,optional"`
}

type TelephoneRegisterRequest

type TelephoneRegisterRequest struct {
	Identifier        string `json:"identifier"`
	Telephone         string `json:"telephone" validate:"required"`
	TelephoneAreaCode string `json:"telephone_area_code" validate:"required"`
	Password          string `json:"password" validate:"required,min=8,max=128"`
	Invite            string `json:"invite,optional"`
	Code              string `json:"code,optional"`
	IP                string `header:"X-Original-Forwarded-For" swaggerignore:"true"`
	UserAgent         string `header:"User-Agent" swaggerignore:"true"`
	LoginType         string `header:"Login-Type,optional" swaggerignore:"true"`
	CfToken           string `json:"cf_token,optional"`
}

type TelephoneResetPasswordRequest

type TelephoneResetPasswordRequest struct {
	Identifier        string `json:"identifier"`
	Telephone         string `json:"telephone" validate:"required"`
	TelephoneAreaCode string `json:"telephone_area_code" validate:"required"`
	Password          string `json:"password" validate:"required,min=8,max=128"`
	Code              string `json:"code,optional"`
	IP                string `header:"X-Original-Forwarded-For" swaggerignore:"true"`
	UserAgent         string `header:"User-Agent" swaggerignore:"true"`
	LoginType         string `header:"Login-Type,optional" swaggerignore:"true"`
	CfToken           string `json:"cf_token,optional"`
}

type TestEmailSendRequest

type TestEmailSendRequest struct {
	Email string `json:"email" validate:"required,email"`
}

type TestSmsSendRequest

type TestSmsSendRequest struct {
	AreaCode  string `json:"area_code" validate:"required"`
	Telephone string `json:"telephone" validate:"required"`
}

type UnbindDeviceRequest

type UnbindDeviceRequest struct {
	Id int64 `json:"id" validate:"required"`
}

type UnbindOAuthRequest

type UnbindOAuthRequest struct {
	Method string `json:"method"`
}

type UpdateAuthMethodConfigRequest

type UpdateAuthMethodConfigRequest struct {
	Id      int64       `json:"id"`
	Method  string      `json:"method"`
	Config  interface{} `json:"config"`
	Enabled *bool       `json:"enabled"`
}

type UpdateBindEmailRequest

type UpdateBindEmailRequest struct {
	Email string `json:"email" validate:"required,email"`
}

type UpdateBindMobileRequest

type UpdateBindMobileRequest struct {
	AreaCode string `json:"area_code" validate:"required"`
	Mobile   string `json:"mobile" validate:"required"`
	Code     string `json:"code" validate:"required"`
}

type UpdateUserAuthMethodRequest

type UpdateUserAuthMethodRequest struct {
	UserId         int64  `json:"user_id"`
	AuthType       string `json:"auth_type"`
	AuthIdentifier string `json:"auth_identifier"`
}

type UpdateUserBasiceInfoRequest

type UpdateUserBasiceInfoRequest struct {
	UserId             int64  `json:"user_id" validate:"required"`
	Password           string `json:"password"`
	Avatar             string `json:"avatar"`
	Balance            int64  `json:"balance"`
	Commission         int64  `json:"commission"`
	ReferralPercentage uint8  `json:"referral_percentage"`
	OnlyFirstPurchase  bool   `json:"only_first_purchase"`
	GiftAmount         int64  `json:"gift_amount"`
	Telegram           int64  `json:"telegram"`
	ReferCode          string `json:"refer_code"`
	RefererId          int64  `json:"referer_id"`
	Enable             bool   `json:"enable"`
	IsAdmin            bool   `json:"is_admin"`
}

type UpdateUserNotifyRequest

type UpdateUserNotifyRequest struct {
	EnableBalanceNotify   *bool `json:"enable_balance_notify"`
	EnableLoginNotify     *bool `json:"enable_login_notify"`
	EnableSubscribeNotify *bool `json:"enable_subscribe_notify"`
	EnableTradeNotify     *bool `json:"enable_trade_notify"`
}

type UpdateUserNotifySettingRequest

type UpdateUserNotifySettingRequest struct {
	UserId                int64 `json:"user_id" validate:"required"`
	EnableBalanceNotify   bool  `json:"enable_balance_notify"`
	EnableLoginNotify     bool  `json:"enable_login_notify"`
	EnableSubscribeNotify bool  `json:"enable_subscribe_notify"`
	EnableTradeNotify     bool  `json:"enable_trade_notify"`
}

type UpdateUserPasswordRequest

type UpdateUserPasswordRequest struct {
	Password string `json:"password" validate:"required,min=8,max=128"`
}

type UpdateUserRulesRequest

type UpdateUserRulesRequest struct {
	Rules []string `json:"rules" validate:"required"`
}

type User

type User struct {
	Id                    int64            `json:"id"`
	Avatar                string           `json:"avatar"`
	Balance               int64            `json:"balance"`
	Commission            int64            `json:"commission"`
	ReferralPercentage    uint8            `json:"referral_percentage"`
	OnlyFirstPurchase     bool             `json:"only_first_purchase"`
	GiftAmount            int64            `json:"gift_amount"`
	Telegram              int64            `json:"telegram"`
	ReferCode             string           `json:"refer_code"`
	RefererId             int64            `json:"referer_id"`
	Enable                bool             `json:"enable"`
	IsAdmin               bool             `json:"is_admin,omitempty"`
	EnableBalanceNotify   bool             `json:"enable_balance_notify"`
	EnableLoginNotify     bool             `json:"enable_login_notify"`
	EnableSubscribeNotify bool             `json:"enable_subscribe_notify"`
	EnableTradeNotify     bool             `json:"enable_trade_notify"`
	AuthMethods           []UserAuthMethod `json:"auth_methods"`
	UserDevices           []UserDevice     `json:"user_devices"`
	Rules                 []string         `json:"rules"`
	CreatedAt             int64            `json:"created_at"`
	UpdatedAt             int64            `json:"updated_at"`
	DeletedAt             int64            `json:"deleted_at,omitempty"`
}

type UserAuthMethod

type UserAuthMethod struct {
	AuthType       string `json:"auth_type"`
	AuthIdentifier string `json:"auth_identifier"`
	Verified       bool   `json:"verified"`
}

type UserDevice

type UserDevice struct {
	Id         int64  `json:"id"`
	Ip         string `json:"ip"`
	Identifier string `json:"identifier"`
	UserAgent  string `json:"user_agent"`
	Online     bool   `json:"online"`
	Enabled    bool   `json:"enabled"`
	CreatedAt  int64  `json:"created_at"`
	UpdatedAt  int64  `json:"updated_at"`
}

type UserLoginLog

type UserLoginLog struct {
	Id               int64  `json:"id"`
	UserId           int64  `json:"user_id"`
	LoginIP          string `json:"login_ip"`
	UserAgent        string `json:"user_agent"`
	Success          bool   `json:"success"`
	Timestamp        int64  `json:"timestamp"`
	ActorID          int64  `json:"actor_id,omitempty"`
	IPCountryCode    string `json:"ip_country_code,omitempty"`
	IPCountry        string `json:"ip_country,omitempty"`
	IPRegion         string `json:"ip_region,omitempty"`
	IPCity           string `json:"ip_city,omitempty"`
	IPASN            uint   `json:"ip_asn,omitempty"`
	IPASOrganization string `json:"ip_as_organization,omitempty"`
}

type UserLoginRequest

type UserLoginRequest struct {
	Identifier string `json:"identifier"`
	Email      string `json:"email" validate:"required,email"`
	Password   string `json:"password" validate:"required"`
	IP         string `header:"X-Original-Forwarded-For" swaggerignore:"true"`
	UserAgent  string `header:"User-Agent" swaggerignore:"true"`
	LoginType  string `header:"Login-Type" swaggerignore:"true"`
	CfToken    string `json:"cf_token,optional"`
}

type UserRegisterRequest

type UserRegisterRequest struct {
	Identifier string `json:"identifier"`
	Email      string `json:"email" validate:"required,email"`
	Password   string `json:"password" validate:"required,min=8,max=128"`
	Invite     string `json:"invite,optional"`
	Code       string `json:"code,optional"`
	IP         string `header:"X-Original-Forwarded-For" swaggerignore:"true"`
	UserAgent  string `header:"User-Agent" swaggerignore:"true"`
	LoginType  string `header:"Login-Type" swaggerignore:"true"`
	CfToken    string `json:"cf_token,optional"`
}

type VerifyEmailRequest

type VerifyEmailRequest struct {
	Email string `json:"email" validate:"required,email"`
	Code  string `json:"code" validate:"required"`
}

Jump to

Keyboard shortcuts

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