Documentation ¶
Index ¶
- Constants
- Variables
- type Instructions
- type Option
- func Algorithms(algs ...string) Option
- func BaseURL(url string) Option
- func DeviceID(id string) Option
- func Timeout(timeout time.Duration) Option
- func UseNowFunc(nowFunc func() time.Time) Option
- func UseResolver(resolver Resolver) Option
- func WithFetchListener(listener event.FetchListener) Option
- func WithPEMs(pems ...[]byte) Option
- type Resolver
Constants ¶
View Source
const ( // DefaultTimeout is the default timeout for DNS queries. DefaultTimeout = time.Second * 15 )
Variables ¶
View Source
var ( ErrInvalidConfig = errors.New("invalid configuration") ErrInvalidJWT = errors.New("invalid jwt txt record") ErrInvalidPath = errors.New("invalid path") ErrUnspportedID = errors.New("unsupported device id") ErrUnspportedAlg = errors.New("unsupported jwt algorithm") ErrNoKeys = errors.New("no keys provided") ErrNoKeysMatch = errors.New("no keys match jwt") ErrInvalidInput = errors.New("invalid input") )
Functions ¶
This section is empty.
Types ¶
type Instructions ¶
type Instructions struct {
// contains filtered or unexported fields
}
func New ¶
func New(opts ...Option) (*Instructions, error)
New creates a new secure Instruction object.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option is a functional option for the Instructions constructor.
func Algorithms ¶
Algorithms sets the algorithms to use for verification. Valid algorithms are "EdDSA", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "RS256", "RS384", and "RS512".
func Timeout ¶
Timeout sets the timeout for DNS queries. 0 means use the default timeout. A negative timeout is invalid.
func UseNowFunc ¶
UseNowFunc sets the function to use for getting the current time.
func UseResolver ¶
UseResolver sets the resolver to use for DNS queries.
func WithFetchListener ¶
func WithFetchListener(listener event.FetchListener) Option
WithFetchListener adds a listener for fetch events.
Click to show internal directories.
Click to hide internal directories.