dsp

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package dsp manages the dataspace protocol.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDSPRoutes

func GetDSPRoutes(
	provider providerv1.ProviderServiceClient,
	store statemachine.Archiver,
	reconciler *statemachine.Reconciler,
	selfURL *url.URL,
	pingResponse *providerv1.PingResponse,
) http.Handler

func GetWellKnownRoutes

func GetWellKnownRoutes() http.Handler

GetRoutes gets all the dataspace routes.

func WrapHandlerWithError

func WrapHandlerWithError(h func(w http.ResponseWriter, r *http.Request) error) http.Handler

WrapHandlerWithError wraps a http handler that returns an error into a more generic http.Handler. It will handle the error like it's supposed to be an http error. If the function returns a normal error, it will return a 500 with a generic error message. If the error conforms to a HTTPError, it will use the information to format a proper HTTP dataspace error.

Types

type CatalogError

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

CatalogError implements HTTPError for catalog requests.

func (CatalogError) ConsumerPID

func (ce CatalogError) ConsumerPID() string

func (CatalogError) DSPCode

func (ce CatalogError) DSPCode() string

func (CatalogError) Description

func (ce CatalogError) Description() []shared.Multilanguage

func (CatalogError) Error

func (ce CatalogError) Error() string

func (CatalogError) ErrorType

func (ce CatalogError) ErrorType() string

func (CatalogError) ProviderPID

func (ce CatalogError) ProviderPID() string

func (CatalogError) Reason

func (ce CatalogError) Reason() []shared.Multilanguage

func (CatalogError) StatusCode

func (ce CatalogError) StatusCode() int

type ContractError

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

func (ContractError) ConsumerPID

func (ce ContractError) ConsumerPID() string

func (ContractError) DSPCode

func (ce ContractError) DSPCode() string

func (ContractError) Description

func (ce ContractError) Description() []shared.Multilanguage

func (ContractError) Error

func (ce ContractError) Error() string

func (ContractError) ErrorType

func (ce ContractError) ErrorType() string

func (ContractError) ProviderPID

func (ce ContractError) ProviderPID() string

func (ContractError) Reason

func (ce ContractError) Reason() []shared.Multilanguage

func (ContractError) StatusCode

func (ce ContractError) StatusCode() int

type HTTPReturnError

type HTTPReturnError interface {
	error
	StatusCode() int
	ErrorType() string
	DSPCode() string
	Reason() []shared.Multilanguage
	Description() []shared.Multilanguage
	ProviderPID() string
	ConsumerPID() string
}

HTTPReturnError is an interface for a dataspace protocol error, containing all the information needed to return a sane dataspace error over HTTP.

type TransferError

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

func (TransferError) ConsumerPID

func (te TransferError) ConsumerPID() string

func (TransferError) DSPCode

func (te TransferError) DSPCode() string

func (TransferError) Description

func (te TransferError) Description() []shared.Multilanguage

func (TransferError) Error

func (te TransferError) Error() string

func (TransferError) ErrorType

func (te TransferError) ErrorType() string

func (TransferError) ProviderPID

func (te TransferError) ProviderPID() string

func (TransferError) Reason

func (te TransferError) Reason() []shared.Multilanguage

func (TransferError) StatusCode

func (te TransferError) StatusCode() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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