Documentation
¶
Index ¶
- func Download(ctx context.Context, remoteFilename, localPath string) error
- func GetSaveSyncItems(ctx context.Context) ([]*pb.SaveSyncItem, error)
- func Init(conn *grpc.ClientConn)
- func PostSaveSyncItems(ctx context.Context, items []*pb.SaveSyncItem) error
- func Upload(ctx context.Context, kind pb.FileKind, localPath string) error
- type Handler
- func (h *Handler) DownloadFile(ctx context.Context, remoteFilename, localPath string) error
- func (h *Handler) GetSaveSync(ctx context.Context) ([]*pb.SaveSyncItem, error)
- func (h *Handler) PostSaveSync(ctx context.Context, items []*pb.SaveSyncItem) error
- func (h *Handler) UploadFile(ctx context.Context, kind pb.FileKind, localPath string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(conn *grpc.ClientConn) *Handler
func (*Handler) DownloadFile ¶
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 (*Handler) PostSaveSync ¶
Click to show internal directories.
Click to hide internal directories.