Documentation ¶
Index ¶
- Constants
- type ProtectedEntity
- func (this ProtectedEntity) DeleteSnapshot(ctx context.Context, snapshotToDelete astrolabe.ProtectedEntitySnapshotID, ...) (bool, error)
- func (ProtectedEntity) GetCombinedInfo(ctx context.Context) ([]astrolabe.ProtectedEntityInfo, error)
- func (ProtectedEntity) GetComponents(ctx context.Context) ([]astrolabe.ProtectedEntity, error)
- func (this ProtectedEntity) GetDataReader(ctx context.Context) (io.ReadCloser, error)
- func (this ProtectedEntity) GetID() astrolabe.ProtectedEntityID
- func (this ProtectedEntity) GetInfo(ctx context.Context) (astrolabe.ProtectedEntityInfo, error)
- func (ProtectedEntity) GetInfoForSnapshot(ctx context.Context, snapshotID astrolabe.ProtectedEntitySnapshotID) (*astrolabe.ProtectedEntityInfo, error)
- func (this ProtectedEntity) GetMetadataReader(ctx context.Context) (io.ReadCloser, error)
- func (this ProtectedEntity) ListSnapshots(ctx context.Context) ([]astrolabe.ProtectedEntitySnapshotID, error)
- func (this ProtectedEntity) Overwrite(ctx context.Context, sourcePE astrolabe.ProtectedEntity, ...) error
- func (ProtectedEntity) Snapshot(ctx context.Context, params map[string]map[string]interface{}) (astrolabe.ProtectedEntitySnapshotID, error)
- type ProtectedEntityTypeManager
- func (this *ProtectedEntityTypeManager) Copy(ctx context.Context, sourcePE astrolabe.ProtectedEntity, ...) (astrolabe.ProtectedEntity, error)
- func (this *ProtectedEntityTypeManager) CopyFromInfo(ctx context.Context, sourcePEInfo astrolabe.ProtectedEntityInfo, ...) (astrolabe.ProtectedEntity, error)
- func (this *ProtectedEntityTypeManager) GetProtectedEntities(ctx context.Context) ([]astrolabe.ProtectedEntityID, error)
- func (this *ProtectedEntityTypeManager) GetProtectedEntitiesByIDPrefix(ctx context.Context, idPrefix string) ([]astrolabe.ProtectedEntityID, error)
- func (this *ProtectedEntityTypeManager) GetProtectedEntity(ctx context.Context, id astrolabe.ProtectedEntityID) (astrolabe.ProtectedEntity, error)
- func (this *ProtectedEntityTypeManager) GetTypeName() string
- type RepositoryProtectedEntityManager
Constants ¶
const DATA_SUFFIX = ".data"
const MD_SUFFIX = ".md"
* Protected Entities are stored in the S3 repo as 1-3 files. The peinfo file contains the Protected Entity JSON, * the md file contains the Protected Entity metadata, if present and the data file contains the Protected Entity data, * if present. The basic structure of the repository is * <bucket>/<user specified prefix>/<type>/{peinfo, md, data}/<peid>[, .md, .data] * The PEID must have a snapshot component * For example, an IVD would be represented as three S3 objects: * /astrolabe-repo/ivd/peinfo/ivd:e1c3cb20-db88-4c1c-9f02-5f5347e435d5:67469e1c-50a8-4f63-9a6a-ad8a2265197c * /astrolabe-repo/ivd/md/ivd:e1c3cb20-db88-4c1c-9f02-5f5347e435d5:67469e1c-50a8-4f63-9a6a-ad8a2265197c.md * /astrolabe-repo/ivd/data/ivd:e1c3cb20-db88-4c1c-9f02-5f5347e435d5:67469e1c-50a8-4f63-9a6a-ad8a2265197c.data * * The combined stream is not stored in S3 but could be synthesized on demand (figure out how this would actually work)
const MaxBufferSize = 10 * 1024 * 1024 // Let's not get too crazy with buffers
const MaxParts = 10000 // Maximum number of parts we will use
const MinMultiPartSize = 5 * 1024 * 1024
const SegmentSizeLimit = MaxParts * MaxBufferSize
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProtectedEntity ¶
type ProtectedEntity struct {
// contains filtered or unexported fields
}
func NewProtectedEntityFromJSONBuf ¶
func NewProtectedEntityFromJSONBuf(rpetm *ProtectedEntityTypeManager, buf []byte) (pe ProtectedEntity, err error)
func NewProtectedEntityFromJSONReader ¶
func NewProtectedEntityFromJSONReader(rpetm *ProtectedEntityTypeManager, reader io.Reader) (pe ProtectedEntity, err error)
func (ProtectedEntity) DeleteSnapshot ¶
func (this ProtectedEntity) DeleteSnapshot(ctx context.Context, snapshotToDelete astrolabe.ProtectedEntitySnapshotID, params map[string]map[string]interface{}) (bool, error)
func (ProtectedEntity) GetCombinedInfo ¶
func (ProtectedEntity) GetCombinedInfo(ctx context.Context) ([]astrolabe.ProtectedEntityInfo, error)
func (ProtectedEntity) GetComponents ¶
func (ProtectedEntity) GetComponents(ctx context.Context) ([]astrolabe.ProtectedEntity, error)
func (ProtectedEntity) GetDataReader ¶
func (this ProtectedEntity) GetDataReader(ctx context.Context) (io.ReadCloser, error)
func (ProtectedEntity) GetID ¶
func (this ProtectedEntity) GetID() astrolabe.ProtectedEntityID
func (ProtectedEntity) GetInfo ¶
func (this ProtectedEntity) GetInfo(ctx context.Context) (astrolabe.ProtectedEntityInfo, error)
func (ProtectedEntity) GetInfoForSnapshot ¶
func (ProtectedEntity) GetInfoForSnapshot(ctx context.Context, snapshotID astrolabe.ProtectedEntitySnapshotID) (*astrolabe.ProtectedEntityInfo, error)
func (ProtectedEntity) GetMetadataReader ¶
func (this ProtectedEntity) GetMetadataReader(ctx context.Context) (io.ReadCloser, error)
func (ProtectedEntity) ListSnapshots ¶
func (this ProtectedEntity) ListSnapshots(ctx context.Context) ([]astrolabe.ProtectedEntitySnapshotID, error)
func (ProtectedEntity) Overwrite ¶ added in v0.2.0
func (this ProtectedEntity) Overwrite(ctx context.Context, sourcePE astrolabe.ProtectedEntity, params map[string]map[string]interface{}, overwriteComponents bool) error
func (ProtectedEntity) Snapshot ¶
func (ProtectedEntity) Snapshot(ctx context.Context, params map[string]map[string]interface{}) (astrolabe.ProtectedEntitySnapshotID, error)
type ProtectedEntityTypeManager ¶
type ProtectedEntityTypeManager struct {
// contains filtered or unexported fields
}
* ProtectedEntityTypeManager for an S3 repository acts as a passive, generic Protected Entity Type Manager * Protected Entities served by the type manager do not change and are always read-only.
func NewS3RepositoryProtectedEntityTypeManager ¶
func NewS3RepositoryProtectedEntityTypeManager(typeName string, session session.Session, bucket string, prefix string, logger logrus.FieldLogger) (*ProtectedEntityTypeManager, error)
func (*ProtectedEntityTypeManager) Copy ¶
func (this *ProtectedEntityTypeManager) Copy(ctx context.Context, sourcePE astrolabe.ProtectedEntity, params map[string]map[string]interface{}, options astrolabe.CopyCreateOptions) (astrolabe.ProtectedEntity, error)
func (*ProtectedEntityTypeManager) CopyFromInfo ¶
func (this *ProtectedEntityTypeManager) CopyFromInfo(ctx context.Context, sourcePEInfo astrolabe.ProtectedEntityInfo, params map[string]map[string]interface{}, options astrolabe.CopyCreateOptions) (astrolabe.ProtectedEntity, error)
func (*ProtectedEntityTypeManager) GetProtectedEntities ¶
func (this *ProtectedEntityTypeManager) GetProtectedEntities(ctx context.Context) ([]astrolabe.ProtectedEntityID, error)
func (*ProtectedEntityTypeManager) GetProtectedEntitiesByIDPrefix ¶
func (this *ProtectedEntityTypeManager) GetProtectedEntitiesByIDPrefix(ctx context.Context, idPrefix string) ([]astrolabe.ProtectedEntityID, error)
func (*ProtectedEntityTypeManager) GetProtectedEntity ¶
func (this *ProtectedEntityTypeManager) GetProtectedEntity(ctx context.Context, id astrolabe.ProtectedEntityID) (astrolabe.ProtectedEntity, error)
func (*ProtectedEntityTypeManager) GetTypeName ¶
func (this *ProtectedEntityTypeManager) GetTypeName() string
type RepositoryProtectedEntityManager ¶
type RepositoryProtectedEntityManager struct {
// contains filtered or unexported fields
}