Documentation
¶
Index ¶
- Constants
- type Manager
- func (m Manager) Delete(w http.ResponseWriter, cookie *http.Cookie)
- func (m Manager) Get(r *http.Request, key string) (string, error)
- func (m Manager) Read(signedValue string) (string, error)
- func (m Manager) Set(w http.ResponseWriter, r *http.Request, cookie *http.Cookie) error
- func (m Manager) Sign(rawValue string) (string, error)
- type Secrets
- type SignedCookie
Constants ¶
View Source
const (
SecretSize = 32 // SecretSize is the size, in bytes, of a cookie secret.
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (Manager) Delete ¶ added in v0.0.2
func (m Manager) Delete(w http.ResponseWriter, cookie *http.Cookie)
type Secrets ¶ added in v0.0.2
type Secrets []string
Secrets is a latest-first list of 32-byte, base64-encoded secrets.
type SignedCookie ¶ added in v0.0.20
func (*SignedCookie[T]) Delete ¶ added in v0.0.20
func (ac *SignedCookie[T]) Delete(w http.ResponseWriter, r *http.Request) error
func (*SignedCookie[T]) Get ¶ added in v0.0.20
func (ac *SignedCookie[T]) Get(r *http.Request) (*T, error)
func (*SignedCookie[T]) Set ¶ added in v0.0.20
func (ac *SignedCookie[T]) Set(w http.ResponseWriter, r *http.Request, value *T, overrideBaseCookie *http.Cookie) error
Click to show internal directories.
Click to hide internal directories.