Documentation
¶
Index ¶
- Variables
- func NewLogger(out io.Writer, lvl Level) *log.Logger
- func OptionHTTPClient(client *http.Client) func(c *Client)
- func OptionKafkaOptions(ko *KafkaOptions) func(c *Client)
- func OptionLogger(logger iLogger) func(c *Client)
- func OptionSQSOptions(so *SQSOptions) func(c *Client)
- type APIResponse
- type AlertConfiguration
- type ApiKey
- type ApiKeyAuth
- type BasicAuth
- type BatchReplayOptions
- type Client
- type CreateBroadcastEventRequest
- type CreateDynamicEventRequest
- type CreateEndpointRequest
- type CreateEventRequest
- type CreateFanoutEventRequest
- type CreatePortalLinkRequest
- type CreateProjectRequest
- type CreateSourceRequest
- type CreateSubscriptionRequest
- type DeliveryAttempt
- type DeliveryAttemptQueryParam
- type DeliveryAttemptResponse
- type EncodingType
- type Endpoint
- func (e *Endpoint) All(ctx context.Context, query *EndpointParams) (*ListEndpointResponse, error)
- func (e *Endpoint) Create(ctx context.Context, body *CreateEndpointRequest, query *EndpointParams) (*EndpointResponse, error)
- func (e *Endpoint) Delete(ctx context.Context, endpointID string, query *EndpointParams) error
- func (e *Endpoint) Find(ctx context.Context, endpointID string, query *EndpointParams) (*EndpointResponse, error)
- func (e *Endpoint) Pause(ctx context.Context, Id string) (*EndpointResponse, error)
- func (e Endpoint) RollSecret(ctx context.Context, Id string, body *RollSecretRequest) error
- func (e *Endpoint) Update(ctx context.Context, endpointID string, body *CreateEndpointRequest, ...) (*EndpointResponse, error)
- type EndpointAuth
- type EndpointParams
- type EndpointResponse
- type Event
- func (e *Event) All(ctx context.Context, query *EventParams) (*ListEventResponse, error)
- func (e *Event) BatchReplay(ctx context.Context, query *BatchReplayOptions) error
- func (e *Event) BroadcastEvent(ctx context.Context, body *CreateBroadcastEventRequest) error
- func (e *Event) Create(ctx context.Context, body *CreateEventRequest) error
- func (e *Event) FanoutEvent(ctx context.Context, body *CreateFanoutEventRequest) error
- func (e *Event) Find(ctx context.Context, eventID string) (*EventResponse, error)
- func (e *Event) Replay(ctx context.Context, eventID string) error
- type EventDelivery
- func (e *EventDelivery) All(ctx context.Context, query *EventDeliveryParams) (*ListEventDeliveryResponse, error)
- func (e *EventDelivery) BatchResend(ctx context.Context, query *EventDeliveryParams) error
- func (e *EventDelivery) Find(ctx context.Context, eventDeliveryID string, query *EventDeliveryParams) (*EventDeliveryResponse, error)
- func (e *EventDelivery) Resend(ctx context.Context, eventDeliveryID string, query *EventDeliveryParams) (*EventDeliveryResponse, error)
- type EventDeliveryParams
- type EventDeliveryResponse
- type EventMetadata
- type EventParams
- type EventResponse
- type Filter
- type FilterConfiguration
- type HMac
- type Kafka
- type KafkaOptions
- type Level
- type ListDeliveryAttemptResponse
- type ListEndpointResponse
- type ListEventDeliveryResponse
- type ListEventResponse
- type ListParams
- type ListPortalLinkResponse
- type ListProjectResponse
- type ListSourceResponse
- type ListSubscriptionResponse
- type Metadata
- type Option
- type Pagination
- type PortalLink
- func (p *PortalLink) All(ctx context.Context) (*ListPortalLinkResponse, error)
- func (p *PortalLink) Create(ctx context.Context, body *CreatePortalLinkRequest) (*PortalLinkResponse, error)
- func (p *PortalLink) Find(ctx context.Context, portalLinkID string) (*PortalLinkResponse, error)
- func (p *PortalLink) Revoke(ctx context.Context, portalLinkID string) error
- func (p *PortalLink) Update(ctx context.Context, portalLinkID string, body *UpdatePortalLinkRequest) (*PortalLinkResponse, error)
- type PortalLinkResponse
- type Project
- type ProjectConfig
- type ProjectMetadata
- type ProjectResponse
- type ProviderConfig
- type RateLimitConfiguration
- type RetentionPolicyConfiguration
- type RetryConfiguration
- type RollSecretRequest
- type SQS
- type SQSOptions
- type Secret
- type SignatureConfiguration
- type Source
- func (s *Source) All(ctx context.Context, query *SourceParams) (*ListSourceResponse, error)
- func (s *Source) Create(ctx context.Context, body *CreateSourceRequest) (*SourceResponse, error)
- func (s *Source) Delete(ctx context.Context, sourceId string) error
- func (s *Source) Find(ctx context.Context, sourceId string) (*SourceResponse, error)
- func (s *Source) Update(ctx context.Context, sourceId string, body *CreateSourceRequest) (*SourceResponse, error)
- type SourceParams
- type SourceResponse
- type StrategyConfiguration
- type Subscription
- func (s *Subscription) All(ctx context.Context, query *SubscriptionParams) (*ListSubscriptionResponse, error)
- func (s *Subscription) Create(ctx context.Context, body *CreateSubscriptionRequest) (*SubscriptionResponse, error)
- func (s *Subscription) Delete(ctx context.Context, subscriptionId string) error
- func (s *Subscription) Find(ctx context.Context, subscriptionId string) (*SubscriptionResponse, error)
- func (s *Subscription) Update(ctx context.Context, subscriptionId string, body *CreateSubscriptionRequest) (*SubscriptionResponse, error)
- type SubscriptionParams
- type SubscriptionResponse
- type TwitterProviderConfig
- type UpdatePortalLinkRequest
- type VerifierConfig
- type Webhook
- type WebhookOpts
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotListDeliveryAttemptResponse = errors.New("invalid list delivery attempt response") ErrNotDeliveryAttemptResponse = errors.New("invalid delivery attempt response") )
View Source
var ( ErrNotListEndpointResponse = errors.New("invalid list endpoint response") ErrNotEndpointResponse = errors.New("invalid endpoint response") )
View Source
var ( ErrNotListEventResponse = errors.New("invalid list event response") ErrNotEventResponse = errors.New("invalid event response") )
View Source
var ( ErrNotListEventDeliveryResponse = errors.New("invalid list event delivery response") ErrNotEventDeliveryResponse = errors.New("invalid event delivery response") )
View Source
var ( ErrNotListProjectResponse = errors.New("invalid list project response") ErrNotProjectResponse = errors.New("invalid project response") )
View Source
var ( ErrNotListSourceResponse = errors.New("invalid list source response") ErrNotSourceResponse = errors.New("invalid source response") )
View Source
var ( ErrNotListSubscriptionResponse = errors.New("invalid list subscription response") ErrNotSubscriptionResponse = errors.New("invalid subscription response") )
View Source
var ( ErrInvalidSignatureHeader = errors.New("webhook has no signature header") ErrInvalidHeader = errors.New("webhook has invalid header") ErrInvalidEncoding = errors.New("invalid encoding") ErrInvalidSignature = errors.New("webhook has no valid signature") ErrInvalidHashAlgorithm = errors.New("invalid hash algorithm") ErrTimestampExpired = errors.New("timestamp has expired") )
View Source
var ( DefaultTolerance = 300 * time.Second DefaultEncoding EncodingType = HexEncoding DefaultHash = "SHA256" DefaultSigHeader = "X-Convoy-Signature" )
Functions ¶
func OptionHTTPClient ¶
func OptionKafkaOptions ¶
func OptionKafkaOptions(ko *KafkaOptions) func(c *Client)
func OptionLogger ¶
func OptionLogger(logger iLogger) func(c *Client)
func OptionSQSOptions ¶
func OptionSQSOptions(so *SQSOptions) func(c *Client)
Types ¶
type APIResponse ¶
type APIResponse struct {
Status bool `json:"status"`
Message string `json:"message"`
Data *json.RawMessage `json:"data,omitempty"`
}
type AlertConfiguration ¶
type ApiKeyAuth ¶
type BatchReplayOptions ¶
type Client ¶
type Client struct {
Projects *Project
Endpoints *Endpoint
Events *Event
EventDeliveries *EventDelivery
DeliveryAttempts *DeliveryAttempt
Sources *Source
Subscriptions *Subscription
PortalLinks *PortalLink
Kafka *Kafka
SQS *SQS
// contains filtered or unexported fields
}
type CreateBroadcastEventRequest ¶ added in v2.1.10
type CreateEndpointRequest ¶
type CreateEndpointRequest struct {
Name string `json:"name"`
SupportEmail string `json:"support_email"`
OwnerID string `json:"owner_id"`
SlackWebhookUrl string `json:"slack_webhook_url"`
URL string `json:"url"`
Secret string `json:"secret,omitempty"`
Description string `json:"description,omitempty"`
AdvancedSignatures *bool `json:"advanced_signatures"`
IsDisabled bool `json:"is_disabled"`
ContentType string `json:"content_type,omitempty"`
Authentication *EndpointAuth `json:"authentication"`
HttpTimeout string `json:"http_timeout,omitempty"`
RateLimit int `json:"rate_limit,omitempty"`
RateLimitDuration string `json:"rate_limit_duration,omitempty"`
}
type CreateEventRequest ¶
type CreatePortalLinkRequest ¶
type CreateProjectRequest ¶
type CreateSourceRequest ¶
type CreateSourceRequest struct {
Name string `json:"name"`
Type string `json:"type"`
Provider string `json:"provider"`
IsDisabled bool `json:"is_disabled"`
Verifier VerifierConfig `json:"verifier"`
}
type CreateSubscriptionRequest ¶
type CreateSubscriptionRequest struct {
Name string `json:"name"`
SourceID string `json:"source_id"`
EndpointID string `json:"endpoint_id"`
AlertConfig *AlertConfiguration `json:"alert_config"`
RetryConfig *RetryConfiguration `json:"retry_config"`
FilterConfig *FilterConfiguration `json:"filter_config"`
}
type DeliveryAttempt ¶
type DeliveryAttempt struct {
// contains filtered or unexported fields
}
func (*DeliveryAttempt) All ¶
func (d *DeliveryAttempt) All(ctx context.Context, eventDeliveryID string, query *DeliveryAttemptQueryParam) (*ListDeliveryAttemptResponse, error)
func (*DeliveryAttempt) Find ¶
func (d *DeliveryAttempt) Find(ctx context.Context, eventDeliveryID, deliveryAttemptID string, query *DeliveryAttemptQueryParam) (*DeliveryAttemptResponse, error)
type DeliveryAttemptQueryParam ¶
type DeliveryAttemptQueryParam struct {
GroupID string `url:"groupId"`
}
type DeliveryAttemptResponse ¶
type DeliveryAttemptResponse struct {
UID string `json:"uid"`
MsgID string `json:"msg_id"`
URL string `json:"url"`
Method string `json:"method"`
EndpointID string `json:"endpoint_id"`
APIVersion string `json:"api_version"`
IPAddress string `json:"ip_address,omitempty"`
RequestHeader map[string]string `json:"request_http_header,omitempty"`
ResponseHeader map[string]string `json:"response_http_header,omitempty"`
HttpResponseCode string `json:"http_status,omitempty"`
ResponseData string `json:"response_data,omitempty"`
Error string `json:"error,omitempty"`
Status bool `json:"status,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
DeletedAt time.Time `json:"deleted_at,omitempty"`
}
type EncodingType ¶
type EncodingType string
const ( Base64Encoding EncodingType = "base64" HexEncoding EncodingType = "hex" )
type Endpoint ¶
type Endpoint struct {
// contains filtered or unexported fields
}
func (*Endpoint) All ¶
func (e *Endpoint) All(ctx context.Context, query *EndpointParams) (*ListEndpointResponse, error)
func (*Endpoint) Create ¶
func (e *Endpoint) Create(ctx context.Context, body *CreateEndpointRequest, query *EndpointParams) (*EndpointResponse, error)
func (*Endpoint) Find ¶
func (e *Endpoint) Find(ctx context.Context, endpointID string, query *EndpointParams) (*EndpointResponse, error)
func (Endpoint) RollSecret ¶
func (*Endpoint) Update ¶
func (e *Endpoint) Update(ctx context.Context, endpointID string, body *CreateEndpointRequest, query *EndpointParams) (*EndpointResponse, error)
type EndpointAuth ¶
type EndpointAuth struct {
Type string `json:"type"`
ApiKey *ApiKeyAuth `json:"api_key"`
}
type EndpointParams ¶
type EndpointParams struct {
ListParams
Query string `url:"query"`
OwnerID string `url:"ownerId"`
}
type EndpointResponse ¶
type EndpointResponse struct {
UID string `json:"uid"`
GroupID string `json:"group_id"`
OwnerID string `json:"owner_id"`
TargetUrl string `json:"target_url"`
Title string `json:"title"`
Description string `json:"description"`
Status string `json:"status"`
Secrets []Secret `json:"secrets"`
AdvancedSignatures bool `json:"advanced_signatures"`
SlackWebhookUrl string `json:"slack_webhook_url"`
SupportEmail string `json:"support_email"`
IsDisabled bool `json:"is_disabled"`
ContentType string `json:"content_type"`
HttpTimeout string `json:"http_timeout"`
RateLimit int `json:"rate_limit"`
RateLimitDuration string `json:"rate_limit_duration"`
Authentication *EndpointAuth `json:"authentication"`
Events int64 `json:"events"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
func (*Event) All ¶
func (e *Event) All(ctx context.Context, query *EventParams) (*ListEventResponse, error)
func (*Event) BatchReplay ¶
func (e *Event) BatchReplay(ctx context.Context, query *BatchReplayOptions) error
func (*Event) BroadcastEvent ¶ added in v2.1.10
func (e *Event) BroadcastEvent(ctx context.Context, body *CreateBroadcastEventRequest) error
func (*Event) FanoutEvent ¶
func (e *Event) FanoutEvent(ctx context.Context, body *CreateFanoutEventRequest) error
type EventDelivery ¶
type EventDelivery struct {
// contains filtered or unexported fields
}
func (*EventDelivery) All ¶
func (e *EventDelivery) All(ctx context.Context, query *EventDeliveryParams) (*ListEventDeliveryResponse, error)
func (*EventDelivery) BatchResend ¶
func (e *EventDelivery) BatchResend(ctx context.Context, query *EventDeliveryParams) error
func (*EventDelivery) Find ¶
func (e *EventDelivery) Find(ctx context.Context, eventDeliveryID string, query *EventDeliveryParams) (*EventDeliveryResponse, error)
func (*EventDelivery) Resend ¶
func (e *EventDelivery) Resend(ctx context.Context, eventDeliveryID string, query *EventDeliveryParams) (*EventDeliveryResponse, error)
type EventDeliveryParams ¶
type EventDeliveryParams struct {
ListParams
EventType string `url:"eventType"`
EventID string `url:"eventId"`
Status []string `url:"status"`
EndpointID []string `url:"endpointId"`
SubscriptionID string `url:"subscriptionId"`
StartDate time.Time `url:"startDate" layout:"2006-01-02T15:04:05"`
EndDate time.Time `url:"endDate" layout:"2006-01-02T15:04:05"`
}
type EventDeliveryResponse ¶
type EventDeliveryResponse struct {
UID string `json:"uid"`
EventMetadata EventMetadata `json:"event_metadata"`
Metadata Metadata `json:"metadata"`
Description string `json:"description,omitempty"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type EventMetadata ¶
type EventParams ¶
type EventParams struct {
ListParams
Query string `url:"query"`
IdempotencyKey string `url:"idempotencyKey"`
SourceID string `url:"sourceId"`
EndpointID []string `url:"endpointId"`
StartDate time.Time `url:"startDate" layout:"2006-01-02T15:04:05"`
EndDate time.Time `url:"endDate" layout:"2006-01-02T15:04:05"`
}
type EventResponse ¶
type FilterConfiguration ¶
type Kafka ¶
type Kafka struct {
// contains filtered or unexported fields
}
func (*Kafka) WriteBroadcastEvent ¶ added in v2.1.14
func (k *Kafka) WriteBroadcastEvent(ctx context.Context, body *CreateBroadcastEventRequest) error
func (*Kafka) WriteEvent ¶
func (k *Kafka) WriteEvent(ctx context.Context, body *CreateEventRequest) error
func (*Kafka) WriteFanoutEvent ¶
func (k *Kafka) WriteFanoutEvent(ctx context.Context, body *CreateFanoutEventRequest) error
type KafkaOptions ¶
type Level ¶
type Level int32
Level represents a log level.
const ( // FatalLevel is used for undesired and unexpected events that // the program cannot recover from. FatalLevel Level = iota // ErrorLevel is used for undesired and unexpected events that // the program can recover from. ErrorLevel // WarnLevel is used for undesired but relatively expected events, // which may indicate a problem. WarnLevel // InfoLevel is used for general informational log messages. InfoLevel // DebugLevel is the lowest level of logging. // Debug logs are intended for debugging and development purposes. DebugLevel )
type ListDeliveryAttemptResponse ¶
type ListDeliveryAttemptResponse []DeliveryAttemptResponse
type ListEndpointResponse ¶
type ListEndpointResponse struct {
Content []EndpointResponse `json:"content"`
Pagination Pagination `json:"pagination"`
}
type ListEventDeliveryResponse ¶
type ListEventDeliveryResponse struct {
Content []EventDeliveryResponse `json:"content"`
Pagination Pagination `json:"pagination"`
}
type ListEventResponse ¶
type ListEventResponse struct {
Content []EventResponse `json:"content"`
Pagination Pagination `json:"pagination"`
}
type ListParams ¶
type ListParams struct {
PerPage int `url:"perPage,omitempty"`
PrevPageCursor string `url:"prev_page_cursor"`
NextPageCursor string `url:"next_page_cursor"`
}
ListParams is used in requests for filtering lists
type ListPortalLinkResponse ¶
type ListPortalLinkResponse struct {
Content []PortalLinkResponse `json:"content"`
Pagination Pagination `json:"pagination"`
}
type ListProjectResponse ¶
type ListProjectResponse []ProjectResponse
type ListSourceResponse ¶
type ListSourceResponse struct {
Content []SourceResponse `json:"content"`
Pagination Pagination `json:"pagination"`
}
type ListSubscriptionResponse ¶
type ListSubscriptionResponse struct {
Content []SubscriptionResponse `json:"content"`
Pagination Pagination `json:"pagination"`
}
type Metadata ¶
type Metadata struct {
// Data to be sent to endpoint.
Data json.RawMessage `json:"data"`
Strategy string `json:"strategy"`
// NextSendTime denotes the next time a Event will be published in
// case it failed the first time
NextSendTime time.Time `json:"next_send_time"`
// NumTrials: number of times we have tried to deliver this Event to
// an application
NumTrials uint64 `json:"num_trials"`
IntervalSeconds uint64 `json:"interval_seconds"`
RetryLimit uint64 `json:"retry_limit"`
}
type Pagination ¶
type Pagination struct {
PerPage int `json:"per_page"`
HasNextPage bool `json:"has_next_page"`
HasPrevPage bool `json:"has_prev_page"`
PrevPageCursor string `json:"prev_page_cursor"`
NextPageCursor string `json:"next_page_cursor"`
}
Pagination type used in responses.
type PortalLink ¶
type PortalLink struct {
// contains filtered or unexported fields
}
func (*PortalLink) All ¶
func (p *PortalLink) All(ctx context.Context) (*ListPortalLinkResponse, error)
func (*PortalLink) Create ¶
func (p *PortalLink) Create(ctx context.Context, body *CreatePortalLinkRequest) (*PortalLinkResponse, error)
func (*PortalLink) Find ¶
func (p *PortalLink) Find(ctx context.Context, portalLinkID string) (*PortalLinkResponse, error)
func (*PortalLink) Revoke ¶
func (p *PortalLink) Revoke(ctx context.Context, portalLinkID string) error
func (*PortalLink) Update ¶
func (p *PortalLink) Update(ctx context.Context, portalLinkID string, body *UpdatePortalLinkRequest) (*PortalLinkResponse, error)
type PortalLinkResponse ¶
type PortalLinkResponse struct {
UID string `json:"uid"`
Name string `json:"name"`
ProjectID string `json:"project_id"`
OwnerID string `json:"owner_id"`
Endpoints []string `json:"endpoints"`
EndpointCount int `json:"endpoint_count"`
CanManageEndpoint bool `json:"can_manage_endpoint"`
Token string `json:"token"`
EndpointsMetadata []EndpointResponse `json:"endpoints_metadata"`
URL string `json:"url"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt time.Time
}
type Project ¶
type Project struct {
// contains filtered or unexported fields
}
func (*Project) Update ¶
func (p *Project) Update(ctx context.Context, projectID string, body *CreateProjectRequest) (*ProjectResponse, error)
type ProjectConfig ¶
type ProjectConfig struct {
RateLimit *RateLimitConfiguration `json:"ratelimit"`
Strategy *StrategyConfiguration `json:"strategy"`
Signature *SignatureConfiguration `json:"signature"`
RetentionPolicy *RetentionPolicyConfiguration `json:"retention_policy"`
DisableEndpoint bool `json:"disable_endpoint"`
ReplayAttacks bool `json:"replay_attacks"`
IsRetentionPolicyEnabled bool `json:"is_retention_policy_enabled"`
}
type ProjectMetadata ¶
type ProjectMetadata struct {
RetainedEvents int `json:"retained_events"`
}
type ProjectResponse ¶
type ProjectResponse struct {
UID string `json:"uid"`
Name string `json:"name"`
LogoUrl string `json:"logo_url"`
OrganisationID string `json:"organisation_id"`
Type string `json:"type"`
Config *ProjectConfig `json:"config"`
Statistics struct {
MessageSent int `json:"messages_sent"`
TotalApps int `json:"total_apps"`
} `json:"statistics"`
RateLimit int `json:"rate_limit"`
RateLimitDuration string `json:"rate_limit_duration"`
Metadata *ProjectMetadata `json:"metadata"`
CreatedAt time.Time `json:"created_at,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
}
type ProviderConfig ¶
type ProviderConfig struct {
Twitter *TwitterProviderConfig `json:"twitter" bson:"twitter"`
}
type RateLimitConfiguration ¶
type RetentionPolicyConfiguration ¶
type RetentionPolicyConfiguration struct {
Policy string `json:"policy"`
}
type RetryConfiguration ¶
type RollSecretRequest ¶
type SQS ¶
type SQS struct {
// contains filtered or unexported fields
}
func (*SQS) WriteBroadcastEvent ¶ added in v2.1.14
func (s *SQS) WriteBroadcastEvent(ctx context.Context, body *CreateBroadcastEventRequest) error
func (*SQS) WriteEvent ¶
func (s *SQS) WriteEvent(ctx context.Context, body *CreateEventRequest) error
func (*SQS) WriteFanoutEvent ¶
func (s *SQS) WriteFanoutEvent(ctx context.Context, body *CreateFanoutEventRequest) error
type SQSOptions ¶
type SignatureConfiguration ¶
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
func (*Source) All ¶
func (s *Source) All(ctx context.Context, query *SourceParams) (*ListSourceResponse, error)
func (*Source) Create ¶
func (s *Source) Create(ctx context.Context, body *CreateSourceRequest) (*SourceResponse, error)
func (*Source) Update ¶
func (s *Source) Update(ctx context.Context, sourceId string, body *CreateSourceRequest) (*SourceResponse, error)
type SourceParams ¶
type SourceParams struct {
ListParams
Type string `url:"type"`
}
type SourceResponse ¶
type SourceResponse struct {
UID string `json:"uid"`
GroupID string `json:"group_id"`
MaskID string `json:"mask_id"`
Name string `json:"name"`
Type string `json:"type"`
Provider string `json:"provider"`
IsDisabled bool `json:"is_disabled"`
Verifier *VerifierConfig `json:"verifier"`
ProviderConfig *ProviderConfig `json:"provider_config"`
ForwardHeaders []string `json:"forward_headers"`
CreatedAt time.Time `json:"created_at,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
}
type StrategyConfiguration ¶
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
func (*Subscription) All ¶
func (s *Subscription) All(ctx context.Context, query *SubscriptionParams) (*ListSubscriptionResponse, error)
func (*Subscription) Create ¶
func (s *Subscription) Create(ctx context.Context, body *CreateSubscriptionRequest) (*SubscriptionResponse, error)
func (*Subscription) Delete ¶
func (s *Subscription) Delete(ctx context.Context, subscriptionId string) error
func (*Subscription) Find ¶
func (s *Subscription) Find(ctx context.Context, subscriptionId string) (*SubscriptionResponse, error)
func (*Subscription) Update ¶
func (s *Subscription) Update(ctx context.Context, subscriptionId string, body *CreateSubscriptionRequest) (*SubscriptionResponse, error)
type SubscriptionParams ¶
type SubscriptionParams struct {
ListParams
EndpointID []string `url:"endpointId"`
}
type SubscriptionResponse ¶
type SubscriptionResponse struct {
UID string `json:"uid"`
Name string `json:"name"`
Type string `json:"type"`
Status string `json:"status"`
Source *SourceResponse `json:"source_metadata,omitempty"`
// subscription config
AlertConfig *AlertConfiguration `json:"alert_config,omitempty"`
RetryConfig *RetryConfiguration `json:"retry_config,omitempty"`
FilterConfig *FilterConfiguration `json:"filter_config,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
}
type TwitterProviderConfig ¶
type UpdatePortalLinkRequest ¶
type VerifierConfig ¶
type Webhook ¶
type Webhook struct {
// contains filtered or unexported fields
}
func NewWebhook ¶
func NewWebhook(opts *WebhookOpts) *Webhook
func (*Webhook) VerifyPayload ¶ added in v2.1.3
type WebhookOpts ¶ added in v2.1.3
Source Files
¶
Click to show internal directories.
Click to hide internal directories.