bootstraptypes

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TagUUID     = "site-uuid"
	TagOTP      = "otp"
	TagCredsURL = "creds-url"
	TagCACert   = "cacert"
)

Tags must match those in SecretConfig

Variables

This section is empty.

Functions

This section is empty.

Types

type Bootstrap

type Bootstrap struct {
	Config      *SecretConfig
	State       *State
	Secret      coreV1Types.SecretInterface
	Secretfiles map[string]bool
}

Bootstrap - data type for Bootstrap

func NewBootstrapInstance

func NewBootstrapInstance() *Bootstrap

NewBootstrapInstance - creates a new instance of Bootstrap

type SecretConfig

type SecretConfig struct {
	UUID     string `yaml:"site-uuid"`
	OTP      string `yaml:"otp"`
	CredsURL string `yaml:"creds-url"`
	CACert   string `yaml:"cacert"`
}

SecretConfig Secret file contents of the data section

type SecretReq

type SecretReq struct {
	UUID string `json:"siteuuid"`
	OTP  string `json:"otp"`
}

SecretReq Secret request data body

type SiteCredsResponse

type SiteCredsResponse struct {
	// Key is the private key
	Key string `json:"key,omitempty"`
	// Certificate is the client certificate
	Certificate string `json:"certificate,omitempty"`
	// CACertificate is the CA cert for validating the server
	CACertificate string `json:"cacertificate,omitempty"`
}

SiteCredsResponse defines a site credentials response

type State

type State struct {
	// DownloadSucceeded the Credentials file has been updated
	DownloadSucceeded atomic.Uint64
	// DownloadAttempted the number of times the secret file has been updated
	DownloadAttempted atomic.Uint64
}

State - state of the bootstrap process

Jump to

Keyboard shortcuts

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