Documentation
¶
Index ¶
- func NewRequiredKeyValidationError(key string) error
- type Context
- type Executor
- type ExecutorContext
- func (e *ExecutorContext) GetBoolean(k string) (bool, error)
- func (e *ExecutorContext) GetList(k string) ([]string, error)
- func (e *ExecutorContext) GetMap(k string) (map[string]string, error)
- func (e *ExecutorContext) GetNumber(k string) (uint64, error)
- func (e *ExecutorContext) GetRequiredNumber(k string) (uint64, error)
- func (e *ExecutorContext) GetRequiredString(k string) (string, error)
- func (e *ExecutorContext) GetStore() map[string]string
- func (e *ExecutorContext) GetString(k string) string
- type ExecutorResult
- type ExecutorResultOption
- type NonRetryableError
- type RequiredKeyValidationError
- type RetryableError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context interface { GetString(k string) string GetRequiredString(k string) (string, error) GetNumber(k string) (uint64, error) GetRequiredNumber(k string) (uint64, error) GetMap(k string) (map[string]string, error) GetList(k string) ([]string, error) GetBoolean(k string) (bool, error) GetStore() map[string]string }
type Executor ¶
type Executor interface {
Execute(Context) *ExecutorResult
}
type ExecutorContext ¶
type ExecutorContext struct {
// contains filtered or unexported fields
}
func (*ExecutorContext) GetBoolean ¶
func (e *ExecutorContext) GetBoolean(k string) (bool, error)
func (*ExecutorContext) GetMap ¶
func (e *ExecutorContext) GetMap(k string) (map[string]string, error)
func (*ExecutorContext) GetRequiredNumber ¶
func (e *ExecutorContext) GetRequiredNumber(k string) (uint64, error)
func (*ExecutorContext) GetRequiredString ¶
func (e *ExecutorContext) GetRequiredString(k string) (string, error)
func (*ExecutorContext) GetStore ¶
func (e *ExecutorContext) GetStore() map[string]string
func (*ExecutorContext) GetString ¶
func (e *ExecutorContext) GetString(k string) string
type ExecutorResult ¶
type ExecutorResult struct { Output map[string]string Status pb.TaskExecutionResponseMessage_TaskState Error string }
func NewExecutorResult ¶
func NewExecutorResult(opts ...ExecutorResultOption) *ExecutorResult
type ExecutorResultOption ¶ added in v0.0.4
type ExecutorResultOption func(*ExecutorResult)
func Error ¶
func Error(err error) ExecutorResultOption
func ErrorString ¶
func ErrorString(err string) ExecutorResultOption
func Output ¶
func Output(m map[string]string) ExecutorResultOption
func Status ¶
func Status(s pb.TaskExecutionResponseMessage_TaskState) ExecutorResultOption
type NonRetryableError ¶
type NonRetryableError struct {
// contains filtered or unexported fields
}
func NewNonRetryableError ¶
func NewNonRetryableError(format string, args ...any) *NonRetryableError
func (*NonRetryableError) Error ¶
func (err *NonRetryableError) Error() string
func (*NonRetryableError) Unwrap ¶
func (err *NonRetryableError) Unwrap() error
func (*NonRetryableError) WithCause ¶
func (err *NonRetryableError) WithCause(e error) *NonRetryableError
type RequiredKeyValidationError ¶
type RequiredKeyValidationError string
func (RequiredKeyValidationError) Error ¶
func (err RequiredKeyValidationError) Error() string
type RetryableError ¶
type RetryableError struct {
// contains filtered or unexported fields
}
func NewRetryableError ¶
func NewRetryableError(format string, args ...any) *RetryableError
func (*RetryableError) Error ¶
func (err *RetryableError) Error() string
func (*RetryableError) Unwrap ¶
func (err *RetryableError) Unwrap() error
func (*RetryableError) WithCause ¶
func (err *RetryableError) WithCause(e error) *RetryableError
Click to show internal directories.
Click to hide internal directories.