Documentation
¶
Index ¶
Constants ¶
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 ( // TunnelRegion captures enum value "" TunnelRegion 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 Headers ¶ added in v0.2.0
type Headers interface{}
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"`
// description
Description string `json:"description,omitempty"`
// headers
Headers Headers `json:"headers,omitempty"`
// id
// Read Only: true
ID string `json:"id,omitempty"`
// name
Name string `json:"name,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 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"`
// 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"`
// Enforce TLS verification where possible (internal relay agent)
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 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