Documentation
¶
Index ¶
- type APIKey
- type APIKeyByIDResponse
- type APIKeyResponse
- type Configuration
- type ConfigurationResponse
- type CreateEndpointApiKey
- type CreateProjectResponse
- type DashboardSummary
- type DeliveryAttempt
- type Endpoint
- type Event
- type ExpireSecret
- type FanoutEvent
- type FilterSchema
- type ForgotPassword
- type IDs
- type LoginUser
- type LoginUserResponse
- type MessageResponse
- type Organisation
- type OrganisationInvite
- type PersonalAPIKey
- type PortalAPIKeyResponse
- type PortalLink
- type PortalLinkResponse
- type Project
- type RegisterUser
- type ResetPassword
- type RetryConfiguration
- type Role
- type Source
- type SourceResponse
- type Subscription
- type TestFilter
- type Token
- type UpdateEndpoint
- type UpdateOrganisationMember
- type UpdatePassword
- type UpdateProject
- type UpdateSource
- type UpdateSubscription
- type UpdateUser
- type User
- type UserExists
- type UserInviteTokenResponse
- type WebhookRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKeyByIDResponse ¶
type APIKeyByIDResponse struct {
UID string `json:"uid"`
Name string `json:"name"`
Role auth.Role `json:"role"`
Type datastore.KeyType `json:"key_type"`
ExpiresAt null.Time `json:"expires_at,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
}
type APIKeyResponse ¶
type Configuration ¶
type Configuration struct {
IsAnalyticsEnabled *bool `json:"is_analytics_enabled"`
IsSignupEnabled *bool `json:"is_signup_enabled"`
StoragePolicy *datastore.StoragePolicyConfiguration `json:"storage_policy"`
}
type ConfigurationResponse ¶
type ConfigurationResponse struct {
UID string `json:"uid"`
IsAnalyticsEnabled bool `json:"is_analytics_enabled"`
IsSignupEnabled bool `json:"is_signup_enabled"`
ApiVersion string `json:"api_version"`
StoragePolicy *datastore.StoragePolicyConfiguration `json:"storage_policy"`
CreatedAt time.Time `json:"created_at,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
DeletedAt null.Time `json:"deleted_at,omitempty"`
}
type CreateEndpointApiKey ¶
type CreateProjectResponse ¶
type CreateProjectResponse struct {
APIKey *APIKeyResponse `json:"api_key"`
Project *datastore.Project `json:"project"`
}
type DashboardSummary ¶
type DashboardSummary struct {
EventsSent uint64 `json:"events_sent" bson:"events_sent"`
Applications int `json:"apps" bson:"apps"`
Period string `json:"period" bson:"period"`
PeriodData *[]datastore.EventInterval `json:"event_data,omitempty" bson:"event_data"`
}
type DeliveryAttempt ¶
type DeliveryAttempt struct {
MessageID string `json:"msg_id" bson:"msg_id"`
APIVersion string `json:"api_version" bson:"api_version"`
IPAddress string `json:"ip" bson:"ip"`
Status string `json:"status" bson:"status"`
CreatedAt int64 `json:"created_at" bson:"created_at"`
MessageResponse MessageResponse `json:"response" bson:"response"`
}
type Endpoint ¶
type Endpoint struct {
URL string `json:"url" bson:"url" valid:"required~please provide a url for your endpoint"`
Secret string `json:"secret" bson:"secret"`
OwnerID string `json:"owner_id" bson:"owner_id"`
Description string `json:"description" bson:"description"`
AdvancedSignatures bool `json:"advanced_signatures" bson:"advanced_signatures"`
Name string `json:"name" bson:"name" valid:"required~please provide your endpointName"`
SupportEmail string `json:"support_email" bson:"support_email" valid:"email~please provide a valid email"`
IsDisabled bool `json:"is_disabled"`
SlackWebhookURL string `json:"slack_webhook_url" bson:"slack_webhook_url"`
HttpTimeout string `json:"http_timeout" bson:"http_timeout"`
RateLimit int `json:"rate_limit" bson:"rate_limit"`
RateLimitDuration string `json:"rate_limit_duration" bson:"rate_limit_duration"`
Authentication *datastore.EndpointAuthentication `json:"authentication"`
AppID string // Deprecated but necessary for backward compatibility
}
type Event ¶
type Event struct {
EndpointID string `json:"endpoint_id"`
AppID string `json:"app_id" bson:"app_id"` // Deprecated but necessary for backward compatibility
EventType string `json:"event_type" bson:"event_type" valid:"required~please provide an event type"`
// Data is an arbitrary JSON value that gets sent as the body of the
// webhook to the endpoints
Data json.RawMessage `json:"data" bson:"data" valid:"required~please provide your data"`
CustomHeaders map[string]string `json:"custom_headers"`
}
type ExpireSecret ¶
type FanoutEvent ¶
type FanoutEvent struct {
OwnerID string `json:"owner_id" valid:"required~please provide an owner id"`
EventType string `json:"event_type" valid:"required~please provide an event type"`
// Data is an arbitrary JSON value that gets sent as the body of the
// webhook to the endpoints
Data json.RawMessage `json:"data" bson:"data" valid:"required~please provide your data"`
CustomHeaders map[string]string `json:"custom_headers"`
}
type FilterSchema ¶
type ForgotPassword ¶
type ForgotPassword struct {
Email string `json:"email" valid:"required~please provide an email,email"`
}
type LoginUserResponse ¶
type LoginUserResponse struct {
UID string `json:"uid"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Email string `json:"email"`
Token Token `json:"token"`
EmailVerified bool `json:"email_verified"`
CreatedAt time.Time `json:"created_at,omitempty" bson:"created_at"`
UpdatedAt time.Time `json:"updated_at,omitempty" bson:"updated_at"`
}
type MessageResponse ¶
type MessageResponse struct {
Status int `json:"status" bson:"status"`
Data json.RawMessage `json:"data" bson:"data"`
}
type Organisation ¶
type OrganisationInvite ¶
type PersonalAPIKey ¶
type PortalAPIKeyResponse ¶
type PortalLink ¶
type PortalLinkResponse ¶
type PortalLinkResponse struct {
UID string `json:"uid"`
Name string `json:"name"`
ProjectID string `json:"project_id"`
Endpoints []string `json:"endpoints"`
EndpointCount int `json:"endpoint_count"`
Token string `json:"token"`
EndpointsMetadata datastore.EndpointMetadata `json:"endpoints_metadata"`
URL string `json:"url"`
CreatedAt time.Time `json:"created_at,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
DeletedAt null.Time `json:"deleted_at,omitempty"`
}
type Project ¶
type Project struct {
Name string `json:"name" bson:"name" valid:"required~please provide a valid name"`
Type datastore.ProjectType `json:"type" bson:"type" valid:"required~please provide a valid type,in(incoming|outgoing)"`
LogoURL string `json:"logo_url" bson:"logo_url" valid:"url~please provide a valid logo url,optional"`
Config *datastore.ProjectConfig `json:"config"`
}
type RegisterUser ¶
type RegisterUser struct {
FirstName string `json:"first_name" valid:"required~please provide a first name"`
LastName string `json:"last_name" valid:"required~please provide a last name"`
Email string `json:"email" valid:"required~please provide an email,email"`
Password string `json:"password" valid:"required~please provide a password"`
OrganisationName string `json:"org_name" valid:"required~please provide an organisation name"`
}
type ResetPassword ¶
type RetryConfiguration ¶
type RetryConfiguration struct {
Type datastore.StrategyProvider `json:"type,omitempty" valid:"supported_retry_strategy~please provide a valid retry strategy type"`
Duration string `json:"duration,omitempty" valid:"duration~please provide a valid time duration"`
IntervalSeconds uint64 `json:"interval_seconds" valid:"int~please provide a valid interval seconds"`
RetryCount uint64 `json:"retry_count" valid:"int~please provide a valid retry count"`
}
type Source ¶
type Source struct {
Name string `json:"name" valid:"required~please provide a source name"`
Type datastore.SourceType `json:"type" valid:"required~please provide a type,supported_source~unsupported source type"`
Provider datastore.SourceProvider `json:"provider"`
IsDisabled bool `json:"is_disabled"`
Verifier datastore.VerifierConfig `json:"verifier"`
PubSub datastore.PubSubConfig `json:"pub_sub"`
}
type SourceResponse ¶
type SourceResponse struct {
UID string `json:"uid"`
MaskID string `json:"mask_id"`
ProjectID string `json:"project_id"`
Name string `json:"name"`
Type datastore.SourceType `json:"type"`
URL string `json:"url"`
IsDisabled bool `json:"is_disabled"`
Verifier *datastore.VerifierConfig `json:"verifier"`
Provider datastore.SourceProvider `json:"provider"`
ProviderConfig *datastore.ProviderConfig `json:"provider_config"`
PubSub *datastore.PubSubConfig `json:"pub_sub"`
CreatedAt time.Time `json:"created_at,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
DeletedAt null.Time `json:"deleted_at,omitempty"`
}
type Subscription ¶
type Subscription struct {
Name string `json:"name" bson:"name" valid:"required~please provide a valid subscription name"`
SourceID string `json:"source_id" bson:"source_id"`
AppID string `json:"app_id"` // Deprecated but necessary for backward compatibility
EndpointID string `json:"endpoint_id" bson:"endpoint_id" valid:"required~please provide a valid endpoint id"`
AlertConfig *datastore.AlertConfiguration `json:"alert_config,omitempty" bson:"alert_config,omitempty"`
RetryConfig *RetryConfiguration `json:"retry_config,omitempty" bson:"retry_config,omitempty"`
FilterConfig *datastore.FilterConfiguration `json:"filter_config,omitempty" bson:"filter_config,omitempty"`
RateLimitConfig *datastore.RateLimitConfiguration `json:"rate_limit_config,omitempty" bson:"rate_limit_config,omitempty"`
}
type TestFilter ¶
type TestFilter struct {
Request FilterSchema `json:"request"`
Schema FilterSchema `json:"schema"`
}
type UpdateEndpoint ¶
type UpdateEndpoint struct {
URL string `json:"url" bson:"url" valid:"required~please provide a url for your endpoint"`
Secret string `json:"secret" bson:"secret"`
Description string `json:"description" bson:"description"`
AdvancedSignatures *bool `json:"advanced_signatures" bson:"advanced_signatures"`
Name *string `json:"name" bson:"name" valid:"required~please provide your endpointName"`
SupportEmail *string `json:"support_email" bson:"support_email" valid:"email~please provide a valid email"`
IsDisabled *bool `json:"is_disabled"`
SlackWebhookURL *string `json:"slack_webhook_url" bson:"slack_webhook_url"`
HttpTimeout string `json:"http_timeout" bson:"http_timeout"`
RateLimit int `json:"rate_limit" bson:"rate_limit"`
RateLimitDuration string `json:"rate_limit_duration" bson:"rate_limit_duration"`
Authentication *datastore.EndpointAuthentication `json:"authentication"`
}
type UpdatePassword ¶
type UpdatePassword struct {
CurrentPassword string `json:"current_password" valid:"required~please provide the current password"`
Password string `json:"password" valid:"required~please provide the password field"`
PasswordConfirmation string `json:"password_confirmation" valid:"required~please provide the password confirmation field"`
}
type UpdateProject ¶
type UpdateProject struct {
Name string `json:"name" bson:"name" valid:"required~please provide a valid name"`
LogoURL string `json:"logo_url" bson:"logo_url" valid:"url~please provide a valid logo url,optional"`
RateLimit int `json:"rate_limit" bson:"rate_limit" valid:"int~please provide a valid rate limit,optional"`
RateLimitDuration string `json:"rate_limit_duration" bson:"rate_limit_duration" valid:"alphanum~please provide a valid rate limit duration,optional"`
Config *datastore.ProjectConfig `json:"config" valid:"optional"`
}
type UpdateSource ¶
type UpdateSource struct {
Name *string `json:"name" valid:"required~please provide a source name"`
Type datastore.SourceType `json:"type" valid:"required~please provide a type,supported_source~unsupported source type"`
IsDisabled *bool `json:"is_disabled"`
ForwardHeaders []string `json:"forward_headers"`
Verifier datastore.VerifierConfig `json:"verifier"`
PubSub *datastore.PubSubConfig `json:"pub_sub"`
}
type UpdateSubscription ¶
type UpdateSubscription struct {
Name string `json:"name,omitempty"`
AppID string `json:"app_id,omitempty"`
SourceID string `json:"source_id,omitempty"`
EndpointID string `json:"endpoint_id,omitempty"`
AlertConfig *datastore.AlertConfiguration `json:"alert_config,omitempty"`
RetryConfig *RetryConfiguration `json:"retry_config,omitempty"`
FilterConfig *datastore.FilterConfiguration `json:"filter_config,omitempty"`
RateLimitConfig *datastore.RateLimitConfiguration `json:"rate_limit_config,omitempty"`
}
type UpdateUser ¶
type User ¶
type User struct {
FirstName string `json:"first_name" valid:"required~please provide a first name"`
LastName string `json:"last_name" valid:"required~please provide a last name"`
Email string `json:"email" valid:"required~please provide an email,email"`
Password string `json:"password" valid:"required~please provide a password"`
Role auth.Role `json:"role" bson:"role"`
}
type UserExists ¶
type UserExists struct {
Email string `json:"email" valid:"required~please provide an email,email"`
}
type UserInviteTokenResponse ¶
type UserInviteTokenResponse struct {
Token *datastore.OrganisationInvite `json:"token"`
User *datastore.User `json:"user"`
}
type WebhookRequest ¶
type WebhookRequest struct {
Event string `json:"event" bson:"event"`
Data json.RawMessage `json:"data" bson:"data"`
}
Click to show internal directories.
Click to hide internal directories.