v1alpha1

package
v1.12.0-RC1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2020 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsErr

func IsErr(given *msg) (ok bool)

func IsInfo

func IsInfo(given *msg) (ok bool)

func IsNotErr

func IsNotErr(given *msg) (ok bool)

func IsNotInfo

func IsNotInfo(given *msg) (ok bool)

func IsSkip

func IsSkip(given *msg) (ok bool)

func IsWarn

func IsWarn(given *msg) (ok bool)

func YamlString

func YamlString(ctx string, o interface{}) string

YamlString returns the provided object as a yaml formatted string

Types

type AllMsgs

type AllMsgs map[MsgType]Msgs

AllMsgs holds messages categorized per message type

func (AllMsgs) Error

func (a AllMsgs) Error() (err error)

Error returns the first error that was recorded

func (AllMsgs) GoString

func (a AllMsgs) GoString() string

GoString is an implementation of GoStringer interface

func (AllMsgs) HasError

func (a AllMsgs) HasError() (iserr bool)

func (AllMsgs) HasInfo

func (a AllMsgs) HasInfo() (isinfo bool)

func (AllMsgs) HasSkip

func (a AllMsgs) HasSkip() (isskip bool)

func (AllMsgs) HasWarn

func (a AllMsgs) HasWarn() (iswarn bool)

func (AllMsgs) IsEmpty

func (a AllMsgs) IsEmpty() (isempty bool)

func (AllMsgs) String

func (a AllMsgs) String() string

String is an implementation of Stringer interface

func (AllMsgs) ToMsgs

func (a AllMsgs) ToMsgs() (m *Msgs)

type MsgType

type MsgType string
const (
	InfoMsg MsgType = "info"  // represents an information
	ErrMsg  MsgType = "error" // represents an error message
	WarnMsg MsgType = "warn"  // represents a warning message
	SkipMsg MsgType = "skip"  // represents a message about a skipped operation
)

type Msgs

type Msgs struct {
	Items []*msg `json:"items,omitempty"`
}

Msgs represent a list of msg instance

func (*Msgs) AddError

func (m *Msgs) AddError(e error) (u *Msgs)

func (*Msgs) AddInfo

func (m *Msgs) AddInfo(i string) (u *Msgs)

func (*Msgs) AddSkip

func (m *Msgs) AddSkip(s string) (u *Msgs)

func (*Msgs) AddWarn

func (m *Msgs) AddWarn(w string) (u *Msgs)

func (Msgs) AllMsgs

func (m Msgs) AllMsgs() (all AllMsgs)

func (Msgs) Errors

func (m Msgs) Errors() (f Msgs)

func (Msgs) Filter

func (m Msgs) Filter(p msgPredicate) (f Msgs)

func (Msgs) GoString

func (m Msgs) GoString() string

GoString is an implementation of GoStringer interface

func (Msgs) HasError

func (m Msgs) HasError() bool

func (Msgs) HasWarn

func (m Msgs) HasWarn() bool

func (Msgs) Infos

func (m Msgs) Infos() (f Msgs)

func (Msgs) Log

func (m Msgs) Log(l func(string, ...interface{}))

func (Msgs) LogErrors

func (m Msgs) LogErrors(l func(string, ...interface{}))

func (Msgs) LogNonErrors

func (m Msgs) LogNonErrors(l func(string, ...interface{}))

func (Msgs) LogNonInfos

func (m Msgs) LogNonInfos(l func(string, ...interface{}))

func (*Msgs) Merge

func (m *Msgs) Merge(s *Msgs) (u *Msgs)

func (Msgs) NonErrors

func (m Msgs) NonErrors() (f Msgs)

func (Msgs) NonInfos

func (m Msgs) NonInfos() (f Msgs)

func (*Msgs) Reset

func (m *Msgs) Reset() (u *Msgs)

Reset clears the list of messages

func (Msgs) Skips

func (m Msgs) Skips() (f Msgs)

func (Msgs) String

func (m Msgs) String() string

String is an implementation of Stringer interface

func (Msgs) Warns

func (m Msgs) Warns() (f Msgs)

Jump to

Keyboard shortcuts

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