vimport

package
v0.8.5-2-g6183dbf6 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: BSD-3-Clause Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsLoggable

func IsLoggable(err error) bool

IsLoggable returns whether err should be logged when handled. All errors are considered loggable unless explicitly marked otherwise.

func NewCmd

func NewCmd() *cobra.Command

func NotLoggable

func NotLoggable(err error) error

NotLoggable marks an error as not loggable.

Types

type ImportOptions

type ImportOptions struct {
	Auth  *config.AuthConfig `noattribute:"true"`
	Token string             `noattribute:"true"`
	Metro string             `noattribute:"true"`

	Source string `local:"true" long:"source" short:"s" usage:"Path to the data source (directory, Dockerfile)" default:"."`
	VolID  string `local:"true" long:"volume" short:"v" usage:"Identifier of an existing volume (name or UUID)"`
}

func (*ImportOptions) Pre

func (opts *ImportOptions) Pre(cmd *cobra.Command, _ []string) error

func (*ImportOptions) Run

func (opts *ImportOptions) Run(ctx context.Context, _ []string) error

type Loggable

type Loggable interface {
	error
	Loggable() bool
}

Loggable is a type of error that can be asserted for behaviour, and signals whether an error should be logged when handled. It is particularly useful for communicating to a caller that the error was already reported (e.g. logged) in a callee.

Jump to

Keyboard shortcuts

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