api

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVideoSlice

func GetVideoSlice(w http.ResponseWriter, req *http.Request)

func HTTPRequest

func HTTPRequest(request *http.Request, w http.ResponseWriter, isNeedWalletAddress bool) (data map[string]interface{}, err error)

HTTPRequest

func ParseBody

func ParseBody(r *http.Request) (map[string]interface{}, error)

ParseBody

func StartHTTPServ

func StartHTTPServ()

StartHTTPServ

Types

type MsgSlice

type MsgSlice []walletList

MsgSlice sort based on MsgSlice.count decreasingly

func (MsgSlice) Len

func (a MsgSlice) Len() int

func (MsgSlice) Less

func (a MsgSlice) Less(i, j int) bool

func (MsgSlice) Swap

func (a MsgSlice) Swap(i, j int)

type SliceInfo

type SliceInfo struct {
	SliceHash string
	TaskId    string
}

type StreamInfo

type StreamInfo struct {
	HeaderFile         string
	SegmentToSliceInfo map[string]*protos.DownloadSliceInfo
	FileInfo           *protos.RspFileStorageInfo
}

type StreamReqBody

type StreamReqBody struct {
	FileHash      string
	FileName      string
	WalletAddress string
	P2PAddress    string
	SpP2pAddress  string
	RestAddress   string
	Sign          []byte
	SavePath      string
	SliceInfo     *protos.DownloadSliceInfo
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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