storage

package
v0.18.4 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultTTL is session time to live default value.
	DefaultTTL = 24 * time.Minute
	// DefaultTTC is time to clear default value.
	DefaultTTC = 1 * time.Minute
)
View Source
const (
	// EngineInMemory is not implemented yet.
	EngineInMemory = "in_memory"
	// EnginePostgres keeps session within postgres database.
	EnginePostgres = "postgres"
	// EngineRedis is not implemented yet.
	EngineRedis = "redis"
)

Variables

View Source
var (
	ErrSessionNotFound    = errors.New("storage: session not found")
	ErrMissingAccessToken = errors.New("storage: missing access token")
	ErrMissingSubjectID   = errors.New("storage: missing subject accessToken")
	ErrMissingSession     = errors.New("storage: missing session")
)

Functions

func TestStorageAbandon added in v0.16.0

func TestStorageAbandon(t *testing.T, s Storage)

func TestStorageDelete added in v0.16.0

func TestStorageDelete(t *testing.T, s Storage)

func TestStorageExists added in v0.16.0

func TestStorageExists(t *testing.T, s Storage)

func TestStorageGet added in v0.16.0

func TestStorageGet(t *testing.T, s Storage)

func TestStorageList added in v0.16.0

func TestStorageList(t *testing.T, s Storage)

func TestStorageListBetween added in v0.16.0

func TestStorageListBetween(t *testing.T, s Storage)

func TestStorageSetValue added in v0.16.0

func TestStorageSetValue(t *testing.T, s Storage)

func TestStorageStart added in v0.16.0

func TestStorageStart(t *testing.T, s Storage)

Types

type InstrumentedStorage

type InstrumentedStorage interface {
	Storage
	prometheus.Collector
}

InstrumentedStorage combines Storage and prometheus Collector interface.

type Storage

Storage combines API that needs to be implemented by any storage to be replaceable.

func Init

func Init(s Storage, isTest bool) (Storage, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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