duokey

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2021 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogExecutionTime added in v0.1.0

func LogExecutionTime(logger Logger, msg string, start time.Time)

Types

type Config

type Config struct {
	Credentials credentials.Config
	HTTPClient  *http.Client

	Logger Logger
}

Config stores the configuration of a DuoKey client: credentials needed to get an access token and http client.

type Logger added in v0.0.7

type Logger interface {
	Info(...interface{})
	Infof(string, ...interface{})
}

Logger is a generic logging interface. Zap SugaredLogger and Logrus automatically implement this interface

func NewDefaultLogger added in v0.0.7

func NewDefaultLogger() Logger

NewDefaultLogger returns a Logger which will write log messages to stdout. Each log entry is prefixed with date, time, final file name element, and line number.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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