Documentation ¶
Index ¶
- type ListUserResponse
- type User
- type UserController
- func (c *UserController) DeleteUser(_ struct{ ... }, id int) (response *UserResponse)
- func (c *UserController) GetUser(_ struct{ ... }, id int, ctx context.Context) (response *UserResponse)
- func (c *UserController) GetUserByName(_ struct{ ... }, name string) (response *UserResponse)
- func (c *UserController) GetUserQuery(_ struct{ ... }, ctx context.Context) (response *UserResponse)
- func (c *UserController) GetUsers(_ struct{ ... }, request *UserRequests, ctx context.Context) (response *ListUserResponse)
- type UserRequests
- type UserResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListUserResponse ¶ added in v1.4.0
type ListUserResponse struct { at.ResponseBody `json:"-"` model.BaseResponse Data *UserRequests `json:"data"` }
type User ¶
type UserController ¶
type UserController struct { at.RestController at.RequestMapping `value:"/user" ` }
func (*UserController) DeleteUser ¶
func (c *UserController) DeleteUser(_ struct { at.DeleteMapping `value:"/{id}"` at.Operation `id:"Update Employee" description:"Delete User by ID"` }, id int) (response *UserResponse)
GetUser
func (*UserController) GetUser ¶
func (c *UserController) GetUser(_ struct { at.GetMapping `value:"/{id}"` at.Operation `id:"Update Employee" description:"Get User by ID"` // /user/{id} -> `values:"user:read" type:"path" in:"id"` at.RequiresPermissions `values:"user:read" type:"path" in:"id"` }, id int, ctx context.Context) (response *UserResponse)
GetUser
func (*UserController) GetUserByName ¶ added in v1.4.0
func (c *UserController) GetUserByName(_ struct { at.GetMapping `value:"/name/{name}"` // /user/{id} -> `values:"user:read" type:"path" in:"id"` at.RequiresPermissions `values:"user:read" type:"path" in:"name"` }, name string) (response *UserResponse)
GetUser
func (*UserController) GetUserQuery ¶ added in v1.4.0
func (c *UserController) GetUserQuery(_ struct { at.GetMapping `value:"/query"` at.Operation `id:"Update Employee" description:"Query User"` // /user?id=12345 -> `values:"user:read" type:"query" in:"id"` at.RequiresPermissions `values:"user:read" type:"query" in:"id"` }, ctx context.Context) (response *UserResponse)
GetUser
func (*UserController) GetUsers ¶ added in v1.4.0
func (c *UserController) GetUsers(_ struct { at.GetMapping `value:"/"` at.Operation `id:"Update Employee" description:"Get User List"` at.RequiresPermissions `values:"user:list" type:"query:pagination" in:"page,per_page,id" out:"expr,total"` }, request *UserRequests, ctx context.Context) (response *ListUserResponse)
GetUser
type UserRequests ¶ added in v1.4.0
type UserRequests struct { at.RequestParams at.Schema // For paginated result sets, page of results to retrieve. Page int `url:"page,omitempty" json:"page,omitempty" validate:"min=1"` // For paginated result sets, the number of results to include per page. PerPage int `url:"per_page,omitempty" json:"per_page,omitempty" validate:"min=1"` Total int `json:"total"` Expr string `json:"expr"` }
type UserResponse ¶
type UserResponse struct { at.ResponseBody `json:"-"` model.BaseResponse Data *User `json:"data"` }
Click to show internal directories.
Click to hide internal directories.