Documentation ¶
Index ¶
- type Backup
- type Client
- func (c *Client) AddBackup(ctx context.Context, backupDir string) (*pb.AddBackupReply, error)
- func (c *Client) Close() error
- func (c *Client) Export(ctx context.Context) (*pb.ExportReply, error)
- func (c *Client) ListBackups(ctx context.Context) (*pb.ListBackupsReply, error)
- func (c *Client) UpdateLatestBackup(ctx context.Context, deviceID string, backupCid string) (*pb.UpdateLatestBackupReply, error)
- type Service
- func (s *Service) AddBackup(ctx context.Context, req *pb.AddBackupRequest) (*pb.AddBackupReply, error)
- func (s *Service) Export(ctx context.Context, req *pb.ExportRequest) (*pb.ExportReply, error)
- func (s *Service) ListBackups(ctx context.Context, req *pb.ListBackupsRequest) (*pb.ListBackupsReply, error)
- func (s *Service) UpdateLatestBackup(ctx context.Context, req *pb.UpdateLatestBackupRequest) (*pb.UpdateLatestBackupReply, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backup ¶ added in v0.3.0
type Backup struct { ID core.InstanceID `json:"_id"` // DeviceID LatestBackupCid string UpdatedAt time.Time }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides the client api.
func NewClient ¶
func NewClient(target string, opts ...grpc.DialOption) (*Client, error)
NewClient starts the client.
func (*Client) Export ¶ added in v0.3.0
Export returns the information needed to share backups with another device
func (*Client) ListBackups ¶
ListBackups lists all known backups
func (*Client) UpdateLatestBackup ¶
func (c *Client) UpdateLatestBackup(ctx context.Context, deviceID string, backupCid string) (*pb.UpdateLatestBackupReply, error)
UpdateLatestBackup saves a reference to the latest backup
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a gRPC service
func (*Service) AddBackup ¶
func (s *Service) AddBackup(ctx context.Context, req *pb.AddBackupRequest) (*pb.AddBackupReply, error)
AddBackup adds a new backup to IPFS
func (*Service) Export ¶ added in v0.3.0
func (s *Service) Export(ctx context.Context, req *pb.ExportRequest) (*pb.ExportReply, error)
Export returns the information needed to share backups with another device
func (*Service) ListBackups ¶
func (s *Service) ListBackups(ctx context.Context, req *pb.ListBackupsRequest) (*pb.ListBackupsReply, error)
ListBackups lists all known backups
func (*Service) UpdateLatestBackup ¶
func (s *Service) UpdateLatestBackup(ctx context.Context, req *pb.UpdateLatestBackupRequest) (*pb.UpdateLatestBackupReply, error)
UpdateLatestBackup saves a reference to the latest backup
Click to show internal directories.
Click to hide internal directories.