Documentation ¶
Index ¶
- func CreateUser(username, password, email, avatar string, ctx context.Context, db *gorm.DB) error
- func RetrieveUser(username, password string, ctx context.Context, db *gorm.DB) (*model.User, error)
- func UpdateUser(username, newPassword string, ctx context.Context, db *gorm.DB) error
- type CreateUserFlow
- type DetailTodo
- type DetailUser
- type DetailUserAndTodo
- type MGetUserFlow
- type RetrieveUserFlow
- type UpdateUserFlow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateUser ¶
func RetrieveUser ¶
Types ¶
type CreateUserFlow ¶
type CreateUserFlow struct { // request data Username string Password string Email string Avatar string // contains filtered or unexported fields }
func NewCreateUserFlow ¶
func (*CreateUserFlow) Do ¶
func (f *CreateUserFlow) Do() error
type DetailTodo ¶
type DetailUser ¶
type DetailUserAndTodo ¶
type DetailUserAndTodo struct { *DetailUser Todos []*model.Todo `json:"todos,omitempty"` // 空的列表返回null }
type MGetUserFlow ¶
type MGetUserFlow struct { // request data UserIds []int64 // response data UserAndTodo []*DetailUserAndTodo // contains filtered or unexported fields }
func NewMGetUserFlow ¶
func (*MGetUserFlow) Do ¶
func (f *MGetUserFlow) Do() ([]*DetailUserAndTodo, error)
type RetrieveUserFlow ¶
type RetrieveUserFlow struct { // request data Username string Password string // response data User *model.User // contains filtered or unexported fields }
func NewRetrieveUserFlow ¶
type UpdateUserFlow ¶
type UpdateUserFlow struct { // request data Username string NewPassword string // contains filtered or unexported fields }
func NewUpdateUserFlow ¶
func (*UpdateUserFlow) Do ¶
func (f *UpdateUserFlow) Do() error
Click to show internal directories.
Click to hide internal directories.