Documentation ¶
Index ¶
- func CreateWebhook(ctx echo.Context) error
- func DeleteWebhook(ctx echo.Context) error
- func FindWebhook(ctx echo.Context) error
- func GetWebhook(ctx echo.Context) error
- func ParseTimeout(p *string) (sql.NullInt32, error)
- func Publish(ctx echo.Context) error
- func UpdateWebhook(ctx echo.Context) error
- type Create
- type Header
- type Update
- type Webhook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateWebhook ¶
func CreateWebhook(ctx echo.Context) error
@Description Create a webhook @Accept json @Produce json @Tags /api/v1/webhook @Router /api/v1/webhook [post] @Param webhook body Create true "Create" @Success 200 {object} Webhook
func DeleteWebhook ¶
func DeleteWebhook(ctx echo.Context) error
@Description Delete a webhook @Accept json @Produce json @Tags /api/v1/webhook @Router /api/v1/webhook/{uuid} [delete] @Param uuid path string true "Webhook UUID" @Success 200
func FindWebhook ¶
func FindWebhook(ctx echo.Context) error
@Description Find webhooks @Accept x-www-form-urlencoded @Produce json @Tags /api/v1/webhook @Router /api/v1/webhook [get] @Param q query string false "query github.com/claion-org/claiflow/pkg/server/database/vanilla/stmt/README.md" @Param o query string false "order github.com/claion-org/claiflow/pkg/server/database/vanilla/stmt/README.md" @Param p query string false "paging github.com/claion-org/claiflow/pkg/server/database/vanilla/stmt/README.md" @Success 200 {array} Webhook
func GetWebhook ¶
func GetWebhook(ctx echo.Context) error
@Description Get a webhook @Accept json @Produce json @Tags /api/v1/webhook @Router /api/v1/webhook/{uuid} [get] @Param uuid path string true "webhook UUID" @Success 200 {object} Webhook
func Publish ¶
func Publish(ctx echo.Context) error
@Description Publish a webhook message @Accept json @Produce json @Tags /api/v1/webhook @Router /api/v1/webhook/{uuid}/publish [post] @Param uuid path string true "webhook UUID" @Param message body []byte true "Publish message" @Success 200
func UpdateWebhook ¶
func UpdateWebhook(ctx echo.Context) error
@Description Update a webhook @Accept json @Produce json @Tags /api/v1/webhook @Router /api/v1/webhook/{uuid} [put] @Param uuid path string true "Webhook UUID" @Param webhook body Update true "Update" @Success 200 {object} Webhook
Types ¶
type Create ¶
type Create struct { Uuid *string `json:"uuid,omitempty"` // (optional) Name string `json:"name"` Summary *string `json:"summary,omitempty"` // (optional) URL string `json:"url"` Method string `json:"method"` Headers Header `json:"headers"` // (optional) Timeout *string `json:"timeout,omitempty"` // (optional) ConditionValidator string `json:"conditionValidator,omitempty"` // (optional) ConditionFilter *string `json:"conditionFilter,omitempty"` // (optional) }
type Update ¶
type Update struct { Name *string `json:"name,omitempty"` // (optional) Summary *string `json:"summary,omitempty"` // (optional) URL *string `json:"url,omitempty"` // (optional) Method *string `json:"method,omitempty"` // (optional) Headers Header `json:"headers,omitempty"` // (optional) Timeout *string `json:"timeout,omitempty"` // (optional) ConditionValidator *string `json:"conditionValidator,omitempty"` // (optional) ConditionFilter *string `json:"conditionFilter,omitempty"` // (optional) }
type Webhook ¶
type Webhook struct { Uuid string `json:"uuid"` Name string `json:"name"` Summary *string `json:"summary,omitempty"` URL string `json:"url"` Method string `json:"method"` Headers Header `json:"headers,omitempty" swaggertype:"object"` Timeout string `json:"timeout,omitempty"` ConditionValidator string `json:"conditionValidator,omitempty"` ConditionFilter *string `json:"conditionFilter,omitempty"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` }