Documentation
¶
Index ¶
- Variables
- func GenSessionID() []byte
- func GetKeys() (keys [][32]byte, err error)
- func ReadCookie[T CookieReader](store Store, req *http.Request, val T) error
- func WriteCookie[T CookieWriter](store Store, req *http.Request, w http.ResponseWriter, val T) error
- type CookieReader
- type CookieWriter
- type GrainSession
- type Payload
- type Store
- type UserSession
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrPayloadTooShort = errors.New("payload too short; not enough space for nonce")
)
Functions ¶
func GenSessionID ¶
func GenSessionID() []byte
func ReadCookie ¶
func ReadCookie[T CookieReader](store Store, req *http.Request, val T) error
func WriteCookie ¶
func WriteCookie[T CookieWriter](store Store, req *http.Request, w http.ResponseWriter, val T) error
Types ¶
type CookieReader ¶
type GrainSession ¶
type GrainSession struct { GrainID types.GrainID `capnp:"grainId"` SessionID []byte `capnp:"sessionId"` }
func (GrainSession) CookieName ¶
func (sess GrainSession) CookieName() string
type UserSession ¶
type UserSession struct { SessionID []byte `capnp:"sessionId"` Credential types.Credential }
func (UserSession) CookieName ¶
func (sess UserSession) CookieName() string
Click to show internal directories.
Click to hide internal directories.