common

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BCCSP

type BCCSP struct {
	ProviderName string      `json:"default,omitempty"`
	SW           *SwOpts     `json:"SW,omitempty"`
	PKCS11       *PKCS11Opts `json:"PKCS11,omitempty"`
}

type Duration

type Duration struct {
	time.Duration `json:",inline"`
}

func ConvertTimeDuration

func ConvertTimeDuration(d time.Duration) Duration

func MustParseDuration

func MustParseDuration(d string) Duration

func ParseDuration

func ParseDuration(d string) (Duration, error)

func (*Duration) Decode

func (d *Duration) Decode(value string) error

Decode is custom decoder for `envconfig` library, this method is used to handle reading in environment variables and converting them into the type that is expected in our structs

func (*Duration) Get

func (d *Duration) Get() time.Duration

func (Duration) MarshalJSON

func (d Duration) MarshalJSON() (b []byte, err error)

func (*Duration) Unmarshal

func (d *Duration) Unmarshal(s string) (err error)

Unmarshal is custom unmarshaler for github.com/kelseyhightower/envconfig

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(b []byte) (err error)

type FileKeyStoreOpts

type FileKeyStoreOpts struct {
	KeyStorePath string `json:"keystore,omitempty"`
}

type PKCS11Opts

type PKCS11Opts struct {
	SecLevel     int               `json:"security,omitempty"`
	HashFamily   string            `json:"hash,omitempty"`
	Library      string            `json:"library,omitempty"`
	Label        string            `json:"label,omitempty"`
	Pin          string            `json:"pin,omitempty"`
	Ephemeral    bool              `json:"tempkeys,omitempty"`
	SoftVerify   bool              `json:"softwareVerify,omitempty"`
	Immutable    bool              `json:"immutable,omitempty"`
	FileKeyStore *FileKeyStoreOpts `json:"filekeystore,omitempty"`
}

type SwOpts

type SwOpts struct {
	SecLevel     int              `json:"security,omitempty"`
	HashFamily   string           `json:"hash,omitempty"`
	FileKeyStore FileKeyStoreOpts `json:"filekeystore,omitempty"`
}

SwOpts contains options for the SWFactory

Jump to

Keyboard shortcuts

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