Documentation
¶
Index ¶
- func Run(c *cli.Context) error
- type DealStats
- type ItemInfo
- type Server
- func (d Server) GetCars(c echo.Context) error
- func (d Server) GetDatasets(c echo.Context) error
- func (d Server) GetDealStats(c echo.Context) error
- func (d Server) GetDealsForCar(c echo.Context) error
- func (d Server) GetDealsForItem(c echo.Context) error
- func (d Server) GetDirectoryEntries(c echo.Context) error
- func (d Server) GetItems(c echo.Context) error
- func (s Server) GetMetadataHandler(c echo.Context) error
- func (d Server) GetOverallDealStats(c echo.Context) error
- func (d Server) GetSources(c echo.Context) error
- func (d Server) HandlePostSource(c echo.Context) error
- func (s Server) PushItem(c echo.Context) error
- func (d Server) Run(c *cli.Context) error
- func (s Server) UploadFile(c echo.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (Server) GetDatasets ¶
func (Server) GetDealStats ¶
func (Server) GetDealsForCar ¶
func (Server) GetDealsForItem ¶
func (Server) GetDirectoryEntries ¶
func (Server) GetMetadataHandler ¶
GetMetadataHandler godoc @Summary Get metadata for a piece @Description Get metadata for a piece @Tags Piece @Accept json @Produce json @Param piece path string true "Piece CID" @Success 200 {object} store.PieceReader @Failure 400 {string} string "Bad Request" @Failure 500 {string} string "Internal Server Error" @Router /piece/metadata/{piece} [get]
func (Server) GetOverallDealStats ¶
func (Server) GetSources ¶
func (Server) HandlePostSource ¶
func (Server) PushItem ¶
PushItem godoc @Summary Push an item to the staging area @Description Push an item to the staging area @Tags Data Source @Accept json @Produce json @Param item body ItemInfo true "Item" @Success 200 {string} string "OK" @Failure 400 {string} string "Bad Request" @Failure 500 {string} string "Internal Server Error" @Router /dataset/push [post]
func (Server) UploadFile ¶
UploadFile godoc @Summary Upload a file to a dataset @Description Upload a file to a dataset @Tags Data Source @Accept mpfd @Produce text/plain @Param dataset query string true "Dataset name" @Param file formData file true "File to upload" @Success 200 {string} string "File uploaded" @Failure 400 {string} string "Error: dataset name is required." @Failure 400 {string} string "Error: file is required." @Failure 400 {string} string "Error: dataset not found." @Failure 500 {string} string "Error: internal server error." @Router /dataset/upload [post]