repository

package
v1.10.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	http.Interface
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(postgresRead relational.InterfaceRead, postgresWrite relational.InterfaceWrite) *Handler

func (*Handler) Delete

func (h *Handler) Delete(w netHttp.ResponseWriter, r *netHttp.Request)

@Tags Tokens @Security ApiKeyAuth @Description Delete a repository token @ID repository-delete-token @Param repositoryID path string true "repositoryID of the repository" @Param companyID path string true "companyID of the repository" @Param tokenID path string true "ID of the token" @Success 204 {object} http.Response{content=string} "NO CONTENT" @Success 400 {object} http.Response{content=string} "BAD REQUEST" @Success 401 {object} http.Response{content=string} "UNAUTHORIZED" @Failure 500 {object} http.Response{content=string} "INTERNAL SERVER ERROR" @Router /api/companies/{companyID}/repositories/{repositoryID}/tokens/{tokenID} [delete]

func (*Handler) Get

@Tags Tokens @Security ApiKeyAuth @Description Delete a repository token @ID repository-get-all-token @Param repositoryID path string true "repositoryID of the repository" @Param companyID path string true "companyID of the repository" @Success 200 {object} http.Response{content=string} "OK" @Success 400 {object} http.Response{content=string} "BAD REQUEST" @Success 401 {object} http.Response{content=string} "UNAUTHORIZED" @Failure 500 {object} http.Response{content=string} "INTERNAL SERVER ERROR" @Router /api/companies/{companyID}/repositories/{repositoryID}/tokens [get]

func (*Handler) Options

func (h *Handler) Options(w netHttp.ResponseWriter, r *netHttp.Request)

func (*Handler) Post

func (h *Handler) Post(w netHttp.ResponseWriter, r *netHttp.Request)

@Tags Tokens @Security ApiKeyAuth @Description Create a new repository token @ID repository-new-token @Accept json @Produce json @Param repositoryID path string true "repositoryID of the repository" @Param companyID path string true "companyID of the repository" @Param Token body api.Token true "token info" @Success 200 {object} http.Response{content=string} "CREATED" @Success 400 {object} http.Response{content=string} "BAD REQUEST" @Success 401 {object} http.Response{content=string} "UNAUTHORIZED" @Success 422 {object} http.Response{content=string} "UNPROCESSABLE ENTITY" @Failure 500 {object} http.Response{content=string} "INTERNAL SERVER ERROR" @Router /api/companies/{companyID}/repositories/{repositoryID}/tokens [post]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL