...
1 package sessions
2
3 import (
4 "github.com/gorilla/sessions"
5 )
6
7 type CookieStore interface {
8 Store
9 }
10
11
12
13
14
15
16
17
18
19
20 func NewCookieStore(keyPairs ...[]byte) CookieStore {
21 return &cookieStore{sessions.NewCookieStore(keyPairs...)}
22 }
23
24 type cookieStore struct {
25 *sessions.CookieStore
26 }
27
28 func (c *cookieStore) Options(options Options) {
29 c.CookieStore.Options = &sessions.Options{
30 Path: options.Path,
31 Domain: options.Domain,
32 MaxAge: options.MaxAge,
33 Secure: options.Secure,
34 HttpOnly: options.HttpOnly,
35 }
36 }
37
View as plain text