This section is empty.


This section is empty.


This section is empty.


type Cookie struct {
	// Name is the name of the cookie.
	Name string

	// Path is path of the cookie.
	Path string

	// MaxAge is the max age of the cookie.
	MaxAge time.Duration

	// HTTPOnly restricts the cookie to HTTP (no javascript access).
	HTTPOnly bool

    Cookie is a description of a cookie used for consistent cookie setting and deleting.

    func (*Cookie) Exists

    func (d *Cookie) Exists(r *http.Request) bool

      Exists checks if the cookies exists.

      func (*Cookie) Get

      func (d *Cookie) Get(w http.ResponseWriter, r *http.Request, v interface{}) (bool, error)

        Get decodes the cookie into the value. Returns false if the cookie is not there.

        func (*Cookie) Remove

        func (d *Cookie) Remove(w http.ResponseWriter, r *http.Request)

          Remove the cookie with the specified name (if it exists).

          func (*Cookie) Set

          func (d *Cookie) Set(w http.ResponseWriter, r *http.Request, v interface{}) error

            Set the value of the cookie.

            Source Files