Help us shape the future of Go! Take the 2026 Go Developer Survey

file

package
v1.0.85 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download(ctx context.Context, remoteFilename, localPath string) error

func GetSaveSyncItems

func GetSaveSyncItems(ctx context.Context) ([]*pb.SaveSyncItem, error)

func Init

func Init(conn *grpc.ClientConn)

func PostSaveSyncItems

func PostSaveSyncItems(ctx context.Context, items []*pb.SaveSyncItem) error

func Upload

func Upload(ctx context.Context, kind pb.FileKind, localPath string) error

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(conn *grpc.ClientConn) *Handler

func (*Handler) DownloadFile

func (h *Handler) DownloadFile(ctx context.Context, remoteFilename, localPath string) error

DownloadFile writes the remote file to localPath, resuming from the current local file length on reconnect. Retries with backoff on transient errors.

func (*Handler) GetSaveSync

func (h *Handler) GetSaveSync(ctx context.Context) ([]*pb.SaveSyncItem, error)

func (*Handler) PostSaveSync

func (h *Handler) PostSaveSync(ctx context.Context, items []*pb.SaveSyncItem) error

func (*Handler) UploadFile

func (h *Handler) UploadFile(ctx context.Context, kind pb.FileKind, localPath string) error

UploadFile streams localPath to the backend, resuming from the server-staged offset on reconnect. Retries with backoff on transient errors.

Jump to

Keyboard shortcuts

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