Documentation
¶
Overview ¶
Package cli implements the nexus command: validate, plan and apply for provider manifests, with secrets resolved from the environment, a SOPS file or Google Secret Manager.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Version = "dev"
Version is stamped at build time (make cli). A binary from `go install ...@vX.Y.Z` reports that module version through build info; a plain go build in a checkout reports "dev".
Functions ¶
Types ¶
type Manifest ¶
type Manifest struct {
Providers []Provider `yaml:"providers"`
}
Manifest is the desired state: every provider the Broker should have.
type Provider ¶
type Provider struct {
Name string `yaml:"name" json:"name"`
// Pointers: an omitted field is left as the Broker has it, while an
// explicit empty string ("") is sent and clears the live value.
Description *string `yaml:"description,omitempty" json:"description,omitempty"`
Category *string `yaml:"category,omitempty" json:"category,omitempty"`
AuthType string `yaml:"auth_type,omitempty" json:"auth_type,omitempty"`
AuthHeader string `yaml:"auth_header,omitempty" json:"auth_header,omitempty"`
ClientID string `yaml:"client_id,omitempty" json:"client_id,omitempty"`
ClientSecret string `yaml:"client_secret,omitempty" json:"client_secret,omitempty"`
AuthURL string `yaml:"auth_url,omitempty" json:"auth_url,omitempty"`
TokenURL string `yaml:"token_url,omitempty" json:"token_url,omitempty"`
Issuer string `yaml:"issuer,omitempty" json:"issuer,omitempty"`
EnableDiscovery bool `yaml:"enable_discovery" json:"enable_discovery"`
Scopes []string `yaml:"scopes" json:"scopes"`
APIBaseURL string `yaml:"api_base_url,omitempty" json:"api_base_url,omitempty"`
UserInfoEndpoint string `yaml:"user_info_endpoint,omitempty" json:"user_info_endpoint,omitempty"`
Params map[string]interface{} `yaml:"params,omitempty" json:"params,omitempty"`
// SAML providers (auth_type: saml); the Broker requires all four.
SAMLIdpEntityID string `yaml:"saml_idp_entity_id,omitempty" json:"saml_idp_entity_id,omitempty"`
SAMLIdpSSOURL string `yaml:"saml_idp_sso_url,omitempty" json:"saml_idp_sso_url,omitempty"`
SAMLIdpX509Cert string `yaml:"saml_idp_x509_cert,omitempty" json:"saml_idp_x509_cert,omitempty"`
SAMLSPEntityID string `yaml:"saml_sp_entity_id,omitempty" json:"saml_sp_entity_id,omitempty"`
}
Provider is one entry of the manifest; its JSON form is what the Broker's POST /providers "profile" and PATCH /providers/{id} accept.