cmd

package
v0.27.5 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: Apache-2.0 Imports: 55 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

Functions

func Execute

func Execute()

Execute is ...

func GetRootCommand

func GetRootCommand() *cobra.Command

func NewCmdArt

func NewCmdArt(out io.Writer, errOut io.Writer) *cobra.Command

func NewCmdCreate

func NewCmdCreate(out io.Writer, errOut io.Writer) *cobra.Command

NewCmdCreate creates a command object for the "create" command

func NewCmdCreateConfig

func NewCmdCreateConfig() *cobra.Command

NewCmdCreateConfig creates a command object for the "config" command

func NewCmdCreateConfigController

func NewCmdCreateConfigController() *cobra.Command

NewCmdCreateConfigController creates a command object for the "create" command

func NewCmdCreateConfigEnvironment

func NewCmdCreateConfigEnvironment() *cobra.Command

NewCmdCreateConfigEnvironment creates a command object for the "environment" command

func NewCmdCreateConfigRouter

func NewCmdCreateConfigRouter() *cobra.Command

NewCmdCreateConfigRouter creates a command object for the "router" command

func NewCmdCreateConfigRouterEdge

func NewCmdCreateConfigRouterEdge() *cobra.Command

NewCmdCreateConfigRouterEdge creates a command object for the "edge" command

func NewCmdCreateConfigRouterFabric

func NewCmdCreateConfigRouterFabric() *cobra.Command

NewCmdCreateConfigRouterFabric creates a command object for the "fabric" command

func NewCmdLogFormat

func NewCmdLogFormat(out io.Writer, errOut io.Writer) *cobra.Command

NewCmdLogFormat a command object for the "log-format" command

func NewCmdPKI

func NewCmdPKI(out io.Writer, errOut io.Writer) *cobra.Command

NewCmdPKI PKIs a command object for the "PKI" command

func NewCmdPKICreate

func NewCmdPKICreate(out io.Writer, errOut io.Writer) *cobra.Command

NewCmdPKICreate creates a command object for the "create" command

func NewCmdPKICreateCA

func NewCmdPKICreateCA(out io.Writer, errOut io.Writer) *cobra.Command

NewCmdPKICreateCA creates a command object for the "create" command

func NewCmdPKICreateCSR

func NewCmdPKICreateCSR(out io.Writer, errOut io.Writer) *cobra.Command

NewCmdPKICreateCSR creates a command object for the "create" command

func NewCmdPKICreateClient

func NewCmdPKICreateClient(out io.Writer, errOut io.Writer) *cobra.Command

NewCmdPKICreateClient creates a command object for the "create" command

func NewCmdPKICreateIntermediate

func NewCmdPKICreateIntermediate(out io.Writer, errOut io.Writer) *cobra.Command

NewCmdPKICreateIntermediate creates a command object for the "create" command

func NewCmdPKICreateKey

func NewCmdPKICreateKey(out io.Writer, errOut io.Writer) *cobra.Command

NewCmdPKICreateKey creates a command object for the "create" command

func NewCmdPKICreateServer

func NewCmdPKICreateServer(out io.Writer, errOut io.Writer) *cobra.Command

NewCmdPKICreateServer creates a command object for the "create" command

func NewCmdRoot

func NewCmdRoot(in io.Reader, out, err io.Writer, cmd *cobra.Command) *cobra.Command

func NewRootCommand

func NewRootCommand(in io.Reader, out, err io.Writer) *cobra.Command

func NewUnwrapIdentityFileCommand

func NewUnwrapIdentityFileCommand(out io.Writer, errOut io.Writer) *cobra.Command

func SetControllerIdentity

func SetControllerIdentity(data *ControllerTemplateValues)

func SetControllerIdentityCA

func SetControllerIdentityCA(c *ControllerTemplateValues)

func SetControllerIdentityCert

func SetControllerIdentityCert(c *ControllerTemplateValues)

func SetControllerIdentityKey

func SetControllerIdentityKey(c *ControllerTemplateValues)

func SetControllerIdentityServerCert

func SetControllerIdentityServerCert(c *ControllerTemplateValues)

func SetEdgeConfig

func SetEdgeConfig(data *ControllerTemplateValues)

func SetEdgeSigningCert

func SetEdgeSigningCert(c *ControllerTemplateValues)

func SetEdgeSigningKey

func SetEdgeSigningKey(c *ControllerTemplateValues)

func SetWebConfig

func SetWebConfig(data *ControllerTemplateValues)

func SetWebIdentityCA

func SetWebIdentityCA(c *ControllerTemplateValues)

func SetWebIdentityCert

func SetWebIdentityCert(c *ControllerTemplateValues)

func SetWebIdentityKey

func SetWebIdentityKey(c *ControllerTemplateValues)

func SetWebIdentityServerCert

func SetWebIdentityServerCert(c *ControllerTemplateValues)

func SetZitiRouterIdentity

func SetZitiRouterIdentity(r *RouterTemplateValues, routerName string)

func SetZitiRouterIdentityCA

func SetZitiRouterIdentityCA(r *RouterTemplateValues, routerName string)

func SetZitiRouterIdentityCert

func SetZitiRouterIdentityCert(r *RouterTemplateValues, routerName string)

func SetZitiRouterIdentityKey

func SetZitiRouterIdentityKey(r *RouterTemplateValues, routerName string)

func SetZitiRouterIdentityServerCert

func SetZitiRouterIdentityServerCert(r *RouterTemplateValues, routerName string)

Types

type ArtOptions

type ArtOptions struct {
	CommonOptions
}

func (*ArtOptions) Run

func (o *ArtOptions) Run() error

Run ...

type CommonOptions

type CommonOptions struct {
	Out            io.Writer
	Err            io.Writer
	Cmd            *cobra.Command
	Args           []string
	BatchMode      bool
	Verbose        bool
	Staging        bool
	ConfigIdentity string
	Timeout        int
}

CommonOptions contains common options and helper methods

func (*CommonOptions) AddCommonFlags

func (options *CommonOptions) AddCommonFlags(cmd *cobra.Command)

func (*CommonOptions) GetZitiComponent

func (o *CommonOptions) GetZitiComponent(p string) (string, error)

type ConfigTemplateValues

type ConfigTemplateValues struct {
	ZitiHome string
	Hostname string

	Controller ControllerTemplateValues
	Router     RouterTemplateValues
}

type ControllerHealthCheckValues

type ControllerHealthCheckValues struct {
	Interval     time.Duration
	Timeout      time.Duration
	InitialDelay time.Duration
}

type ControllerTemplateValues

type ControllerTemplateValues struct {
	Name                        string
	Port                        string
	AdvertisedAddress           string
	ListenerAddress             string
	IdentityCert                string
	IdentityServerCert          string
	IdentityKey                 string
	IdentityCA                  string
	MinQueuedConnects           int
	MaxQueuedConnects           int
	DefaultQueuedConnects       int
	MinOutstandingConnects      int
	MaxOutstandingConnects      int
	DefaultOutstandingConnects  int
	MinConnectTimeout           time.Duration
	MaxConnectTimeout           time.Duration
	DefaultConnectTimeout       time.Duration
	EdgeIdentityDuration        time.Duration
	EdgeRouterDuration          time.Duration
	DefaultEdgeIdentityDuration time.Duration
	DefaultEdgeRouterDuration   time.Duration
	Edge                        EdgeControllerValues
	WebListener                 ControllerWebListenerValues
	HealthCheck                 ControllerHealthCheckValues
}

type ControllerWebListenerValues

type ControllerWebListenerValues struct {
	IdleTimeout   time.Duration
	ReadTimeout   time.Duration
	WriteTimeout  time.Duration
	MinTLSVersion string
	MaxTLSVersion string
}

type CreateConfigControllerOptions

type CreateConfigControllerOptions struct {
	CreateConfigOptions

	CtrlPort                       string
	MgmtListener                   string
	EdgeIdentityEnrollmentDuration time.Duration
	EdgeRouterEnrollmentDuration   time.Duration
}

CreateConfigControllerOptions the options for the create spring command

type CreateConfigEnvironmentOptions

type CreateConfigEnvironmentOptions struct {
	CreateConfigOptions
	EnvVariableTemplateData
	// contains filtered or unexported fields
}

CreateConfigEnvironmentOptions the options for the create environment command

type CreateConfigOptions

type CreateConfigOptions struct {
	common.CommonOptions

	Output       string
	DatabaseFile string
}

CreateConfigOptions the options for the create config command

type CreateConfigRouterOptions

type CreateConfigRouterOptions struct {
	CreateConfigOptions

	RouterName   string
	WssEnabled   bool
	IsPrivate    bool
	TunnelerMode string
	LanInterface string
}

CreateConfigRouterOptions the options for the router command

type EdgeControllerValues

type EdgeControllerValues struct {
	AdvertisedPort  string
	ZitiSigningCert string
	ZitiSigningKey  string

	APIActivityUpdateBatchSize int
	APIActivityUpdateInterval  time.Duration
	APISessionTimeout          time.Duration
	ListenerHostPort           string
	AdvertisedHostPort         string
	IdentityCert               string
	IdentityServerCert         string
	IdentityKey                string
	IdentityCA                 string
}

type EdgeRouterTemplateValues

type EdgeRouterTemplateValues struct {
	Hostname         string
	Port             string
	IPOverride       string
	AdvertisedHost   string
	LanInterface     string
	ListenerBindPort string
}

type EnvVar

type EnvVar struct {
	Name        string
	Description string
	Value       string
}

type EnvVariableTemplateData

type EnvVariableTemplateData struct {
	OSCommentPrefix string
	OSVarDeclare    string
	EnvVars         []EnvVar
}

type IdentityConfigFile

type IdentityConfigFile struct {
	ZtAPI       string          `json:"ztAPI"`
	ID          identity.Config `json:"id"`
	ConfigTypes []string        `json:"configTypes"`
}

type LogFormatOptions

type LogFormatOptions struct {
	CommonOptions
	// contains filtered or unexported fields
}

AgentOptions contains the command line options

func (*LogFormatOptions) Run

func (o *LogFormatOptions) Run() error

Run implements this command

type MainOptions

type MainOptions struct {
	CommonOptions
}

InitOptions the flags for running init

type PKICreateCAOptions

type PKICreateCAOptions struct {
	PKICreateOptions
}

PKICreateCAOptions the options for the create spring command

func (*PKICreateCAOptions) Run

func (o *PKICreateCAOptions) Run() error

Run implements this command

type PKICreateCSROptions

type PKICreateCSROptions struct {
	PKICreateOptions
}

PKICreateCSROptions the options for the create spring command

func (*PKICreateCSROptions) Run

func (o *PKICreateCSROptions) Run() error

Run implements this command

type PKICreateClientOptions

type PKICreateClientOptions struct {
	PKICreateOptions
}

PKICreateClientOptions the options for the create spring command

func (*PKICreateClientOptions) Run

func (o *PKICreateClientOptions) Run() error

Run implements this command

type PKICreateIntermediateOptions

type PKICreateIntermediateOptions struct {
	PKICreateOptions
}

PKICreateIntermediateOptions the options for the create spring command

func (*PKICreateIntermediateOptions) Run

Run implements this command

type PKICreateKeyOptions

type PKICreateKeyOptions struct {
	PKICreateOptions
}

PKICreateKeyOptions the options for the create spring command

func (*PKICreateKeyOptions) Run

func (o *PKICreateKeyOptions) Run() error

Run implements this command

type PKICreateOptions

type PKICreateOptions struct {
	PKIOptions
}

PKICreateOptions the options for the create spring command

func (*PKICreateOptions) ObtainCAFile

func (o *PKICreateOptions) ObtainCAFile() (string, error)

ObtainCAFile returns the value for ca-file

func (*PKICreateOptions) ObtainCAName

func (o *PKICreateOptions) ObtainCAName(pkiroot string) (string, error)

ObtainCAName returns the value for ca-name

func (*PKICreateOptions) ObtainCSRFile

func (o *PKICreateOptions) ObtainCSRFile() (string, error)

ObtainCSRFile returns the value for csr-file

func (*PKICreateOptions) ObtainClientCertFile

func (o *PKICreateOptions) ObtainClientCertFile() (string, error)

ObtainClientCertFile returns the value for client-file

func (*PKICreateOptions) ObtainCommonName

func (o *PKICreateOptions) ObtainCommonName() (string, error)

ObtainCommonName returns the value for CN

func (*PKICreateOptions) ObtainFileName

func (o *PKICreateOptions) ObtainFileName(cafile string, commonName string) string

ObtainFileName returns the value for the 'name' used in the PKI request

func (*PKICreateOptions) ObtainIPsAndDNSNames

func (o *PKICreateOptions) ObtainIPsAndDNSNames() ([]net.IP, []string, error)

ObtainIPsAndDNSNames returns the IP addrs and/or DNS names used in the PKI request template

func (*PKICreateOptions) ObtainIntermediateCAFile

func (o *PKICreateOptions) ObtainIntermediateCAFile() (string, error)

ObtainIntermediateCAFile returns the value for intermediate-file

func (*PKICreateOptions) ObtainIntermediateCSRFile

func (o *PKICreateOptions) ObtainIntermediateCSRFile() (string, error)

ObtainIntermediateCSRFile returns the value for intermediate-file

func (*PKICreateOptions) ObtainKeyFile

func (o *PKICreateOptions) ObtainKeyFile(required bool) (string, error)

ObtainKeyFile returns the value for key-file

func (*PKICreateOptions) ObtainKeyName

func (o *PKICreateOptions) ObtainKeyName(pkiroot string) (string, error)

ObtainKeyName returns the private key from the key-file

func (*PKICreateOptions) ObtainPKICSRRequestTemplate

func (o *PKICreateOptions) ObtainPKICSRRequestTemplate(commonName string) *x509.CertificateRequest

ObtainPKICSRRequestTemplate returns the CSR 'template' used in the PKI request

func (*PKICreateOptions) ObtainPKIRequestTemplate

func (o *PKICreateOptions) ObtainPKIRequestTemplate(commonName string) *x509.Certificate

ObtainPKIRequestTemplate returns the 'template' used in the PKI request

func (*PKICreateOptions) ObtainPKIRoot

func (o *PKICreateOptions) ObtainPKIRoot() (string, error)

ObtainPKIRoot returns the value for pki-root

func (*PKICreateOptions) ObtainServerCertFile

func (o *PKICreateOptions) ObtainServerCertFile() (string, error)

ObtainServerCertFile returns the value for server-file

func (*PKICreateOptions) Run

func (o *PKICreateOptions) Run() error

Run implements this command

type PKICreateServerOptions

type PKICreateServerOptions struct {
	PKICreateOptions
}

PKICreateServerOptions the options for the create spring command

func (*PKICreateServerOptions) Run

func (o *PKICreateServerOptions) Run() error

Run implements this command

type PKIFlags

type PKIFlags struct {
	PKIRoot               string
	PKIOrganization       string
	PKIOrganizationalUnit string
	PKICountry            string
	PKILocality           string
	PKIProvince           string
	CAFile                string
	CAName                string
	CommonName            string
	CAExpire              int
	CAMaxpath             int
	CAPrivateKeySize      int
	IntermediateFile      string
	IntermediateName      string
	ServerFile            string
	ServerName            string
	ClientFile            string
	ClientName            string
	KeyFile               string
	CSRFile               string
	CSRName               string
	KeyName               string
	DNSName               []string
	IP                    []string
	Email                 []string
	PKI                   *pki.ZitiPKI
	SpiffeID              string
}

type PKIOptions

type PKIOptions struct {
	CommonOptions

	Flags PKIFlags
}

PKIOptions contains the command line options

func (*PKIOptions) Run

func (o *PKIOptions) Run() error

Run implements this command

type RootCmd

type RootCmd struct {
	// contains filtered or unexported fields
}

type RouterForwarderTemplateValues

type RouterForwarderTemplateValues struct {
	LatencyProbeInterval  time.Duration
	XgressDialQueueLength int
	XgressDialWorkerCount int
	LinkDialQueueLength   int
	LinkDialWorkerCount   int
}

type RouterListenerTemplateValues

type RouterListenerTemplateValues struct {
	ConnectTimeout    time.Duration
	GetSessionTimeout time.Duration
	OutQueueSize      int
}

type RouterTemplateValues

type RouterTemplateValues struct {
	Name               string
	IsPrivate          bool
	IsFabric           bool
	IsWss              bool
	TunnelerMode       string
	IdentityCert       string
	IdentityServerCert string
	IdentityKey        string
	IdentityCA         string
	Edge               EdgeRouterTemplateValues
	Wss                WSSRouterTemplateValues
	Forwarder          RouterForwarderTemplateValues
	Listener           RouterListenerTemplateValues
}

type WSSRouterTemplateValues

type WSSRouterTemplateValues struct {
	WriteTimeout      time.Duration
	ReadTimeout       time.Duration
	IdleTimeout       time.Duration
	PongTimeout       time.Duration
	PingInterval      time.Duration
	HandshakeTimeout  time.Duration
	ReadBufferSize    int
	WriteBufferSize   int
	EnableCompression bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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