storage

package
v0.0.0-...-37e6509 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoltStorage

type BoltStorage struct {
	File    string
	Timeout time.Duration
	// contains filtered or unexported fields
}

func (*BoltStorage) Get

func (s *BoltStorage) Get(key resource.Key) (result *resource.Resource, err error)

func (*BoltStorage) Init

func (s *BoltStorage) Init() error

func (*BoltStorage) List

func (s *BoltStorage) List(key resource.Key) (result []*resource.Resource, err error)

func (*BoltStorage) Put

func (s *BoltStorage) Put(r *resource.Resource) error

type ResourceStorage

type ResourceStorage interface {
	Init() error
	Put(*resource.Resource) error
	Get(resource.Key) (*resource.Resource, error)
	List(resource.Key) ([]*resource.Resource, error)
}

func NewResourceStorage

func NewResourceStorage(config conf.DBConfig) ResourceStorage

Jump to

Keyboard shortcuts

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