api

package
v0.12.4 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//TODO to be replaced by other map implementation that has similar feature
	RequestInfoMap = utils.NewAutoCleanMap(1 * time.Hour)
)

Functions

func GetOzone added in v0.11.9

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

func GetVideoSlice

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

func GetVideoSliceCache added in v0.11.9

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

func PrepareSharedVideoFileCache added in v0.12.0

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

func PrepareVideoFileCache added in v0.11.9

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

func StartHTTPServ

func StartHTTPServ(ctx context.Context)

Types

type OzoneInfo added in v0.11.9

type OzoneInfo struct {
	WalletAddress  string `json:"walletAddress"`
	SequenceNumber string `json:"sequenceNumber"`
	Ozone          string `json:"ozone"`
}

type StreamInfo

type StreamInfo struct {
	HeaderFile         string                               `json:"header_file"`
	FileHash           string                               `json:"file_hash"`
	SegmentToSliceInfo map[string]*protos.DownloadSliceInfo `json:"segment_to_slice_info"`
}

type StreamInfoRequest added in v0.12.1

type StreamInfoRequest struct {
	PubKey        string `json:"pubKey"`
	WalletAddress string `json:"walletAddress"`
	Signature     string `json:"signature"`
	ReqTime       int64  `json:"reqTime"`
}

type StreamInfoResponse added in v0.12.1

type StreamInfoResponse struct {
	HeaderFile string `json:"headerFile"`
	ReqId      string `json:"reqId"`
}

type StreamReqBody

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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