alkasir: github.com/alkasir/alkasir/pkg/shared/linkheader Index | Files

package linkheader

import "github.com/alkasir/alkasir/pkg/shared/linkheader"

Package link implements parsing and serialization of Link header values as defined in RFC 5988.

Index

Package Files

link.go linkheader.go

func Format Uses

func Format(links []Link) string

Format serializes a slice of Links into a header value. It does not currently implement RFC 2231 handling of non-ASCII character encoding and language information.

func Parse Uses

func Parse(l string) ([]Link, error)

Parse parses a Link header value into a slice of Links. It does not currently implement RFC 2231 handling of non-ASCII character encoding and language information.

type Link struct {
    URI    string
    Rel    string
    Params map[string]string
}

type LinkHeader Uses

type LinkHeader struct {
    // contains filtered or unexported fields
}

LinkHeader .

func NewLinkHeader Uses

func NewLinkHeader(u *url.URL, pageParam string) *LinkHeader

func (*LinkHeader) Current Uses

func (l *LinkHeader) Current(pageValue string)

func (*LinkHeader) First Uses

func (l *LinkHeader) First(pageValue string)

func (*LinkHeader) Last Uses

func (l *LinkHeader) Last(pageValue string)

func (*LinkHeader) Next Uses

func (l *LinkHeader) Next(pageValue string)

func (*LinkHeader) Previous Uses

func (l *LinkHeader) Previous(pageValue string)

func (*LinkHeader) SetHeader Uses

func (l *LinkHeader) SetHeader(header http.Header)

Package linkheader imports 6 packages (graph) and is imported by 1 packages. Updated 2016-07-24. Refresh now. Tools for package owners.