stores

package
v0.0.0-...-9336d3e Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvStore

type EnvStore struct {
	// contains filtered or unexported fields
}

EnvStore struct to store the env variables

func NewEnvStore

func NewEnvStore() *EnvStore

NewEnvStore create a new env store

func (*EnvStore) Get

func (e *EnvStore) Get(key string) interface{}

Get returns the value of the key in evn store

func (*EnvStore) GetStore

func (e *EnvStore) GetStore() map[string]interface{}

GetStore returns the env store

func (*EnvStore) Set

func (e *EnvStore) Set(key string, value interface{})

Set sets the value of the key in env store

func (*EnvStore) UpdateStore

func (e *EnvStore) UpdateStore(store map[string]interface{})

UpdateEnvStore to update the whole env store object

type SessionEntry

type SessionEntry struct {
	Value     string
	ExpiresAt int64
}

SessionEntry is the struct for entry stored in store

type SessionStore

type SessionStore struct {
	// contains filtered or unexported fields
}

SessionStore struct to store the env variables

func NewSessionStore

func NewSessionStore() *SessionStore

NewSessionStore create a new session store

func (*SessionStore) Get

func (s *SessionStore) Get(key, subKey string) string

Get returns the value of the key in state store

func (*SessionStore) Remove

func (s *SessionStore) Remove(key, subKey string)

Remove value for given key and subkey

func (*SessionStore) RemoveAll

func (s *SessionStore) RemoveAll(key string)

RemoveAll all values for given key

func (*SessionStore) RemoveByNamespace

func (s *SessionStore) RemoveByNamespace(namespace string) error

RemoveByNamespace to delete session for a given namespace example google,github

func (*SessionStore) Set

func (s *SessionStore) Set(key string, subKey, value string, expiration int64)

Set sets the value of the key in state store

type StateStore

type StateStore struct {
	// contains filtered or unexported fields
}

StateStore struct to store the env variables

func NewStateStore

func NewStateStore() *StateStore

NewStateStore create a new state store

func (*StateStore) Get

func (s *StateStore) Get(key string) string

Get returns the value of the key in state store

func (*StateStore) Remove

func (s *StateStore) Remove(key string)

Remove removes the key from state store

func (*StateStore) Set

func (s *StateStore) Set(key string, value string)

Set sets the value of the key in state store

Jump to

Keyboard shortcuts

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