session

package
v0.0.0-...-0de1ee4 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultCookieName = "SSID"

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(data string, key []byte) ([]byte, error)

func Encrypt

func Encrypt(data []byte, key []byte) (string, error)

func Get

func Get(ctx context.Context) string

func Middleware

func Middleware(encryptionKey string, options ...OptionFn) func(http.Handler) http.Handler

Types

type OptionFn

type OptionFn func(*Session)

func WithCookieName

func WithCookieName(name string) OptionFn

type Session

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

func New

func New(encryptionKey string, options ...OptionFn) *Session

func (*Session) Handler

func (s *Session) Handler(next http.Handler) http.Handler

Jump to

Keyboard shortcuts

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