Back to godoc.org

Package bubble

v1.13.0
Latest Go to latest

The highest tagged major version is .

Published: Aug 6, 2020 | License: AGPL-3.0 | Module: gitlab.misakey.dev/misakey/msk-sdk-go

Index

func AddNeedle

func AddNeedle(n Needle)

AddNeedle to current list of needles - if not locked

func Explode

func Explode(bubble error) error

Explode iterates on all registered needles if the returned error is not nil, it means the needle found an error he could handle since we iterate with a simple loop on the needles, first appended needles are the first to be used

func Lock

func Lock()

Lock the possibility to add needles to the list should be used at the end of all needles instantiation

type EchoNeedle

type EchoNeedle struct {
}

func (EchoNeedle) Explode

func (n EchoNeedle) Explode(err error) error

type Needle

type Needle interface {
	// Explode is a function testing all known needles in the giving box
	// it takes in argument the error that bubbled up.
	Explode(err error) error
}

Needle is a component able to transform a given error into a better one. The analysis of the input error is up to the implementation, as the final returned error is. The implementation shall return nil if the input error is unknown.

type PSQLNeedle

type PSQLNeedle struct {
}

func (PSQLNeedle) Explode

func (n PSQLNeedle) Explode(err error) error

type Validator10Needle

type Validator10Needle struct {
}

func (Validator10Needle) Explode

func (n Validator10Needle) Explode(err error) error

type ValidatorNeedle

type ValidatorNeedle struct {
}

func (ValidatorNeedle) Explode

func (n ValidatorNeedle) Explode(err error) error

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier