cli

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: Apache-2.0 Imports: 32 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
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

func Main

func Main(args []string) int

Main runs the CLI and returns the process exit code.

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.

Jump to

Keyboard shortcuts

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