Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // SessionIdHashKeyName is the name of attribute that represents session id. SessionIdHashKeyName = "session_id" // SessionDataKeyName is the name of attribute that represents session data encoded in Gob. SessionDataKeyName = "session_data" // SessionExpiresName is the name of attribute that represents session expiration date. SessionExpiresName = "session_expires_at" )
View Source
var DefaultSessionOpts = &sessions.Options{
Path: "/",
MaxAge: 86400 * 30,
}
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct { Table *table.Table Codecs []securecookie.Codec // Options is served as the default configuration for Cookie Options *sessions.Options // If UseSessionCookie is true, a cookie will not have Expires and Max-Age fields. // Otherwise, it will be set to the same value of Options.MaxAge. UseSessionCookie bool }
Store represents the session store backed by DynamoDB.
func New ¶
func New(dynamodbAPI dynamodbiface.DynamoDBAPI, tableName string, keyPairs ...[]byte) *Store
New returns a new session store. See https://github.com/gorilla/sessions/blob/master/store.go for what keyPairs means. Especially for dynamostore, keyPairs is be used to authenticate session id. Yes, the actual data is stored in DynamoDB table.
func (*Store) Get ¶
Get returns a session for the given name after adding it to the registry.
See gorilla/sessions FilesystemStore.Get(). or boj/redistore
Click to show internal directories.
Click to hide internal directories.