s3repository

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2020 License: Apache-2.0 Imports: 16 Imported by: 4

Documentation

Index

Constants

View Source
const DATA_SUFFIX = ".data"
View Source
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>/astrolabe-repo/<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)

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) (bool, error)

func (ProtectedEntity) GetCombinedInfo

func (ProtectedEntity) GetComponents

func (ProtectedEntity) GetDataReader

func (this ProtectedEntity) GetDataReader(context.Context) (io.ReadCloser, error)

func (ProtectedEntity) GetID

func (ProtectedEntity) GetInfo

func (ProtectedEntity) GetInfoForSnapshot

func (ProtectedEntity) GetMetadataReader

func (this ProtectedEntity) GetMetadataReader(context.Context) (io.Reader, error)

func (ProtectedEntity) ListSnapshots

func (ProtectedEntity) Snapshot

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, logger logrus.FieldLogger) (*ProtectedEntityTypeManager, error)

func (*ProtectedEntityTypeManager) Copy

func (*ProtectedEntityTypeManager) CopyFromInfo

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 (*ProtectedEntityTypeManager) GetTypeName

func (this *ProtectedEntityTypeManager) GetTypeName() string

type RepositoryProtectedEntityManager

type RepositoryProtectedEntityManager struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL