auth

package
v0.2.0-alpha.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseGRPCErr

func ParseGRPCErr(err error) ([]byte, error)

func Register

func Register(name string, exec CreateFunc)

func RegisterErrorDecoder

func RegisterErrorDecoder(name string, exec DecodeFunc)

func ToGRPCErr

func ToGRPCErr(err error) error

Types

type Auth

type Auth interface {
	DoAuth(token string, ext []byte) (string, error)
}

type CreateFunc

type CreateFunc func(url string, timeout time.Duration) Auth

func Load

func Load(name string) (CreateFunc, error)

type DecodeFunc

type DecodeFunc func(src string) ([]byte, error)

type ErrorDetail

type ErrorDetail interface {
	Domain() string
	Encoding() (string, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL