Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var GlobalValidator = validator.New()
GlobalValidator a global go-playground/validator instance.
Functions ¶
This section is empty.
Types ¶
type BackgroundProcess ¶
type ErrItemAlreadyExists ¶
ErrItemAlreadyExists indicates if an item write operation failed due existent entity already present in the storage.
func (ErrItemAlreadyExists) Error ¶
func (e ErrItemAlreadyExists) Error() string
type ErrItemNotFound ¶
ErrItemNotFound indicates if an item lookup operation failed due a non-existent entity in the storage.
func (ErrItemNotFound) Error ¶
func (e ErrItemNotFound) Error() string
type ErrOutOfRange ¶
ErrOutOfRange indicates if a property is out of a specified range.
func NewOutOfRangeWithType ¶
func NewOutOfRangeWithType[T, P any](property string, a, b P) ErrOutOfRange[P]
NewOutOfRangeWithType allocates a new ErrOutOfRange using T as base structure of a property. This routine will generate an ErrOutOfRange.PropertyName as `T_string_type.property`.
func (ErrOutOfRange[T]) Error ¶
func (e ErrOutOfRange[T]) Error() string
type Identifiable ¶
type Identifiable[T comparable] interface { // GetID generates or retrieves (depending on the concrete implementation) the structure's unique identifier. GetID() T }
Identifiable adheres identification capabilities to a Go structure.
type NoopIdentifiable ¶
type NoopIdentifiable struct { }
NoopIdentifiable is the no-operation Identifiable struct.
func (NoopIdentifiable) GetID ¶
func (n NoopIdentifiable) GetID() string
type Registry ¶
type Registry[T any] interface { // Register saves a component with the given key. Register(key string, component T) error // Get retrieves a component using its key. Get(key string) (T, error) // Exists indicates whether a component with the given key exists. Exists(key string) error }
Registry a generic registry to manage a specific set of resources of the system.
NOTE: Concurrency safeness depends on concrete implementations of this interface. DO NOT consider every registry as concurrent-safe.
type RepositoryConfig ¶
type RepositoryConfig struct {
ItemTTL time.Duration // Time for an item to be preserved in the store (aka. Time-To-Live).
}
RepositoryConfig a basic and general-purposed repository configuration. Extend from this structure (with struct-embedding) if more fields are required for specific scenarios.
type Retryable ¶
type Retryable struct {
Parent error
}
Retryable wraps a parent error to indicate its execution process is able to get retried.
type Task ¶
type Task struct { TaskID int // Task unique identifier. ExecutionPlanID string // Correlation StateID. Driver string // Driver type to be used by agent executors. ResourceURL string // Location of the resource as URL. AgentArguments map[string]string // Arguments to be passed to the execution agent. TypeMIME string // MIME Type of the payload. Payload any `json:"-"` // Transient data to be passed to internal components for different utilities. EncodedPayload []byte // Encoded data to be passed to the execution agent. }
Task a unit of work to be executed by a Boltzmann agent.