Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateEvent ¶
ValidateEvent provides validation checks for the event name of a webhook
func ValidateTargetURI ¶
ValidateTargetURI provides validation checks for the targetUri of a webhook
Types ¶
type AddTargetURIReq ¶
type AddTargetURIReq struct { Event string `json:"-" valid:"required" URIParam:"yes"` TargetUri string `valid:"required" json:"targetUri"` }
AddTargetURIReq represents a request to add a webhook. It will add a target uri to be called on a specific event.
func (*AddTargetURIReq) Validate ¶
func (c *AddTargetURIReq) Validate() error
Validate provides custom validation for the AddTargetURIReq request
type Configuration ¶
type DeleteReq ¶
type DeleteReq struct {
Event string `json:"-" valid:"required" URIParam:"yes"`
}
DeleteReq represents a request to delete all the target uris associated with a webhook for a given event
type DeleteTargetURIReq ¶
type DeleteTargetURIReq struct { Event string `json:"-" valid:"required" URIParam:"yes"` TargetUri string `URIParam:"yes" valid:"required"` }
DeleteTargetURIReq represents a request to delete a specific target uri associated with a webhook for a given event
func (*DeleteTargetURIReq) Validate ¶
func (c *DeleteTargetURIReq) Validate() error
Validate provides custom validation for the DeleteTargetURIReq request
type UpdateReq ¶
type UpdateReq struct { Event string `json:"-" valid:"required" URIParam:"yes"` Recursive string `json:"recursive" oneOf:"true,false"` TargetUris []TargetUri `json:"targetUris,omitempty"` }
UpdateReq represents a request to update a webhook for a given event
type Webhook ¶
type Webhook struct { Name string Configuration Configuration Links []models.LinkEntity }