api

package
v0.2.25 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: Apache-2.0, MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(c *cli.Context) error

Types

type ItemInfo

type ItemInfo struct {
	Path string `json:"path"` // Path to the new item, relative to the source
}

type Server

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

func (Server) GetMetadataHandler

func (s Server) GetMetadataHandler(c echo.Context) error

GetMetadataHandler godoc @Summary Get metadata for a piece @Description Get metadata for a piece for how it may be reassembled from the data source @Tags Piece Metadata @Produce json @Param piece path string true "Piece CID" @Success 200 {object} store.PieceReader @Failure 400 {string} string "Bad Request" @Failure 404 {string} string "Not Found" @Failure 500 {string} string "Internal Server Error" @Router /piece/{id}/metadata [get]

func (Server) HandlePostSource

func (s Server) HandlePostSource(c echo.Context) error

func (Server) PushItem

func (s Server) PushItem(c echo.Context) error

PushItem godoc @Summary Push an item to be queued @Description Tells Singularity that something is ready to be grabbed for data preparation @Tags Data Source @Accept json @Produce json @Param item body ItemInfo true "Item" @Success 201 {object} model.Item @Failure 400 {string} string "Bad Request" @Failure 409 {string} string "Item already exists" @Failure 500 {string} string "Internal Server Error" @Router /source/{id}/push [post]

func (Server) Run

func (s Server) Run(c *cli.Context) error

func (Server) SendManualHandler added in v0.2.23

func (s Server) SendManualHandler(c echo.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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