providers

package
v0.0.0-...-35c6083 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProviderTests

func ProviderTests(t *testing.T, p Provider)

ProviderTests runs all provider tests

Types

type Provider

type Provider interface {
	// SetUserSession sets the user session for given user identifier in form recipe:user_id
	SetUserSession(userId, key, token string, expiration int64) error
	// GetUserSession returns the session token for given token
	GetUserSession(userId, key string) (string, error)
	// DeleteUserSession deletes the user session
	DeleteUserSession(userId, key string) error
	// DeleteAllSessions deletes all the sessions from the session store
	DeleteAllUserSessions(userId string) error
	// DeleteSessionForNamespace deletes the session for a given namespace
	DeleteSessionForNamespace(namespace string) error
	// SetMfaSession sets the mfa session with key and value of userId
	SetMfaSession(userId, key string, expiration int64) error
	// GetMfaSession returns value of given mfa session
	GetMfaSession(userId, key string) (string, error)
	// DeleteMfaSession deletes given mfa session from in-memory store.
	DeleteMfaSession(userId, key string) error

	// SetState sets the login state (key, value form) in the session store
	SetState(key, state string) error
	// GetState returns the state from the session store
	GetState(key string) (string, error)
	// RemoveState removes the social login state from the session store
	RemoveState(key string) error

	// UpdateEnvStore to update the whole env store object
	UpdateEnvStore(store map[string]interface{}) error
	// GetEnvStore() returns the env store object
	GetEnvStore() (map[string]interface{}, error)
	// UpdateEnvVariable to update the particular env variable
	UpdateEnvVariable(key string, value interface{}) error
	// GetStringStoreEnvVariable to get the string env variable from env store
	GetStringStoreEnvVariable(key string) (string, error)
	// GetBoolStoreEnvVariable to get the bool env variable from env store
	GetBoolStoreEnvVariable(key string) (bool, error)
}

Provider defines current memory store provider

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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