mock

package
v0.0.0-...-0490640 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Tokens []*tokens.Token `json:"tokens"`
}

Config is used for configuring mock adapters

func (*Config) Open

func (cfg *Config) Open(_ *certs.ServiceCerts, logger *zap.Logger) (tokens.Storage, error)

Open initializes the mock adapter

type ErrorOnlyConfig

type ErrorOnlyConfig struct {
	Msg string
}

ErrorOnlyConfig is used to set up a mock adapter that only returns errors. To be used for testing.

func (*ErrorOnlyConfig) Open

func (cfg *ErrorOnlyConfig) Open(_ *certs.ServiceCerts, logger *zap.Logger) (tokens.Storage, error)

Open is for instantiating the error-only mock adapter

Jump to

Keyboard shortcuts

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