storage

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

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 AddDockerRegistryAuthRequest

type AddDockerRegistryAuthRequest struct {
	DockerRegistryAuth *models.DockerRegistryAuth
}

type AddNamespaceRequest

type AddNamespaceRequest struct {
	Namespace *models.Namespace
}

type AddPipelineRequest

type AddPipelineRequest struct {
	Pipeline *models.Pipeline
}

type AddRunRequest

type AddRunRequest struct {
	Run *models.Run
}

type AddTaskRunRequest

type AddTaskRunRequest struct {
	TaskRun *models.TaskRun
}

type AddTokenRequest

type AddTokenRequest struct {
	Token *models.Token
}

type AddTriggerEventRequest

type AddTriggerEventRequest struct {
	Event *models.TriggerEvent
}

type DeleteRunRequest

type DeleteRunRequest struct {
	NamespaceID string
	PipelineID  string
	ID          int64
}

type DeleteTokenRequest

type DeleteTokenRequest struct {
	Hash 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

	GetAllTriggerEvents(r GetAllTriggerEventsRequest) ([]*models.TriggerEvent, error)
	GetTriggerEvent(r GetTriggerEventRequest) (*models.TriggerEvent, error)
	AddTriggerEvent(r AddTriggerEventRequest) error
	UpdateTriggerEvent(r UpdateTriggerEventRequest) error

	GetAllRunRegistrations(r GetAllRunRegistrationsRequest) (map[RunRegistryKey]struct{}, error)
	RegisterRun(r RegisterRunRequest) error
	UnregisterRun(r UnregisterRunRequest) error
	RegistrationExists(r RegistrationExistsRequest) bool

	GetAllDockerRegistryAuths(r GetAllDockerRegistryAuthsRequest) ([]*models.DockerRegistryAuth, error)
	GetDockerRegistryAuth(r GetDockerRegistryAuthRequest) (*models.DockerRegistryAuth, error)
	AddDockerRegistryAuth(r AddDockerRegistryAuthRequest) error
	RemoveDockerRegistryAuth(r RemoveDockerRegistryAuthRequest) 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 GetAllDockerRegistryAuthsRequest

type GetAllDockerRegistryAuthsRequest struct{}

type GetAllNamespacesRequest

type GetAllNamespacesRequest struct {
	Offset int
	Limit  int
}

type GetAllPipelinesRequest

type GetAllPipelinesRequest struct {
	Offset int
	Limit  int

	NamespaceID string
}

type GetAllRunRegistrationsRequest

type GetAllRunRegistrationsRequest struct{}

type GetAllRunsRequest

type GetAllRunsRequest struct {
	Offset int
	Limit  int

	NamespaceID string
	PipelineID  string
}

type GetAllTaskRunsRequest

type GetAllTaskRunsRequest struct {
	NamespaceID string
	PipelineID  string
	RunID       int64
}

type GetAllTokensRequest

type GetAllTokensRequest struct {
	Offset     int
	Limit      int
	Namespaces []string
}

type GetAllTriggerEventsRequest

type GetAllTriggerEventsRequest struct {
	Offset int
	Limit  int

	NamespaceID          string
	PipelineID           string
	PipelineTriggerLabel string
}

type GetDockerRegistryAuthRequest

type GetDockerRegistryAuthRequest struct {
	Registry string
}

type GetNamespaceRequest

type GetNamespaceRequest struct {
	ID string
}

type GetPipelineRequest

type GetPipelineRequest struct {
	NamespaceID string
	ID          string
}

type GetRunRequest

type GetRunRequest struct {
	NamespaceID string
	PipelineID  string
	ID          int64
}

type GetTaskRunRequest

type GetTaskRunRequest struct {
	NamespaceID string
	PipelineID  string
	RunID       int64
	ID          string
}

type GetTokenRequest

type GetTokenRequest struct {
	Hash string
}

type GetTriggerEventRequest

type GetTriggerEventRequest struct {
	NamespaceID          string
	PipelineID           string
	PipelineTriggerLabel string
	ID                   int64
}

type RegisterRunRequest

type RegisterRunRequest struct {
	Namespace string
	Pipeline  string
	Run       int64
}

type RegistrationExistsRequest

type RegistrationExistsRequest struct {
	Namespace string
	Pipeline  string
	Run       int64
}

type RemoveDockerRegistryAuthRequest

type RemoveDockerRegistryAuthRequest struct {
	Registry string
}

type RunRegistryKey

type RunRegistryKey struct {
	Namespace string
	Pipeline  string
	Run       int64
}

type UnregisterRunRequest

type UnregisterRunRequest struct {
	Namespace string
	Pipeline  string
	Run       int64
}

type UpdateNamespaceRequest

type UpdateNamespaceRequest struct {
	Namespace *models.Namespace
}

type UpdatePipelineRequest

type UpdatePipelineRequest struct {
	Pipeline *models.Pipeline
}

type UpdateRunRequest

type UpdateRunRequest struct {
	Run *models.Run
}

type UpdateTaskRunRequest

type UpdateTaskRunRequest struct {
	TaskRun *models.TaskRun
}

type UpdateTriggerEventRequest

type UpdateTriggerEventRequest struct {
	Event *models.TriggerEvent
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL