cookies

package
v0.0.0-...-f38779c Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package cookies provides a convenience wrapper around gorilla/securecookie with shared hash keys

Index

Constants

View Source
const (
	AuthTokenKey = "token"
)

Variables

This section is empty.

Functions

func Clear

func Clear(ctx context.Context) error

func Delete

func Delete(ctx context.Context, key string) error

func Get

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

Get retrieves a cookie with the given key and encodes it into value

func Init

func Init(hashKey, blockKey []byte)

Init initializes the cookie jar and is required if you don't want panics. If the COOKIE_HASH_KEY and COOKIE_BLOCK_KEY environment variables are supplied it will have already been initialized using those values so this will be unnecessary.

func Set

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

Set stores the given value with the given key

Types

This section is empty.

Jump to

Keyboard shortcuts

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