config

package
v0.2024.5 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmpty = errors.New("empty value")
)

Functions

func IsPEM

func IsPEM(val string) bool

func ReadPEMOrFile

func ReadPEMOrFile(dir, val string) ([]byte, error)

Types

type Root

type Root struct {
	system.Config

	Name    string `json:"name,omitempty"`    // The smart core name of the hub. Defaults to the node name.
	Address string `json:"address,omitempty"` // The network address nodes can reach this hub on. By default attempts to find a non-local net.Iface.

	// Validity controls the expiry of signatures associated with node certificates during enrollment.
	Validity *jsontypes.Duration `json:"validity,omitempty"`

	Key   string `json:"key,omitempty"`   // Key used to sign node certificates as part of enrollment. Defaults to hub.key.pem if present else generates one.
	Cert  string `json:"cert,omitempty"`  // Cert used as the signer for enrolled node certificates. Defaults to hub.cert.pem if present else generates a self signed one.
	Roots string `json:"roots,omitempty"` // Roots pem or path to roots.pem shared as the trust root with enrolled nodes. Defaults to hub.roots.pem if present else cert is used.

	Storage *Storage `json:"storage,omitempty"`
}

type Storage

type Storage struct {
	Type StorageType `json:"type,omitempty"`
	pgxutil.ConnectConfig
}

type StorageType

type StorageType string
const (
	StorageTypePostgres StorageType = "postgres"
	StorageTypeProxy    StorageType = "proxy"
	StorageTypeBolt     StorageType = "bolt"
)

Jump to

Keyboard shortcuts

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