redis

package
v0.0.0-...-dcf5b65 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2023 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 CSRFStore

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

func NewCSRFStore

func NewCSRFStore(host, port, password string, sessionTime time.Duration) *CSRFStore

NewCSRFStore returns an instance of redis based session store

func (*CSRFStore) Get

func (s *CSRFStore) Get(ctx context.Context, token string) (string, error)

Get gets token from the store

func (*CSRFStore) Insert

func (s *CSRFStore) Insert(ctx context.Context, token string) error

Insert adds token in the store

func (*CSRFStore) Invalidate

func (s *CSRFStore) Invalidate(ctx context.Context, token string) error

Invalidate will remove token from the store

type SessionStore

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

SessionStore implments session.Store interface

func NewSessionStore

func NewSessionStore(host, port, password string, sessionTime time.Duration) *SessionStore

NewSessionStore returns an instance of redis based session store

func (*SessionStore) Get

func (s *SessionStore) Get(ctx context.Context, key string, value interface{}) error

Get gets value from the store

func (*SessionStore) Set

func (s *SessionStore) Set(ctx context.Context, key string, value interface{}) error

Set sets value in the store

Jump to

Keyboard shortcuts

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