Documentation ¶
Index ¶
- Constants
- Variables
- func ValidateInhooksConfig(appConf *lib.AppConfig, c *InhooksConfig) error
- type DeliveryAttempt
- type DeliveryAttemptStatus
- type Flow
- type HMACAlgorithm
- type InhooksConfig
- type Message
- type MessageStatus
- type QueueStatus
- type QueuedInfo
- type Sink
- type SinkType
- type Source
- type SourceType
- type Transform
- type TransformDefinition
- type TransformType
- type Verification
- type VerificationType
Constants ¶
View Source
const ( DeliveryAttemptStatusOK = "ok" DeliveryAttemptStatusFailed = "failed" )
View Source
const (
SinkTypeHttp = "http"
)
View Source
const (
SourceTypeHttp = "http"
)
View Source
const (
TransformTypeJavascript = "javascript"
)
Variables ¶
View Source
var HMACAlgorithms = []HMACAlgorithm{ HMACAlgorithmSHA256, }
View Source
var SinkTypes = []SinkType{ SinkTypeHttp, }
View Source
var SourceTypes = []SourceType{ SourceTypeHttp, }
View Source
var TransformTypes = []TransformType{ TransformTypeJavascript, }
View Source
var VerificationTypes = []VerificationType{ VerificationTypeHMAC, }
Functions ¶
func ValidateInhooksConfig ¶
func ValidateInhooksConfig(appConf *lib.AppConfig, c *InhooksConfig) error
ValidateInhooksConfig validates inhooks config and sets defaults
Types ¶
type DeliveryAttempt ¶
type DeliveryAttempt struct { At time.Time `json:"at"` Status DeliveryAttemptStatus `json:"status"` Error string `json:"error"` }
type DeliveryAttemptStatus ¶
type DeliveryAttemptStatus string
type HMACAlgorithm ¶ added in v0.1.6
type HMACAlgorithm string
const (
HMACAlgorithmSHA256 HMACAlgorithm = "sha256"
)
type InhooksConfig ¶
type InhooksConfig struct { Flows []*Flow `yaml:"flows"` TransformDefinitions []*TransformDefinition `yaml:"transform_definitions"` }
type Message ¶
type Message struct { ID string `json:"id"` FlowID string `json:"flowID"` SourceID string `json:"sourceID"` // Ingested Request ID IngestedReqID string `json:"ingestedReqID"` SinkID string `json:"sinkID"` HttpHeaders http.Header `json:"httpHeaders"` RawQuery string `json:"rawQuery"` Payload []byte `json:"payload"` // Processing Info DeliveryAttempts []*DeliveryAttempt `json:"deliveryAttempts"` DeliverAfter time.Time }
type MessageStatus ¶
type MessageStatus string
type QueueStatus ¶
type QueueStatus string
const ( QueueStatusScheduled QueueStatus = "scheduled" QueueStatusReady QueueStatus = "ready" QueueStatusProcessing QueueStatus = "processing" QueueStatusDone QueueStatus = "done" QueueStatusDead QueueStatus = "dead" )
type QueuedInfo ¶ added in v0.1.2
type QueuedInfo struct { MessageID string QueueStatus QueueStatus DeliverAfter time.Time }
type Sink ¶
type Sink struct { // Sink ID ID string `yaml:"id"` // Sink Type Type SinkType `yaml:"type"` // Sink Url for HTTP sinks URL string `yaml:"url"` // Process after delay Delay *time.Duration `yaml:"delay"` // Retry every x time RetryInterval *time.Duration `yaml:"retryInterval"` // Retry exponential multiplier. 1 is constant backoff. Set to > 1 for exponential backoff. RetryExpMultiplier *float64 `yaml:"retryExpMultiplier"` // Max attempts MaxAttempts *int `yaml:"maxAttempts"` // Transform to apply to the data Transform *Transform `yaml:"transform"` }
type Source ¶
type Source struct { ID string `yaml:"id"` Slug string `yaml:"slug"` Type SourceType `yaml:"type"` Verification *Verification `yaml:"verification"` }
type SourceType ¶
type SourceType string
type TransformDefinition ¶ added in v0.1.9
type TransformDefinition struct { ID string `yaml:"id"` Type TransformType `yaml:"type"` Script string `yaml:"script"` }
type TransformType ¶ added in v0.1.9
type TransformType string
type Verification ¶ added in v0.1.6
type Verification struct { VerificationType VerificationType `yaml:"verificationType"` HMACAlgorithm *HMACAlgorithm `yaml:"hmacAlgorithm"` SignatureHeader string `yaml:"signatureHeader"` SignaturePrefix string `yaml:"signaturePrefix"` CurrentSecretEnvVar string `yaml:"currentSecretEnvVar"` PreviousSecretEnvVar string `yaml:"previousSecretEnvVar"` }
type VerificationType ¶ added in v0.1.6
type VerificationType string
const (
VerificationTypeHMAC VerificationType = "hmac"
)
Click to show internal directories.
Click to hide internal directories.