jwt: github.com/gbrlsnchs/jwt/internal Index | Files

package internal

import "github.com/gbrlsnchs/jwt/internal"


Package Files

decode.go ed25519.go epoch.go errors.go


var Epoch = time.Date(1970, time.January, 1, 0, 0, 0, 0, time.UTC)

Epoch is 01/01/1970.

func Decode Uses

func Decode(enc []byte, v interface{}) error

Decode decodes a Base64 encoded JSON object using the proper encoding for JWTs.

func DecodeToBytes Uses

func DecodeToBytes(enc []byte) ([]byte, error)

DecodeToBytes decodes a Base64 string using the proper encoding for JWTs.

func ErrorAs Uses

func ErrorAs(err error, target interface{}) bool

ErrorAs wraps errors.As.

func ErrorIs Uses

func ErrorIs(err, target error) bool

ErrorIs wraps errors.Is.

func Errorf Uses

func Errorf(format string, a ...interface{}) error

Errorf wraps fmt.Errorf.

func GenerateEd25519Keys Uses

func GenerateEd25519Keys() (ed25519.PrivateKey, ed25519.PublicKey)

GenerateEd25519Keys generates a pair of keys for testing purposes.

func NewError Uses

func NewError(text string) error

NewError wraps errors.New.

Package internal imports 7 packages (graph). Updated 2019-09-22. Refresh now. Tools for package owners.