joak

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

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

Go to latest
Published: Apr 6, 2016 License: MIT, MIT Imports: 13 Imported by: 0

README

joak

A helper pkg for github.com/0xor1/oak, it preconfigures to use cookie sessions and provides local and GAE data stores for github.com/0xor1/sus.Version based objects.

Test Coverage

Docs

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RouteGaeProd

func RouteGaeProd(router *mux.Router, ef EntityFactory, ei EntityInitializer, sessionMaxAge int, sessionName string, newAuthKey string, newCryptKey string, oldAuthKey string, oldCryptKey string, entity Entity, getJoinResp oak.GetJoinResp, getEntityChangeResp oak.GetEntityChangeResp, performAct oak.PerformAct, deleteAfter time.Duration, clearOutAfter time.Duration, kind string, ctxFactory ContextFactory) error

func RouteLocalTest

func RouteLocalTest(router *mux.Router, ef EntityFactory, ei EntityInitializer, sessionMaxAge int, sessionName string, newAuthKey string, newCryptKey string, oldAuthKey string, oldCryptKey string, entity Entity, getJoinResp oak.GetJoinResp, getEntityChangeResp oak.GetEntityChangeResp, performAct oak.PerformAct, deleteAfter time.Duration)

Types

type ContextFactory

type ContextFactory func(r *http.Request) context.Context

type Entity

type Entity interface {
	oak.Entity
	IncrementVersion()
	DecrementVersion()
	SetDeleteAfter(time.Time)
}

type EntityFactory

type EntityFactory func() Entity

type EntityInitializer

type EntityInitializer func(e Entity) Entity

Jump to

Keyboard shortcuts

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