clients

package
v2.7.5 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 11 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPasswordIsTooShort = errors.New("password is too short")
	ErrMustSpecifyOrg     = errors.New("must specify org ID or org name")
	ErrMustSpecifyBucket  = errors.New("must specify bucket ID or bucket name")
)

Functions

func ReadQuery

func ReadQuery(filepath string, args []string) (string, error)

ReadQuery reads a Flux query into memory from a --file argument, args, or stdin

Types

type BucketParams

type BucketParams struct {
	BucketID   string
	BucketName string
}

type CLI

type CLI struct {
	StdIO stdio.StdIO

	HideTableHeaders bool
	PrintAsJSON      bool

	ActiveConfig  config.Config
	ConfigService config.Service
}

CLI is a container for common functionality used to execute commands.

func (*CLI) PrintJSON

func (c *CLI) PrintJSON(v interface{}) error

func (*CLI) PrintTable

func (c *CLI) PrintTable(headers []string, rows ...map[string]interface{}) error

type OrgBucketParams

type OrgBucketParams struct {
	OrgParams
	BucketParams
}

type OrgParams

type OrgParams struct {
	OrgID   string
	OrgName string
}

func (OrgParams) GetOrgID added in v2.3.0

func (p OrgParams) GetOrgID(ctx context.Context, activeConfig config.Config, orgApi api.OrganizationsApi) (string, error)

Jump to

Keyboard shortcuts

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