storage

package
v1.7.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	*gorm.DB
}

DB a struct wrapping plain sql library with SQL dialect, to solve any feature difference between MySQL, which is used in production, and Sqlite, which is used for unit testing.

func NewDB

func NewDB(db *gorm.DB) *DB

NewDB creates a DB

func NewFakeDb

func NewFakeDb() (*DB, error)

func NewFakeDbOrFatal

func NewFakeDbOrFatal() *DB

type ExecutionCacheStore

type ExecutionCacheStore struct {
	// contains filtered or unexported fields
}

func NewExecutionCacheStore

func NewExecutionCacheStore(db *DB, time util.TimeInterface) *ExecutionCacheStore

factory function for execution cache store

func (*ExecutionCacheStore) CreateExecutionCache

func (s *ExecutionCacheStore) CreateExecutionCache(executionCache *model.ExecutionCache) (*model.ExecutionCache, error)

func (*ExecutionCacheStore) DeleteExecutionCache

func (s *ExecutionCacheStore) DeleteExecutionCache(executionCacheID string) error

func (*ExecutionCacheStore) GetExecutionCache

func (s *ExecutionCacheStore) GetExecutionCache(executionCacheKey string, maxCacheStaleness int64) (*model.ExecutionCache, error)

type ExecutionCacheStoreInterface

type ExecutionCacheStoreInterface interface {
	GetExecutionCache(executionCacheKey string, maxCacheStaleness int64) (*model.ExecutionCache, error)
	CreateExecutionCache(*model.ExecutionCache) (*model.ExecutionCache, error)
	DeleteExecutionCache(executionCacheKey string) error
}

Jump to

Keyboard shortcuts

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