Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller interface { List(ctx context.Context, query *q.Query) (int64, []*User, error) GetByID(ctx context.Context, id uint) (*User, error) UpdateByID(c context.Context, id uint, u *UpdateUserRequest) (*User, error) ListUserLinks(ctx context.Context, uid uint) ([]*Link, error) DeleteLinksByID(c context.Context, id uint) error // LoginWithPasswd checks inputted email & password LoginWithPasswd(ctx context.Context, request *LoginRequest) (*models.User, error) }
func NewController ¶
func NewController(param *param.Param) Controller
type LoginRequest ¶
type UpdateUserRequest ¶
type User ¶
type User struct { ID uint `json:"id,omitempty"` Name string `json:"name,omitempty"` FullName string `json:"fullName,omitempty"` Email string `json:"email,omitempty"` IsAdmin bool `json:"isAdmin"` IsBanned bool `json:"isBanned"` Phone string `json:"phone,omitempty"` UpdatedAt time.Time `json:"updatedAt,omitempty"` CreatedAt time.Time `json:"createdAt,omitempty"` }
Click to show internal directories.
Click to hide internal directories.