Documentation ¶
Overview ¶
It takes a path, parses it, and returns the protocol, the CID, and the path segments
Index ¶
- Variables
- func ConfigureGatewayRouter(e *echo.Group, node *core.LightNode)
- func ConfigureHealthCheckRouter(healthCheckApiGroup *echo.Group, node *core.LightNode)
- func ConfigureNodeInfoRouter(e *echo.Group, node *core.LightNode)
- func ConfigurePinningRouter(e *echo.Group, node *core.LightNode)
- func ConfigureRetrieveRouter(e *echo.Group, node *core.LightNode)
- func ConfigureStatsRouter(e *echo.Group, node *core.LightNode)
- func ConfigureStatusCheckRouter(e *echo.Group, node *core.LightNode)
- func ErrorHandler(err error, c echo.Context)
- func GatewayContentResolverCheckHandler(c echo.Context) error
- func GatewayResolverCheckHandlerDirectPath(c echo.Context) error
- func InitializeEchoRouterConfig(ln *core.LightNode)
- func LoopForever()
- func RetrieveSplitHandler(c echo.Context, node *core.LightNode) error
- func ServeDir(ctx context.Context, n mdagipld.Node, w http.ResponseWriter, req *http.Request) error
- func SniffMimeType(w http.ResponseWriter, dr uio.DagReader) error
- type AuthResponse
- type CidRequest
- type Context
- type CustomLinks
- type DealE2EUploadRequest
- type DealE2EUploadResponse
- type GatewayHandler
- type HttpError
- type HttpErrorResponse
- type Stats
- type StatusCheckResponse
- type UploadResponse
- type UploadSplitResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var (
OsSignal chan os.Signal
)
Functions ¶
func ConfigureGatewayRouter ¶
func ConfigureHealthCheckRouter ¶
ConfigureHealthCheckRouter > ConfigureHealthCheckRouter is a function that takes a pointer to an echo.Group and a pointer to a DeltaNode and returns nothing
func ConfigureNodeInfoRouter ¶
ConfigureNodeInfoRouter It configures the router to handle requests for node information
func ConfigurePinningRouter ¶
func ConfigureRetrieveRouter ¶
func ConfigureStatsRouter ¶
func ErrorHandler ¶
func ErrorHandler(err error, c echo.Context)
func GatewayContentResolverCheckHandler ¶
func GatewayContentResolverCheckHandler(c echo.Context) error
func GatewayResolverCheckHandlerDirectPath ¶
func GatewayResolverCheckHandlerDirectPath(c echo.Context) error
`GatewayResolverCheckHandlerDirectPath` is a function that takes a `echo.Context` and returns an `error`
func InitializeEchoRouterConfig ¶
RouterConfig configures the API node
func RetrieveSplitHandler ¶
RetrieveSplitHandler is the handler for the /retrieve/split endpoint
func SniffMimeType ¶
func SniffMimeType(w http.ResponseWriter, dr uio.DagReader) error
Types ¶
type AuthResponse ¶
type AuthResponse struct { Result struct { Validated bool `json:"validated"` Details string `json:"details"` } `json:"result"` }
func GetAuthResponse ¶
func GetAuthResponse(resp *http.Response) (AuthResponse, error)
type CidRequest ¶
type CidRequest struct {
Cids []string `json:"cids"`
}
type Context ¶
type Context struct {
CustomLinks []CustomLinks
}
type CustomLinks ¶
type DealE2EUploadRequest ¶
type DealE2EUploadRequest struct { Cid string `json:"cid,omitempty"` Miner string `json:"miner,omitempty"` Duration int64 `json:"duration,omitempty"` DurationInDays int64 `json:"duration_in_days,omitempty"` ConnectionMode string `json:"connection_mode,omitempty"` Size int64 `json:"size,omitempty"` StartEpoch int64 `json:"start_epoch,omitempty"` StartEpochInDays int64 `json:"start_epoch_in_days,omitempty"` Replication int `json:"replication,omitempty"` RemoveUnsealedCopy bool `json:"remove_unsealed_copy"` SkipIPNIAnnounce bool `json:"skip_ipni_announce"` AutoRetry bool `json:"auto_retry"` Label string `json:"label,omitempty"` DealVerifyState string `json:"deal_verify_state,omitempty"` }
type DealE2EUploadResponse ¶
type DealE2EUploadResponse struct { Status string `json:"status"` Message string `json:"message"` ContentId int64 `json:"content_id,omitempty"` DealRequest interface{} `json:"deal_request_meta,omitempty"` DealProposalParameterRequest interface{} `json:"deal_proposal_parameter_request_meta,omitempty"` ReplicatedContents interface{} `json:"replicated_contents,omitempty"` }
DealE2EUploadResponse DealResponse Creating a new struct called DealResponse and then returning it.
type GatewayHandler ¶
type GatewayHandler struct {
// contains filtered or unexported fields
}
func (*GatewayHandler) GatewayDirResolverCheckHandler ¶
func (gw *GatewayHandler) GatewayDirResolverCheckHandler(c echo.Context) error
func (*GatewayHandler) ServeHTTP ¶
func (gw *GatewayHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type HttpError ¶
type HttpErrorResponse ¶
type HttpErrorResponse struct {
Error HttpError `json:"error"`
}
type StatusCheckResponse ¶
type UploadResponse ¶
type UploadSplitResponse ¶
Click to show internal directories.
Click to hide internal directories.