storage

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2016 License: Unlicense Imports: 3 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotSupported = errors.New("the operation is not supported by the driver")
	ErrNotFound     = errors.New("not found")
)

Functions

func ForContext

func ForContext(ctx context.Context, driver Driver) context.Context

Types

type Driver

type Driver interface {
	Init() error
	Setup(ctx context.Context) error
	Teardown(ctx context.Context) error

	Hooks() HookStore
}

func FromContext

func FromContext(ctx context.Context) Driver

type HookStore

type HookStore interface {
	GetByID(ctx context.Context, id string) (*v1.Hook, error)
	Delete(ctx context.Context, id string) error
	Store(ctx context.Context, hook *v1.Hook) error
	GetAll(ctx context.Context) ([]*v1.Hook, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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