Documentation
¶
Index ¶
- func CheckReplicationProfile(p rp.Profile, pin, root string) error
- type ByteObservation
- type Client
- func (c *Client) AddP2PSignal(ctx context.Context, ...) error
- func (c *Client) BindReplication(ctx context.Context, b rp.Binding) (rp.Profile, error)
- func (c *Client) Broadcast(ctx context.Context, entryID, senderOwner, senderDevice, recipientOwner string) (TransferList, error)
- func (c *Client) CommitReuse(ctx context.Context, token string) (CompleteResponse, error)
- func (c *Client) CompleteP2P(ctx context.Context, transferID, ownerID, deviceID string, version int64) (Transfer, error)
- func (c *Client) CompletePull(ctx context.Context, pullID, deviceID, contentRoot string) (PullCompleteResponse, error)
- func (c *Client) CompleteUpload(ctx context.Context, uploadID string) (CompleteResponse, error)
- func (c *Client) Content(ctx context.Context, pullID string, offset int64) (*http.Response, error)
- func (c *Client) ContentRange(ctx context.Context, pullID string, start, end int64) (*http.Response, error)
- func (c *Client) CreateP2P(ctx context.Context, request P2PCreateRequest) (Transfer, error)
- func (c *Client) CreatePull(ctx context.Context, entryID, ownerID, deviceID, transferID string) (Pull, error)
- func (c *Client) CreateTransfer(ctx context.Context, request TransferCreateRequest) (Transfer, error)
- func (c *Client) DeviceAction(ctx context.Context, ...) (Device, error)
- func (c *Client) DialRelay(ctx context.Context, id, role string) (*websocket.Conn, error)
- func (c *Client) FileAction(ctx context.Context, entryID, action, ownerID, deviceID string, version int64, ...) (FileSnapshot, error)
- func (c *Client) GetFile(ctx context.Context, entryID, ownerID string, access ...string) (FileSnapshot, error)
- func (c *Client) GetManifest(ctx context.Context, entryID, ownerID, deviceID, transferID string) (ManifestEnvelope, error)
- func (c *Client) GetP2PProgress(ctx context.Context, id, ownerID, deviceID string) (P2PProgressSnapshot, error)
- func (c *Client) GetPull(ctx context.Context, pullID, ownerID, deviceID string) (Pull, error)
- func (c *Client) GetQuota(ctx context.Context, scopeID string) (Quota, error)
- func (c *Client) GetTask(ctx context.Context, id, ownerID, deviceID string) (Task, error)
- func (c *Client) GetTransfer(ctx context.Context, id, ownerID, deviceID string) (Transfer, error)
- func (c *Client) ListDevices(ctx context.Context, ownerID string) (DeviceList, error)
- func (c *Client) ListTasks(ctx context.Context, ownerID, deviceID, kind, state string, ...) (TaskList, error)
- func (c *Client) ListTransfers(ctx context.Context, path, ownerID, deviceID, role, state string, limit int) (TransferList, error)
- func (c *Client) ObserveP2PProgress(ctx context.Context, transferID, ownerID, deviceID string, received int64, ...) error
- func (c *Client) P2PProgress(ctx context.Context, transferID, ownerID, deviceID string, received int64) error
- func (c *Client) P2PSignals(ctx context.Context, transferID, ownerID, deviceID string, after int64) (P2PSignalList, error)
- func (c *Client) Prepare(ctx context.Context, request PrepareRequest) (PrepareResponse, error)
- func (c *Client) PutManifestEnvelope(ctx context.Context, ...) error
- func (c *Client) ReadReplication(ctx context.Context, epoch string, after int64, snapshot bool, upper int64, ...) (rp.Page, error)
- func (c *Client) RecipientPublicKey(ctx context.Context, ownerID, deviceID string) (string, error)
- func (c *Client) RelayTransport(ctx context.Context, id string) (string, error)
- func (c *Client) ReplicationProfile(ctx context.Context, stream string) (rp.Profile, error)
- func (c *Client) ReplicationRoster(ctx context.Context, r rp.Roster) (rp.Profile, error)
- func (c *Client) SubmitP2PSignal(ctx context.Context, ...) (P2PSignal, error)
- func (c *Client) Sync(ctx context.Context, after int64, limit int, ownerID, deviceID string) (SyncResponse, error)
- func (c *Client) TaskAction(ctx context.Context, id, action, ownerID, deviceID string, version int64, ...) (Task, error)
- func (c *Client) TaskProgress(ctx context.Context, id, ownerID, deviceID string, progress int64) (Task, error)
- func (c *Client) TaskProjection(ctx context.Context, id, ownerID, deviceID string) (TaskProjection, error)
- func (c *Client) TransferAction(ctx context.Context, id, action, ownerID, deviceID string, version int64, ...) (Transfer, error)
- func (c *Client) UploadChunk(ctx context.Context, uploadID string, index int, digest string, data []byte) error
- func (c *Client) UploadReplication(ctx context.Context, b rp.Upload) (rp.Ack, error)
- type CompleteResponse
- type Device
- type DeviceList
- type FileEntry
- type FileSnapshot
- type Manifest
- type ManifestEnvelope
- type P2PCreateRequest
- type P2PProgressSnapshot
- type P2PSignal
- type P2PSignalList
- type PrepareRequest
- type PrepareResponse
- type Pull
- type PullCompleteResponse
- type Quota
- type SyncEvent
- type SyncResponse
- type Task
- type TaskList
- type TaskProjection
- type Transfer
- type TransferCreateRequest
- type TransferList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ByteObservation ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewWithClock ¶
func (*Client) AddP2PSignal ¶
func (*Client) BindReplication ¶
func (*Client) CommitReuse ¶
func (*Client) CompleteP2P ¶
func (*Client) CompletePull ¶
func (*Client) CompleteUpload ¶
func (*Client) ContentRange ¶
func (*Client) CreatePull ¶
func (*Client) CreateTransfer ¶
func (*Client) DeviceAction ¶
func (*Client) FileAction ¶
func (*Client) GetManifest ¶
func (*Client) GetP2PProgress ¶
func (*Client) GetTransfer ¶
func (*Client) ListDevices ¶
func (*Client) ListTransfers ¶
func (*Client) ObserveP2PProgress ¶
func (*Client) P2PProgress ¶
func (*Client) P2PSignals ¶
func (*Client) Prepare ¶
func (c *Client) Prepare(ctx context.Context, request PrepareRequest) (PrepareResponse, error)
func (*Client) PutManifestEnvelope ¶
func (*Client) ReadReplication ¶
func (*Client) RecipientPublicKey ¶
func (*Client) RelayTransport ¶
func (*Client) ReplicationProfile ¶
func (*Client) ReplicationRoster ¶
func (*Client) SubmitP2PSignal ¶
func (*Client) TaskAction ¶
func (*Client) TaskProgress ¶
func (*Client) TaskProjection ¶
func (*Client) TransferAction ¶
func (*Client) UploadChunk ¶
type CompleteResponse ¶
type DeviceList ¶
type DeviceList struct {
Devices []Device `json:"devices"`
}
type FileEntry ¶
type FileEntry struct {
ID string `json:"id"`
VersionID string `json:"version_id"`
OwnerID string `json:"owner_id"`
DeviceID string `json:"device_id"`
FileName string `json:"file_name"`
RetentionClass string `json:"retention_class"`
State string `json:"state"`
ExpiresAt *time.Time `json:"expires_at,omitempty"`
}
type FileSnapshot ¶
type FileSnapshot struct {
ReferenceKind string `json:"reference_kind"`
ID string `json:"id"`
VersionID string `json:"version_id"`
OwnerID string `json:"owner_id"`
DeviceID string `json:"device_id"`
FileName string `json:"file_name"`
RetentionClass string `json:"retention_class"`
State string `json:"state"`
ExpiresAt *time.Time `json:"expires_at,omitempty"`
Version int64 `json:"version"`
}
type Manifest ¶
type Manifest struct {
VersionID string `json:"version_id"`
ContentRoot string `json:"content_root"`
SizeBytes int64 `json:"size_bytes"`
ChunkSize int `json:"chunk_size"`
ChunkCount int `json:"chunk_count"`
EncryptionSuite string `json:"encryption_suite,omitempty"`
EncryptedManifest []byte `json:"encrypted_manifest,omitempty"`
}
type ManifestEnvelope ¶
type P2PCreateRequest ¶
type P2PCreateRequest struct {
SenderOwnerID string `json:"sender_owner_id"`
SenderDeviceID string `json:"sender_device_id"`
RecipientOwnerID string `json:"recipient_owner_id"`
RecipientDeviceID string `json:"recipient_device_id"`
FileName string `json:"file_name"`
SizeBytes int64 `json:"size_bytes"`
ContentRoot string `json:"content_root"`
EncryptionSuite string `json:"encryption_suite"`
EncryptedManifest []byte `json:"encrypted_manifest"`
SenderEncryptedManifest []byte `json:"sender_encrypted_manifest"`
}
type P2PProgressSnapshot ¶
type P2PProgressSnapshot struct {
TransferID string `json:"transfer_id"`
AttemptID string `json:"attempt_id"`
State string `json:"state"`
StateVersion int64 `json:"state_version"`
ProgressRevision int64 `json:"progress_revision"`
Direction string `json:"direction"`
DisplayMetricID string `json:"display_metric_id"`
ExpiresAt time.Time `json:"expires_at"`
Route struct {
Kind string `json:"kind"`
Epoch int64 `json:"epoch"`
} `json:"route"`
Delivery ByteObservation `json:"delivery"`
Spool struct {
ByteObservation
StateVersion int64 `json:"state_version"`
SealedAt *time.Time `json:"sealed_at"`
} `json:"spool"`
Completion struct {
Delivered bool `json:"delivered"`
Stored bool `json:"stored"`
} `json:"completion"`
Capabilities map[string]bool `json:"capabilities"`
}
type P2PSignalList ¶
type P2PSignalList struct {
Signals []P2PSignal `json:"signals"`
}
type PrepareRequest ¶
type PrepareRequest struct {
ScopeID string `json:"scope_id"`
EncryptionDomainID string `json:"encryption_domain_id"`
OwnerID string `json:"owner_id"`
DeviceID string `json:"device_id"`
FileName string `json:"file_name"`
RetentionClass string `json:"retention_class"`
HashVersion string `json:"hash_version"`
DedupKey string `json:"dedup_key"`
ContentRoot string `json:"content_root"`
SizeBytes int64 `json:"size_bytes"`
ChunkSize int `json:"chunk_size"`
EncryptionSuite string `json:"encryption_suite,omitempty"`
EncryptedManifest []byte `json:"encrypted_manifest,omitempty"`
}
type PrepareResponse ¶
type Pull ¶
type Pull struct {
ID string `json:"id"`
TaskID string `json:"task_id"`
TransferID string `json:"transfer_id,omitempty"`
EntryID string `json:"entry_id"`
DeviceID string `json:"device_id"`
FileName string `json:"file_name"`
ContentRoot string `json:"content_root"`
SizeBytes int64 `json:"size_bytes"`
}
type PullCompleteResponse ¶
type PullCompleteResponse struct {
FirstDelivery bool `json:"first_delivery"`
}
type SyncEvent ¶
type SyncEvent struct {
Sequence int64 `json:"sequence"`
EventID string `json:"event_id"`
EventType string `json:"event_type"`
AggregateID string `json:"aggregate_id"`
AggregateVersion int64 `json:"aggregate_version"`
Payload json.RawMessage `json:"payload"`
OccurredAt time.Time `json:"occurred_at"`
}
type SyncResponse ¶
type Task ¶
type Task struct {
ID string `json:"id"`
Kind string `json:"kind"`
ReferenceID string `json:"reference_id"`
OwnerID string `json:"owner_id"`
DeviceID string `json:"device_id"`
State string `json:"state"`
ProgressBytes int64 `json:"progress_bytes"`
TotalBytes int64 `json:"total_bytes"`
Version int64 `json:"version"`
ErrorCode *string `json:"error_code,omitempty"`
ErrorMessage *string `json:"error_message,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type TaskProjection ¶
type Transfer ¶
type Transfer struct {
ID string `json:"id"`
EntryID *string `json:"entry_id,omitempty"`
DeliveryMode string `json:"delivery_mode"`
SenderOwnerID string `json:"sender_owner_id"`
SenderDeviceID string `json:"sender_device_id"`
RecipientOwnerID string `json:"recipient_owner_id"`
RecipientDeviceID string `json:"recipient_device_id"`
State string `json:"state"`
Version int64 `json:"version"`
FailureReason *string `json:"failure_reason,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
ExpiresAt time.Time `json:"expires_at"`
FileName *string `json:"file_name,omitempty"`
SizeBytes *int64 `json:"size_bytes,omitempty"`
ContentRoot *string `json:"content_root,omitempty"`
EncryptionSuite *string `json:"encryption_suite,omitempty"`
EncryptedManifest []byte `json:"encrypted_manifest,omitempty"`
SenderEncryptedManifest []byte `json:"sender_encrypted_manifest,omitempty"`
ReceivedBytes int64 `json:"received_bytes"`
}
type TransferCreateRequest ¶
type TransferCreateRequest struct {
EntryID string `json:"entry_id"`
DeliveryMode string `json:"delivery_mode"`
SenderOwnerID string `json:"sender_owner_id"`
SenderDeviceID string `json:"sender_device_id"`
RecipientOwnerID string `json:"recipient_owner_id"`
RecipientDeviceID string `json:"recipient_device_id"`
}
type TransferList ¶
Click to show internal directories.
Click to hide internal directories.