company

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 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 {
	httpUtil.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 http.ResponseWriter, r *http.Request)

@Tags Tokens @Security ApiKeyAuth @Description Delete a company token @ID company-delete-token @Param companyID path string true "companyID of the company" @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}/tokens/{tokenID} [delete]

func (*Handler) Get

func (h *Handler) Get(w http.ResponseWriter, r *http.Request)

@Tags Tokens @Security ApiKeyAuth @Description Delete a company token @ID company-get-all-token @Param companyID path string true "companyID of the company" @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}/tokens [get]

func (*Handler) Options

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

func (*Handler) Post

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

@Tags Tokens @Security ApiKeyAuth @Description Create a new company token @ID company-new-token @Accept json @Produce json @Param companyID path string true "companyID of the company" @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}/tokens [post]

Jump to

Keyboard shortcuts

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