Versions in this module Expand all Collapse all v1 v1.1.2 Oct 18, 2023 v1.1.1 Feb 24, 2017 Changes in this version + var ErrMacInvalid = cookieError + func DecodeMulti(name string, value string, dst interface{}, codecs ...Codec) error + func EncodeMulti(name string, value interface{}, codecs ...Codec) (string, error) + func GenerateRandomKey(length int) []byte + type Codec interface + Decode func(name, value string, dst interface{}) error + Encode func(name string, value interface{}) (string, error) + func CodecsFromPairs(keyPairs ...[]byte) []Codec + type Error interface + Cause func() error + IsDecode func() bool + IsInternal func() bool + IsUsage func() bool + type GobEncoder struct + func (e GobEncoder) Deserialize(src []byte, dst interface{}) error + func (e GobEncoder) Serialize(src interface{}) ([]byte, error) + type JSONEncoder struct + func (e JSONEncoder) Deserialize(src []byte, dst interface{}) error + func (e JSONEncoder) Serialize(src interface{}) ([]byte, error) + type MultiError []error + func (m MultiError) Cause() error + func (m MultiError) Error() string + func (m MultiError) IsDecode() bool + func (m MultiError) IsInternal() bool + func (m MultiError) IsUsage() bool + type NopEncoder struct + func (e NopEncoder) Deserialize(src []byte, dst interface{}) error + func (e NopEncoder) Serialize(src interface{}) ([]byte, error) + type SecureCookie struct + func New(hashKey, blockKey []byte) *SecureCookie + func (s *SecureCookie) BlockFunc(f func([]byte) (cipher.Block, error)) *SecureCookie + func (s *SecureCookie) Decode(name, value string, dst interface{}) error + func (s *SecureCookie) Encode(name string, value interface{}) (string, error) + func (s *SecureCookie) HashFunc(f func() hash.Hash) *SecureCookie + func (s *SecureCookie) MaxAge(value int) *SecureCookie + func (s *SecureCookie) MaxLength(value int) *SecureCookie + func (s *SecureCookie) MinAge(value int) *SecureCookie + func (s *SecureCookie) SetSerializer(sz Serializer) *SecureCookie + type Serializer interface + Deserialize func(src []byte, dst interface{}) error + Serialize func(src interface{}) ([]byte, error)