Documentation
¶
Index ¶
- type API
- func (a *API) Create(ctx context.Context, user CreateUserRequest) (int, error)
- func (a *API) Delete(ctx context.Context, id int) error
- func (a *API) Get(ctx context.Context, id int) (*GetUserResponse, error)
- func (a API) List(ctx context.Context) ([]*GetUserResponse, error)
- func (a *API) Update(ctx context.Context, id int, user UpdateUserRequest) error
- type CreateUserRequest
- type GetUserResponse
- type HttpClient
- type ListUsersResponse
- type Log
- type Task
- type UpdateUserRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
type CreateUserRequest ¶
type CreateUserRequest struct {
Name *string `json:"name,omitempty"`
Role *string `json:"role,omitempty"`
Password *string `json:"password,omitempty"`
}
func (CreateUserRequest) String ¶
func (o CreateUserRequest) String() string
type GetUserResponse ¶
type GetUserResponse struct {
ID *int `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Role *string `json:"role,omitempty"`
}
func (GetUserResponse) String ¶
func (o GetUserResponse) String() string
type HttpClient ¶
type HttpClient interface {
Get(ctx context.Context, name, path string, responseBody interface{}) error
Post(ctx context.Context, name, path string, requestBody interface{}, responseBody interface{}) error
Put(ctx context.Context, name, path string, requestBody interface{}, responseBody interface{}) error
Delete(ctx context.Context, name, path string, responseBody interface{}) error
}
type ListUsersResponse ¶
type ListUsersResponse struct {
AccountId *int `json:"accountId,omitempty"`
Users []*GetUserResponse `json:"users,omitempty"`
}
func (ListUsersResponse) String ¶
func (o ListUsersResponse) String() string
type UpdateUserRequest ¶
type UpdateUserRequest struct {
Role *string `json:"role,omitempty"`
Password *string `json:"password,omitempty"`
}
func (UpdateUserRequest) String ¶
func (o UpdateUserRequest) String() string
Click to show internal directories.
Click to hide internal directories.