console

package
v0.19.2 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: MPL-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterPolicies added in v0.19.0

func FilterPolicies(policyPath string, policies policy.Policies) (policy.Policies, error)

Types

type Bar

type Bar struct {
	Name    string
	Message string
	Status  string
	Total   int64
	// contains filtered or unexported fields
}

func (*Bar) Done added in v0.16.0

func (b *Bar) Done()

func (*Bar) SetTotal

func (b *Bar) SetTotal(total int64, triggerComplete bool)

type Client

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

Client console client is a wrapper around client.Client for console execution of CloudQuery

func CreateClient

func CreateClient(ctx context.Context, configPath string, opts ...client.Option) (*Client, error)

func CreateClientFromConfig

func CreateClientFromConfig(ctx context.Context, cfg *config.Config, opts ...client.Option) (*Client, error)

func (Client) BuildAllProviderTables added in v0.19.2

func (c Client) BuildAllProviderTables(ctx context.Context) error

func (Client) BuildProviderTables added in v0.15.3

func (c Client) BuildProviderTables(ctx context.Context, providerName string) error

func (Client) CallModule added in v0.15.10

func (c Client) CallModule(ctx context.Context, req ModuleCallRequest) error

func (Client) Client

func (c Client) Client() *client.Client

func (Client) DescribePolicies added in v0.17.0

func (c Client) DescribePolicies(ctx context.Context, policySource string) error

func (Client) DowngradeProviders added in v0.14.5

func (c Client) DowngradeProviders(ctx context.Context, args []string) error

func (Client) DownloadPolicy added in v0.13.8

func (c Client) DownloadPolicy(ctx context.Context, args []string) error

func (Client) DownloadProviders

func (c Client) DownloadProviders(ctx context.Context) error

func (Client) DropProvider added in v0.14.5

func (c Client) DropProvider(ctx context.Context, providerName string) error

func (Client) Fetch

func (c Client) Fetch(ctx context.Context, failOnError bool) error

func (Client) RunPolicies added in v0.16.0

func (c Client) RunPolicies(ctx context.Context, policySource, outputDir string, noResults bool) error

func (Client) UpgradeProviders added in v0.14.5

func (c Client) UpgradeProviders(ctx context.Context, args []string) error

type ExitCodeError added in v0.15.11

type ExitCodeError struct {
	OriginalError error
	ExitCode      int
}

func (*ExitCodeError) Error added in v0.15.11

func (e *ExitCodeError) Error() string

type ModuleCallRequest added in v0.15.10

type ModuleCallRequest struct {
	// Name of the module
	Name string

	// Params are the invocation parameters specific to the module
	Params interface{}

	// Profile is the selected/overridden name of the profile
	Profile string

	// OutputPath is the filename to save output to
	OutputPath string
}

ModuleCallRequest is the request used to call a module.

type Progress

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

func NewProgress

func NewProgress(ctx context.Context, opts ...ProgressOption) *Progress

func (*Progress) AbortAll added in v0.14.5

func (u *Progress) AbortAll()

func (*Progress) Add

func (u *Progress) Add(name, displayName, message string, total int64)

func (*Progress) AttachReader

func (u *Progress) AttachReader(name string, data io.Reader) io.Reader

func (*Progress) GetBar

func (u *Progress) GetBar(name string) *Bar

func (*Progress) Increment

func (u *Progress) Increment(name string, n int)

func (*Progress) MarkAllDone added in v0.15.0

func (u *Progress) MarkAllDone()

func (*Progress) Update

func (u *Progress) Update(name, status, msg string, n int)

func (*Progress) Wait

func (u *Progress) Wait()

type ProgressOption

type ProgressOption func(o *ProgressOptions)

type ProgressOptions

type ProgressOptions struct {
	Filler           string
	StatusFunc       func(b *Bar, statistics decor.Statistics) string
	MessageHook      func(b *Bar, statistics decor.Statistics) string
	AppendDecorators []decor.Decorator
}

type Table added in v0.17.0

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

func (Table) Append added in v0.17.0

func (t Table) Append(i ...interface{})

func (Table) Render added in v0.17.0

func (t Table) Render()

func (Table) SetHeaders added in v0.17.0

func (t Table) SetHeaders(headers ...string)

Jump to

Keyboard shortcuts

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