Documentation
¶
Index ¶
- Constants
- Variables
- type BatchCheckResult
- type BlobFact
- type CommitRequest
- type CommitResult
- type Conflict
- type Envelope
- type Head
- type Layout
- type Lock
- type Manifest
- type ManifestDelete
- type ManifestEntry
- type MemoryTransport
- func (m *MemoryTransport) AcquireLock(_ context.Context, lock Lock, now time.Time) error
- func (m *MemoryTransport) BatchCheck(_ context.Context, blobIDs []string) (BatchCheckResult, error)
- func (m *MemoryTransport) CommitRevision(_ context.Context, req CommitRequest) (CommitResult, error)
- func (m *MemoryTransport) CurrentHead(_ context.Context, vaultID string) (Head, error)
- func (m *MemoryTransport) GetBlob(_ context.Context, blobID string) (Envelope, error)
- func (m *MemoryTransport) GetManifest(_ context.Context, blobID string) (Envelope, error)
- func (m *MemoryTransport) PutBlob(_ context.Context, blobID string, envelope Envelope) error
- func (m *MemoryTransport) PutManifest(_ context.Context, blobID string, envelope Envelope) error
- type ObjectRef
- type ObjectStoreTransport
- func (t *ObjectStoreTransport) BatchCheck(ctx context.Context, blobIDs []string) (BatchCheckResult, error)
- func (t *ObjectStoreTransport) CommitRevision(ctx context.Context, req CommitRequest) (CommitResult, error)
- func (t *ObjectStoreTransport) CurrentHead(ctx context.Context, vaultID string) (Head, error)
- func (t *ObjectStoreTransport) GetBlob(ctx context.Context, blobID string) (Envelope, error)
- func (t *ObjectStoreTransport) GetManifest(ctx context.Context, blobID string) (Envelope, error)
- func (t *ObjectStoreTransport) PutBlob(ctx context.Context, blobID string, envelope Envelope) error
- func (t *ObjectStoreTransport) PutManifest(ctx context.Context, blobID string, envelope Envelope) error
- type Revision
- type Transport
Constants ¶
View Source
const ( EnvelopeSchemaVersion = syncwire.EnvelopeSchemaVersion HeadSchemaVersion = "pinax.cloud.head.v1" RevisionSchemaVersion = "pinax.cloud.revision.v1" ManifestSchemaVersionV1 = syncwire.ManifestSchemaVersionV1 ManifestSchemaVersionV2 = syncwire.ManifestSchemaVersionV2 ManifestSchemaVersion = syncwire.ManifestSchemaVersion ConflictSchemaVersion = "pinax.cloud.conflict.v1" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BatchCheckResult ¶
type CommitRequest ¶
type CommitResult ¶
type Conflict ¶
type Envelope ¶
Envelope is the syncwire envelope; cloudsync aliases it so the transport layer and the encryption helpers share one wire schema.
type Manifest ¶
Manifest wire types are owned by syncwire; aliases keep cloudsync.* identifiers working with a single on-wire schema.
type ManifestDelete ¶ added in v0.1.3
type ManifestDelete = syncwire.ManifestDelete
Manifest wire types are owned by syncwire; aliases keep cloudsync.* identifiers working with a single on-wire schema.
type ManifestEntry ¶
type ManifestEntry = syncwire.ManifestEntry
Manifest wire types are owned by syncwire; aliases keep cloudsync.* identifiers working with a single on-wire schema.
type MemoryTransport ¶
type MemoryTransport struct {
// contains filtered or unexported fields
}
func NewMemoryTransport ¶
func NewMemoryTransport(layout Layout) *MemoryTransport
func (*MemoryTransport) AcquireLock ¶
func (*MemoryTransport) BatchCheck ¶
func (m *MemoryTransport) BatchCheck(_ context.Context, blobIDs []string) (BatchCheckResult, error)
func (*MemoryTransport) CommitRevision ¶
func (m *MemoryTransport) CommitRevision(_ context.Context, req CommitRequest) (CommitResult, error)
func (*MemoryTransport) CurrentHead ¶
func (*MemoryTransport) GetManifest ¶
func (*MemoryTransport) PutManifest ¶
type ObjectStoreTransport ¶
type ObjectStoreTransport struct {
// contains filtered or unexported fields
}
func NewObjectStoreTransport ¶
func NewObjectStoreTransport(store remote.BlobStore, layout Layout) *ObjectStoreTransport
func (*ObjectStoreTransport) BatchCheck ¶
func (t *ObjectStoreTransport) BatchCheck(ctx context.Context, blobIDs []string) (BatchCheckResult, error)
func (*ObjectStoreTransport) CommitRevision ¶
func (t *ObjectStoreTransport) CommitRevision(ctx context.Context, req CommitRequest) (CommitResult, error)
func (*ObjectStoreTransport) CurrentHead ¶
func (*ObjectStoreTransport) GetManifest ¶
func (*ObjectStoreTransport) PutManifest ¶
type Revision ¶
type Revision struct {
SchemaVersion string `json:"schema_version"`
RevisionID string `json:"revision_id"`
ParentRevisionID string `json:"parent_revision_id"`
ManifestBlobID string `json:"manifest_blob_id"`
BlobIDs []string `json:"blob_ids"`
CreatedAt string `json:"created_at"`
CreatedByDevice string `json:"created_by_device"`
}
type Transport ¶
type Transport interface {
CurrentHead(ctx context.Context, vaultID string) (Head, error)
BatchCheck(ctx context.Context, blobIDs []string) (BatchCheckResult, error)
PutBlob(ctx context.Context, blobID string, envelope Envelope) error
GetBlob(ctx context.Context, blobID string) (Envelope, error)
PutManifest(ctx context.Context, blobID string, envelope Envelope) error
GetManifest(ctx context.Context, blobID string) (Envelope, error)
CommitRevision(ctx context.Context, req CommitRequest) (CommitResult, error)
}
Click to show internal directories.
Click to hide internal directories.