Documentation
¶
Overview ¶
Package event provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.
Index ¶
- func NewCreateWebhookSubscriptionRequest(server string, body CreateWebhookSubscriptionJSONRequestBody) (*http.Request, error)
- func NewCreateWebhookSubscriptionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteWebhookSubscriptionRequest(server string, key string) (*http.Request, error)
- func NewGetWebhookSubscriptionRequest(server string, key string) (*http.Request, error)
- func NewGetWebhookSubscriptionsRequest(server string) (*http.Request, error)
- func NewStreamWebhookTroubleshootingRequest(server string, params *StreamWebhookTroubleshootingParams) (*http.Request, error)
- func NewTestWebhookSubscriptionRequest(server string, body TestWebhookSubscriptionJSONRequestBody) (*http.Request, error)
- func NewTestWebhookSubscriptionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdateWebhookSubscriptionRequest(server string, key string, body UpdateWebhookSubscriptionJSONRequestBody) (*http.Request, error)
- func NewUpdateWebhookSubscriptionRequestWithBody(server string, key string, contentType string, body io.Reader) (*http.Request, error)
- type Client
- func (c *Client) CreateWebhookSubscription(ctx context.Context, body CreateWebhookSubscriptionJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateWebhookSubscriptionWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeleteWebhookSubscription(ctx context.Context, key string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetWebhookSubscription(ctx context.Context, key string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetWebhookSubscriptions(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) StreamWebhookTroubleshooting(ctx context.Context, params *StreamWebhookTroubleshootingParams, ...) (*http.Response, error)
- func (c *Client) TestWebhookSubscription(ctx context.Context, body TestWebhookSubscriptionJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) TestWebhookSubscriptionWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UpdateWebhookSubscription(ctx context.Context, key string, body UpdateWebhookSubscriptionJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdateWebhookSubscriptionWithBody(ctx context.Context, key string, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateWebhookSubscriptionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateWebhookSubscriptionResponse, error)
- func (c *ClientWithResponses) CreateWebhookSubscriptionWithResponse(ctx context.Context, body CreateWebhookSubscriptionJSONRequestBody, ...) (*CreateWebhookSubscriptionResponse, error)
- func (c *ClientWithResponses) DeleteWebhookSubscriptionWithResponse(ctx context.Context, key string, reqEditors ...RequestEditorFn) (*DeleteWebhookSubscriptionResponse, error)
- func (c *ClientWithResponses) GetWebhookSubscriptionWithResponse(ctx context.Context, key string, reqEditors ...RequestEditorFn) (*GetWebhookSubscriptionResponse, error)
- func (c *ClientWithResponses) GetWebhookSubscriptionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetWebhookSubscriptionsResponse, error)
- func (c *ClientWithResponses) StreamWebhookTroubleshootingWithResponse(ctx context.Context, params *StreamWebhookTroubleshootingParams, ...) (*StreamWebhookTroubleshootingResponse, error)
- func (c *ClientWithResponses) TestWebhookSubscriptionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*TestWebhookSubscriptionResponse, error)
- func (c *ClientWithResponses) TestWebhookSubscriptionWithResponse(ctx context.Context, body TestWebhookSubscriptionJSONRequestBody, ...) (*TestWebhookSubscriptionResponse, error)
- func (c *ClientWithResponses) UpdateWebhookSubscriptionWithBodyWithResponse(ctx context.Context, key string, contentType string, body io.Reader, ...) (*UpdateWebhookSubscriptionResponse, error)
- func (c *ClientWithResponses) UpdateWebhookSubscriptionWithResponse(ctx context.Context, key string, body UpdateWebhookSubscriptionJSONRequestBody, ...) (*UpdateWebhookSubscriptionResponse, error)
- type ClientWithResponsesInterface
- type CreateWebhookSubscriptionJSONRequestBody
- type CreateWebhookSubscriptionResponse
- func (r CreateWebhookSubscriptionResponse) ContentType() string
- func (r CreateWebhookSubscriptionResponse) GetBody() []byte
- func (r CreateWebhookSubscriptionResponse) GetJSON201() *WebhookSubscription
- func (r CreateWebhookSubscriptionResponse) GetJSON400() *ErrorResponse
- func (r CreateWebhookSubscriptionResponse) GetJSON401() *ErrorResponse
- func (r CreateWebhookSubscriptionResponse) GetJSON403() *ErrorResponse
- func (r CreateWebhookSubscriptionResponse) Status() string
- func (r CreateWebhookSubscriptionResponse) StatusCode() int
- type CustomWebhookHandlerCreate
- type CustomWebhookHandlerCreateHandlerType
- type CustomWebhookHandlerCreateMethod
- type CustomWebhookHandlerRead
- type CustomWebhookHandlerReadHandlerType
- type CustomWebhookHandlerReadMethod
- type CustomWebhookHandlerUpdate
- type CustomWebhookHandlerUpdateHandlerType
- type CustomWebhookHandlerUpdateMethod
- type DeleteWebhookSubscriptionResponse
- func (r DeleteWebhookSubscriptionResponse) ContentType() string
- func (r DeleteWebhookSubscriptionResponse) GetBody() []byte
- func (r DeleteWebhookSubscriptionResponse) GetJSON401() *ErrorResponse
- func (r DeleteWebhookSubscriptionResponse) GetJSON403() *ErrorResponse
- func (r DeleteWebhookSubscriptionResponse) GetJSON404() *ErrorResponse
- func (r DeleteWebhookSubscriptionResponse) Status() string
- func (r DeleteWebhookSubscriptionResponse) StatusCode() int
- type ErrorResponse
- type EventFilter
- type EventFilterCriteria
- type GetWebhookSubscriptionResponse
- func (r GetWebhookSubscriptionResponse) ContentType() string
- func (r GetWebhookSubscriptionResponse) GetBody() []byte
- func (r GetWebhookSubscriptionResponse) GetJSON200() *WebhookSubscription
- func (r GetWebhookSubscriptionResponse) GetJSON401() *ErrorResponse
- func (r GetWebhookSubscriptionResponse) GetJSON403() *ErrorResponse
- func (r GetWebhookSubscriptionResponse) GetJSON404() *ErrorResponse
- func (r GetWebhookSubscriptionResponse) Status() string
- func (r GetWebhookSubscriptionResponse) StatusCode() int
- type GetWebhookSubscriptionsResponse
- func (r GetWebhookSubscriptionsResponse) ContentType() string
- func (r GetWebhookSubscriptionsResponse) GetBody() []byte
- func (r GetWebhookSubscriptionsResponse) GetJSON200() *[]WebhookSubscription
- func (r GetWebhookSubscriptionsResponse) GetJSON401() *ErrorResponse
- func (r GetWebhookSubscriptionsResponse) GetJSON403() *ErrorResponse
- func (r GetWebhookSubscriptionsResponse) Status() string
- func (r GetWebhookSubscriptionsResponse) StatusCode() int
- type HttpHeader
- type HttpRequestDoer
- type NamedSecretCreate
- type NamedSecretRead
- type NamedSecretUpdate
- type RequestEditorFn
- type StreamWebhookTroubleshootingParams
- type StreamWebhookTroubleshootingResponse
- func (r StreamWebhookTroubleshootingResponse) ContentType() string
- func (r StreamWebhookTroubleshootingResponse) GetBody() []byte
- func (r StreamWebhookTroubleshootingResponse) GetJSON200() ...
- func (r StreamWebhookTroubleshootingResponse) GetJSON401() *ErrorResponse
- func (r StreamWebhookTroubleshootingResponse) GetJSON403() *ErrorResponse
- func (r StreamWebhookTroubleshootingResponse) Status() string
- func (r StreamWebhookTroubleshootingResponse) StatusCode() int
- type TestWebhookSubscriptionJSONRequestBody
- type TestWebhookSubscriptionResponse
- func (r TestWebhookSubscriptionResponse) ContentType() string
- func (r TestWebhookSubscriptionResponse) GetBody() []byte
- func (r TestWebhookSubscriptionResponse) GetJSON400() *ErrorResponse
- func (r TestWebhookSubscriptionResponse) GetJSON401() *ErrorResponse
- func (r TestWebhookSubscriptionResponse) GetJSON403() *ErrorResponse
- func (r TestWebhookSubscriptionResponse) Status() string
- func (r TestWebhookSubscriptionResponse) StatusCode() int
- type UpdateWebhookSubscriptionJSONRequestBody
- type UpdateWebhookSubscriptionResponse
- func (r UpdateWebhookSubscriptionResponse) ContentType() string
- func (r UpdateWebhookSubscriptionResponse) GetBody() []byte
- func (r UpdateWebhookSubscriptionResponse) GetJSON400() *ErrorResponse
- func (r UpdateWebhookSubscriptionResponse) GetJSON401() *ErrorResponse
- func (r UpdateWebhookSubscriptionResponse) GetJSON403() *ErrorResponse
- func (r UpdateWebhookSubscriptionResponse) GetJSON404() *ErrorResponse
- func (r UpdateWebhookSubscriptionResponse) Status() string
- func (r UpdateWebhookSubscriptionResponse) StatusCode() int
- type WebhookHandler
- type WebhookHandlerHandlerType
- type WebhookHandlerInputCreate
- func (t WebhookHandlerInputCreate) AsCustomWebhookHandlerCreate() (CustomWebhookHandlerCreate, error)
- func (t WebhookHandlerInputCreate) AsWebhookHandler() (WebhookHandler, error)
- func (t WebhookHandlerInputCreate) Discriminator() (string, error)
- func (t *WebhookHandlerInputCreate) FromCustomWebhookHandlerCreate(v CustomWebhookHandlerCreate) error
- func (t *WebhookHandlerInputCreate) FromWebhookHandler(v WebhookHandler) error
- func (t WebhookHandlerInputCreate) MarshalJSON() ([]byte, error)
- func (t *WebhookHandlerInputCreate) MergeCustomWebhookHandlerCreate(v CustomWebhookHandlerCreate) error
- func (t *WebhookHandlerInputCreate) MergeWebhookHandler(v WebhookHandler) error
- func (t *WebhookHandlerInputCreate) UnmarshalJSON(b []byte) error
- func (t WebhookHandlerInputCreate) ValueByDiscriminator() (interface{}, error)
- type WebhookHandlerInputUpdate
- func (t WebhookHandlerInputUpdate) AsCustomWebhookHandlerUpdate() (CustomWebhookHandlerUpdate, error)
- func (t WebhookHandlerInputUpdate) AsWebhookHandler() (WebhookHandler, error)
- func (t WebhookHandlerInputUpdate) Discriminator() (string, error)
- func (t *WebhookHandlerInputUpdate) FromCustomWebhookHandlerUpdate(v CustomWebhookHandlerUpdate) error
- func (t *WebhookHandlerInputUpdate) FromWebhookHandler(v WebhookHandler) error
- func (t WebhookHandlerInputUpdate) MarshalJSON() ([]byte, error)
- func (t *WebhookHandlerInputUpdate) MergeCustomWebhookHandlerUpdate(v CustomWebhookHandlerUpdate) error
- func (t *WebhookHandlerInputUpdate) MergeWebhookHandler(v WebhookHandler) error
- func (t *WebhookHandlerInputUpdate) UnmarshalJSON(b []byte) error
- func (t WebhookHandlerInputUpdate) ValueByDiscriminator() (interface{}, error)
- type WebhookHandlerRead
- type WebhookHandlerReadHandlerType
- type WebhookHandlerResponse
- func (t WebhookHandlerResponse) AsCustomWebhookHandlerRead() (CustomWebhookHandlerRead, error)
- func (t WebhookHandlerResponse) AsWebhookHandlerRead() (WebhookHandlerRead, error)
- func (t WebhookHandlerResponse) Discriminator() (string, error)
- func (t *WebhookHandlerResponse) FromCustomWebhookHandlerRead(v CustomWebhookHandlerRead) error
- func (t *WebhookHandlerResponse) FromWebhookHandlerRead(v WebhookHandlerRead) error
- func (t WebhookHandlerResponse) MarshalJSON() ([]byte, error)
- func (t *WebhookHandlerResponse) MergeCustomWebhookHandlerRead(v CustomWebhookHandlerRead) error
- func (t *WebhookHandlerResponse) MergeWebhookHandlerRead(v WebhookHandlerRead) error
- func (t *WebhookHandlerResponse) UnmarshalJSON(b []byte) error
- func (t WebhookHandlerResponse) ValueByDiscriminator() (interface{}, error)
- type WebhookSubscription
- type WebhookSubscriptionCreate
- type WebhookSubscriptionUpdate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCreateWebhookSubscriptionRequest ¶
func NewCreateWebhookSubscriptionRequest(server string, body CreateWebhookSubscriptionJSONRequestBody) (*http.Request, error)
NewCreateWebhookSubscriptionRequest calls the generic CreateWebhookSubscription builder with application/json body
func NewCreateWebhookSubscriptionRequestWithBody ¶
func NewCreateWebhookSubscriptionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateWebhookSubscriptionRequestWithBody constructs an http.Request for the CreateWebhookSubscription method, with any body, and a specified content type
func NewDeleteWebhookSubscriptionRequest ¶
NewDeleteWebhookSubscriptionRequest constructs an http.Request for the DeleteWebhookSubscription method
func NewGetWebhookSubscriptionRequest ¶
NewGetWebhookSubscriptionRequest constructs an http.Request for the GetWebhookSubscription method
func NewGetWebhookSubscriptionsRequest ¶
NewGetWebhookSubscriptionsRequest constructs an http.Request for the GetWebhookSubscriptions method
func NewStreamWebhookTroubleshootingRequest ¶
func NewStreamWebhookTroubleshootingRequest(server string, params *StreamWebhookTroubleshootingParams) (*http.Request, error)
NewStreamWebhookTroubleshootingRequest constructs an http.Request for the StreamWebhookTroubleshooting method
func NewTestWebhookSubscriptionRequest ¶
func NewTestWebhookSubscriptionRequest(server string, body TestWebhookSubscriptionJSONRequestBody) (*http.Request, error)
NewTestWebhookSubscriptionRequest calls the generic TestWebhookSubscription builder with application/json body
func NewTestWebhookSubscriptionRequestWithBody ¶
func NewTestWebhookSubscriptionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewTestWebhookSubscriptionRequestWithBody constructs an http.Request for the TestWebhookSubscription method, with any body, and a specified content type
func NewUpdateWebhookSubscriptionRequest ¶
func NewUpdateWebhookSubscriptionRequest(server string, key string, body UpdateWebhookSubscriptionJSONRequestBody) (*http.Request, error)
NewUpdateWebhookSubscriptionRequest calls the generic UpdateWebhookSubscription builder with application/json body
func NewUpdateWebhookSubscriptionRequestWithBody ¶
func NewUpdateWebhookSubscriptionRequestWithBody(server string, key string, contentType string, body io.Reader) (*http.Request, error)
NewUpdateWebhookSubscriptionRequestWithBody constructs an http.Request for the UpdateWebhookSubscription method, with any body, and a specified content type
Types ¶
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) CreateWebhookSubscription ¶
func (c *Client) CreateWebhookSubscription(ctx context.Context, body CreateWebhookSubscriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateWebhookSubscription Create a webhook subscription
Stores a new subscription and starts delivering matching events if it is enabled. Answers 201. A key that already exists is rejected with 400. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with w.
Takes a body of the `application/json` content type.
Corresponds with POST /api/v1/subscriptions (the `CreateWebhookSubscription` operationId).
func (*Client) CreateWebhookSubscriptionWithBody ¶
func (c *Client) CreateWebhookSubscriptionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateWebhookSubscriptionWithBody Create a webhook subscription
Stores a new subscription and starts delivering matching events if it is enabled. Answers 201. A key that already exists is rejected with 400. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with w.
Takes any type of body and a specified content type.
Corresponds with POST /api/v1/subscriptions (the `CreateWebhookSubscription` operationId).
func (*Client) DeleteWebhookSubscription ¶
func (c *Client) DeleteWebhookSubscription(ctx context.Context, key string, reqEditors ...RequestEditorFn) (*http.Response, error)
DeleteWebhookSubscription Delete a webhook subscription
Deletes the subscription. Deliveries already in flight finish; no new ones start. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with d.
Corresponds with DELETE /api/v1/subscriptions/{key} (the `DeleteWebhookSubscription` operationId).
func (*Client) GetWebhookSubscription ¶
func (c *Client) GetWebhookSubscription(ctx context.Context, key string, reqEditors ...RequestEditorFn) (*http.Response, error)
GetWebhookSubscription Get a webhook subscription
Returns one subscription with secrets redacted. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with r.
Corresponds with GET /api/v1/subscriptions/{key} (the `GetWebhookSubscription` operationId).
func (*Client) GetWebhookSubscriptions ¶
func (c *Client) GetWebhookSubscriptions(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
GetWebhookSubscriptions List webhook subscriptions
Returns every subscription the caller may manage, global and project ones, with secrets redacted. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with r.
Corresponds with GET /api/v1/subscriptions (the `GetWebhookSubscriptions` operationId).
func (*Client) StreamWebhookTroubleshooting ¶
func (c *Client) StreamWebhookTroubleshooting(ctx context.Context, params *StreamWebhookTroubleshootingParams, reqEditors ...RequestEditorFn) (*http.Response, error)
StreamWebhookTroubleshooting Read the webhook delivery log
Returns delivery attempt records from a store that keeps the most recent 10,000; older ones are discarded. Three modes, chosen by the parameters: without start the connection stays open and streams each new record as it happens until the client disconnects; with start alone the stored records from that time are sent first and the stream then stays live; with start plus end or count the call returns the matching stored records and ends. start=0 begins at the oldest record held. subscription and target filter every mode. A record is kept for every failed attempt, and for every attempt of a subscription with debug set. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with r.
Corresponds with GET /api/v1/troubleshooting (the `StreamWebhookTroubleshooting` operationId).
func (*Client) TestWebhookSubscription ¶
func (c *Client) TestWebhookSubscription(ctx context.Context, body TestWebhookSubscriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
TestWebhookSubscription Send a test delivery
Builds a sample event for the body's domain and first event type and delivers it once through the body's handler, without storing anything. Useful to check a URL, secret or template before creating the subscription. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with x.
Takes a body of the `application/json` content type.
Corresponds with POST /api/v1/subscriptions/test (the `TestWebhookSubscription` operationId).
func (*Client) TestWebhookSubscriptionWithBody ¶
func (c *Client) TestWebhookSubscriptionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
TestWebhookSubscriptionWithBody Send a test delivery
Builds a sample event for the body's domain and first event type and delivers it once through the body's handler, without storing anything. Useful to check a URL, secret or template before creating the subscription. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with x.
Takes any type of body and a specified content type.
Corresponds with POST /api/v1/subscriptions/test (the `TestWebhookSubscription` operationId).
func (*Client) UpdateWebhookSubscription ¶
func (c *Client) UpdateWebhookSubscription(ctx context.Context, key string, body UpdateWebhookSubscriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateWebhookSubscription Replace a webhook subscription
Replaces the subscription with the body. The key and project cannot change. Secrets follow the keep, rotate and wipe rules described on their fields, so a client that read the subscription (secrets redacted) can send it back without erasing them. Answers 204 with no body. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with w.
Takes a body of the `application/json` content type.
Corresponds with PUT /api/v1/subscriptions/{key} (the `UpdateWebhookSubscription` operationId).
func (*Client) UpdateWebhookSubscriptionWithBody ¶
func (c *Client) UpdateWebhookSubscriptionWithBody(ctx context.Context, key string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateWebhookSubscriptionWithBody Replace a webhook subscription
Replaces the subscription with the body. The key and project cannot change. Secrets follow the keep, rotate and wipe rules described on their fields, so a client that read the subscription (secrets redacted) can send it back without erasing them. Answers 204 with no body. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with w.
Takes any type of body and a specified content type.
Corresponds with PUT /api/v1/subscriptions/{key} (the `UpdateWebhookSubscription` operationId).
type ClientInterface ¶
type ClientInterface interface {
// GetWebhookSubscriptions List webhook subscriptions
//
// Returns every subscription the caller may manage, global and project ones, with secrets redacted. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with r.
//
// Corresponds with GET /api/v1/subscriptions (the `GetWebhookSubscriptions` operationId).
GetWebhookSubscriptions(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateWebhookSubscriptionWithBody Create a webhook subscription
//
// Stores a new subscription and starts delivering matching events if it is enabled. Answers 201. A key that already exists is rejected with 400. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with w.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /api/v1/subscriptions (the `CreateWebhookSubscription` operationId).
CreateWebhookSubscriptionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateWebhookSubscription Create a webhook subscription
//
// Stores a new subscription and starts delivering matching events if it is enabled. Answers 201. A key that already exists is rejected with 400. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with w.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /api/v1/subscriptions (the `CreateWebhookSubscription` operationId).
CreateWebhookSubscription(ctx context.Context, body CreateWebhookSubscriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// TestWebhookSubscriptionWithBody Send a test delivery
//
// Builds a sample event for the body's domain and first event type and delivers it once through the body's handler, without storing anything. Useful to check a URL, secret or template before creating the subscription. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with x.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /api/v1/subscriptions/test (the `TestWebhookSubscription` operationId).
TestWebhookSubscriptionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// TestWebhookSubscription Send a test delivery
//
// Builds a sample event for the body's domain and first event type and delivers it once through the body's handler, without storing anything. Useful to check a URL, secret or template before creating the subscription. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with x.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /api/v1/subscriptions/test (the `TestWebhookSubscription` operationId).
TestWebhookSubscription(ctx context.Context, body TestWebhookSubscriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteWebhookSubscription Delete a webhook subscription
//
// Deletes the subscription. Deliveries already in flight finish; no new ones start. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with d.
//
// Corresponds with DELETE /api/v1/subscriptions/{key} (the `DeleteWebhookSubscription` operationId).
DeleteWebhookSubscription(ctx context.Context, key string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetWebhookSubscription Get a webhook subscription
//
// Returns one subscription with secrets redacted. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with r.
//
// Corresponds with GET /api/v1/subscriptions/{key} (the `GetWebhookSubscription` operationId).
GetWebhookSubscription(ctx context.Context, key string, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateWebhookSubscriptionWithBody Replace a webhook subscription
//
// Replaces the subscription with the body. The key and project cannot change. Secrets follow the keep, rotate and wipe rules described on their fields, so a client that read the subscription (secrets redacted) can send it back without erasing them. Answers 204 with no body. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with w.
//
// Takes any type of body and a specified content type.
//
// Corresponds with PUT /api/v1/subscriptions/{key} (the `UpdateWebhookSubscription` operationId).
UpdateWebhookSubscriptionWithBody(ctx context.Context, key string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateWebhookSubscription Replace a webhook subscription
//
// Replaces the subscription with the body. The key and project cannot change. Secrets follow the keep, rotate and wipe rules described on their fields, so a client that read the subscription (secrets redacted) can send it back without erasing them. Answers 204 with no body. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with w.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with PUT /api/v1/subscriptions/{key} (the `UpdateWebhookSubscription` operationId).
UpdateWebhookSubscription(ctx context.Context, key string, body UpdateWebhookSubscriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// StreamWebhookTroubleshooting Read the webhook delivery log
//
// Returns delivery attempt records from a store that keeps the most recent 10,000; older ones are discarded. Three modes, chosen by the parameters: without start the connection stays open and streams each new record as it happens until the client disconnects; with start alone the stored records from that time are sent first and the stream then stays live; with start plus end or count the call returns the matching stored records and ends. start=0 begins at the oldest record held. subscription and target filter every mode. A record is kept for every failed attempt, and for every attempt of a subscription with debug set. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with r.
//
// Corresponds with GET /api/v1/troubleshooting (the `StreamWebhookTroubleshooting` operationId).
StreamWebhookTroubleshooting(ctx context.Context, params *StreamWebhookTroubleshootingParams, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CreateWebhookSubscriptionWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateWebhookSubscriptionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateWebhookSubscriptionResponse, error)
CreateWebhookSubscriptionWithBodyWithResponse Create a webhook subscription
Stores a new subscription and starts delivering matching events if it is enabled. Answers 201. A key that already exists is rejected with 400. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with w.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/subscriptions (the `CreateWebhookSubscription` operationId).
func (*ClientWithResponses) CreateWebhookSubscriptionWithResponse ¶
func (c *ClientWithResponses) CreateWebhookSubscriptionWithResponse(ctx context.Context, body CreateWebhookSubscriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateWebhookSubscriptionResponse, error)
CreateWebhookSubscriptionWithResponse Create a webhook subscription
Stores a new subscription and starts delivering matching events if it is enabled. Answers 201. A key that already exists is rejected with 400. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with w.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/subscriptions (the `CreateWebhookSubscription` operationId).
func (*ClientWithResponses) DeleteWebhookSubscriptionWithResponse ¶
func (c *ClientWithResponses) DeleteWebhookSubscriptionWithResponse(ctx context.Context, key string, reqEditors ...RequestEditorFn) (*DeleteWebhookSubscriptionResponse, error)
DeleteWebhookSubscriptionWithResponse Delete a webhook subscription
Deletes the subscription. Deliveries already in flight finish; no new ones start. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with d.
Returns a wrapper object for the known response body format(s).
Corresponds with DELETE /api/v1/subscriptions/{key} (the `DeleteWebhookSubscription` operationId).
func (*ClientWithResponses) GetWebhookSubscriptionWithResponse ¶
func (c *ClientWithResponses) GetWebhookSubscriptionWithResponse(ctx context.Context, key string, reqEditors ...RequestEditorFn) (*GetWebhookSubscriptionResponse, error)
GetWebhookSubscriptionWithResponse Get a webhook subscription
Returns one subscription with secrets redacted. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with r.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /api/v1/subscriptions/{key} (the `GetWebhookSubscription` operationId).
func (*ClientWithResponses) GetWebhookSubscriptionsWithResponse ¶
func (c *ClientWithResponses) GetWebhookSubscriptionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetWebhookSubscriptionsResponse, error)
GetWebhookSubscriptionsWithResponse List webhook subscriptions
Returns every subscription the caller may manage, global and project ones, with secrets redacted. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with r.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /api/v1/subscriptions (the `GetWebhookSubscriptions` operationId).
func (*ClientWithResponses) StreamWebhookTroubleshootingWithResponse ¶
func (c *ClientWithResponses) StreamWebhookTroubleshootingWithResponse(ctx context.Context, params *StreamWebhookTroubleshootingParams, reqEditors ...RequestEditorFn) (*StreamWebhookTroubleshootingResponse, error)
StreamWebhookTroubleshootingWithResponse Read the webhook delivery log
Returns delivery attempt records from a store that keeps the most recent 10,000; older ones are discarded. Three modes, chosen by the parameters: without start the connection stays open and streams each new record as it happens until the client disconnects; with start alone the stored records from that time are sent first and the stream then stays live; with start plus end or count the call returns the matching stored records and ends. start=0 begins at the oldest record held. subscription and target filter every mode. A record is kept for every failed attempt, and for every attempt of a subscription with debug set. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with r.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /api/v1/troubleshooting (the `StreamWebhookTroubleshooting` operationId).
func (*ClientWithResponses) TestWebhookSubscriptionWithBodyWithResponse ¶
func (c *ClientWithResponses) TestWebhookSubscriptionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TestWebhookSubscriptionResponse, error)
TestWebhookSubscriptionWithBodyWithResponse Send a test delivery
Builds a sample event for the body's domain and first event type and delivers it once through the body's handler, without storing anything. Useful to check a URL, secret or template before creating the subscription. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with x.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/subscriptions/test (the `TestWebhookSubscription` operationId).
func (*ClientWithResponses) TestWebhookSubscriptionWithResponse ¶
func (c *ClientWithResponses) TestWebhookSubscriptionWithResponse(ctx context.Context, body TestWebhookSubscriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*TestWebhookSubscriptionResponse, error)
TestWebhookSubscriptionWithResponse Send a test delivery
Builds a sample event for the body's domain and first event type and delivers it once through the body's handler, without storing anything. Useful to check a URL, secret or template before creating the subscription. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with x.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /api/v1/subscriptions/test (the `TestWebhookSubscription` operationId).
func (*ClientWithResponses) UpdateWebhookSubscriptionWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateWebhookSubscriptionWithBodyWithResponse(ctx context.Context, key string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateWebhookSubscriptionResponse, error)
UpdateWebhookSubscriptionWithBodyWithResponse Replace a webhook subscription
Replaces the subscription with the body. The key and project cannot change. Secrets follow the keep, rotate and wipe rules described on their fields, so a client that read the subscription (secrets redacted) can send it back without erasing them. Answers 204 with no body. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with w.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with PUT /api/v1/subscriptions/{key} (the `UpdateWebhookSubscription` operationId).
func (*ClientWithResponses) UpdateWebhookSubscriptionWithResponse ¶
func (c *ClientWithResponses) UpdateWebhookSubscriptionWithResponse(ctx context.Context, key string, body UpdateWebhookSubscriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateWebhookSubscriptionResponse, error)
UpdateWebhookSubscriptionWithResponse Replace a webhook subscription
Replaces the subscription with the body. The key and project cannot change. Secrets follow the keep, rotate and wipe rules described on their fields, so a client that read the subscription (secrets redacted) can send it back without erasing them. Answers 204 with no body. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with w.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with PUT /api/v1/subscriptions/{key} (the `UpdateWebhookSubscription` operationId).
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// GetWebhookSubscriptionsWithResponse List webhook subscriptions
//
// Returns every subscription the caller may manage, global and project ones, with secrets redacted. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with r.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /api/v1/subscriptions (the `GetWebhookSubscriptions` operationId).
GetWebhookSubscriptionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetWebhookSubscriptionsResponse, error)
// CreateWebhookSubscriptionWithBodyWithResponse Create a webhook subscription
//
// Stores a new subscription and starts delivering matching events if it is enabled. Answers 201. A key that already exists is rejected with 400. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with w.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/subscriptions (the `CreateWebhookSubscription` operationId).
CreateWebhookSubscriptionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateWebhookSubscriptionResponse, error)
// CreateWebhookSubscriptionWithResponse Create a webhook subscription
//
// Stores a new subscription and starts delivering matching events if it is enabled. Answers 201. A key that already exists is rejected with 400. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with w.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/subscriptions (the `CreateWebhookSubscription` operationId).
CreateWebhookSubscriptionWithResponse(ctx context.Context, body CreateWebhookSubscriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateWebhookSubscriptionResponse, error)
// TestWebhookSubscriptionWithBodyWithResponse Send a test delivery
//
// Builds a sample event for the body's domain and first event type and delivers it once through the body's handler, without storing anything. Useful to check a URL, secret or template before creating the subscription. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with x.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/subscriptions/test (the `TestWebhookSubscription` operationId).
TestWebhookSubscriptionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TestWebhookSubscriptionResponse, error)
// TestWebhookSubscriptionWithResponse Send a test delivery
//
// Builds a sample event for the body's domain and first event type and delivers it once through the body's handler, without storing anything. Useful to check a URL, secret or template before creating the subscription. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with x.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /api/v1/subscriptions/test (the `TestWebhookSubscription` operationId).
TestWebhookSubscriptionWithResponse(ctx context.Context, body TestWebhookSubscriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*TestWebhookSubscriptionResponse, error)
// DeleteWebhookSubscriptionWithResponse Delete a webhook subscription
//
// Deletes the subscription. Deliveries already in flight finish; no new ones start. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with d.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with DELETE /api/v1/subscriptions/{key} (the `DeleteWebhookSubscription` operationId).
DeleteWebhookSubscriptionWithResponse(ctx context.Context, key string, reqEditors ...RequestEditorFn) (*DeleteWebhookSubscriptionResponse, error)
// GetWebhookSubscriptionWithResponse Get a webhook subscription
//
// Returns one subscription with secrets redacted. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with r.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /api/v1/subscriptions/{key} (the `GetWebhookSubscription` operationId).
GetWebhookSubscriptionWithResponse(ctx context.Context, key string, reqEditors ...RequestEditorFn) (*GetWebhookSubscriptionResponse, error)
// UpdateWebhookSubscriptionWithBodyWithResponse Replace a webhook subscription
//
// Replaces the subscription with the body. The key and project cannot change. Secrets follow the keep, rotate and wipe rules described on their fields, so a client that read the subscription (secrets redacted) can send it back without erasing them. Answers 204 with no body. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with w.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PUT /api/v1/subscriptions/{key} (the `UpdateWebhookSubscription` operationId).
UpdateWebhookSubscriptionWithBodyWithResponse(ctx context.Context, key string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateWebhookSubscriptionResponse, error)
// UpdateWebhookSubscriptionWithResponse Replace a webhook subscription
//
// Replaces the subscription with the body. The key and project cannot change. Secrets follow the keep, rotate and wipe rules described on their fields, so a client that read the subscription (secrets redacted) can send it back without erasing them. Answers 204 with no body. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with w.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PUT /api/v1/subscriptions/{key} (the `UpdateWebhookSubscription` operationId).
UpdateWebhookSubscriptionWithResponse(ctx context.Context, key string, body UpdateWebhookSubscriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateWebhookSubscriptionResponse, error)
// StreamWebhookTroubleshootingWithResponse Read the webhook delivery log
//
// Returns delivery attempt records from a store that keeps the most recent 10,000; older ones are discarded. Three modes, chosen by the parameters: without start the connection stays open and streams each new record as it happens until the client disconnects; with start alone the stored records from that time are sent first and the stream then stays live; with start plus end or count the call returns the matching stored records and ends. start=0 begins at the oldest record held. subscription and target filter every mode. A record is kept for every failed attempt, and for every attempt of a subscription with debug set. Requires a platform admin, a project admin (project subscriptions in the artifact, artifact_property, docker and build domains only), the Manage Webhooks role, or a token scoped system:webhooks@<project>/<url> with r.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /api/v1/troubleshooting (the `StreamWebhookTroubleshooting` operationId).
StreamWebhookTroubleshootingWithResponse(ctx context.Context, params *StreamWebhookTroubleshootingParams, reqEditors ...RequestEditorFn) (*StreamWebhookTroubleshootingResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreateWebhookSubscriptionJSONRequestBody ¶
type CreateWebhookSubscriptionJSONRequestBody = WebhookSubscriptionCreate
CreateWebhookSubscriptionJSONRequestBody defines body for CreateWebhookSubscription for application/json ContentType.
type CreateWebhookSubscriptionResponse ¶
type CreateWebhookSubscriptionResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON201 the response for an HTTP 201 `application/json` response
JSON201 *WebhookSubscription
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *ErrorResponse
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *ErrorResponse
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ErrorResponse
}
func ParseCreateWebhookSubscriptionResponse ¶
func ParseCreateWebhookSubscriptionResponse(rsp *http.Response) (*CreateWebhookSubscriptionResponse, error)
ParseCreateWebhookSubscriptionResponse parses an HTTP response from a CreateWebhookSubscriptionWithResponse call
func (CreateWebhookSubscriptionResponse) ContentType ¶
func (r CreateWebhookSubscriptionResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateWebhookSubscriptionResponse) GetBody ¶
func (r CreateWebhookSubscriptionResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (CreateWebhookSubscriptionResponse) GetJSON201 ¶
func (r CreateWebhookSubscriptionResponse) GetJSON201() *WebhookSubscription
GetJSON201 returns the response for an HTTP 201 `application/json` response
func (CreateWebhookSubscriptionResponse) GetJSON400 ¶
func (r CreateWebhookSubscriptionResponse) GetJSON400() *ErrorResponse
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (CreateWebhookSubscriptionResponse) GetJSON401 ¶
func (r CreateWebhookSubscriptionResponse) GetJSON401() *ErrorResponse
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (CreateWebhookSubscriptionResponse) GetJSON403 ¶
func (r CreateWebhookSubscriptionResponse) GetJSON403() *ErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (CreateWebhookSubscriptionResponse) Status ¶
func (r CreateWebhookSubscriptionResponse) Status() string
Status returns HTTPResponse.Status
func (CreateWebhookSubscriptionResponse) StatusCode ¶
func (r CreateWebhookSubscriptionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CustomWebhookHandlerCreate ¶
type CustomWebhookHandlerCreate struct {
// HandlerType Required within this object. Must be custom-webhook.
HandlerType CustomWebhookHandlerCreateHandlerType `json:"handler_type"`
// HttpHeaders Optional within this object. HTTP headers sent with every delivery. Values may reference secrets as {{.secrets.<name>}}.
HttpHeaders *[]HttpHeader `json:"http_headers,omitempty"`
// Method Optional within this object. HTTP method used for the delivery. Defaults to POST.
Method *CustomWebhookHandlerCreateMethod `json:"method,omitempty"`
// Payload Optional within this object. Go text/template rendered into the request body. The template sees the event as {{.data}} (for example {{.data.repo_key}}; {{json .data}} renders it as JSON), the subscription's secrets as {{.secrets.<name>}} and the acting user as {{.userContext.id}}. Omitted means the event's default JSON payload. A template that fails to parse is rejected with 400.
Payload *string `json:"payload,omitempty"`
// Proxy Optional within this object. Key of a configured outbound proxy to use for deliveries. Omitted means a direct connection, or the platform default proxy when one is set.
Proxy *string `json:"proxy,omitempty"`
// Secrets Optional within this object. Named secrets the templates can reference.
Secrets *[]NamedSecretCreate `json:"secrets,omitempty"`
// Url Required within this object. Absolute http or https URL the event is delivered to. Failed deliveries are retried with backoff. The URL may reference secrets as {{.secrets.<name>}}.
Url string `json:"url"`
}
CustomWebhookHandlerCreate A custom-webhook handler: the request is built from templates.
type CustomWebhookHandlerCreateHandlerType ¶
type CustomWebhookHandlerCreateHandlerType string
CustomWebhookHandlerCreateHandlerType Required within this object. Must be custom-webhook.
const (
CustomWebhookHandlerCreateHandlerTypeCustomWebhook CustomWebhookHandlerCreateHandlerType = "custom-webhook"
)
Defines values for CustomWebhookHandlerCreateHandlerType.
func (CustomWebhookHandlerCreateHandlerType) Valid ¶
func (e CustomWebhookHandlerCreateHandlerType) Valid() bool
Valid indicates whether the value is a known member of the CustomWebhookHandlerCreateHandlerType enum.
type CustomWebhookHandlerCreateMethod ¶
type CustomWebhookHandlerCreateMethod string
CustomWebhookHandlerCreateMethod Optional within this object. HTTP method used for the delivery. Defaults to POST.
const ( CustomWebhookHandlerCreateMethodDELETE CustomWebhookHandlerCreateMethod = "DELETE" CustomWebhookHandlerCreateMethodGET CustomWebhookHandlerCreateMethod = "GET" CustomWebhookHandlerCreateMethodPATCH CustomWebhookHandlerCreateMethod = "PATCH" CustomWebhookHandlerCreateMethodPOST CustomWebhookHandlerCreateMethod = "POST" CustomWebhookHandlerCreateMethodPUT CustomWebhookHandlerCreateMethod = "PUT" )
Defines values for CustomWebhookHandlerCreateMethod.
func (CustomWebhookHandlerCreateMethod) Valid ¶
func (e CustomWebhookHandlerCreateMethod) Valid() bool
Valid indicates whether the value is a known member of the CustomWebhookHandlerCreateMethod enum.
type CustomWebhookHandlerRead ¶
type CustomWebhookHandlerRead struct {
// HandlerType Required within this object. Always custom-webhook.
HandlerType CustomWebhookHandlerReadHandlerType `json:"handler_type"`
// HttpHeaders Optional within this object. The header templates.
HttpHeaders *[]HttpHeader `json:"http_headers,omitempty"`
// Method Optional within this object. The delivery method.
Method *CustomWebhookHandlerReadMethod `json:"method,omitempty"`
// Payload Optional within this object. The payload template.
Payload *string `json:"payload,omitempty"`
// Proxy Optional within this object. The proxy key, when one is set.
Proxy *string `json:"proxy,omitempty"`
// Secrets Optional within this object. The secret names; values are never returned.
Secrets *[]NamedSecretRead `json:"secrets,omitempty"`
// Url Required within this object. The delivery URL template.
Url string `json:"url"`
}
CustomWebhookHandlerRead A custom-webhook handler as the server returns it.
type CustomWebhookHandlerReadHandlerType ¶
type CustomWebhookHandlerReadHandlerType string
CustomWebhookHandlerReadHandlerType Required within this object. Always custom-webhook.
const (
CustomWebhookHandlerReadHandlerTypeCustomWebhook CustomWebhookHandlerReadHandlerType = "custom-webhook"
)
Defines values for CustomWebhookHandlerReadHandlerType.
func (CustomWebhookHandlerReadHandlerType) Valid ¶
func (e CustomWebhookHandlerReadHandlerType) Valid() bool
Valid indicates whether the value is a known member of the CustomWebhookHandlerReadHandlerType enum.
type CustomWebhookHandlerReadMethod ¶
type CustomWebhookHandlerReadMethod string
CustomWebhookHandlerReadMethod Optional within this object. The delivery method.
const ( CustomWebhookHandlerReadMethodDELETE CustomWebhookHandlerReadMethod = "DELETE" CustomWebhookHandlerReadMethodGET CustomWebhookHandlerReadMethod = "GET" CustomWebhookHandlerReadMethodPATCH CustomWebhookHandlerReadMethod = "PATCH" CustomWebhookHandlerReadMethodPOST CustomWebhookHandlerReadMethod = "POST" CustomWebhookHandlerReadMethodPUT CustomWebhookHandlerReadMethod = "PUT" )
Defines values for CustomWebhookHandlerReadMethod.
func (CustomWebhookHandlerReadMethod) Valid ¶
func (e CustomWebhookHandlerReadMethod) Valid() bool
Valid indicates whether the value is a known member of the CustomWebhookHandlerReadMethod enum.
type CustomWebhookHandlerUpdate ¶
type CustomWebhookHandlerUpdate struct {
// HandlerType Required within this object. Must be custom-webhook.
HandlerType CustomWebhookHandlerUpdateHandlerType `json:"handler_type"`
// HttpHeaders Optional within this object. HTTP headers sent with every delivery. Values may reference secrets as {{.secrets.<name>}}.
HttpHeaders *[]HttpHeader `json:"http_headers,omitempty"`
// Method Optional within this object. HTTP method used for the delivery. Defaults to POST.
Method *CustomWebhookHandlerUpdateMethod `json:"method,omitempty"`
// Payload Optional within this object. Go text/template rendered into the request body. The template sees the event as {{.data}} (for example {{.data.repo_key}}; {{json .data}} renders it as JSON), the subscription's secrets as {{.secrets.<name>}} and the acting user as {{.userContext.id}}. Omitted means the event's default JSON payload. A template that fails to parse is rejected with 400.
Payload *string `json:"payload,omitempty"`
// Proxy Optional within this object. Key of a configured outbound proxy to use for deliveries. Omitted means a direct connection, or the platform default proxy when one is set.
Proxy *string `json:"proxy,omitempty"`
// Secrets Optional within this object. Named secrets the payload and header templates can reference. On replace, a listed name without a value keeps that secret, a value rotates it, an empty string wipes it, and a secret whose name is not listed is removed.
Secrets *[]NamedSecretUpdate `json:"secrets,omitempty"`
// Url Required within this object. Absolute http or https URL the event is delivered to. Failed deliveries are retried with backoff.
Url string `json:"url"`
}
CustomWebhookHandlerUpdate A custom-webhook handler in a replace body.
type CustomWebhookHandlerUpdateHandlerType ¶
type CustomWebhookHandlerUpdateHandlerType string
CustomWebhookHandlerUpdateHandlerType Required within this object. Must be custom-webhook.
const (
CustomWebhookHandlerUpdateHandlerTypeCustomWebhook CustomWebhookHandlerUpdateHandlerType = "custom-webhook"
)
Defines values for CustomWebhookHandlerUpdateHandlerType.
func (CustomWebhookHandlerUpdateHandlerType) Valid ¶
func (e CustomWebhookHandlerUpdateHandlerType) Valid() bool
Valid indicates whether the value is a known member of the CustomWebhookHandlerUpdateHandlerType enum.
type CustomWebhookHandlerUpdateMethod ¶
type CustomWebhookHandlerUpdateMethod string
CustomWebhookHandlerUpdateMethod Optional within this object. HTTP method used for the delivery. Defaults to POST.
const ( CustomWebhookHandlerUpdateMethodDELETE CustomWebhookHandlerUpdateMethod = "DELETE" CustomWebhookHandlerUpdateMethodGET CustomWebhookHandlerUpdateMethod = "GET" CustomWebhookHandlerUpdateMethodPATCH CustomWebhookHandlerUpdateMethod = "PATCH" CustomWebhookHandlerUpdateMethodPOST CustomWebhookHandlerUpdateMethod = "POST" CustomWebhookHandlerUpdateMethodPUT CustomWebhookHandlerUpdateMethod = "PUT" )
Defines values for CustomWebhookHandlerUpdateMethod.
func (CustomWebhookHandlerUpdateMethod) Valid ¶
func (e CustomWebhookHandlerUpdateMethod) Valid() bool
Valid indicates whether the value is a known member of the CustomWebhookHandlerUpdateMethod enum.
type DeleteWebhookSubscriptionResponse ¶
type DeleteWebhookSubscriptionResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *ErrorResponse
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ErrorResponse
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *ErrorResponse
}
func ParseDeleteWebhookSubscriptionResponse ¶
func ParseDeleteWebhookSubscriptionResponse(rsp *http.Response) (*DeleteWebhookSubscriptionResponse, error)
ParseDeleteWebhookSubscriptionResponse parses an HTTP response from a DeleteWebhookSubscriptionWithResponse call
func (DeleteWebhookSubscriptionResponse) ContentType ¶
func (r DeleteWebhookSubscriptionResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (DeleteWebhookSubscriptionResponse) GetBody ¶
func (r DeleteWebhookSubscriptionResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (DeleteWebhookSubscriptionResponse) GetJSON401 ¶
func (r DeleteWebhookSubscriptionResponse) GetJSON401() *ErrorResponse
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (DeleteWebhookSubscriptionResponse) GetJSON403 ¶
func (r DeleteWebhookSubscriptionResponse) GetJSON403() *ErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (DeleteWebhookSubscriptionResponse) GetJSON404 ¶
func (r DeleteWebhookSubscriptionResponse) GetJSON404() *ErrorResponse
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (DeleteWebhookSubscriptionResponse) Status ¶
func (r DeleteWebhookSubscriptionResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteWebhookSubscriptionResponse) StatusCode ¶
func (r DeleteWebhookSubscriptionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ErrorResponse ¶
type ErrorResponse struct {
// Errors Required within this object. One entry per error.
Errors []struct {
// Code Required within this object. A symbolic code such as NOT_FOUND.
Code string `json:"code"`
// Message Required within this object. Human readable explanation.
Message string `json:"message"`
} `json:"errors"`
}
ErrorResponse The error envelope used by every /event response.
type EventFilter ¶
type EventFilter struct {
// Criteria Optional within this object. Resource conditions for the domain. Required for every domain except user and curation.
Criteria *EventFilterCriteria `json:"criteria,omitempty"`
// Domain Required within this object. One of artifact, artifact_property, docker, build, user, release_bundle, distribution, artifactory_release_bundle, destination, release_bundle_v2, release_bundle_v2_promotion, artifact_lifecycle, xray_scan_status, app_trust or curation. Subscriptions are accepted for every domain, but events are emitted only for artifact, artifact_property, docker, build and user. Project admins may only use artifact, artifact_property, docker and build.
Domain string `json:"domain"`
// EventTypes Required within this object. Events of the domain that trigger the subscription, at least one, spelled exactly as listed here. artifact: deployed, deleted, moved, copied, cached. artifact_property: added, deleted. docker: pushed, deleted, promoted. build: uploaded, deleted, promoted. user: locked. release_bundle: created, signed, deleted. distribution: distribute_started, distribute_completed, distribute_aborted, distribute_failed, delete_started, delete_completed, delete_failed. artifactory_release_bundle and destination: received, delete_started, delete_completed, delete_failed. release_bundle_v2: release_bundle_v2_started, release_bundle_v2_failed, release_bundle_v2_completed. release_bundle_v2_promotion: release_bundle_v2_promotion_started, release_bundle_v2_promotion_failed, release_bundle_v2_promotion_completed. artifact_lifecycle: archive, restore. An event type that does not belong to the domain is rejected with 400.
EventTypes []string `json:"event_types"`
}
EventFilter Selects the domain, the event types and the resources whose events are delivered.
type EventFilterCriteria ¶
type EventFilterCriteria struct {
// AnyBuild Optional within this object. Build domain: match every build.
AnyBuild *bool `json:"anyBuild,omitempty"`
// AnyFederated Optional within this object. Repository domains: match events in every federated repository.
AnyFederated *bool `json:"anyFederated,omitempty"`
// AnyLocal Optional within this object. Repository domains: match events in every local repository.
AnyLocal *bool `json:"anyLocal,omitempty"`
// AnyReleaseBundle Optional within this object. Release bundle domains: match every release bundle.
AnyReleaseBundle *bool `json:"anyReleaseBundle,omitempty"`
// AnyRemote Optional within this object. Repository domains: match events in every remote repository cache.
AnyRemote *bool `json:"anyRemote,omitempty"`
// ApplicationKeys Optional within this object. app_trust: application keys whose events match.
ApplicationKeys *[]string `json:"applicationKeys,omitempty"`
// ExcludePatterns Optional within this object. Repository and build domains: Ant patterns that exclude an otherwise matching path or build name.
ExcludePatterns *[]string `json:"excludePatterns,omitempty"`
// IncludePatterns Optional within this object. Repository and build domains: Ant patterns an artifact path (or build name) must match. Empty means everything.
IncludePatterns *[]string `json:"includePatterns,omitempty"`
// RegisteredReleaseBundlesNames Optional within this object. release_bundle, distribution, artifactory_release_bundle and destination: release bundle names that match.
RegisteredReleaseBundlesNames *[]string `json:"registeredReleaseBundlesNames,omitempty"`
// RepoKeys Optional within this object. Repository domains: repositories whose events match, in addition to the any* flags. A repository that does not exist is rejected with 400.
RepoKeys *[]string `json:"repoKeys,omitempty"`
// SelectedBuilds Optional within this object. Build domain: build names that match, in addition to anyBuild.
SelectedBuilds *[]string `json:"selectedBuilds,omitempty"`
// SelectedEnvironments Optional within this object. release_bundle_v2_promotion: target environments whose promotions match.
SelectedEnvironments *[]string `json:"selectedEnvironments,omitempty"`
// SelectedReleaseBundles Optional within this object. release_bundle_v2: map from release bundle name to the versions that match; an empty list matches every version of that bundle.
SelectedReleaseBundles *map[string][]string `json:"selectedReleaseBundles,omitempty"`
// Stages Optional within this object. app_trust: lifecycle stages whose events match.
Stages *[]string `json:"stages,omitempty"`
AdditionalProperties map[string]interface{} `json:"-"`
}
EventFilterCriteria Resource conditions for the domain. Which fields apply depends on the domain: artifact, artifact_property, docker and artifact_lifecycle use anyLocal, anyRemote, anyFederated, repoKeys and the patterns; build uses anyBuild, selectedBuilds and the patterns; release_bundle, distribution, artifactory_release_bundle and destination use anyReleaseBundle and registeredReleaseBundlesNames; release_bundle_v2 uses anyReleaseBundle and selectedReleaseBundles; release_bundle_v2_promotion uses selectedEnvironments; app_trust uses applicationKeys and stages; user and curation take no criteria. Fields that do not apply to the domain are stored and echoed but have no effect. Unknown fields are kept as given.
func (EventFilterCriteria) Get ¶
func (a EventFilterCriteria) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for EventFilterCriteria. Returns the specified element and whether it was found
func (EventFilterCriteria) MarshalJSON ¶
func (a EventFilterCriteria) MarshalJSON() ([]byte, error)
Override default JSON handling for EventFilterCriteria to handle AdditionalProperties
func (*EventFilterCriteria) Set ¶
func (a *EventFilterCriteria) Set(fieldName string, value interface{})
Setter for additional properties for EventFilterCriteria
func (*EventFilterCriteria) UnmarshalJSON ¶
func (a *EventFilterCriteria) UnmarshalJSON(b []byte) error
Override default JSON handling for EventFilterCriteria to handle AdditionalProperties
type GetWebhookSubscriptionResponse ¶
type GetWebhookSubscriptionResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *WebhookSubscription
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *ErrorResponse
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ErrorResponse
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *ErrorResponse
}
func ParseGetWebhookSubscriptionResponse ¶
func ParseGetWebhookSubscriptionResponse(rsp *http.Response) (*GetWebhookSubscriptionResponse, error)
ParseGetWebhookSubscriptionResponse parses an HTTP response from a GetWebhookSubscriptionWithResponse call
func (GetWebhookSubscriptionResponse) ContentType ¶
func (r GetWebhookSubscriptionResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetWebhookSubscriptionResponse) GetBody ¶
func (r GetWebhookSubscriptionResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetWebhookSubscriptionResponse) GetJSON200 ¶
func (r GetWebhookSubscriptionResponse) GetJSON200() *WebhookSubscription
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetWebhookSubscriptionResponse) GetJSON401 ¶
func (r GetWebhookSubscriptionResponse) GetJSON401() *ErrorResponse
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (GetWebhookSubscriptionResponse) GetJSON403 ¶
func (r GetWebhookSubscriptionResponse) GetJSON403() *ErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (GetWebhookSubscriptionResponse) GetJSON404 ¶
func (r GetWebhookSubscriptionResponse) GetJSON404() *ErrorResponse
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (GetWebhookSubscriptionResponse) Status ¶
func (r GetWebhookSubscriptionResponse) Status() string
Status returns HTTPResponse.Status
func (GetWebhookSubscriptionResponse) StatusCode ¶
func (r GetWebhookSubscriptionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetWebhookSubscriptionsResponse ¶
type GetWebhookSubscriptionsResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *[]WebhookSubscription
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *ErrorResponse
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ErrorResponse
}
func ParseGetWebhookSubscriptionsResponse ¶
func ParseGetWebhookSubscriptionsResponse(rsp *http.Response) (*GetWebhookSubscriptionsResponse, error)
ParseGetWebhookSubscriptionsResponse parses an HTTP response from a GetWebhookSubscriptionsWithResponse call
func (GetWebhookSubscriptionsResponse) ContentType ¶
func (r GetWebhookSubscriptionsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetWebhookSubscriptionsResponse) GetBody ¶
func (r GetWebhookSubscriptionsResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetWebhookSubscriptionsResponse) GetJSON200 ¶
func (r GetWebhookSubscriptionsResponse) GetJSON200() *[]WebhookSubscription
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetWebhookSubscriptionsResponse) GetJSON401 ¶
func (r GetWebhookSubscriptionsResponse) GetJSON401() *ErrorResponse
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (GetWebhookSubscriptionsResponse) GetJSON403 ¶
func (r GetWebhookSubscriptionsResponse) GetJSON403() *ErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (GetWebhookSubscriptionsResponse) Status ¶
func (r GetWebhookSubscriptionsResponse) Status() string
Status returns HTTPResponse.Status
func (GetWebhookSubscriptionsResponse) StatusCode ¶
func (r GetWebhookSubscriptionsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpHeader ¶
type HttpHeader struct {
// Name Required within this object. Header name.
Name string `json:"name"`
// Value Required within this object. Header value; custom-webhook values may reference {{.secrets.<name>}}.
Value string `json:"value"`
}
HttpHeader One HTTP header added to deliveries.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type NamedSecretCreate ¶
type NamedSecretCreate struct {
// Name Required within this object. Secret name, a letter or underscore followed by letters, digits or underscores.
Name string `json:"name"`
// Value Required within this object. Secret value. Write-only: responses return the name only.
Value *string `json:"value,omitempty"`
}
NamedSecretCreate A named secret for templates.
type NamedSecretRead ¶
type NamedSecretRead struct {
// Name Required within this object. Secret name.
Name string `json:"name"`
}
NamedSecretRead A named secret as the server returns it: the name only.
type NamedSecretUpdate ¶
type NamedSecretUpdate struct {
// Name Required within this object. Name of the secret to keep, rotate or wipe.
Name string `json:"name"`
// Value Optional within this object. Write-only. Omitted keeps the stored value, a non-empty value rotates it, and an empty string wipes it.
Value *string `json:"value,omitempty"`
}
NamedSecretUpdate A named secret in a replace body.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type StreamWebhookTroubleshootingParams ¶
type StreamWebhookTroubleshootingParams struct {
// Subscription Optional query parameter. Only records of this subscription key.
Subscription *string `form:"subscription,omitempty" json:"subscription,omitempty"`
// Target Optional query parameter. Only records whose target URL equals this value.
Target *string `form:"target,omitempty" json:"target,omitempty"`
// Start Optional query parameter. Earliest record to include, as Unix time in milliseconds, the unit of each record's timestamp; 0 means the oldest record held. Alone it keeps the stream live after the stored records; with end or count the call ends after them.
Start *int64 `form:"start,omitempty" json:"start,omitempty"`
// End Optional query parameter. Exclude records at or after this time, as Unix time in milliseconds. Only valid with start (400 otherwise); makes the call a bounded fetch.
End *int64 `form:"end,omitempty" json:"end,omitempty"`
// Count Optional query parameter. Maximum number of records returned. Only valid with start (400 otherwise); makes the call a bounded fetch.
Count *int `form:"count,omitempty" json:"count,omitempty"`
}
StreamWebhookTroubleshootingParams defines parameters for StreamWebhookTroubleshooting.
type StreamWebhookTroubleshootingResponse ¶
type StreamWebhookTroubleshootingResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *struct {
// ElapsedMillis Optional within this object. How long the attempt took, in milliseconds.
ElapsedMillis *int `json:"elapsed_millis,omitempty"`
// Errors Optional within this object. Errors met during the attempt (connection, timeout or template errors); empty on success.
Errors *[]string `json:"errors,omitempty"`
// Event Optional within this object. The event that was delivered.
Event *struct {
// Data Optional within this object. The event payload, serialised as a JSON string.
Data *string `json:"data,omitempty"`
// Domain Optional within this object. Event domain.
Domain *string `json:"domain,omitempty"`
// EventType Optional within this object. Event type.
EventType *string `json:"event_type,omitempty"`
// Id Optional within this object. Unique event identifier; retries of one event share it.
Id *string `json:"id,omitempty"`
// Source Optional within this object. Service that raised the event, for example jfrt@<service id>.
Source *string `json:"source,omitempty"`
// SubscriptionKey Optional within this object. Subscription that delivered it.
SubscriptionKey *string `json:"subscription_key,omitempty"`
} `json:"event,omitempty"`
// Request Optional within this object. The outgoing request, with secrets masked.
Request *struct {
// Headers Optional within this object. Request headers; the auth header and secret-bearing values are masked.
Headers *map[string]string `json:"headers,omitempty"`
// Method Optional within this object. HTTP method.
Method *string `json:"method,omitempty"`
// Payload Optional within this object. Rendered request body.
Payload *string `json:"payload,omitempty"`
// RetriesAttempted Optional within this object. Number of retries before this attempt.
RetriesAttempted *int `json:"retries_attempted,omitempty"`
// Url Optional within this object. Target URL.
Url *string `json:"url,omitempty"`
} `json:"request,omitempty"`
// Response Optional within this object. The receiver's answer; absent when no response arrived.
Response *struct {
// Body Optional within this object. Body the receiver returned, as text, truncated to the first 4 KiB.
Body *string `json:"body,omitempty"`
// Headers Optional within this object. Response headers.
Headers *map[string]string `json:"headers,omitempty"`
// Status Optional within this object. HTTP status code returned by the receiver.
Status *int `json:"status,omitempty"`
} `json:"response,omitempty"`
// Timestamp Optional within this object. When the delivery attempt was made, as Unix time in milliseconds.
Timestamp *int64 `json:"timestamp,omitempty"`
}
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *ErrorResponse
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ErrorResponse
}
func ParseStreamWebhookTroubleshootingResponse ¶
func ParseStreamWebhookTroubleshootingResponse(rsp *http.Response) (*StreamWebhookTroubleshootingResponse, error)
ParseStreamWebhookTroubleshootingResponse parses an HTTP response from a StreamWebhookTroubleshootingWithResponse call
func (StreamWebhookTroubleshootingResponse) ContentType ¶
func (r StreamWebhookTroubleshootingResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (StreamWebhookTroubleshootingResponse) GetBody ¶
func (r StreamWebhookTroubleshootingResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (StreamWebhookTroubleshootingResponse) GetJSON200 ¶
func (r StreamWebhookTroubleshootingResponse) GetJSON200() *struct { // ElapsedMillis Optional within this object. How long the attempt took, in milliseconds. ElapsedMillis *int `json:"elapsed_millis,omitempty"` // Errors Optional within this object. Errors met during the attempt (connection, timeout or template errors); empty on success. Errors *[]string `json:"errors,omitempty"` // Event Optional within this object. The event that was delivered. Event *struct { // Data Optional within this object. The event payload, serialised as a JSON string. Data *string `json:"data,omitempty"` // Domain Optional within this object. Event domain. Domain *string `json:"domain,omitempty"` // EventType Optional within this object. Event type. EventType *string `json:"event_type,omitempty"` // Id Optional within this object. Unique event identifier; retries of one event share it. Id *string `json:"id,omitempty"` // Source Optional within this object. Service that raised the event, for example jfrt@<service id>. Source *string `json:"source,omitempty"` // SubscriptionKey Optional within this object. Subscription that delivered it. SubscriptionKey *string `json:"subscription_key,omitempty"` } `json:"event,omitempty"` // Request Optional within this object. The outgoing request, with secrets masked. Request *struct { // Headers Optional within this object. Request headers; the auth header and secret-bearing values are masked. Headers *map[string]string `json:"headers,omitempty"` // Method Optional within this object. HTTP method. Method *string `json:"method,omitempty"` // Payload Optional within this object. Rendered request body. Payload *string `json:"payload,omitempty"` // RetriesAttempted Optional within this object. Number of retries before this attempt. RetriesAttempted *int `json:"retries_attempted,omitempty"` // Url Optional within this object. Target URL. Url *string `json:"url,omitempty"` } `json:"request,omitempty"` // Response Optional within this object. The receiver's answer; absent when no response arrived. Response *struct { // Body Optional within this object. Body the receiver returned, as text, truncated to the first 4 KiB. Body *string `json:"body,omitempty"` // Headers Optional within this object. Response headers. Headers *map[string]string `json:"headers,omitempty"` // Status Optional within this object. HTTP status code returned by the receiver. Status *int `json:"status,omitempty"` } `json:"response,omitempty"` // Timestamp Optional within this object. When the delivery attempt was made, as Unix time in milliseconds. Timestamp *int64 `json:"timestamp,omitempty"` }
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (StreamWebhookTroubleshootingResponse) GetJSON401 ¶
func (r StreamWebhookTroubleshootingResponse) GetJSON401() *ErrorResponse
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (StreamWebhookTroubleshootingResponse) GetJSON403 ¶
func (r StreamWebhookTroubleshootingResponse) GetJSON403() *ErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (StreamWebhookTroubleshootingResponse) Status ¶
func (r StreamWebhookTroubleshootingResponse) Status() string
Status returns HTTPResponse.Status
func (StreamWebhookTroubleshootingResponse) StatusCode ¶
func (r StreamWebhookTroubleshootingResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type TestWebhookSubscriptionJSONRequestBody ¶
type TestWebhookSubscriptionJSONRequestBody = WebhookSubscriptionCreate
TestWebhookSubscriptionJSONRequestBody defines body for TestWebhookSubscription for application/json ContentType.
type TestWebhookSubscriptionResponse ¶
type TestWebhookSubscriptionResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *ErrorResponse
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *ErrorResponse
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ErrorResponse
}
func ParseTestWebhookSubscriptionResponse ¶
func ParseTestWebhookSubscriptionResponse(rsp *http.Response) (*TestWebhookSubscriptionResponse, error)
ParseTestWebhookSubscriptionResponse parses an HTTP response from a TestWebhookSubscriptionWithResponse call
func (TestWebhookSubscriptionResponse) ContentType ¶
func (r TestWebhookSubscriptionResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (TestWebhookSubscriptionResponse) GetBody ¶
func (r TestWebhookSubscriptionResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (TestWebhookSubscriptionResponse) GetJSON400 ¶
func (r TestWebhookSubscriptionResponse) GetJSON400() *ErrorResponse
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (TestWebhookSubscriptionResponse) GetJSON401 ¶
func (r TestWebhookSubscriptionResponse) GetJSON401() *ErrorResponse
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (TestWebhookSubscriptionResponse) GetJSON403 ¶
func (r TestWebhookSubscriptionResponse) GetJSON403() *ErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (TestWebhookSubscriptionResponse) Status ¶
func (r TestWebhookSubscriptionResponse) Status() string
Status returns HTTPResponse.Status
func (TestWebhookSubscriptionResponse) StatusCode ¶
func (r TestWebhookSubscriptionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateWebhookSubscriptionJSONRequestBody ¶
type UpdateWebhookSubscriptionJSONRequestBody = WebhookSubscriptionUpdate
UpdateWebhookSubscriptionJSONRequestBody defines body for UpdateWebhookSubscription for application/json ContentType.
type UpdateWebhookSubscriptionResponse ¶
type UpdateWebhookSubscriptionResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *ErrorResponse
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *ErrorResponse
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ErrorResponse
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *ErrorResponse
}
func ParseUpdateWebhookSubscriptionResponse ¶
func ParseUpdateWebhookSubscriptionResponse(rsp *http.Response) (*UpdateWebhookSubscriptionResponse, error)
ParseUpdateWebhookSubscriptionResponse parses an HTTP response from a UpdateWebhookSubscriptionWithResponse call
func (UpdateWebhookSubscriptionResponse) ContentType ¶
func (r UpdateWebhookSubscriptionResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (UpdateWebhookSubscriptionResponse) GetBody ¶
func (r UpdateWebhookSubscriptionResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (UpdateWebhookSubscriptionResponse) GetJSON400 ¶
func (r UpdateWebhookSubscriptionResponse) GetJSON400() *ErrorResponse
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (UpdateWebhookSubscriptionResponse) GetJSON401 ¶
func (r UpdateWebhookSubscriptionResponse) GetJSON401() *ErrorResponse
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (UpdateWebhookSubscriptionResponse) GetJSON403 ¶
func (r UpdateWebhookSubscriptionResponse) GetJSON403() *ErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (UpdateWebhookSubscriptionResponse) GetJSON404 ¶
func (r UpdateWebhookSubscriptionResponse) GetJSON404() *ErrorResponse
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (UpdateWebhookSubscriptionResponse) Status ¶
func (r UpdateWebhookSubscriptionResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateWebhookSubscriptionResponse) StatusCode ¶
func (r UpdateWebhookSubscriptionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type WebhookHandler ¶
type WebhookHandler struct {
// CustomHttpHeaders Optional within this object. Extra HTTP headers sent with every delivery. Header names must be unique.
CustomHttpHeaders *[]HttpHeader `json:"custom_http_headers,omitempty"`
// HandlerType Required within this object. Must be webhook.
HandlerType WebhookHandlerHandlerType `json:"handler_type"`
// Proxy Optional within this object. Key of a configured outbound proxy to use for deliveries. Omitted means a direct connection, or the platform default proxy when one is set.
Proxy *string `json:"proxy,omitempty"`
// Secret Optional within this object. Shared secret for the `X-JFrog-Event-Auth` delivery header. Write-only: responses never echo it. On replace, omitting it keeps the stored secret, a new value rotates it, and an empty string removes it.
Secret *string `json:"secret,omitempty"`
// Url Required within this object. Absolute http or https URL the event is delivered to. Failed deliveries are retried with backoff.
Url string `json:"url"`
// UseSecretForSigning Optional within this object. Selects what `X-JFrog-Event-Auth` carries: false (the default) sends the secret itself, true sends the lower-case hex HMAC-SHA256 of the request body keyed with the secret, so the receiver can verify the payload. Ignored when no secret is set.
UseSecretForSigning *bool `json:"use_secret_for_signing,omitempty"`
}
WebhookHandler A webhook handler: the event is posted as JSON to url.
type WebhookHandlerHandlerType ¶
type WebhookHandlerHandlerType string
WebhookHandlerHandlerType Required within this object. Must be webhook.
const (
WebhookHandlerHandlerTypeWebhook WebhookHandlerHandlerType = "webhook"
)
Defines values for WebhookHandlerHandlerType.
func (WebhookHandlerHandlerType) Valid ¶
func (e WebhookHandlerHandlerType) Valid() bool
Valid indicates whether the value is a known member of the WebhookHandlerHandlerType enum.
type WebhookHandlerInputCreate ¶
type WebhookHandlerInputCreate struct {
// contains filtered or unexported fields
}
WebhookHandlerInputCreate A handler in a create body, discriminated by handler_type.
func (WebhookHandlerInputCreate) AsCustomWebhookHandlerCreate ¶
func (t WebhookHandlerInputCreate) AsCustomWebhookHandlerCreate() (CustomWebhookHandlerCreate, error)
AsCustomWebhookHandlerCreate returns the union data inside the WebhookHandlerInputCreate as a CustomWebhookHandlerCreate
func (WebhookHandlerInputCreate) AsWebhookHandler ¶
func (t WebhookHandlerInputCreate) AsWebhookHandler() (WebhookHandler, error)
AsWebhookHandler returns the union data inside the WebhookHandlerInputCreate as a WebhookHandler
func (WebhookHandlerInputCreate) Discriminator ¶
func (t WebhookHandlerInputCreate) Discriminator() (string, error)
func (*WebhookHandlerInputCreate) FromCustomWebhookHandlerCreate ¶
func (t *WebhookHandlerInputCreate) FromCustomWebhookHandlerCreate(v CustomWebhookHandlerCreate) error
FromCustomWebhookHandlerCreate overwrites any union data inside the WebhookHandlerInputCreate as the provided CustomWebhookHandlerCreate
func (*WebhookHandlerInputCreate) FromWebhookHandler ¶
func (t *WebhookHandlerInputCreate) FromWebhookHandler(v WebhookHandler) error
FromWebhookHandler overwrites any union data inside the WebhookHandlerInputCreate as the provided WebhookHandler
func (WebhookHandlerInputCreate) MarshalJSON ¶
func (t WebhookHandlerInputCreate) MarshalJSON() ([]byte, error)
func (*WebhookHandlerInputCreate) MergeCustomWebhookHandlerCreate ¶
func (t *WebhookHandlerInputCreate) MergeCustomWebhookHandlerCreate(v CustomWebhookHandlerCreate) error
MergeCustomWebhookHandlerCreate performs a merge with any union data inside the WebhookHandlerInputCreate, using the provided CustomWebhookHandlerCreate
func (*WebhookHandlerInputCreate) MergeWebhookHandler ¶
func (t *WebhookHandlerInputCreate) MergeWebhookHandler(v WebhookHandler) error
MergeWebhookHandler performs a merge with any union data inside the WebhookHandlerInputCreate, using the provided WebhookHandler
func (*WebhookHandlerInputCreate) UnmarshalJSON ¶
func (t *WebhookHandlerInputCreate) UnmarshalJSON(b []byte) error
func (WebhookHandlerInputCreate) ValueByDiscriminator ¶
func (t WebhookHandlerInputCreate) ValueByDiscriminator() (interface{}, error)
type WebhookHandlerInputUpdate ¶
type WebhookHandlerInputUpdate struct {
// contains filtered or unexported fields
}
WebhookHandlerInputUpdate A handler in a replace body, discriminated by handler_type.
func (WebhookHandlerInputUpdate) AsCustomWebhookHandlerUpdate ¶
func (t WebhookHandlerInputUpdate) AsCustomWebhookHandlerUpdate() (CustomWebhookHandlerUpdate, error)
AsCustomWebhookHandlerUpdate returns the union data inside the WebhookHandlerInputUpdate as a CustomWebhookHandlerUpdate
func (WebhookHandlerInputUpdate) AsWebhookHandler ¶
func (t WebhookHandlerInputUpdate) AsWebhookHandler() (WebhookHandler, error)
AsWebhookHandler returns the union data inside the WebhookHandlerInputUpdate as a WebhookHandler
func (WebhookHandlerInputUpdate) Discriminator ¶
func (t WebhookHandlerInputUpdate) Discriminator() (string, error)
func (*WebhookHandlerInputUpdate) FromCustomWebhookHandlerUpdate ¶
func (t *WebhookHandlerInputUpdate) FromCustomWebhookHandlerUpdate(v CustomWebhookHandlerUpdate) error
FromCustomWebhookHandlerUpdate overwrites any union data inside the WebhookHandlerInputUpdate as the provided CustomWebhookHandlerUpdate
func (*WebhookHandlerInputUpdate) FromWebhookHandler ¶
func (t *WebhookHandlerInputUpdate) FromWebhookHandler(v WebhookHandler) error
FromWebhookHandler overwrites any union data inside the WebhookHandlerInputUpdate as the provided WebhookHandler
func (WebhookHandlerInputUpdate) MarshalJSON ¶
func (t WebhookHandlerInputUpdate) MarshalJSON() ([]byte, error)
func (*WebhookHandlerInputUpdate) MergeCustomWebhookHandlerUpdate ¶
func (t *WebhookHandlerInputUpdate) MergeCustomWebhookHandlerUpdate(v CustomWebhookHandlerUpdate) error
MergeCustomWebhookHandlerUpdate performs a merge with any union data inside the WebhookHandlerInputUpdate, using the provided CustomWebhookHandlerUpdate
func (*WebhookHandlerInputUpdate) MergeWebhookHandler ¶
func (t *WebhookHandlerInputUpdate) MergeWebhookHandler(v WebhookHandler) error
MergeWebhookHandler performs a merge with any union data inside the WebhookHandlerInputUpdate, using the provided WebhookHandler
func (*WebhookHandlerInputUpdate) UnmarshalJSON ¶
func (t *WebhookHandlerInputUpdate) UnmarshalJSON(b []byte) error
func (WebhookHandlerInputUpdate) ValueByDiscriminator ¶
func (t WebhookHandlerInputUpdate) ValueByDiscriminator() (interface{}, error)
type WebhookHandlerRead ¶
type WebhookHandlerRead struct {
// CustomHttpHeaders Optional within this object. The extra headers.
CustomHttpHeaders *[]HttpHeader `json:"custom_http_headers,omitempty"`
// HandlerType Required within this object. Always webhook.
HandlerType WebhookHandlerReadHandlerType `json:"handler_type"`
// Proxy Optional within this object. The proxy key, when one is set.
Proxy *string `json:"proxy,omitempty"`
// Secret Optional within this object. Never the stored secret: absent when no secret is set, otherwise a fixed mask, so a client can tell that one exists.
Secret *string `json:"secret,omitempty"`
// Url Required within this object. The delivery URL.
Url string `json:"url"`
// UseSecretForSigning Optional within this object. Whether deliveries carry an HMAC signature rather than the raw secret.
UseSecretForSigning *bool `json:"use_secret_for_signing,omitempty"`
}
WebhookHandlerRead A webhook handler as the server returns it.
type WebhookHandlerReadHandlerType ¶
type WebhookHandlerReadHandlerType string
WebhookHandlerReadHandlerType Required within this object. Always webhook.
const (
WebhookHandlerReadHandlerTypeWebhook WebhookHandlerReadHandlerType = "webhook"
)
Defines values for WebhookHandlerReadHandlerType.
func (WebhookHandlerReadHandlerType) Valid ¶
func (e WebhookHandlerReadHandlerType) Valid() bool
Valid indicates whether the value is a known member of the WebhookHandlerReadHandlerType enum.
type WebhookHandlerResponse ¶
type WebhookHandlerResponse struct {
// contains filtered or unexported fields
}
WebhookHandlerResponse A handler as the server returns it, discriminated by handler_type.
func (WebhookHandlerResponse) AsCustomWebhookHandlerRead ¶
func (t WebhookHandlerResponse) AsCustomWebhookHandlerRead() (CustomWebhookHandlerRead, error)
AsCustomWebhookHandlerRead returns the union data inside the WebhookHandlerResponse as a CustomWebhookHandlerRead
func (WebhookHandlerResponse) AsWebhookHandlerRead ¶
func (t WebhookHandlerResponse) AsWebhookHandlerRead() (WebhookHandlerRead, error)
AsWebhookHandlerRead returns the union data inside the WebhookHandlerResponse as a WebhookHandlerRead
func (WebhookHandlerResponse) Discriminator ¶
func (t WebhookHandlerResponse) Discriminator() (string, error)
func (*WebhookHandlerResponse) FromCustomWebhookHandlerRead ¶
func (t *WebhookHandlerResponse) FromCustomWebhookHandlerRead(v CustomWebhookHandlerRead) error
FromCustomWebhookHandlerRead overwrites any union data inside the WebhookHandlerResponse as the provided CustomWebhookHandlerRead
func (*WebhookHandlerResponse) FromWebhookHandlerRead ¶
func (t *WebhookHandlerResponse) FromWebhookHandlerRead(v WebhookHandlerRead) error
FromWebhookHandlerRead overwrites any union data inside the WebhookHandlerResponse as the provided WebhookHandlerRead
func (WebhookHandlerResponse) MarshalJSON ¶
func (t WebhookHandlerResponse) MarshalJSON() ([]byte, error)
func (*WebhookHandlerResponse) MergeCustomWebhookHandlerRead ¶
func (t *WebhookHandlerResponse) MergeCustomWebhookHandlerRead(v CustomWebhookHandlerRead) error
MergeCustomWebhookHandlerRead performs a merge with any union data inside the WebhookHandlerResponse, using the provided CustomWebhookHandlerRead
func (*WebhookHandlerResponse) MergeWebhookHandlerRead ¶
func (t *WebhookHandlerResponse) MergeWebhookHandlerRead(v WebhookHandlerRead) error
MergeWebhookHandlerRead performs a merge with any union data inside the WebhookHandlerResponse, using the provided WebhookHandlerRead
func (*WebhookHandlerResponse) UnmarshalJSON ¶
func (t *WebhookHandlerResponse) UnmarshalJSON(b []byte) error
func (WebhookHandlerResponse) ValueByDiscriminator ¶
func (t WebhookHandlerResponse) ValueByDiscriminator() (interface{}, error)
type WebhookSubscription ¶
type WebhookSubscription struct {
// Debug Optional within this object. Whether successful deliveries are logged too.
Debug *bool `json:"debug,omitempty"`
// Description Optional within this object. The stored description.
Description *string `json:"description,omitempty"`
// Enabled Optional within this object. Whether events are delivered.
Enabled *bool `json:"enabled,omitempty"`
// EventFilter Optional within this object. The stored filter.
EventFilter *EventFilter `json:"event_filter,omitempty"`
// Handlers Optional within this object. The single handler, with secrets redacted.
Handlers *[]WebhookHandlerResponse `json:"handlers,omitempty"`
// Key Optional within this object. The subscription key.
Key *string `json:"key,omitempty"`
// ProjectKey Optional within this object. The owning project; absent for a global subscription.
ProjectKey *string `json:"project_key,omitempty"`
}
WebhookSubscription A stored webhook subscription as the server returns it, with secrets redacted.
type WebhookSubscriptionCreate ¶
type WebhookSubscriptionCreate struct {
// Debug Optional within this object. When true every delivery attempt, successful or not, is kept in the troubleshooting log; when false (the default) only failed attempts are kept.
Debug *bool `json:"debug,omitempty"`
// Description Optional within this object. Free text describing the subscription.
Description *string `json:"description,omitempty"`
// Enabled Required within this object. Whether events are delivered. A disabled subscription is stored but never fires.
Enabled bool `json:"enabled"`
// EventFilter Required within this object. Which events trigger the subscription. See EventFilter.
EventFilter EventFilter `json:"event_filter"`
// Handlers Required within this object. Exactly one delivery handler: a webhook (fixed JSON payload) or a custom-webhook (templated request).
Handlers []WebhookHandlerInputCreate `json:"handlers"`
// Key Required within this object. Subscription key, unique on the server: a letter followed by letters, digits, underscore or hyphen, at most 500 characters. Immutable once created; it is the {key} path parameter of the other operations.
Key string `json:"key"`
// ProjectKey Optional within this object. Project the subscription belongs to. Omitted means a global subscription. Project admins must set it to their own project. Immutable: a replace that changes it is rejected with 400.
ProjectKey *string `json:"project_key,omitempty"`
}
WebhookSubscriptionCreate Body for creating (or test-delivering) a webhook subscription.
type WebhookSubscriptionUpdate ¶
type WebhookSubscriptionUpdate struct {
// Debug Optional within this object. When true every delivery attempt, successful or not, is kept in the troubleshooting log; when false (the default) only failed attempts are kept.
Debug *bool `json:"debug,omitempty"`
// Description Optional within this object. Free text describing the subscription.
Description *string `json:"description,omitempty"`
// Enabled Required within this object. Whether events are delivered.
Enabled bool `json:"enabled"`
// EventFilter Required within this object. Which events trigger the subscription. See EventFilter.
EventFilter EventFilter `json:"event_filter"`
// Handlers Required within this object. Exactly one delivery handler: a webhook (fixed JSON payload) or a custom-webhook (templated request).
Handlers []WebhookHandlerInputUpdate `json:"handlers"`
// ProjectKey Optional within this object. Must equal the stored project key or be omitted; the project of a subscription cannot change.
ProjectKey *string `json:"project_key,omitempty"`
}
WebhookSubscriptionUpdate Body for replacing a webhook subscription. Every field is replaced except the key, which comes from the path, and secrets, which follow the keep, rotate and wipe rules on their fields.