flags

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigFlag = "config"

	ClientHostFlag       = "client-host"
	ClientPortFlag       = "client-port"
	ClientUnixSocketFlag = "client-unix-socket"
	ClientTLSHostFlag    = "client-tls-host"
	ClientTLSPortFlag    = "client-tls-port"

	MgmtHostFlag       = "mgmt-host"
	MgmtPortFlag       = "mgmt-port"
	MgmtUnixSocketFlag = "mgmt-unix-socket"
	MgmtTLSHostFlag    = "mgmt-tls-host"
	MgmtTLSPortFlag    = "mgmt-tls-port"

	TLSCaFlag = "tls-ca"

	FilterFlag    = "filter"
	RawFlag       = "raw"
	EnableTLSFlag = "enable-tls"
)

Variables

View Source
var Koanf = koanf.New(".")

Functions

This section is empty.

Types

type BaseCmd

type BaseCmd struct {
	EnableTLS bool
	TLSCa     string

	Host    string `validate:"required,hostname_rfc1123"`
	Port    int    `validate:"required"`
	TLSHost string `validate:"required,hostname_rfc1123"`
	TLSPort int    `validate:"required"`
	Socket  string

	MgmtHost    string `validate:"required,hostname_rfc1123"`
	MgmtPort    int    `validate:"required"`
	MgmtTLSHost string `validate:"required,hostname_rfc1123"`
	MgmtTLSPort int    `validate:"required"`
	MgmtSocket  string

	Filter string
	// Strip quotes to make output usable in shell scripts
	RawOutput bool
}

func NewBaseCmd

func NewBaseCmd() BaseCmd

func (*BaseCmd) CreateClient

func (b *BaseCmd) CreateClient() *client.WorkflowExecutor

func (*BaseCmd) CreateHTTPClient

func (b *BaseCmd) CreateHTTPClient() (*http.Client, error)

func (*BaseCmd) CreateMgmtClient

func (b *BaseCmd) CreateMgmtClient() *client.WorkflowExecutor

func (*BaseCmd) CreateTransportConfig added in v0.2.0

func (b *BaseCmd) CreateTransportConfig() *client.TransportConfig

func (*BaseCmd) DumpResponse

func (b *BaseCmd) DumpResponse(w io.Writer, payload any) error

Jump to

Keyboard shortcuts

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