Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func New ¶
func New(authSvc authservice.Service, projectSvc projectservice.Service) Handler
func (Handler) Create ¶
Create godoc
@Summary Create project
@Description Create project
@Tags Project
@Accept json
@Produce json
@Param request body projectparam.CreateRequest true "Create project request body"
@Success 201 {object} projectparam.CreateResponse
@Failure 400 {object} httputil.HTTPError
@Failure 401 {object} httputil.HTTPError
@Failure 500 {object} httputil.HTTPError
@Security JWTToken
@Router /projects [post]
func (Handler) Delete ¶
Delete godoc
@Summary Delete project
@Description Delete project
@Tags Project
@Accept json
@Produce json
@Param project_id path string true "Project identifier"
@Success 200 {object} projectparam.DeleteResponse
@Failure 400 {object} httputil.HTTPError
@Failure 401 {object} httputil.HTTPError
@Failure 500 {object} httputil.HTTPError
@Security JWTToken
@Router /projects/{project_id} [delete]
func (Handler) List ¶
List godoc
@Summary List projects
@Description List projects
@Tags Project
@Accept json
@Produce json
@Param last_token_id query string false "Last token fetched"
@Param per_page query int false "Per page count"
@Success 200 {object} projectparam.ListResponse
@Failure 400 {object} httputil.HTTPError
@Failure 401 {object} httputil.HTTPError
@Failure 500 {object} httputil.HTTPError
@Security JWTToken
@Router /projects [get]
func (Handler) Update ¶
Update godoc
@Summary Update project
@Description Update project
@Tags Project
@Accept json
@Produce json
@Param project_id path string true "Project identifier"
@Param request body projectparam.UpdateRequest true "Update project request body"
@Success 200 {object} projectparam.UpdateResponse
@Failure 400 {object} httputil.HTTPError
@Failure 401 {object} httputil.HTTPError
@Failure 500 {object} httputil.HTTPError
@Security JWTToken
@Router /projects/{project_id} [post]
Click to show internal directories.
Click to hide internal directories.