flux: github.com/weaveworks/flux/pkg/errors Index | Files

package errors

import "github.com/weaveworks/flux/pkg/errors"


Package Files



const (
    // The operation looked fine on paper, but something went wrong
    Server Type = "server"
    // The thing you mentioned, whatever it is, just doesn't exist
    Missing = "missing"
    // The operation was well-formed, but you asked for something that
    // can't happen at present (e.g., because you've not supplied some
    // config yet)
    User = "user"

func IsMissing Uses

func IsMissing(err error) bool

type Error Uses

type Error struct {
    Type Type
    // a message that can be printed out for the user
    Help string `json:"help"`
    // the underlying error that can be e.g., logged for developers to look at
    Err error

Representation of errors in the API. These are divided into a small number of categories, essentially distinguished by whose fault the error is; i.e., is this error:

- a transient problem with the service, so worth trying again?
- not going to work until the user takes some other action, e.g., updating config?

func CoverAllError Uses

func CoverAllError(err error) *Error

func (*Error) Error Uses

func (e *Error) Error() string

func (*Error) MarshalJSON Uses

func (e *Error) MarshalJSON() ([]byte, error)

func (*Error) UnmarshalJSON Uses

func (e *Error) UnmarshalJSON(data []byte) error

type Type Uses

type Type string

Package errors imports 2 packages (graph). Updated 2019-09-29. Refresh now. Tools for package owners.