registry

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credential

type Credential struct {
	Name     string `json:"name" yaml:"name" mapstructure:"name" secure:"false"`
	Username string `json:"username" yaml:"username" mapstructure:"username" secure:"true"`
	Password string `json:"password" yaml:"password" mapstructure:"password" secure:"true"`
}

func (Credential) GetTransformConfig

func (c Credential) GetTransformConfig() cryptostruct.TransformConfig

type Directory

type Directory struct {
	Organizations []Organization `json:"organizations" yaml:"organizations" mapstructure:"organizations" secure:"true"`
}

func DecryptDirectory

func DecryptDirectory(key string, d SecureDirectory) (Directory, error)

func (Directory) GetTransformConfig

func (d Directory) GetTransformConfig() cryptostruct.TransformConfig

type Environment

type Environment struct {
	Name        string       `json:"name" yaml:"name" mapstructure:"name" secure:"false"`                     // Target environment name, such as "Production"
	Type        string       `json:"type" yaml:"type" mapstructure:"type" secure:"false"`                     // Target type: "StandAlone", "HighAvailabilityPair", "Cluster"
	Management  Node         `json:"management" yaml:"management" mapstructure:"management" secure:"true"`    // Connection details for the Management Address (SNIP / Cluster IP) of the environment
	Nodes       []Node       `json:"nodes" yaml:"nodes" mapstructure:"nodes" secure:"true"`                   // Connection details for the individual Nodes of each node
	Credentials []Credential `json:"credentials" yaml:"credentials" mapstructure:"credentials" secure:"true"` // Connection credentials
	Settings    Settings     `json:"settings" yaml:"settings" mapstructure:"settings" secure:"false"`         // Connection settings for Nitro Client
}

func (Environment) GetCredentialByName added in v0.2.2

func (e Environment) GetCredentialByName(name string) (Credential, error)

func (Environment) GetManagementClient

func (e Environment) GetManagementClient(credential Credential) (*nitro.Client, error)

func (Environment) GetNodeClient

func (e Environment) GetNodeClient(nodeName string, credential Credential) (*nitro.Client, error)

func (Environment) GetNodeNames

func (e Environment) GetNodeNames() []string

func (Environment) GetNodes

func (e Environment) GetNodes() []Node

func (Environment) GetPrimaryClient

func (e Environment) GetPrimaryClient(credential Credential) (*nitro.Client, error)

func (Environment) GetTransformConfig

func (e Environment) GetTransformConfig() cryptostruct.TransformConfig

func (Environment) HasManagement

func (e Environment) HasManagement() bool

func (Environment) HasNodes

func (e Environment) HasNodes() bool

type Node

type Node struct {
	Name    string `json:"name" yaml:"name" mapstructure:"name" secure:"false"`
	Address string `json:"address" yaml:"address" mapstructure:"address" secure:"true"`
}

func (Node) GetTransformConfig

func (n Node) GetTransformConfig() cryptostruct.TransformConfig

type Organization

type Organization struct {
	Name         string        `json:"name" yaml:"name" mapstructure:"name"`
	Environments []Environment `json:"environments" yaml:"environments" mapstructure:"environments" secure:"true"`
}

func (Organization) GetEnvironmentByName

func (o Organization) GetEnvironmentByName(name string) (Environment, error)

func (Organization) GetEnvironmentNames

func (o Organization) GetEnvironmentNames() []string

func (Organization) GetTransformConfig

func (o Organization) GetTransformConfig() cryptostruct.TransformConfig

type SecureCredential

type SecureCredential struct {
	Name         string                    `json:"name" yaml:"name" mapstructure:"name" secure:"false"`
	Username     string                    `json:"username" yaml:"username" mapstructure:"username" secure:"true"`
	Password     string                    `json:"password" yaml:"password" mapstructure:"password" secure:"true"`
	CryptoParams cryptostruct.CryptoParams `json:"cryptoParams" yaml:"cryptoParams" mapstructure:"cryptoParams"`
}

func (SecureCredential) GetCryptoParams

func (s SecureCredential) GetCryptoParams() cryptostruct.CryptoParams

func (SecureCredential) GetTransformConfig

func (s SecureCredential) GetTransformConfig() cryptostruct.TransformConfig

type SecureDirectory

type SecureDirectory struct {
	Organizations []SecureOrganization      `json:"organizations" yaml:"organizations" mapstructure:"organizations" secure:"true"`
	CryptoParams  cryptostruct.CryptoParams `json:"cryptoParams" yaml:"cryptoParams" mapstructure:"cryptoParams"`
}

func EncryptDirectory

func EncryptDirectory(key string, cipherSuite string, d Directory) (SecureDirectory, error)

func (SecureDirectory) GetCryptoParams

func (s SecureDirectory) GetCryptoParams() cryptostruct.CryptoParams

func (SecureDirectory) GetTransformConfig

func (s SecureDirectory) GetTransformConfig() cryptostruct.TransformConfig

type SecureEnvironment

type SecureEnvironment struct {
	Name         string                    `json:"name" yaml:"name" mapstructure:"name" secure:"false"`                     // Target environment name, such as "Production"
	Type         string                    `json:"type" yaml:"type" mapstructure:"type" secure:"false"`                     // Target type: "StandAlone", "HighAvailabilityPair", "Cluster"
	Management   SecureNode                `json:"management" yaml:"management" mapstructure:"management" secure:"true"`    // Connection details for the Management Address (SNIP / Cluster IP) of the environment
	Nodes        []SecureNode              `json:"nodes" yaml:"nodes" mapstructure:"nodes" secure:"true"`                   // Connection details for the individual Nodes of each node
	Settings     Settings                  `json:"settings" yaml:"settings" mapstructure:"settings" secure:"false"`         // Connection settings for Nitro Client
	Credentials  []SecureCredential        `json:"credentials" yaml:"credentials" mapstructure:"credentials" secure:"true"` // Connection credentials
	CryptoParams cryptostruct.CryptoParams `json:"cryptoParams" yaml:"cryptoParams" mapstructure:"cryptoParams"`
}

func (SecureEnvironment) GetCryptoParams

func (s SecureEnvironment) GetCryptoParams() cryptostruct.CryptoParams

func (SecureEnvironment) GetTransformConfig

func (s SecureEnvironment) GetTransformConfig() cryptostruct.TransformConfig

type SecureNode

type SecureNode struct {
	Name         string                    `json:"name" yaml:"name" mapstructure:"name" secure:"false"`
	Address      string                    `json:"address" yaml:"address" mapstructure:"address" secure:"true"`
	CryptoParams cryptostruct.CryptoParams `json:"cryptoParams" yaml:"cryptoParams" mapstructure:"cryptoParams"`
}

func (SecureNode) GetCryptoParams

func (s SecureNode) GetCryptoParams() cryptostruct.CryptoParams

func (SecureNode) GetTransformConfig

func (s SecureNode) GetTransformConfig() cryptostruct.TransformConfig

type SecureOrganization

type SecureOrganization struct {
	Name         string                    `json:"name" yaml:"name" mapstructure:"name" secure:"false"`
	Environments []SecureEnvironment       `json:"environments" yaml:"environments" mapstructure:"environments" secure:"true"`
	CryptoParams cryptostruct.CryptoParams `json:"cryptoParams" yaml:"cryptoParams" mapstructure:"cryptoParams"`
}

func (SecureOrganization) GetCryptoParams

func (s SecureOrganization) GetCryptoParams() cryptostruct.CryptoParams

func (SecureOrganization) GetTransformConfig

func (s SecureOrganization) GetTransformConfig() cryptostruct.TransformConfig

type Settings

type Settings struct {
	UseSsl                    bool   `json:"useSsl" yaml:"useSsl" mapstructure:"useSsl"`
	Timeout                   int    `json:"timeout" yaml:"timeout" mapstructure:"timeout"`
	UserAgent                 string `json:"userAgent" yaml:"userAgent" mapstructure:"userAgent"`
	ValidateServerCertificate bool   `json:"validateServerCertificate" yaml:"validateServerCertificate" mapstructure:"validateServerCertificate"`
	LogTlsSecrets             bool   `json:"logTlsSecrets" yaml:"logTlsSecrets" mapstructure:"logTlsSecrets"`
	LogTlsSecretsDestination  string `json:"logTlsSecretsDestination" yaml:"logTlsSecretsDestination" mapstructure:"logTlsSecretsDestination"`
	AutoLogin                 bool   `json:"autoLogin" yaml:"autoLogin" mapstructure:"autoLogin"`
}

Jump to

Keyboard shortcuts

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