Documentation
¶
Index ¶
- 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 RequestConfig
- type Retry
- type RetryStrategy
- type Source
- type Workspace
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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"`
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" validate:"required,gte=200,lte=599"`
ContentType string `json:"content_type" validate:"required"`
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" default:"true"`
Request RequestConfig `json:"request" db:"request"`
Retry Retry `json:"retry" db:"retry"`
Events pq.StringArray `json:"events" db:"events"`
BaseModel
}
type Event ¶
type FixedStrategyConfig ¶
type FixedStrategyConfig struct {
Attempts []int64 `json:"attempts" default:"[0,60,3600]"`
}
type Plugin ¶ added in v0.2.0
type RequestConfig ¶
type RequestConfig struct {
URL string `json:"url" validate:"required"`
Method string `json:"method" validate:"required,oneof=GET POST PUT DELETE PATCH"`
Headers map[string]string `json:"headers"`
Timeout int64 `json:"timeout" default:"10000" validate:"gte=0"`
}
func (*RequestConfig) Scan ¶
func (m *RequestConfig) Scan(src interface{}) error
type Retry ¶
type Retry struct {
Strategy RetryStrategy `json:"strategy" validate:"oneof=fixed" default:"fixed"`
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 pq.StringArray `json:"methods" db:"methods"`
Async bool `json:"async" db:"async"`
Response *CustomResponse `json:"response" db:"response"`
BaseModel
}
Click to show internal directories.
Click to hide internal directories.