corestorage

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert interface {
	GetOrNew(string) (*alert.Alert, error)
	All() ([]*alert.Alert, error)
	Release(a *alert.Alert) error
	Get(string) (*alert.Alert, error)
}

type AlertMock

type AlertMock struct {
	mock.Mock
}

func (*AlertMock) All

func (m *AlertMock) All() ([]*alert.Alert, error)

func (*AlertMock) Get

func (m *AlertMock) Get(s string) (*alert.Alert, error)

func (*AlertMock) GetOrNew

func (m *AlertMock) GetOrNew(string) (*alert.Alert, error)

func (*AlertMock) Release

func (m *AlertMock) Release(a *alert.Alert) error

type CoreStorage

type CoreStorage interface {
	Name() string
	KV() KV
	Alert() Alert
	Stop() error
}

type KV

type KV interface {
	Put(string, string) error
	Get(string) (string, error)
	Upsert(string, string) error
	Delete(string) error
	All() (map[string]string, error)
}

type KVMock

type KVMock struct {
	mock.Mock
}

func (*KVMock) All

func (m *KVMock) All() (map[string]string, error)

func (*KVMock) Delete

func (m *KVMock) Delete(_ string) error

func (*KVMock) Get

func (m *KVMock) Get(_ string) (string, error)

func (*KVMock) Put

func (m *KVMock) Put(_, _ string) error

func (*KVMock) Upsert

func (m *KVMock) Upsert(_, _ string) error

type Mock

type Mock struct {
	mock.Mock
	// contains filtered or unexported fields
}

func NewMock

func NewMock(name string) *Mock

func (*Mock) Alert

func (m *Mock) Alert() Alert

func (*Mock) AlertMock

func (m *Mock) AlertMock() *AlertMock

func (*Mock) KV

func (m *Mock) KV() KV

func (*Mock) KVMock

func (m *Mock) KVMock() *KVMock

func (*Mock) Name

func (m *Mock) Name() string

func (*Mock) Stop

func (m *Mock) Stop() error

Directories

Path Synopsis
provider

Jump to

Keyboard shortcuts

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