Documentation
¶
Index ¶
- Variables
- type APIResponse
- type AppMetadata
- type Application
- func (a *Application) All(query *ApplicationQueryParam) (*ListApplicationResponse, error)
- func (a *Application) Create(opts *CreateApplicationRequest, query *ApplicationQueryParam) (*ApplicationResponse, error)
- func (a *Application) Delete(id string, query *ApplicationQueryParam) error
- func (a *Application) Find(id string, query *ApplicationQueryParam) (*ApplicationResponse, error)
- func (a *Application) Update(id string, opts *CreateApplicationRequest, query *ApplicationQueryParam) (*ApplicationResponse, error)
- type ApplicationQueryParam
- type ApplicationResponse
- type BatchResendRequest
- type Convoy
- type CreateApplicationRequest
- type CreateEndpointRequest
- type CreateEventRequest
- type CreateGroupRequest
- type DefaultStrategyConfiguration
- type DeliveryAttempt
- type DeliveryAttemptQueryParam
- type DeliveryAttemptResponse
- type Endpoint
- func (e *Endpoint) All(appId string, query *EndpointQueryParam) (*ListEndpointResponse, error)
- func (e *Endpoint) Create(appId string, opts *CreateEndpointRequest, query *EndpointQueryParam) (*EndpointResponse, error)
- func (e *Endpoint) Delete(appId, endpointId string, query *EndpointQueryParam) error
- func (e *Endpoint) Find(appId, endpointId string, query *EndpointQueryParam) (*EndpointResponse, error)
- func (e *Endpoint) Update(appId, endpointId string, opts *CreateEndpointRequest, ...) (*EndpointResponse, error)
- type EndpointMetadata
- type EndpointQueryParam
- type EndpointResponse
- type Event
- type EventDelivery
- func (e *EventDelivery) All(query *EventDeliveryQueryParam) (*ListEventDeliveryResponse, error)
- func (e *EventDelivery) BatchResend(opts *BatchResendRequest, query *EventDeliveryQueryParam) error
- func (e *EventDelivery) Find(id string, query *EventDeliveryQueryParam) (*EventDeliveryResponse, error)
- func (e *EventDelivery) Resend(id string, query *EventDeliveryQueryParam) (*EventDeliveryResponse, error)
- type EventDeliveryQueryParam
- type EventDeliveryResponse
- type EventMetadata
- type EventQueryParam
- type EventResponse
- type ExponentialBackoffStrategyConfiguration
- type Group
- func (g *Group) All(query *GroupQueryParams) (*ListGroupResponse, error)
- func (g *Group) Create(opts *CreateGroupRequest) (*GroupResponse, error)
- func (g *Group) Delete(id string) error
- func (g *Group) Find(id string) (*GroupResponse, error)
- func (g *Group) Update(id string, opts *CreateGroupRequest) (*GroupResponse, error)
- type GroupConfig
- type GroupQueryParams
- type GroupResponse
- type HttpClient
- type ListApplicationResponse
- type ListDeliveryAttemptResponse
- type ListEndpointResponse
- type ListEventDeliveryResponse
- type ListEventResponse
- type ListGroupResponse
- type Metadata
- type Options
- type Pagination
- type QueryParameter
- type SignatureConfiguration
- type StrategyConfiguration
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotListApplicationResponse = errors.New("invalid list application response") ErrNotApplicationResponse = errors.New("invalid application response") )
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 ( ErrNotListGroupResponse = errors.New("invalid list group response") ErrNotGroupResponse = errors.New("invalid group response") )
Functions ¶
This section is empty.
Types ¶
type APIResponse ¶ added in v0.3.0
type APIResponse struct {
Status bool `json:"status"`
Message string `json:"message"`
Data *json.RawMessage `json:"data,omitempty"`
}
type AppMetadata ¶ added in v0.3.0
type Application ¶ added in v0.3.0
type Application struct {
// contains filtered or unexported fields
}
func (*Application) All ¶ added in v0.3.0
func (a *Application) All(query *ApplicationQueryParam) (*ListApplicationResponse, error)
func (*Application) Create ¶ added in v0.3.0
func (a *Application) Create(opts *CreateApplicationRequest, query *ApplicationQueryParam) (*ApplicationResponse, error)
func (*Application) Delete ¶ added in v0.3.0
func (a *Application) Delete(id string, query *ApplicationQueryParam) error
func (*Application) Find ¶ added in v0.3.0
func (a *Application) Find(id string, query *ApplicationQueryParam) (*ApplicationResponse, error)
func (*Application) Update ¶ added in v0.3.0
func (a *Application) Update(id string, opts *CreateApplicationRequest, query *ApplicationQueryParam) (*ApplicationResponse, error)
type ApplicationQueryParam ¶ added in v0.3.0
type ApplicationResponse ¶ added in v0.3.0
type ApplicationResponse struct {
UID string `json:"uid"`
GroupID string `json:"group_id"`
Name string `json:"name"`
Endpoints []EndpointResponse `json:"endpoints"`
SupportEmail string `json:"support_email"`
IsDisabled bool `json:"is_disabled"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Events int64 `json:"events"`
}
type BatchResendRequest ¶ added in v0.3.0
type BatchResendRequest struct {
IDs []string `json:"ids"`
}
type Convoy ¶
type Convoy struct {
Applications *Application
Groups *Group
Endpoints *Endpoint
Events *Event
EventDeliveries *EventDelivery
DeliveryAttempts *DeliveryAttempt
// contains filtered or unexported fields
}
type CreateApplicationRequest ¶ added in v0.3.0
type CreateEndpointRequest ¶ added in v0.3.0
type CreateEndpointRequest struct {
URL string `json:"url"`
Secret string `json:"secret,omitempty"`
Description string `json:"description,omitempty"`
Events []string `json:"events,omitempty"`
HttpTimeout string `json:"http_timeout,omitempty"`
RateLimit int `json:"rate_limit,omitempty"`
RateLimitDuration string `json:"rate_limit_duration,omitempty"`
}
type CreateEventRequest ¶ added in v0.3.0
type CreateEventRequest struct {
AppID string `json:"app_id"`
EventType string `json:"event_type"`
Data json.RawMessage `json:"data"`
}
type CreateGroupRequest ¶ added in v0.3.0
type CreateGroupRequest struct {
Name string `json:"name"`
LogoUrl string `json:"logo_url,omitempty"`
RateLimit int `json:"rate_limit,omitempty"`
RateLimitDuration string `json:"rate_limit_duration,omitempty"`
Group GroupConfig `json:"config"`
}
type DefaultStrategyConfiguration ¶ added in v0.3.0
type DeliveryAttempt ¶ added in v0.3.0
type DeliveryAttempt struct {
// contains filtered or unexported fields
}
func (*DeliveryAttempt) All ¶ added in v0.3.0
func (d *DeliveryAttempt) All(eventDeliveryId string, query *DeliveryAttemptQueryParam) (*ListDeliveryAttemptResponse, error)
func (*DeliveryAttempt) Find ¶ added in v0.3.0
func (d *DeliveryAttempt) Find(eventDeliveryId, deliveryAttemptId string, query *DeliveryAttemptQueryParam) (*DeliveryAttemptResponse, error)
type DeliveryAttemptQueryParam ¶ added in v0.3.0
type DeliveryAttemptQueryParam struct {
GroupID string
}
type DeliveryAttemptResponse ¶ added in v0.3.0
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 Endpoint ¶ added in v0.3.0
type Endpoint struct {
// contains filtered or unexported fields
}
func (*Endpoint) All ¶ added in v0.3.0
func (e *Endpoint) All(appId string, query *EndpointQueryParam) (*ListEndpointResponse, error)
func (*Endpoint) Create ¶ added in v0.3.0
func (e *Endpoint) Create(appId string, opts *CreateEndpointRequest, query *EndpointQueryParam) (*EndpointResponse, error)
func (*Endpoint) Delete ¶ added in v0.3.0
func (e *Endpoint) Delete(appId, endpointId string, query *EndpointQueryParam) error
func (*Endpoint) Find ¶ added in v0.3.0
func (e *Endpoint) Find(appId, endpointId string, query *EndpointQueryParam) (*EndpointResponse, error)
func (*Endpoint) Update ¶ added in v0.3.0
func (e *Endpoint) Update(appId, endpointId string, opts *CreateEndpointRequest, query *EndpointQueryParam) (*EndpointResponse, error)
type EndpointMetadata ¶ added in v0.3.0
type EndpointMetadata struct {
UID string `json:"uid"`
TargetURL string `json:"target_url"`
Status string `json:"status"`
Secret string `json:"secret"`
HttpTimeout string `json:"http_timeout"`
RateLimit int `json:"rate_limit"`
RateLimitDuration string `json:"rate_limit_duration"`
Sent bool `json:"sent"`
}
type EndpointQueryParam ¶ added in v0.3.0
type EndpointQueryParam struct {
GroupID string
}
type EndpointResponse ¶ added in v0.3.0
type EndpointResponse struct {
UID string `json:"uid"`
TargetUrl string `json:"target_url"`
Description string `json:"description"`
Status string `json:"status"`
Secret string `json:"secret"`
HttpTimeout string `json:"http_timeout"`
RateLimit int `json:"rate_limit"`
RateLimitDuration string `json:"rate_limit_duration"`
Events []string `json:"events"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type Event ¶ added in v0.3.0
type Event struct {
// contains filtered or unexported fields
}
func (*Event) All ¶ added in v0.3.0
func (e *Event) All(query *EventQueryParam) (*ListEventResponse, error)
func (*Event) Create ¶ added in v0.3.0
func (e *Event) Create(opts *CreateEventRequest, query *EventQueryParam) (*EventResponse, error)
func (*Event) Find ¶ added in v0.3.0
func (e *Event) Find(id string, query *EventQueryParam) (*EventResponse, error)
type EventDelivery ¶ added in v0.3.0
type EventDelivery struct {
// contains filtered or unexported fields
}
func (*EventDelivery) All ¶ added in v0.3.0
func (e *EventDelivery) All(query *EventDeliveryQueryParam) (*ListEventDeliveryResponse, error)
func (*EventDelivery) BatchResend ¶ added in v0.3.0
func (e *EventDelivery) BatchResend(opts *BatchResendRequest, query *EventDeliveryQueryParam) error
func (*EventDelivery) Find ¶ added in v0.3.0
func (e *EventDelivery) Find(id string, query *EventDeliveryQueryParam) (*EventDeliveryResponse, error)
func (*EventDelivery) Resend ¶ added in v0.3.0
func (e *EventDelivery) Resend(id string, query *EventDeliveryQueryParam) (*EventDeliveryResponse, error)
type EventDeliveryQueryParam ¶ added in v0.3.0
type EventDeliveryResponse ¶ added in v0.3.0
type EventDeliveryResponse struct {
UID string `json:"uid"`
EventMetadata EventMetadata `json:"event_metadata"`
EndpointMetadata EndpointMetadata `json:"endpoint"`
AppMetadata AppMetadata `json:"app_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 ¶ added in v0.3.0
type EventQueryParam ¶ added in v0.3.0
type EventResponse ¶ added in v0.3.0
type EventResponse struct {
UID string `json:"uid"`
EventType string `json:"event_type"`
MatchedEndpoints int `json:"matched_endpoints"`
ProviderID string `json:"provider_id"`
Data json.RawMessage `json:"data"`
AppMetadata AppMetadata `json:"app_metadata"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type ExponentialBackoffStrategyConfiguration ¶ added in v0.3.0
type ExponentialBackoffStrategyConfiguration struct {
RetryLimit uint64 `json:"retryLimit"`
}
type Group ¶ added in v0.3.0
type Group struct {
// contains filtered or unexported fields
}
func (*Group) All ¶ added in v0.3.0
func (g *Group) All(query *GroupQueryParams) (*ListGroupResponse, error)
func (*Group) Create ¶ added in v0.3.0
func (g *Group) Create(opts *CreateGroupRequest) (*GroupResponse, error)
func (*Group) Update ¶ added in v0.3.0
func (g *Group) Update(id string, opts *CreateGroupRequest) (*GroupResponse, error)
type GroupConfig ¶ added in v0.3.0
type GroupConfig struct {
Strategy StrategyConfiguration `json:"strategy"`
Signature SignatureConfiguration `json:"signature"`
DisableEndpoint bool `json:"disable_endpoint"`
ReplayAttacks bool `json:"replay_attacks"`
}
type GroupQueryParams ¶ added in v0.3.0
type GroupResponse ¶ added in v0.3.0
type GroupResponse struct {
UID string `json:"uid"`
Name string `json:"name"`
LogoUrl string `json:"logo_url"`
Group GroupConfig `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"`
CreatedAt time.Time `json:"created_at,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
}
type HttpClient ¶ added in v0.3.0
type HttpClient struct {
// contains filtered or unexported fields
}
func NewClient ¶ added in v0.3.0
func NewClient(opts Options) *HttpClient
func (*HttpClient) SendRequest ¶ added in v0.3.0
func (c *HttpClient) SendRequest(opts *requestOpts) (interface{}, error)
type ListApplicationResponse ¶ added in v0.3.0
type ListApplicationResponse struct {
Content []ApplicationResponse `json:"content"`
Pagination Pagination `json:"pagination"`
}
type ListDeliveryAttemptResponse ¶ added in v0.3.0
type ListDeliveryAttemptResponse []DeliveryAttemptResponse
type ListEndpointResponse ¶ added in v0.3.0
type ListEndpointResponse []EndpointResponse
type ListEventDeliveryResponse ¶ added in v0.3.0
type ListEventDeliveryResponse struct {
Content []EventDeliveryResponse `json:"content"`
Pagination Pagination `json:"pagination"`
}
type ListEventResponse ¶ added in v0.3.0
type ListEventResponse struct {
Content []EventResponse `json:"content"`
Pagination Pagination `json:"pagination"`
}
type ListGroupResponse ¶ added in v0.3.0
type ListGroupResponse []GroupResponse
type Metadata ¶ added in v0.3.0
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 ¶ added in v0.3.0
type QueryParameter ¶ added in v0.3.0
type SignatureConfiguration ¶ added in v0.3.0
type StrategyConfiguration ¶ added in v0.3.0
type StrategyConfiguration struct {
Type string `json:"type"`
Default DefaultStrategyConfiguration `json:"default"`
ExponentialBackoff ExponentialBackoffStrategyConfiguration `json:"exponentialBackoff,omitempty"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.