config

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package config defines the configuration fields used in RA.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StringToX509PublicKeyAlgo

func StringToX509PublicKeyAlgo() mapstructure.DecodeHookFunc

StringToX509PublicKeyAlgo returns a DecodeHookFunc that converts string to x509.PublicKeyAlgorithm.

Types

type GensignConfig

type GensignConfig struct {
	// KeyIDVersion specifies the version of KeyID.
	KeyIDVersion uint16 `json:"keyid_version"`
	// SSHCAFailureDir stores the count of the failure requests to a CA.
	SSHCAFailureDir string `json:"sshca_failure_dir"`
	// SSHCAFailureRetry is the retry times limit.
	SSHCAFailureRetry int64 `json:"sshca_failure_retry"`
	// SSHCAFailureTimeout is the maximum time period to resend the request to CA (in second).
	SSHCAFailureTimeout int64 `json:"sshca_failure_timeout"`
	// HandlerConfig is the config mapping for all the csr handlers in following format:
	// "handlers": {
	//   "$HANDLER_NAME1": {
	//     "enable": true,
	//     "$KEY": $VALUE
	//   }
	//   "$HANDLER_NAME2": {
	//     "enable": true,
	//     "$KEY": $VALUE
	//   }
	// }
	HandlerConfig map[string]handlerConfMap `json:"handlers"`
	// SignerConfig is the mapping for signer configuration.
	SignerConfig map[string]interface{} `json:"signer"`
	// Timeout for gensign (in second).
	RequestTimeout time.Duration `json:"request_timeout"`
}

GensignConfig stores the configuration for gensign command.

func NewGensignConfig

func NewGensignConfig(path string) (*GensignConfig, error)

NewGensignConfig returns the gensign configuration loaded from the provided path.

func (*GensignConfig) ExtractHandlerConf

func (g *GensignConfig) ExtractHandlerConf(name string, handlerConf interface{}) error

ExtractHandlerConf extracts handler config from GensignConfig by the given name.

Jump to

Keyboard shortcuts

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