vimport

package
v0.9.2-54-g76807636 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: BSD-3-Clause Imports: 29 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"`

	VolimportImage string `local:"true" long:"image" usage:"Volume import image to use" default:"official/utils/volimport:latest"`
	Force          bool   `local:"true" long:"force" short:"f" usage:"Force import, even if it might fail"`
	Source         string `` /* 128-byte string literal not displayed */
	Timeout        uint64 `local:"true" long:"timeout" short:"t" usage:"Timeout for the import process in seconds when unresponsive" default:"10"`
	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