storage

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 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 TestStorage_Abandon

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

func TestStorage_Delete

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

func TestStorage_Exists

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

func TestStorage_Get

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

func TestStorage_List

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

func TestStorage_List_between

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

func TestStorage_SetValue

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

func TestStorage_Start

func TestStorage_Start(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
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.

Jump to

Keyboard shortcuts

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