Documentation ¶
Overview ¶
Package storage contains the interface in which the storage layer adheres to. It has a fairly tight coupling with the main application(for example providing autogenerated/sequential ids) so it's flexibility with introducing other storage options heavily requires the writer to look into what the original Bolt package is doing.
Index ¶
- Variables
- type AddEventRequest
- type AddNamespaceRequest
- type AddNotifierRequest
- type AddPipelineRequest
- type AddRunRequest
- type AddTaskRunRequest
- type AddTokenRequest
- type AddTriggerRequest
- type DeleteEventRequest
- type DeleteNotifierRequest
- type DeleteRunRequest
- type DeleteTokenRequest
- type DeleteTriggerRequest
- type Engine
- type EngineType
- type GetAllEventsRequest
- type GetAllNamespacesRequest
- type GetAllNotifiersRequest
- type GetAllPipelinesRequest
- type GetAllRunsRequest
- type GetAllTaskRunsRequest
- type GetAllTokensRequest
- type GetAllTriggersRequest
- type GetEventRequest
- type GetNamespaceRequest
- type GetNotifierRequest
- type GetPipelineRequest
- type GetRunRequest
- type GetTaskRunRequest
- type GetTokenRequest
- type GetTriggerRequest
- type UpdateNamespaceRequest
- type UpdatePipelineRequest
- type UpdateRunRequest
- type UpdateTaskRunRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrEntityNotFound is returned when a certain entity could not be located. ErrEntityNotFound = errors.New("storage: entity not found") // ErrEntityExists is returned when a certain entity was located but not meant to be. ErrEntityExists = errors.New("storage: entity already exists") // ErrPreconditionFailure is returned when there was a validation error with the parameters passed. ErrPreconditionFailure = errors.New("storage: parameters did not pass validation") )
Functions ¶
This section is empty.
Types ¶
type AddEventRequest ¶ added in v0.1.0
type AddNamespaceRequest ¶
type AddNotifierRequest ¶
type AddPipelineRequest ¶
type AddRunRequest ¶
type AddTaskRunRequest ¶
type AddTokenRequest ¶
type AddTriggerRequest ¶
type DeleteEventRequest ¶ added in v0.1.0
type DeleteEventRequest struct {
ID int64
}
type DeleteNotifierRequest ¶
type DeleteNotifierRequest struct {
Kind string
}
type DeleteRunRequest ¶
type DeleteTokenRequest ¶
type DeleteTokenRequest struct {
Hash string
}
type DeleteTriggerRequest ¶
type DeleteTriggerRequest struct {
Kind string
}
type Engine ¶
type Engine interface { GetAllNamespaces(r GetAllNamespacesRequest) ([]*models.Namespace, error) AddNamespace(r AddNamespaceRequest) error GetNamespace(r GetNamespaceRequest) (*models.Namespace, error) UpdateNamespace(r UpdateNamespaceRequest) error GetAllTokens(r GetAllTokensRequest) ([]*models.Token, error) AddToken(r AddTokenRequest) error GetToken(r GetTokenRequest) (*models.Token, error) DeleteToken(r DeleteTokenRequest) error GetAllPipelines(r GetAllPipelinesRequest) ([]*models.Pipeline, error) GetPipeline(r GetPipelineRequest) (*models.Pipeline, error) AddPipeline(r AddPipelineRequest) error UpdatePipeline(r UpdatePipelineRequest) error GetAllRuns(r GetAllRunsRequest) ([]*models.Run, error) GetRun(r GetRunRequest) (*models.Run, error) AddRun(r AddRunRequest) error UpdateRun(r UpdateRunRequest) error GetAllTaskRuns(r GetAllTaskRunsRequest) ([]*models.TaskRun, error) GetTaskRun(r GetTaskRunRequest) (*models.TaskRun, error) AddTaskRun(r AddTaskRunRequest) error UpdateTaskRun(r UpdateTaskRunRequest) error GetAllEvents(r GetAllEventsRequest) ([]models.Event, error) GetEvent(r GetEventRequest) (models.Event, error) AddEvent(r AddEventRequest) error DeleteEvent(r DeleteEventRequest) error GetAllTriggers(r GetAllTriggersRequest) ([]*config.Trigger, error) GetTrigger(r GetTriggerRequest) (*config.Trigger, error) AddTrigger(r AddTriggerRequest) error DeleteTrigger(r DeleteTriggerRequest) error GetAllNotifiers(r GetAllNotifiersRequest) ([]*config.Notifier, error) GetNotifier(r GetNotifierRequest) (*config.Notifier, error) AddNotifier(r AddNotifierRequest) error DeleteNotifier(r DeleteNotifierRequest) error }
Engine represents backend storage implementations where items can be persisted.
type EngineType ¶
type EngineType string
EngineType type represents the different possible storage engines available
const ( // StorageEngineBoltDB represents a boltDB storage engine. // A file based key-value store.(https://pkg.go.dev/go.etcd.io/bbolt) used through (https://github.com/asdine/storm) StorageEngineBoltDB EngineType = "bolt" )
type GetAllEventsRequest ¶ added in v0.1.0
type GetAllNamespacesRequest ¶
type GetAllNotifiersRequest ¶
type GetAllNotifiersRequest struct{}
type GetAllPipelinesRequest ¶
type GetAllRunsRequest ¶
type GetAllTaskRunsRequest ¶
type GetAllTokensRequest ¶
type GetAllTriggersRequest ¶
type GetAllTriggersRequest struct{}
type GetEventRequest ¶ added in v0.1.0
type GetEventRequest struct {
ID int64
}
type GetNamespaceRequest ¶
type GetNamespaceRequest struct {
ID string
}
type GetNotifierRequest ¶
type GetNotifierRequest struct {
Kind string
}
type GetPipelineRequest ¶
type GetRunRequest ¶
type GetTaskRunRequest ¶
type GetTokenRequest ¶
type GetTokenRequest struct {
Hash string
}
type GetTriggerRequest ¶
type GetTriggerRequest struct {
Kind string
}
type UpdateNamespaceRequest ¶
type UpdatePipelineRequest ¶
type UpdateRunRequest ¶
type UpdateTaskRunRequest ¶
Click to show internal directories.
Click to hide internal directories.