rservice

package
v0.0.0-...-3c3b1c7 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: AGPL-3.0-or-later Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FTService

type FTService interface {
	// Local file data transfer protocol based on gRPC streaming, in chunks
	UploadFile(bucketId string, localFilePath string) error

	// Handle a file download request towards the FS server, based on a bucket ID (previously loaded) and a file index
	// Consider the file index towards a lexically sorted list order of the target files directory
	DownloadFile(bucketId string, fileIndex int) (*rpcfile.File, error)
}

FTService is the client API for FTService

func NewFileTransfer

func NewFileTransfer(addr string, chunkSize int, verbose bool) FTService

Init the file transfer service context info

type VrfsService

type VrfsService interface {
	// Handle the request for a file storage bucket from the VRFS API, to upload files to the file storage service
	HandleFileBucketReq(tenantId string, fileSetId string) (int32, string, error)

	// Handle the request to VRFS for confirming the fileset has been correctly uploaded & stored
	HandleUploadDoneReq(tenantId string, fileSetId string, mtRootHash []byte) (int32, string, error)

	// Handle the request to VRFS for retrieving the info to download a file and check/prove it is untampered
	HandleDownloadFileInfoReq(tenantId string, fileSetId string, fileIndex int) (string, *mt.Proof, error)

	// Handle a VRFS API ping request, to check for the service availability
	HandlePingReq() error
}

The client API for the Verifiable Remote File Storage service

func NewVrfsClient

func NewVrfsClient(vrfsEndpoint string) (VrfsService, error)

Init the client's remote service / context

Jump to

Keyboard shortcuts

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