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 = "pinax.cloud.envelope.v1" HeadSchemaVersion = "pinax.cloud.head.v1" RevisionSchemaVersion = "pinax.cloud.revision.v1" ManifestSchemaVersion = "pinax.cloud.manifest.v1" ConflictSchemaVersion = "pinax.cloud.conflict.v1" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BatchCheckResult ¶
type CommitRequest ¶
type CommitResult ¶
type Conflict ¶
type Envelope ¶
type Manifest ¶
type Manifest struct {
SchemaVersion string `json:"schema_version"`
Entries []ManifestEntry `json:"entries"`
Deletes []ManifestDelete `json:"deletes,omitempty"`
}
type ManifestDelete ¶ added in v0.1.3
type ManifestEntry ¶
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.