Documentation ¶
Index ¶
- type API
- func (a *API) CompleteTask(ctx context.Context, c echo.Context, accessToken string, id string) (*models.Task, error)
- func (a *API) CreateTask(ctx context.Context, c echo.Context, accessToken string, ...) (*models.Task, error)
- func (a *API) GetCurrentUser(ctx context.Context, c echo.Context, accessToken string) (*models.User, error)
- func (a *API) GetTask(ctx context.Context, c echo.Context, accessToken string, id string) (*models.Task, error)
- func (a *API) GetUser(ctx context.Context, c echo.Context, username string) (*models.User, error)
- func (a *API) ListTasks(ctx context.Context, c echo.Context, accessToken string, ...) (*TasksListResponse, error)
- func (a *API) Login(ctx context.Context, req AuthLoginRequest) (*AuthLoginResponse, error)
- func (a *API) Refresh(ctx context.Context, c echo.Context) (*AuthRefreshResponse, error)
- func (a *API) ReopenTask(ctx context.Context, c echo.Context, accessToken string, id string) (*models.Task, error)
- func (a *API) Signup(ctx context.Context, req AuthSignupRequest) (*models.User, error)
- func (a *API) Token(ctx context.Context, c echo.Context, token string) (*Token, error)
- func (a *API) TransitionTask(ctx context.Context, c echo.Context, accessToken string, id string, ...) (*models.Task, error)
- func (a *API) UpdateCurrentUser(ctx context.Context, c echo.Context, accessToken string, ...) (*models.User, error)
- func (a *API) UpdateTask(ctx context.Context, c echo.Context, accessToken string, id string, ...) (*models.Task, error)
- type APIError
- type AuthLoginRequest
- type AuthLoginResponse
- type AuthRefreshRequest
- type AuthRefreshResponse
- type AuthSignupRequest
- type CurrentUserUpdateRequest
- type IAPI
- type Pagination
- type TaskCreateRequest
- type TaskUpdateRequest
- type TasksListParams
- type TasksListResponse
- type Token
- type TransitionTask
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
}
func (*API) CompleteTask ¶
func (*API) CreateTask ¶
func (*API) GetCurrentUser ¶
func (*API) ListTasks ¶
func (a *API) ListTasks(ctx context.Context, c echo.Context, accessToken string, params *TasksListParams) (*TasksListResponse, error)
func (*API) Login ¶
func (a *API) Login(ctx context.Context, req AuthLoginRequest) (*AuthLoginResponse, error)
func (*API) Refresh ¶
func (a *API) Refresh(ctx context.Context, c echo.Context) (*AuthRefreshResponse, error)
func (*API) ReopenTask ¶
func (*API) TransitionTask ¶
func (*API) UpdateCurrentUser ¶
type AuthLoginRequest ¶
type AuthLoginResponse ¶
type AuthRefreshRequest ¶
type AuthRefreshRequest struct {
RefreshToken string `json:"refresh_token"`
}
type AuthRefreshResponse ¶
type AuthSignupRequest ¶
type IAPI ¶
type IAPI interface { Login(ctx context.Context, req AuthLoginRequest) (*AuthLoginResponse, error) Signup(ctx context.Context, req AuthSignupRequest) (*models.User, error) Refresh(ctx context.Context, c echo.Context) (*AuthRefreshResponse, error) Token(ctx context.Context, c echo.Context, accessToken string) (*Token, error) GetCurrentUser(ctx context.Context, c echo.Context, accessToken string) (*models.User, error) UpdateCurrentUser(ctx context.Context, c echo.Context, accessToken string, user *CurrentUserUpdateRequest) (*models.User, error) CreateTask(ctx context.Context, c echo.Context, accessToken string, task *TaskCreateRequest) (*models.Task, error) GetTask(ctx context.Context, c echo.Context, accessToken string, id string) (*models.Task, error) UpdateTask(ctx context.Context, c echo.Context, accessToken string, id string, task *TaskUpdateRequest) (*models.Task, error) TransitionTask(ctx context.Context, c echo.Context, accessToken string, id string, task *TransitionTask) (*models.Task, error) CompleteTask(ctx context.Context, c echo.Context, accessToken string, id string) (*models.Task, error) ReopenTask(ctx context.Context, c echo.Context, accessToken string, id string) (*models.Task, error) ListTasks(ctx context.Context, c echo.Context, accessToken string, params *TasksListParams) (*TasksListResponse, error) GetUser(ctx context.Context, c echo.Context, username string) (*models.User, error) }
type Pagination ¶
type TaskCreateRequest ¶
type TaskCreateRequest struct {
Title string `json:"title" form:"title"`
}
type TaskUpdateRequest ¶
type TaskUpdateRequest struct {
Title string `json:"title" form:"title"`
}
type TasksListParams ¶
type TasksListResponse ¶
type TasksListResponse struct { Pagination *Pagination Tasks []models.Task `json:"tasks"` }
type TransitionTask ¶
type TransitionTask struct {
Completed bool `json:"completed"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.