util

package
v0.0.0-...-ed847e1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckRequiredFields

func CheckRequiredFields(req *logical.Request, fields *framework.FieldData) *logical.Response

func IsEnvVarTrue

func IsEnvVarTrue(envVarName string) bool

Types

type Clock

type Clock interface {
	Now() time.Time
	Since(time.Time) time.Duration
}

type FixedClock

type FixedClock struct {
	NowTime time.Time
}

func NewFixedClock

func NewFixedClock(nowTime time.Time) *FixedClock

func (*FixedClock) Now

func (c *FixedClock) Now() time.Time

func (*FixedClock) Since

func (c *FixedClock) Since(t time.Time) time.Duration

type SystemClock

type SystemClock struct{}

func NewSystemClock

func NewSystemClock() *SystemClock

func (*SystemClock) Now

func (c *SystemClock) Now() time.Time

func (*SystemClock) Since

func (c *SystemClock) Since(t time.Time) time.Duration

Jump to

Keyboard shortcuts

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