func AccessDenied(ctx context.Context, logmessage string, a ...interface{}) error
func AlreadyExists(ctx context.Context, logmessage string, a ...interface{}) error
func Error(ctx context.Context, code codes.Code, publicmessage string, logmessage string, a ...interface{}) error
really returns a status.Status
func ErrorString(err error) string
func ErrorStringWithStackTrace(err error) string
func Errorf(format string, args ...interface{}) error
create new error, but include "[file: xxx.go:13]"
func FailedPrecondition(ctx context.Context, logmessage string, a ...interface{}) error
func InvalidArgs(ctx context.Context, publicmessage string, logmessage string, a ...interface{}) error
shortcut: we write this so often: user submitted args that aren't valid
func NeedServiceOrRoot(ctx context.Context, serviceids []string) error
error if context is not root user or one of the services listed
func NeedsRoot(ctx context.Context) error
function call requires "root" privileges. returns error if user is non-root
func NotFound(ctx context.Context, logmessage string, a ...interface{}) error
func NotImplemented(ctx context.Context, method string) error
func ShortMessage(err error) string
func Unauthenticated(ctx context.Context, logmessage string, a ...interface{}) error
func Unavailable(ctx context.Context, method string) error
func Wrap(err error) error
func Wrapf(err error, format string, args ...interface{}) error
type GEEntry struct {
// contains filtered or unexported fields
}
type GEError struct {
// contains filtered or unexported fields
}
func UnmarshalError(err error) *GEError
func (g *GEError) MultilineError() string
type HTTPError struct {
ErrorCode int
ErrorString string
ExtendedErrorString string
ErrorMessage string
}
func ToHTTPCode(err error) *HTTPError