v0

package
v0.0.0-...-403c8b4 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: Apache-2.0, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FinderProtocolID is the libp2p protocol that finder API uses
	FinderProtocolID protocol.ID = "/indexer/finder/0.0.1"
	// IngestProtocolID is the libp2p protocol that ingest API uses
	IngestProtocolID protocol.ID = "/indexer/ingest/0.0.1"
)

Variables

This section is empty.

Functions

func DecodeError

func DecodeError(data []byte) error

func EncodeError

func EncodeError(err error) []byte

Types

type Error

type Error struct {
	// contains filtered or unexported fields
}

Error is the type of error used when it is necessary to convey a specific status code so that it can be handled correctly higher in the call stack.

For example, differentiating between a bad request and an internal server error allows a server to determine whether the error should be returned to a client or not.

func NewError

func NewError(err error, status int) *Error

func (*Error) Error

func (e *Error) Error() string

func (*Error) Status

func (e *Error) Status() int

func (*Error) Text

func (e *Error) Text() string

func (*Error) Unwrap

func (e *Error) Unwrap() error

type ErrorMessage

type ErrorMessage struct {
	Message string `json:",omitempty"`
	Status  int    `json:",omitempty"`
}

Directories

Path Synopsis
admin
finder
pb
ingest
pb
schema
Package schema defines the makeup of an advertisement.
Package schema defines the makeup of an advertisement.
Package libp2pclient provides general libp2p client functionality
Package libp2pclient provides general libp2p client functionality

Jump to

Keyboard shortcuts

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