cmd

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigFile  = "cli.yaml"
	HistoryFile = "cli.hist"
)
View Source
const (
	ClusterFLag     = "cluster"
	DescriptionFlag = "description"
	WorkspaceFlag   = "workspace"
	FormatFlag      = "format"
	WideFlag        = "wide"
	RetentionFlag   = "retention"
	CompressionFlag = "compression"
	IntegrationFlag = "integration"
	RegionFlag      = "region"
	BucketFlag      = "bucket"
	PatternFlag     = "pattern"
	RoleARNFlag     = "role-arn"
	DatasetFlag     = "dataset"
	WaitFlag        = "wait"
	ValidateFlag    = "validate"
	FileFlag        = "file"
	ContextFLag     = "context"
	DebugFlag       = "debug"
	SizeFlag        = "size"
)
View Source
const (
	DefaultFormat    = "table"
	DefaultWorkspace = "commons"
)

Variables

View Source
var (
	Version = "development"
)

Functions

func FormatFromCommand

func FormatFromCommand(cmd *cobra.Command) format.Format

func NewRootCmd

func NewRootCmd(version string) *cobra.Command

Types

type Config

type Config struct {
	APIKey    string `yaml:"apikey"`
	APIServer string `yaml:"apiserver"`
}

type Configs

type Configs struct {
	Current string            `yaml:"current"`
	Configs map[string]Config `yaml:"configs"`
}

type DocumentAdder

type DocumentAdder interface {
	AddDocuments(ctx context.Context, workspace, collection string,
		docs []interface{}) ([]openapi.DocumentStatus, error)
}

type StreamConfig

type StreamConfig struct {
	Workspace  string
	Collection string
	BatchSize  uint64
}

type Streamer

type Streamer struct {
	StreamConfig
	// contains filtered or unexported fields
}

func NewStreamer

func NewStreamer(s DocumentAdder, cfg StreamConfig) Streamer

func (*Streamer) Stream

func (s *Streamer) Stream(ctx context.Context, in io.Reader) (uint64, error)

Jump to

Keyboard shortcuts

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