deal

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: MIT Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListHandler

func ListHandler(db *gorm.DB, request ListDealRequest) ([]model.Deal, *handler.Error)

ListHandler godoc @Summary List all deals @Description List all deals @Tags Deal @Accept json @Produce json @Param request body ListDealRequest true "ListDealRequest" @Success 200 {array} model.Deal @Failure 400 {object} handler.HTTPError @Failure 500 {object} handler.HTTPError @Router /deal/list [post]

func SendManualHandler

func SendManualHandler(
	db *gorm.DB,
	request Proposal,
) (string, *handler.Error)

SendManualHandler godoc @Summary Send a manual deal proposal @Description Send a manual deal proposal @Tags Deal @Accept json @Produce json @Param proposal body Proposal true "Proposal" @Success 200 {string} string @Failure 400 {object} handler.HTTPError @Failure 500 {object} handler.HTTPError @Router /deal/send_manual [post]

Types

type ListDealRequest

type ListDealRequest struct {
	Datasets  []string `json:"datasets"`
	Schedules []uint32 `json:"schedules"`
	Providers []string `json:"providers"`
	States    []string `json:"states"`
}

type Proposal

type Proposal struct {
	HTTPHeaders    []string `json:"httpHeaders"`
	URLTemplate    string   `json:"urlTemplate"`
	Price          float64  `json:"price"`
	RootCID        string   `json:"rootCid"`
	Verified       bool     `json:"verified"`
	IPNI           bool     `json:"ipni"`
	KeepUnsealed   bool     `json:"keepUnsealed"`
	StartDelayDays float64  `json:"startDelayDays"`
	DurationDays   float64  `json:"durationDays"`
	ClientAddress  string   `json:"clientAddress"`
	ProviderID     string   `json:"providerId"`
	PieceCID       string   `json:"pieceCid"`
	PieceSize      string   `json:"pieceSize"`
	FileSize       uint64   `json:"fileSize"`
	LotusAPI       string   `swaggerignore:"true"`
	LotusToken     string   `swaggerignore:"true"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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