Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InvalidArgumentErr ¶
InvalidArgumentErr creates a gRPC InvalidArgument error with the given description.
func NotFoundErr ¶
NotFoundErr creates a gRPC NotFound error with the given description.
Types ¶
type ConfigsNotFound ¶
type ConfigsNotFound struct {
// contains filtered or unexported fields
}
ConfigsNotFound is an error used when the search for a config file results in that file not being found.
func NewConfigsNotFoundError ¶
func NewConfigsNotFoundError(searchPaths []string) *ConfigsNotFound
NewConfigsNotFoundError returns a new instance of a ConfigsNotFound error.
func (*ConfigsNotFound) Error ¶
func (e *ConfigsNotFound) Error() string
Error returns the error string and fulfils the error interface.
type MultiError ¶
type MultiError struct {
// Errors is a the collection of errors that the MultiError keeps track of.
Errors []error
// For is a string that describes the process/function that the MultiError
// is used for. This is optional.
For string
// Context is a general purpose mapping that can be used to store context
// information about errors, such as their source. This is useful when passing
// the MultiError across different scopes where not all info may be present.
Context map[string]string
}
MultiError is a collection of errors that also fulfills the error interface.
It can be used to aggregate errors and then return them all at once.
func NewMultiError ¶
func NewMultiError(source string) *MultiError
NewMultiError creates a new instance of a MultiError.
func (*MultiError) Err ¶
func (err *MultiError) Err() error
Err returns the MultiError if any errors exist. Otherwise, it returns nil.
func (*MultiError) HasErrors ¶
func (err *MultiError) HasErrors() bool
HasErrors checks to see if the MultiError is tracking any errors.
type UnsupportedCommandError ¶
type UnsupportedCommandError struct{}
UnsupportedCommandError is an error that can be used to designate that a given device does not support an operation, e.g. write. Write is required by the PluginHandler interface, but if a device (e.g. a temperature sensor) doesn't support writing, this error can be returned.
func (*UnsupportedCommandError) Error ¶
func (e *UnsupportedCommandError) Error() string