webhook

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: 11 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 {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(databaseWrite SQL.InterfaceWrite, databaseRead SQL.InterfaceRead) *Handler

func (*Handler) Create

func (h *Handler) Create(w netHTTP.ResponseWriter, r *netHTTP.Request)

@Tags Webhooks @Description create webhook! @ID create-webhook @Accept json @Produce json @Param Webhook body webhook.Webhook{headers=[]webhook.Headers} true "webhook info, method allowed is POST" @Param companyID path string true "companyID of the webhook" @Param repositoryID path string true "repositoryID of the webhook" @Success 201 {object} http.Response{content=string} "CREATED" @Failure 400 {object} http.Response{content=string} "BAD REQUEST" @Failure 500 {object} http.Response{content=string} "INTERNAL SERVER ERROR" @Router /account/webhook/{companyID}/{repositoryID} [post] @Security ApiKeyAuth

func (*Handler) ListAll

func (h *Handler) ListAll(w netHTTP.ResponseWriter, r *netHTTP.Request)

@Tags Webhooks @Description get webhook! @ID get-webhook @Accept json @Produce json @Param companyID path string true "companyID of the webhook" @Success 200 {object} http.Response{content=[]webhook.ResponseWebhook{headers=[]webhook.Headers,repository=account.RepositoryResponse}} "OK" @Failure 400 {object} http.Response{content=string} "BAD REQUEST" @Failure 404 {object} http.Response{content=string} "NOT FOUND" @Failure 500 {object} http.Response{content=string} "INTERNAL SERVER ERROR" @Router /account/webhook/{companyID} [get] @Security ApiKeyAuth

func (*Handler) Options

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

func (*Handler) Remove

func (h *Handler) Remove(w netHTTP.ResponseWriter, r *netHTTP.Request)

@Tags Webhooks @Description get webhook by repositoryID! @ID delete-webhook @Accept json @Produce json @Param companyID path string true "companyID of the webhook" @Param repositoryID path string true "repositoryID of the webhook" @Param webhookID path string true "webhookID of the webhook" @Success 204 @Failure 400 {object} http.Response{content=string} "BAD REQUEST" @Failure 404 {object} http.Response{content=string} "NOT FOUND" @Failure 500 {object} http.Response{content=string} "INTERNAL SERVER ERROR" @Router /account/webhook/{companyID}/{repositoryID}/{webhookID} [delete] @Security ApiKeyAuth

func (*Handler) Update

func (h *Handler) Update(w netHTTP.ResponseWriter, r *netHTTP.Request)

@Tags Webhooks @Description get webhook by repositoryID! @ID update-webhook @Accept json @Produce json @Param Webhook body webhook.Webhook{headers=[]webhook.Headers} true "webhook info, method allowed is POST" @Param companyID path string true "companyID of the webhook" @Param repositoryID path string true "repositoryID of the webhook" @Param webhookID path string true "webhookID of the webhook" @Success 204 @Failure 400 {object} http.Response{content=string} "BAD REQUEST" @Failure 404 {object} http.Response{content=string} "NOT FOUND" @Failure 500 {object} http.Response{content=string} "INTERNAL SERVER ERROR" @Router /account/webhook/{companyID}/{repositoryID}/{webhookID} [put] @Security ApiKeyAuth

Jump to

Keyboard shortcuts

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