api

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

package tracker core api

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeforeUpload

func BeforeUpload(c *gin.Context)

BeforeUpload

@param c

func Create

func Create(c *gin.Context)

func Dial

func Dial(IpAddr string, fc func(client pb.StorageClient) (interface{}, error)) (interface{}, error)

Dial gRpc server

@param IpAddr
@param fc
@return interface{}
@return error

func Download

func Download() gin.HandlerFunc

download logic get group ,token -> search db -> get link -> expire ? yes -> get group , Link() -> get link -> proxy

func HTTPProxy

func HTTPProxy(c *gin.Context, Scheme, Host string) bool

HTTPProxy ,http 反向代理

func HandleSync added in v0.7.5

func HandleSync(c *gin.Context)

func HanldeStorageServerReport

func HanldeStorageServerReport(c *gin.Context)

HanldeStorageServerReport

@param c

func ReUploadSession

func ReUploadSession(c *gin.Context)

ReUploadSession

@param c

func Upload

func Upload(c *gin.Context)

Types

type BeforeUploadReq

type BeforeUploadReq struct {
	Group     string   `json:"group"`
	Filename  string   `json:"filename"`
	Size      int64    `json:"size"`
	Md5       string   `json:"md5"`
	ModTime   int64    `json:"mod_time"`
	BlockSize int64    `json:"block_size"`
	BlockMd5  []string `json:"block_md5s"`
	Type      string   `json:"type"`
}

BeforeUploadReq

type CreateReq

type CreateReq struct {
	SessionID string `json:"session_id"`
	Size      int64  `json:"size"`
	BlockSize int64  `json:"block_size"`
}

MergeReq

Directories

Path Synopsis
package manage ui apis
package manage ui apis

Jump to

Keyboard shortcuts

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