Documentation ¶
Overview ¶
Package dsp manages the dataspace protocol.
Index ¶
- func GetDSPRoutes(provider providerv1.ProviderServiceClient, store statemachine.Archiver, ...) http.Handler
- func GetWellKnownRoutes() http.Handler
- func WrapHandlerWithError(h func(w http.ResponseWriter, r *http.Request) error) http.Handler
- type CatalogError
- func (ce CatalogError) ConsumerPID() string
- func (ce CatalogError) DSPCode() string
- func (ce CatalogError) Description() []shared.Multilanguage
- func (ce CatalogError) Error() string
- func (ce CatalogError) ErrorType() string
- func (ce CatalogError) ProviderPID() string
- func (ce CatalogError) Reason() []shared.Multilanguage
- func (ce CatalogError) StatusCode() int
- type ContractError
- func (ce ContractError) ConsumerPID() string
- func (ce ContractError) DSPCode() string
- func (ce ContractError) Description() []shared.Multilanguage
- func (ce ContractError) Error() string
- func (ce ContractError) ErrorType() string
- func (ce ContractError) ProviderPID() string
- func (ce ContractError) Reason() []shared.Multilanguage
- func (ce ContractError) StatusCode() int
- type HTTPReturnError
- type TransferError
- func (te TransferError) ConsumerPID() string
- func (te TransferError) DSPCode() string
- func (te TransferError) Description() []shared.Multilanguage
- func (te TransferError) Error() string
- func (te TransferError) ErrorType() string
- func (te TransferError) ProviderPID() string
- func (te TransferError) Reason() []shared.Multilanguage
- func (te TransferError) StatusCode() int
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 ¶
GetRoutes gets all the dataspace routes.
func WrapHandlerWithError ¶
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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.