Documentation
¶
Index ¶
- Constants
- type AndRule
- type Bucket
- type BucketAuth
- type BucketRequest
- type Domain
- type Function
- type FunctionConfig
- type FunctionRequest
- type HeaderItem
- type Headers
- type Input
- type IntegrationConfiguration
- type Log
- type LogAction
- type LogsResponse
- type MatchRule
- type NotRule
- type OrRule
- type Output
- type Response
- type RuleParameter
- type Rules
- type Token
- type TokenCreateResponse
- type TokenScopes
- type Tunnel
- type TunnelAuth
Constants ¶
const ( // IntegrationConfigurationPluginSlack captures enum value "slack" IntegrationConfigurationPluginSlack string = "slack" // IntegrationConfigurationPluginWebhook captures enum value "webhook" IntegrationConfigurationPluginWebhook string = "webhook" )
const ( // MatchRuleTypeValue captures enum value "value" MatchRuleTypeValue string = "value" // MatchRuleTypeContains captures enum value "contains" MatchRuleTypeContains string = "contains" // MatchRuleTypeDoesNotContain captures enum value "does-not-contain" MatchRuleTypeDoesNotContain string = "does-not-contain" // MatchRuleTypeRegex captures enum value "regex" MatchRuleTypeRegex string = "regex" // MatchRuleTypePayloadHashSha1 captures enum value "payload-hash-sha1" MatchRuleTypePayloadHashSha1 string = "payload-hash-sha1" // MatchRuleTypePayloadHashSha256 captures enum value "payload-hash-sha256" MatchRuleTypePayloadHashSha256 string = "payload-hash-sha256" )
const ( // RuleParameterSourceHeader captures enum value "header" RuleParameterSourceHeader string = "header" // RuleParameterSourcePayload captures enum value "payload" RuleParameterSourcePayload string = "payload" // RuleParameterSourceQuery captures enum value "query" RuleParameterSourceQuery string = "query" )
const ( // TokenAPIAccessDisabled captures enum value "disabled" TokenAPIAccessDisabled string = "disabled" // TokenAPIAccessEnabled captures enum value "enabled" TokenAPIAccessEnabled string = "enabled" )
const ( // TunnelCryptoOff captures enum value "off" TunnelCryptoOff string = "off" // TunnelCryptoFlexible captures enum value "flexible" TunnelCryptoFlexible string = "flexible" // TunnelCryptoFull captures enum value "full" TunnelCryptoFull string = "full" // TunnelCryptoFullStrict captures enum value "full-strict" TunnelCryptoFullStrict string = "full-strict" // TunnelCryptoTLSPassThrough captures enum value "tls-pass-through" TunnelCryptoTLSPassThrough string = "tls-pass-through" )
const ( // TunnelRegionEmpty captures enum value "" TunnelRegionEmpty string = "" // TunnelRegionUsWest captures enum value "us-west" TunnelRegionUsWest string = "us-west" // TunnelRegionEu captures enum value "eu" TunnelRegionEu string = "eu" // TunnelRegionAu captures enum value "au" TunnelRegionAu string = "au" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bucket ¶
type Bucket struct {
// auth
Auth *BucketAuth `json:"auth,omitempty"`
// created at
// Read Only: true
CreatedAt int64 `json:"created_at,omitempty"`
// description
Description string `json:"description,omitempty"`
// If ephemeral is enabled, Webhook Relay will not persist request body, headers or response details
Ephemeral bool `json:"ephemeral,omitempty"`
// id
// Read Only: true
ID string `json:"id,omitempty"`
// inputs
// Read Only: true
Inputs []*Input `json:"inputs"`
// name
Name string `json:"name,omitempty"`
// outputs
// Read Only: true
Outputs []*Output `json:"outputs"`
// Enable/disabled streaming to WebSocket clients from this bucket
Stream bool `json:"stream,omitempty"`
// Indicates that webhooks will not be received due to quota limits
// Read Only: true
Suspended *bool `json:"suspended,omitempty"`
// updated at
// Read Only: true
UpdatedAt int64 `json:"updated_at,omitempty"`
}
Bucket Bucket
swagger:model Bucket
func (*Bucket) MarshalBinary ¶
MarshalBinary interface implementation
func (*Bucket) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type BucketAuth ¶
type BucketAuth struct {
// created at
// Read Only: true
CreatedAt int64 `json:"created_at,omitempty"`
// id
// Read Only: true
ID string `json:"id,omitempty"`
// password
Password string `json:"password,omitempty"`
// token
Token string `json:"token,omitempty"`
// type
Type string `json:"type,omitempty"`
// updated at
// Read Only: true
UpdatedAt int64 `json:"updated_at,omitempty"`
// username
Username string `json:"username,omitempty"`
}
BucketAuth BucketAuth
swagger:model BucketAuth
func (*BucketAuth) MarshalBinary ¶
func (m *BucketAuth) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*BucketAuth) UnmarshalBinary ¶
func (m *BucketAuth) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type BucketRequest ¶
type BucketRequest struct {
// description
Description string `json:"description,omitempty"`
// name
Name string `json:"name,omitempty"`
}
BucketRequest Bucket create request
swagger:model BucketRequest
func (*BucketRequest) MarshalBinary ¶
func (m *BucketRequest) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*BucketRequest) UnmarshalBinary ¶
func (m *BucketRequest) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Domain ¶ added in v0.3.0
type Domain struct {
// created
// Read Only: true
Created int64 `json:"created,omitempty"`
// Name of the domain to reserve, for example joe.hooks.webhookrelay.com, hooks.example.com, tunnel.mydomain.com, etc.
Domain string `json:"domain,omitempty"`
// id
// Read Only: true
ID string `json:"id,omitempty"`
// updated
// Read Only: true
Updated int64 `json:"updated,omitempty"`
}
Domain Reserved Domain
swagger:model Domain
func (*Domain) MarshalBinary ¶ added in v0.3.0
MarshalBinary interface implementation
func (*Domain) UnmarshalBinary ¶ added in v0.3.0
UnmarshalBinary interface implementation
type Function ¶ added in v0.3.0
type Function struct {
// compression
// Read Only: true
Compression string `json:"compression,omitempty"`
// created
// Read Only: true
Created string `json:"created,omitempty"`
// id
// Read Only: true
ID string `json:"id,omitempty"`
// metadata
Metadata map[string]string `json:"metadata,omitempty"`
// name
Name string `json:"name,omitempty"`
// base64 encoded function body
Payload string `json:"payload,omitempty"`
// payload size
// Read Only: true
PayloadSize string `json:"payload_size,omitempty"`
// updated
// Read Only: true
Updated string `json:"updated,omitempty"`
}
Function Function
swagger:model Function
func (*Function) MarshalBinary ¶ added in v0.3.0
MarshalBinary interface implementation
func (*Function) UnmarshalBinary ¶ added in v0.3.0
UnmarshalBinary interface implementation
type FunctionConfig ¶ added in v0.3.0
type FunctionConfig struct {
// Key that will be used to access it from the function
Key string `json:"key,omitempty"`
// Your configuration value
Value string `json:"value,omitempty"`
}
FunctionConfig Function config variable
swagger:model FunctionConfig
func (*FunctionConfig) MarshalBinary ¶ added in v0.3.0
func (m *FunctionConfig) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*FunctionConfig) UnmarshalBinary ¶ added in v0.3.0
func (m *FunctionConfig) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type FunctionRequest ¶ added in v0.3.0
type FunctionRequest struct {
// Driver name (Lua, WASI)
Driver string `json:"driver,omitempty"`
// name
Name string `json:"name,omitempty"`
// base64 encoded function payload
Payload string `json:"payload,omitempty"`
}
FunctionRequest Create/update function request
swagger:model FunctionRequest
func (*FunctionRequest) MarshalBinary ¶ added in v0.3.0
func (m *FunctionRequest) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*FunctionRequest) UnmarshalBinary ¶ added in v0.3.0
func (m *FunctionRequest) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type HeaderItem ¶ added in v0.3.0
type HeaderItem []string
HeaderItem Header values
swagger:model HeaderItem
type Headers ¶ added in v0.2.0
type Headers map[string]HeaderItem
Headers Headers for request/response
A hashmap of header keys and a list of values for each string, Go equivalent map[string][]string
swagger:model Headers
type Input ¶
type Input struct {
// Response body to return when this input receives a webhook
Body string `json:"body,omitempty"`
// created at
// Read Only: true
CreatedAt int64 `json:"created_at,omitempty"`
// Specify any custom domain from your Reserved Domains, such as example.hooks.webhookrelay.com or hooks.example.com (if used with your own top level domain name, create a CNAME pointing at hooks.webhookrelay.com)
CustomDomain string `json:"custom_domain,omitempty"`
// description
Description string `json:"description,omitempty"`
// ID of the function that will be executed for this input
FunctionID string `json:"function_id,omitempty"`
// headers
Headers Headers `json:"headers,omitempty"`
// id
// Read Only: true
ID string `json:"id,omitempty"`
// name
Name string `json:"name,omitempty"`
// When used with custom domains, path_prefix can host multiple input endpoints on a single domain, such as hooks.example.com/github -> Jenkins CI, hooks.example.com/gitlab -> Spinnaker
PathPrefix string `json:"path_prefix,omitempty"`
// Output ID to specify a single output for response or set it to 'anyOutput' to return response from any output. Output should respond within 10 seconds
ResponseFromOutput string `json:"response_from_output,omitempty"`
// Response status code to return when this input receives a webhook
StatusCode int64 `json:"status_code,omitempty"`
// updated at
// Read Only: true
UpdatedAt int64 `json:"updated_at,omitempty"`
}
Input Input
swagger:model Input
func (*Input) MarshalBinary ¶
MarshalBinary interface implementation
func (*Input) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type IntegrationConfiguration ¶ added in v0.3.0
type IntegrationConfiguration struct {
// buckets
Buckets []*Bucket `json:"buckets"`
// created
// Read Only: true
Created int64 `json:"created,omitempty"`
// Free form description field
Description string `json:"description,omitempty"`
// Disable/enable notification configuration. Consistently failing configurations will be disabled
Disabled bool `json:"disabled,omitempty"`
// Event types, currently supported are: 'forwarding.function.error' for failed functions and 'forwarding.delivery.error' for failed webhook delivery. Learn more here https://webhookrelay.com/v1/guide/integrations
Events []string `json:"events"`
// id
// Read Only: true
ID string `json:"id,omitempty"`
// Status description
Message string `json:"message,omitempty"`
// Plugin to use, more info about webhook plugin can be found in the docs here: https://webhookrelay.com/v1/guide/integrations#Webhook
// Enum: [slack webhook]
Plugin string `json:"plugin,omitempty"`
// Plugin status
// Read Only: true
Status string `json:"status,omitempty"`
// updated
// Read Only: true
Updated int64 `json:"updated,omitempty"`
}
IntegrationConfiguration Integration Configuration
swagger:model IntegrationConfiguration
func (*IntegrationConfiguration) MarshalBinary ¶ added in v0.3.0
func (m *IntegrationConfiguration) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*IntegrationConfiguration) UnmarshalBinary ¶ added in v0.3.0
func (m *IntegrationConfiguration) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Log ¶ added in v0.3.0
type Log struct {
// body
Body string `json:"body,omitempty"`
// bucket id
// Read Only: true
BucketID string `json:"bucket_id,omitempty"`
// created at
// Read Only: true
CreatedAt int64 `json:"created_at,omitempty"`
// This field is inherited from the bucket, if set - request/response body will not be set
Ephemeral bool `json:"ephemeral,omitempty"`
// headers
Headers Headers `json:"headers,omitempty"`
// id
// Read Only: true
ID string `json:"id,omitempty"`
// input id
// Read Only: true
InputID string `json:"input_id,omitempty"`
// When internal output receives webhook, it forwards it to any connected agent (relay CLI, Docker agent or WebSocket connection)
Internal bool `json:"internal,omitempty"`
// method
Method string `json:"method,omitempty"`
// output id
// Read Only: true
OutputID string `json:"output_id,omitempty"`
// raw query for example request to http://example.com?foo=bar is foo=bar
RawQuery string `json:"raw_query,omitempty"`
// response body
ResponseBody string `json:"response_body,omitempty"`
// response headers
ResponseHeaders Headers `json:"response_headers,omitempty"`
// Retries taken so far
Retries int64 `json:"retries,omitempty"`
// Request status, example values 'preparing', 'sent', 'failed', 'stalled', 'received', 'rejected'
Status string `json:"status,omitempty"`
// status code
StatusCode int64 `json:"status_code,omitempty"`
// updated at
// Read Only: true
UpdatedAt int64 `json:"updated_at,omitempty"`
}
Log Webhook Log
swagger:model Log
func (*Log) MarshalBinary ¶ added in v0.3.0
MarshalBinary interface implementation
func (*Log) UnmarshalBinary ¶ added in v0.3.0
UnmarshalBinary interface implementation
type LogAction ¶ added in v0.3.0
type LogAction struct {
// Log action, for example 'resend'
Action string `json:"action,omitempty"`
// Optional, only set to an output ID if you want to resend this log to the specific output instead of all bucket outputs
Output string `json:"output,omitempty"`
}
LogAction Webhook Log Action
swagger:model LogAction
func (*LogAction) MarshalBinary ¶ added in v0.3.0
MarshalBinary interface implementation
func (*LogAction) UnmarshalBinary ¶ added in v0.3.0
UnmarshalBinary interface implementation
type LogsResponse ¶ added in v0.3.0
type LogsResponse struct {
// data
Data []*Log `json:"data"`
// limit
Limit int64 `json:"limit,omitempty"`
// offset
Offset int64 `json:"offset,omitempty"`
// total
Total int64 `json:"total,omitempty"`
}
LogsResponse Logs API response
swagger:model LogsResponse
func (*LogsResponse) MarshalBinary ¶ added in v0.3.0
func (m *LogsResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*LogsResponse) UnmarshalBinary ¶ added in v0.3.0
func (m *LogsResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type MatchRule ¶ added in v0.2.0
type MatchRule struct {
// parameter
Parameter *RuleParameter `json:"parameter,omitempty"`
// regex
Regex string `json:"regex,omitempty"`
// secret
Secret string `json:"secret,omitempty"`
// substring
Substring string `json:"substring,omitempty"`
// type
// Enum: [value contains does-not-contain regex payload-hash-sha1 payload-hash-sha256]
Type string `json:"type,omitempty"`
// value
Value string `json:"value,omitempty"`
}
MatchRule Match Rule
swagger:model MatchRule
func (*MatchRule) MarshalBinary ¶ added in v0.3.0
MarshalBinary interface implementation
func (*MatchRule) UnmarshalBinary ¶ added in v0.3.0
UnmarshalBinary interface implementation
type Output ¶
type Output struct {
// bucket id
// Read Only: true
BucketID string `json:"bucket_id,omitempty"`
// created at
// Read Only: true
CreatedAt int64 `json:"created_at,omitempty"`
// description
Description string `json:"description,omitempty"`
// Destination, where to forward the webhook, such as 'http://localhost:4000'
Destination string `json:"destination,omitempty"`
// ID of the function that will be executed for this output
FunctionID string `json:"function_id,omitempty"`
// Headers to override (for example Host)
Headers Headers `json:"headers,omitempty"`
// id
// Read Only: true
ID string `json:"id,omitempty"`
// When internal output receives webhook, it forwards it to any connected agent (relay CLI, Docker agent or WebSocket connection)
Internal bool `json:"internal,omitempty"`
// name
Name string `json:"name,omitempty"`
// Request matching rules, documentation can be found here https://webhookrelay.com/v1/guide/webhook-forwarding.html#Request-matching-rules
Rules *Rules `json:"rules,omitempty"`
// Timeout in seconds, value between 0 and 180
Timeout int64 `json:"timeout,omitempty"`
// Enforce TLS verification where possible (internal and public destinations)
TLSVerification bool `json:"tls_verification,omitempty"`
// updated at
// Read Only: true
UpdatedAt int64 `json:"updated_at,omitempty"`
}
Output Output
swagger:model Output
func (*Output) MarshalBinary ¶
MarshalBinary interface implementation
func (*Output) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Response ¶ added in v0.3.0
type Response struct {
// ID of the object
ID string `json:"id,omitempty"`
// Status of the action
Status string `json:"status,omitempty"`
}
Response Action response
swagger:model Response
func (*Response) MarshalBinary ¶ added in v0.3.0
MarshalBinary interface implementation
func (*Response) UnmarshalBinary ¶ added in v0.3.0
UnmarshalBinary interface implementation
type RuleParameter ¶ added in v0.3.0
type RuleParameter struct {
// name
Name string `json:"name,omitempty"`
// source
// Enum: [header payload query]
Source string `json:"source,omitempty"`
}
RuleParameter RuleParameter
swagger:model RuleParameter
func (*RuleParameter) MarshalBinary ¶ added in v0.3.0
func (m *RuleParameter) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*RuleParameter) UnmarshalBinary ¶ added in v0.3.0
func (m *RuleParameter) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Rules ¶ added in v0.2.0
type Rules struct {
// and
And AndRule `json:"and,omitempty"`
// match
Match *MatchRule `json:"match,omitempty"`
// not
Not NotRule `json:"not,omitempty"`
// or
Or OrRule `json:"or,omitempty"`
}
Rules Rules
swagger:model Rules
func (*Rules) MarshalBinary ¶ added in v0.2.0
MarshalBinary interface implementation
func (*Rules) UnmarshalBinary ¶ added in v0.2.0
UnmarshalBinary interface implementation
type Token ¶
type Token struct {
// Enable/disable API access. If disabled, it can only be used to open tunnel connections or forward webhooks but not change any existing configuration
// Enum: [disabled enabled]
APIAccess string `json:"api_access,omitempty"`
// created at
// Read Only: true
CreatedAt int64 `json:"created_at,omitempty"`
// description
Description string `json:"description,omitempty"`
// id
// Read Only: true
ID string `json:"id,omitempty"`
// last login
// Read Only: true
LastLogin string `json:"last_login,omitempty"`
// scopes
Scopes *TokenScopes `json:"scopes,omitempty"`
// updated at
// Read Only: true
UpdatedAt int64 `json:"updated_at,omitempty"`
}
Token Token
swagger:model Token
func (*Token) MarshalBinary ¶
MarshalBinary interface implementation
func (*Token) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type TokenCreateResponse ¶
type TokenCreateResponse struct {
// Token key, this is an alias to token ID
Key string `json:"key,omitempty"`
// This is the only time secret is revealed as it is already encrypted by the system
Secret string `json:"secret,omitempty"`
}
TokenCreateResponse Token Create Response
swagger:model TokenCreateResponse
func (*TokenCreateResponse) MarshalBinary ¶
func (m *TokenCreateResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*TokenCreateResponse) UnmarshalBinary ¶
func (m *TokenCreateResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type TokenScopes ¶
type TokenScopes struct {
// buckets
Buckets []string `json:"buckets"`
// tunnels
Tunnels []string `json:"tunnels"`
}
TokenScopes TokenScopes
swagger:model TokenScopes
func (*TokenScopes) MarshalBinary ¶
func (m *TokenScopes) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*TokenScopes) UnmarshalBinary ¶
func (m *TokenScopes) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Tunnel ¶
type Tunnel struct {
// auth
Auth *TunnelAuth `json:"auth,omitempty"`
// created at
// Read Only: true
CreatedAt int64 `json:"created_at,omitempty"`
// Tunnel encryption type
// Enum: [off flexible full full-strict tls-pass-through]
Crypto string `json:"crypto,omitempty"`
// description
Description string `json:"description,omitempty"`
// destination
Destination string `json:"destination,omitempty"`
// Groups allow agents to subscribe to one or more tunnels
Group string `json:"group,omitempty"`
// host
Host string `json:"host,omitempty"`
// id
// Read Only: true
ID string `json:"id,omitempty"`
// name
Name string `json:"name,omitempty"`
// protocol
Protocol string `json:"protocol,omitempty"`
// Tunnel region
// Enum: [ us-west eu au]
Region string `json:"region,omitempty"`
// updated at
// Read Only: true
UpdatedAt int64 `json:"updated_at,omitempty"`
}
Tunnel Tunnel
swagger:model Tunnel
func (*Tunnel) MarshalBinary ¶
MarshalBinary interface implementation
func (*Tunnel) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type TunnelAuth ¶
type TunnelAuth struct {
// created at
// Read Only: true
CreatedAt int64 `json:"created_at,omitempty"`
// id
// Read Only: true
ID string `json:"id,omitempty"`
// password
Password string `json:"password,omitempty"`
// token
Token string `json:"token,omitempty"`
// type
Type string `json:"type,omitempty"`
// updated at
// Read Only: true
UpdatedAt int64 `json:"updated_at,omitempty"`
// username
Username string `json:"username,omitempty"`
}
TunnelAuth Tunnel Authentication
swagger:model TunnelAuth
func (*TunnelAuth) MarshalBinary ¶
func (m *TunnelAuth) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*TunnelAuth) UnmarshalBinary ¶
func (m *TunnelAuth) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
Source Files
¶
- and_rule.go
- bucket.go
- bucket_auth.go
- bucket_request.go
- domain.go
- function.go
- function_config.go
- function_request.go
- header_item.go
- headers.go
- input.go
- integration_configuration.go
- log.go
- log_action.go
- logs_response.go
- match_rule.go
- not_rule.go
- or_rule.go
- output.go
- response.go
- rule_parameter.go
- rules.go
- token.go
- token_create_response.go
- token_scopes.go
- tunnel.go
- tunnel_auth.go