push

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ParamPushData the request data of push api, contains basic push file info and chunk info etc
	ParamPushData = "push_data"
	// ParamUpFile the field name of upload file or file chunk
	ParamUpFile = "up_file"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PushAction added in v0.3.4

type PushAction int

PushAction the file upload action

const (
	// UnknownPushAction the unknown push action
	UnknownPushAction PushAction = iota
	// CompareFilePushAction compare the file hash value before upload the file
	CompareFilePushAction
	// CompareChunkPushAction compare the file chunk hash value before upload the file chunk
	CompareChunkPushAction
	// CompareFileAndChunkPushAction compare the file hash value and first file chunk hash value before upload the file
	CompareFileAndChunkPushAction
	// WritePushAction upload the file or file chunk
	WritePushAction
	// TruncatePushAction truncate the file with the specific size
	TruncatePushAction
)

type PushData

type PushData struct {
	// Action the action of file change
	Action action.Action `json:"action"`

	// PushAction the push action of comparing or writing to the file
	PushAction PushAction `json:"push_action"`

	// FileInfo the basic file info
	FileInfo contract.FileInfo `json:"file_info"`

	// Chunk the basic file chunk info
	Chunk contract.Chunk `json:"chunk"`

	// ForceChecksum if the file size and file modification time of the source file is equal to the destination file and ForceChecksum is false, then ignore the current file transfer
	ForceChecksum bool `json:"force_checksum"`
}

PushData the request data of the push api

Jump to

Keyboard shortcuts

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