Documentation ¶
Overview ¶
Package storage contains the data storage interface in which Gofer stores all internal data.
Index ¶
- Variables
- type DB
- func (db *DB) DeleteCommonTaskRegistration(name string) error
- func (db *DB) DeleteEvent(id int64) error
- func (db *DB) DeleteNamespace(id string) error
- func (db *DB) DeleteObjectStorePipelineKey(namespace, pipeline string, key string) error
- func (db *DB) DeleteObjectStoreRunKey(namespace, pipeline string, run int64, key string) error
- func (db *DB) DeletePipeline(namespace, id string) error
- func (db *DB) DeleteRun(namespace, pipeline string, id int64) error
- func (db *DB) DeleteSecretStoreGlobalKey(key string) error
- func (db *DB) DeleteSecretStorePipelineKey(namespace, pipeline string, key string) error
- func (db *DB) DeleteTaskRun(namespace, pipeline string, run int64, id string) error
- func (db *DB) DeleteToken(hash string) error
- func (db *DB) DeleteTriggerRegistration(name string) error
- func (db *DB) DisableToken(hashStr string) error
- func (db *DB) EnableToken(hashStr string) error
- func (db *DB) GetCommonTaskRegistration(name string) (models.CommonTaskRegistration, error)
- func (db *DB) GetEvent(id int64) (models.Event, error)
- func (db *DB) GetNamespace(id string) (models.Namespace, error)
- func (db *DB) GetPipeline(conn qb.BaseRunner, namespace, pipeline string) (models.Pipeline, error)
- func (db *DB) GetRun(namespace, pipeline string, run int64) (models.Run, error)
- func (db *DB) GetSecretStoreGlobalKey(key string) (models.SecretStoreKey, error)
- func (db *DB) GetSecretStorePipelineKey(namespace, pipeline, key string) (models.SecretStoreKey, error)
- func (db *DB) GetTaskRun(namespace, pipeline string, run int64, taskRun string) (models.TaskRun, error)
- func (db *DB) GetToken(hashStr string) (models.Token, error)
- func (db *DB) GetTriggerRegistration(name string) (models.TriggerRegistration, error)
- func (db *DB) InsertCommonTaskRegistration(tr *models.CommonTaskRegistration) error
- func (db *DB) InsertEvent(event *models.Event) (int64, error)
- func (db *DB) InsertNamespace(namespace *models.Namespace) error
- func (db *DB) InsertObjectStorePipelineKey(namespace, pipeline string, objectKey *models.ObjectStoreKey) error
- func (db *DB) InsertObjectStoreRunKey(namespace, pipeline string, run int64, objectKey *models.ObjectStoreKey) error
- func (db *DB) InsertPipeline(pipeline *models.Pipeline) error
- func (db *DB) InsertRun(run *models.Run) (int64, error)
- func (db *DB) InsertSecretStoreGlobalKey(secretKey *models.SecretStoreKey, force bool) error
- func (db *DB) InsertSecretStorePipelineKey(namespace, pipeline string, secretKey *models.SecretStoreKey, force bool) error
- func (db *DB) InsertTaskRun(taskRun *models.TaskRun) error
- func (db *DB) InsertToken(tr *models.Token) error
- func (db *DB) InsertTriggerRegistration(tr *models.TriggerRegistration) error
- func (db *DB) ListCommonTaskRegistrations(offset, limit int) ([]models.CommonTaskRegistration, error)
- func (db *DB) ListCommonTaskSettings(conn qb.BaseRunner, namespace, pipeline string) ([]models.PipelineCommonTaskSettings, error)
- func (db *DB) ListEvents(offset, limit int, reverse bool) ([]models.Event, error)
- func (db *DB) ListNamespaces(offset, limit int) ([]models.Namespace, error)
- func (db *DB) ListObjectStorePipelineKeys(namespace, pipeline string) ([]models.ObjectStoreKey, error)
- func (db *DB) ListObjectStoreRunKeys(namespace, pipeline string, run int64) ([]models.ObjectStoreKey, error)
- func (db *DB) ListPipelines(offset, limit int, namespace string) ([]models.Pipeline, error)
- func (db *DB) ListRuns(conn qb.BaseRunner, offset, limit int, namespace, pipeline string) ([]models.Run, error)
- func (db *DB) ListSecretStoreGlobalKeys() ([]models.SecretStoreKey, error)
- func (db *DB) ListSecretStorePipelineKeys(namespace, pipeline string) ([]models.SecretStoreKey, error)
- func (db *DB) ListTaskRuns(offset, limit int, namespace, pipeline string, run int64) ([]models.TaskRun, error)
- func (db *DB) ListTasks(conn qb.BaseRunner, namespace, pipeline string) ([]models.CustomTask, error)
- func (db *DB) ListTokens(offset, limit int) ([]models.Token, error)
- func (db *DB) ListTriggerRegistrations(offset, limit int) ([]models.TriggerRegistration, error)
- func (db *DB) ListTriggerSettings(conn qb.BaseRunner, namespace, pipeline string) ([]models.PipelineTriggerSettings, error)
- func (db *DB) UpdateCommonTaskRegistration(name string, fields UpdatableCommonTaskRegistrationFields) error
- func (db *DB) UpdateNamespace(id string, fields UpdatableNamespaceFields) error
- func (db *DB) UpdatePipeline(namespace, id string, fields UpdatablePipelineFields) error
- func (db *DB) UpdateRun(namespace, pipeline string, run int64, fields UpdatableRunFields) error
- func (db *DB) UpdateTaskRun(taskRun *models.TaskRun, fields UpdatableTaskRunFields) error
- func (db *DB) UpdateTriggerRegistration(name string, fields UpdatableTriggerRegistrationFields) error
- type UpdatableCommonTaskRegistrationFields
- type UpdatableNamespaceFields
- type UpdatablePipelineFields
- type UpdatableRunFields
- type UpdatableTaskRunFields
- type UpdatableTriggerRegistrationFields
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") // ErrInternal is returned when there was an unknown internal DB error. ErrInternal = errors.New("storage: unknown db error") )
Functions ¶
This section is empty.
Types ¶
type DB ¶ added in v0.3.0
DB is a representation of the datastore
func (*DB) DeleteCommonTaskRegistration ¶ added in v0.3.0
func (*DB) DeleteEvent ¶ added in v0.3.0
func (*DB) DeleteNamespace ¶ added in v0.3.0
func (*DB) DeleteObjectStorePipelineKey ¶ added in v0.3.0
func (*DB) DeleteObjectStoreRunKey ¶ added in v0.3.0
func (*DB) DeletePipeline ¶ added in v0.3.0
func (*DB) DeleteSecretStoreGlobalKey ¶ added in v0.3.0
func (*DB) DeleteSecretStorePipelineKey ¶ added in v0.3.0
func (*DB) DeleteTaskRun ¶ added in v0.3.0
func (*DB) DeleteToken ¶ added in v0.3.0
func (*DB) DeleteTriggerRegistration ¶ added in v0.3.0
func (*DB) DisableToken ¶ added in v0.3.0
func (*DB) EnableToken ¶ added in v0.3.0
func (*DB) GetCommonTaskRegistration ¶ added in v0.3.0
func (db *DB) GetCommonTaskRegistration(name string) (models.CommonTaskRegistration, error)
func (*DB) GetNamespace ¶ added in v0.3.0
func (*DB) GetPipeline ¶ added in v0.3.0
func (*DB) GetSecretStoreGlobalKey ¶ added in v0.3.0
func (db *DB) GetSecretStoreGlobalKey(key string) (models.SecretStoreKey, error)
func (*DB) GetSecretStorePipelineKey ¶ added in v0.3.0
func (db *DB) GetSecretStorePipelineKey(namespace, pipeline, key string) (models.SecretStoreKey, error)
func (*DB) GetTaskRun ¶ added in v0.3.0
func (*DB) GetTriggerRegistration ¶ added in v0.3.0
func (db *DB) GetTriggerRegistration(name string) (models.TriggerRegistration, error)
func (*DB) InsertCommonTaskRegistration ¶ added in v0.3.0
func (db *DB) InsertCommonTaskRegistration(tr *models.CommonTaskRegistration) error
func (*DB) InsertEvent ¶ added in v0.3.0
func (*DB) InsertNamespace ¶ added in v0.3.0
func (*DB) InsertObjectStorePipelineKey ¶ added in v0.3.0
func (db *DB) InsertObjectStorePipelineKey(namespace, pipeline string, objectKey *models.ObjectStoreKey) error
func (*DB) InsertObjectStoreRunKey ¶ added in v0.3.0
func (*DB) InsertPipeline ¶ added in v0.3.0
func (*DB) InsertSecretStoreGlobalKey ¶ added in v0.3.0
func (db *DB) InsertSecretStoreGlobalKey(secretKey *models.SecretStoreKey, force bool) error
func (*DB) InsertSecretStorePipelineKey ¶ added in v0.3.0
func (*DB) InsertTaskRun ¶ added in v0.3.0
func (*DB) InsertTriggerRegistration ¶ added in v0.3.0
func (db *DB) InsertTriggerRegistration(tr *models.TriggerRegistration) error
func (*DB) ListCommonTaskRegistrations ¶ added in v0.3.0
func (db *DB) ListCommonTaskRegistrations(offset, limit int) ([]models.CommonTaskRegistration, error)
func (*DB) ListCommonTaskSettings ¶ added in v0.3.0
func (db *DB) ListCommonTaskSettings(conn qb.BaseRunner, namespace, pipeline string) ([]models.PipelineCommonTaskSettings, error)
func (*DB) ListEvents ¶ added in v0.3.0
Return all events; limited to 200 rows in any one response. The reverse parameter allows the sorting the events in reverse chronological order (newest event first).
func (*DB) ListNamespaces ¶ added in v0.3.0
func (*DB) ListObjectStorePipelineKeys ¶ added in v0.3.0
func (db *DB) ListObjectStorePipelineKeys(namespace, pipeline string) ([]models.ObjectStoreKey, error)
func (*DB) ListObjectStoreRunKeys ¶ added in v0.3.0
func (*DB) ListPipelines ¶ added in v0.3.0
func (*DB) ListSecretStoreGlobalKeys ¶ added in v0.3.0
func (db *DB) ListSecretStoreGlobalKeys() ([]models.SecretStoreKey, error)
func (*DB) ListSecretStorePipelineKeys ¶ added in v0.3.0
func (db *DB) ListSecretStorePipelineKeys(namespace, pipeline string) ([]models.SecretStoreKey, error)
func (*DB) ListTaskRuns ¶ added in v0.3.0
func (*DB) ListTasks ¶ added in v0.3.0
func (db *DB) ListTasks(conn qb.BaseRunner, namespace, pipeline string) ([]models.CustomTask, error)
func (*DB) ListTokens ¶ added in v0.3.0
func (*DB) ListTriggerRegistrations ¶ added in v0.3.0
func (db *DB) ListTriggerRegistrations(offset, limit int) ([]models.TriggerRegistration, error)
func (*DB) ListTriggerSettings ¶ added in v0.3.0
func (db *DB) ListTriggerSettings(conn qb.BaseRunner, namespace, pipeline string) ([]models.PipelineTriggerSettings, error)
func (*DB) UpdateCommonTaskRegistration ¶ added in v0.3.0
func (db *DB) UpdateCommonTaskRegistration(name string, fields UpdatableCommonTaskRegistrationFields) error
func (*DB) UpdateNamespace ¶ added in v0.3.0
func (db *DB) UpdateNamespace(id string, fields UpdatableNamespaceFields) error
func (*DB) UpdatePipeline ¶ added in v0.3.0
func (db *DB) UpdatePipeline(namespace, id string, fields UpdatablePipelineFields) error
func (*DB) UpdateRun ¶ added in v0.3.0
func (db *DB) UpdateRun(namespace, pipeline string, run int64, fields UpdatableRunFields) error
func (*DB) UpdateTaskRun ¶ added in v0.3.0
func (db *DB) UpdateTaskRun(taskRun *models.TaskRun, fields UpdatableTaskRunFields) error
func (*DB) UpdateTriggerRegistration ¶ added in v0.3.0
func (db *DB) UpdateTriggerRegistration(name string, fields UpdatableTriggerRegistrationFields) error
type UpdatableCommonTaskRegistrationFields ¶ added in v0.3.0
type UpdatableCommonTaskRegistrationFields struct { Image *string RegistryAuth *models.RegistryAuth Variables *map[string]string Status *models.CommonTaskStatus Documentation *string }
type UpdatableNamespaceFields ¶ added in v0.3.0
type UpdatablePipelineFields ¶ added in v0.3.0
type UpdatablePipelineFields struct { Name *string Description *string Parallelism *int64 Modified *int64 State *models.PipelineState Tasks *map[string]models.CustomTask Triggers *map[string]models.PipelineTriggerSettings CommonTasks *map[string]models.PipelineCommonTaskSettings Errors *[]models.PipelineError }
type UpdatableRunFields ¶ added in v0.3.0
type UpdatableTaskRunFields ¶ added in v0.3.0
type UpdatableTaskRunFields struct { Started *int64 Ended *int64 ExitCode *int64 State *models.TaskRunState Status *models.TaskRunStatus StatusReason *models.TaskRunStatusReason LogsExpired *bool LogsRemoved *bool Variables *[]models.Variable }
type UpdatableTriggerRegistrationFields ¶ added in v0.3.0
type UpdatableTriggerRegistrationFields struct { Image *string RegistryAuth *models.RegistryAuth Variables *map[string]string Status *models.TriggerStatus }
Click to show internal directories.
Click to hide internal directories.