Documentation ¶
Index ¶
- func CreateAdminIfNotExist(ctx context.Context) (string, error)
- func FetchOrCreateAccountByEthAddress(ctx context.Context, address types.EthAddress) (*models.Account, *models.AccountIdentity, error)
- func GetAccountByAccountID(ctx context.Context, accountID types.SFID) (*models.Account, error)
- func UpdateAccountPassword(ctx context.Context, accountID types.SFID, r *UpdatePasswordReq) error
- func ValidateLoginByEthAddress(ctx context.Context, r *LoginByEthAddressReq) (*models.Account, error)
- func ValidateLoginByUsername(ctx context.Context, r *LoginByUsernameReq) (*models.Account, error)
- type CreateAccountByUsernameReq
- type CreateAccountByUsernameRsp
- type LoginByEthAddressReq
- type LoginByUsernameReq
- type LoginRsp
- type UpdatePasswordReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchOrCreateAccountByEthAddress ¶ added in v1.1.0
func FetchOrCreateAccountByEthAddress(ctx context.Context, address types.EthAddress) (*models.Account, *models.AccountIdentity, error)
func GetAccountByAccountID ¶
func UpdateAccountPassword ¶
func ValidateLoginByEthAddress ¶ added in v1.1.0
func ValidateLoginByUsername ¶ added in v1.1.0
Types ¶
type CreateAccountByUsernameReq ¶
type CreateAccountByUsernameReq struct { Username string `json:"username"` Role enums.AccountRole `json:"role"` AvatarURL string `json:"avatarURL,omitempty" validate:"@url"` Password string `json:"-"` Source enums.AccountSource `json:"-"` }
type CreateAccountByUsernameRsp ¶ added in v1.1.0
func CreateAccountByUsername ¶
func CreateAccountByUsername(ctx context.Context, r *CreateAccountByUsernameReq) (*CreateAccountByUsernameRsp, error)
type LoginByEthAddressReq ¶ added in v1.1.0
type LoginByUsernameReq ¶ added in v1.1.0
type UpdatePasswordReq ¶
Click to show internal directories.
Click to hide internal directories.