session

package
v0.0.0-...-acf328e Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: BSD-3-Clause Imports: 3 Imported by: 0

README

session/mem/session

session/mem/session implements sessions stored in-memory.

Documentation

package session // import "bitbucket.org/_mikey/www/session/mem/session"

Package session

VARIABLES

var Store *store
    Store


TYPES

type Session struct {
	ID   uuid.UUID // [16]byte
	Data map[string]interface{}
	// Has unexported fields.
}
    Session

func New(d time.Duration) *Session
    New

func (sess *Session) Destroy()
    Destroy (*Session)

func (sess *Session) Get(key string) interface{}
    Get (*Session)

func (sess *Session) Set(key string, value interface{})
    Set (*Session)

func (sess *Session) Start()
    Start (*Session)

func (sess *Session) Unset(key string)
    Unset (*Session)

Tests

=== RUN   TestNew
--- PASS: TestNew (0.00s)
=== RUN   TestSetAndGet
--- PASS: TestSetAndGet (0.00s)
=== RUN   TestUnset
--- PASS: TestUnset (0.00s)
=== RUN   TestDestroy
--- PASS: TestDestroy (0.00s)
PASS
ok		bitbucket.org/_mikey/www/session/mem/session	0.003s

Documentation

Overview

Package session

Index

Constants

This section is empty.

Variables

View Source
var Store *store

Store

Functions

This section is empty.

Types

type Session

type Session struct {
	ID   uuid.UUID // [16]byte
	Data map[string]interface{}
	// contains filtered or unexported fields
}

Session

func New

func New(d time.Duration) *Session

New

func (*Session) Destroy

func (sess *Session) Destroy()

Destroy (*Session)

func (*Session) Get

func (sess *Session) Get(key string) interface{}

Get (*Session)

func (*Session) Set

func (sess *Session) Set(key string, value interface{})

Set (*Session)

func (*Session) Start

func (sess *Session) Start()

Start (*Session)

func (*Session) Unset

func (sess *Session) Unset(key string)

Unset (*Session)

Jump to

Keyboard shortcuts

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