Documentation
¶
Index ¶
- func LoadOpenAPI(bytes []byte)
- func LookupSchema(name string) *openapi3.Schema
- type Attempt
- type AttemptDetail
- type AttemptErrorCode
- type AttemptRequest
- type AttemptResponse
- type AttemptStatus
- type AttemptTriggerMode
- type BaseModel
- type CustomResponse
- type Endpoint
- type Event
- type FixedStrategyConfig
- type Headers
- type Metadata
- type Plugin
- type PluginConfiguration
- type RateLimit
- type RequestConfig
- type Retry
- type RetryStrategy
- type Schema
- type Source
- type Strings
- type Workspace
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadOpenAPI ¶ added in v0.8.0
func LoadOpenAPI(bytes []byte)
func LookupSchema ¶ added in v0.8.0
Types ¶
type Attempt ¶
type Attempt struct {
ID string `json:"id" db:"id"`
EventId string `json:"event_id" db:"event_id"`
EndpointId string `json:"endpoint_id" db:"endpoint_id"`
Status AttemptStatus `json:"status" db:"status"`
AttemptNumber int `json:"attempt_number" db:"attempt_number"`
ScheduledAt types.Time `json:"scheduled_at" db:"scheduled_at"`
AttemptedAt *types.Time `json:"attempted_at" db:"attempted_at"`
TriggerMode AttemptTriggerMode `json:"trigger_mode" db:"trigger_mode"`
Exhausted bool `json:"exhausted" db:"exhausted"`
ErrorCode *AttemptErrorCode `json:"error_code" db:"error_code"`
Request *AttemptRequest `json:"request" db:"request"`
Response *AttemptResponse `json:"response" db:"response"`
Event *Event `json:"-" db:"-"`
BaseModel
}
type AttemptDetail ¶ added in v0.2.0
type AttemptDetail struct {
ID string `json:"id" db:"id"`
RequestHeaders Headers `json:"request_headers" db:"request_headers"`
RequestBody *string `json:"request_body" db:"request_body"`
ResponseHeaders *Headers `json:"response_headers" db:"response_headers"`
ResponseBody *string `json:"response_body" db:"response_body"`
BaseModel
}
type AttemptErrorCode ¶
type AttemptErrorCode = string
const ( AttemptErrorCodeTimeout AttemptErrorCode = "TIMEOUT" AttemptErrorCodeUnknown AttemptErrorCode = "UNKNOWN" AttemptErrorCodeEndpointDisabled AttemptErrorCode = "ENDPOINT_DISABLED" AttemptErrorCodeEndpointNotFound AttemptErrorCode = "ENDPOINT_NOT_FOUND" )
type AttemptRequest ¶
type AttemptRequest struct {
Method string `json:"method"`
URL string `json:"url"`
Headers Headers `json:"headers"`
Body *string `json:"body"`
}
func (*AttemptRequest) Scan ¶
func (m *AttemptRequest) Scan(src interface{}) error
type AttemptResponse ¶
type AttemptResponse struct {
Status int `json:"status"`
Latency int64 `json:"latency"`
Headers Headers `json:"headers"`
Body *string `json:"body"`
}
func (*AttemptResponse) Scan ¶
func (m *AttemptResponse) Scan(src interface{}) error
type AttemptStatus ¶
type AttemptStatus = string
const ( AttemptStatusInit AttemptStatus = "INIT" AttemptStatusQueued AttemptStatus = "QUEUED" AttemptStatusSuccess AttemptStatus = "SUCCESSFUL" AttemptStatusFailure AttemptStatus = "FAILED" AttemptStatusCanceled AttemptStatus = "CANCELED" )
type AttemptTriggerMode ¶ added in v0.2.0
type AttemptTriggerMode = string
const ( AttemptTriggerModeInitial AttemptTriggerMode = "INITIAL" AttemptTriggerModeManual AttemptTriggerMode = "MANUAL" AttemptTriggerModeAutomatic AttemptTriggerMode = "AUTOMATIC" )
type CustomResponse ¶
type CustomResponse struct {
Code int `json:"code"`
ContentType string `json:"content_type" yaml:"content_type"`
Body string `json:"body"`
}
func (*CustomResponse) Scan ¶
func (m *CustomResponse) Scan(src interface{}) error
type Endpoint ¶
type Endpoint struct {
ID string `json:"id" db:"id"`
Name *string `json:"name" db:"name"`
Description *string `json:"description" db:"description"`
Enabled bool `json:"enabled" db:"enabled"`
Request RequestConfig `json:"request" db:"request"`
Retry Retry `json:"retry" db:"retry"`
Events Strings `json:"events" db:"events"`
Metadata Metadata `json:"metadata" db:"metadata"`
RateLimit *RateLimit `json:"rate_limit" yaml:"rate_limit" db:"rate_limit"`
BaseModel `yaml:"-"`
}
func (*Endpoint) SchemaName ¶ added in v0.8.0
type Event ¶
type Event struct {
ID string `json:"id" validate:"required"`
EventType string `json:"event_type" db:"event_type" validate:"required"`
Data json.RawMessage `json:"data" validate:"required"`
IngestedAt types.Time `json:"ingested_at" db:"ingested_at"`
UniqueId *string `json:"unique_id" db:"unique_id" validate:"omitempty,max=50"`
BaseModel
}
func (*Event) SchemaName ¶ added in v0.8.0
type FixedStrategyConfig ¶
type FixedStrategyConfig struct {
Attempts []int64 `json:"attempts"`
}
type Headers ¶ added in v0.2.0
func (*Headers) UnmarshalJSON ¶ added in v0.8.0
type Metadata ¶
func (*Metadata) UnmarshalJSON ¶ added in v0.8.0
type Plugin ¶ added in v0.2.0
type Plugin struct {
ID string `json:"id" db:"id"`
Name string `json:"name" db:"name"`
Enabled bool `json:"enabled" db:"enabled"`
EndpointId *string `json:"endpoint_id" db:"endpoint_id" yaml:"endpoint_id"`
SourceId *string `json:"source_id" db:"source_id" yaml:"source_id"`
Config PluginConfiguration `json:"config" db:"config"`
Metadata Metadata `json:"metadata" db:"metadata"`
BaseModel `yaml:"-"`
}
func (*Plugin) SchemaName ¶ added in v0.8.0
func (*Plugin) UnmarshalJSON ¶ added in v0.4.0
type PluginConfiguration ¶ added in v0.4.0
type PluginConfiguration json.RawMessage
func (PluginConfiguration) MarshalJSON ¶ added in v0.4.0
func (m PluginConfiguration) MarshalJSON() ([]byte, error)
func (PluginConfiguration) MarshalYAML ¶ added in v0.4.0
func (m PluginConfiguration) MarshalYAML() (interface{}, error)
func (*PluginConfiguration) UnmarshalJSON ¶ added in v0.4.0
func (m *PluginConfiguration) UnmarshalJSON(data []byte) error
type RequestConfig ¶
type RequestConfig struct {
URL string `json:"url"`
Method string `json:"method"`
Headers Headers `json:"headers"`
Timeout int64 `json:"timeout"`
}
func (*RequestConfig) Scan ¶
func (m *RequestConfig) Scan(src interface{}) error
type Retry ¶
type Retry struct {
Strategy RetryStrategy `json:"strategy"`
Config FixedStrategyConfig `json:"config"`
}
type RetryStrategy ¶
type RetryStrategy string
const (
RetryStrategyFixed RetryStrategy = "fixed"
)
func (RetryStrategy) String ¶
func (m RetryStrategy) String() string
type Source ¶
type Source struct {
ID string `json:"id" db:"id"`
Name *string `json:"name" db:"name"`
Enabled bool `json:"enabled" db:"enabled"`
Path string `json:"path" db:"path"`
Methods Strings `json:"methods" db:"methods"`
Async bool `json:"async" db:"async"`
Response *CustomResponse `json:"response" db:"response"`
Metadata Metadata `json:"metadata" db:"metadata"`
RateLimit *RateLimit `json:"rate_limit" yaml:"rate_limit" db:"rate_limit"`
BaseModel `yaml:"-"`
}
func (*Source) SchemaName ¶ added in v0.8.0
type Strings ¶ added in v0.6.0
type Strings = pq.StringArray
type Workspace ¶
type Workspace struct {
ID string `json:"id" db:"id"`
Name *string `json:"name" db:"name"`
Description *string `json:"description" db:"description"`
Metadata Metadata `json:"metadata" db:"metadata"`
CreatedAt types.Time `db:"created_at" json:"created_at"`
UpdatedAt types.Time `db:"updated_at" json:"updated_at"`
}
func (*Workspace) SchemaName ¶ added in v0.8.0
Click to show internal directories.
Click to hide internal directories.