Documentation
¶
Index ¶
- Variables
- func Construct(cfg Config) (storage.Service, error)
- type Config
- type DynamoAcceptanceStore
- func (d *DynamoAcceptanceStore) Get(ctx context.Context, mh multihash.Multihash, space did.DID) (acceptance.Acceptance, error)
- func (d *DynamoAcceptanceStore) List(ctx context.Context, mh multihash.Multihash, ...) ([]acceptance.Acceptance, error)
- func (d *DynamoAcceptanceStore) Put(ctx context.Context, acc acceptance.Acceptance) error
- type DynamoAllocationStore
- func (d *DynamoAllocationStore) Get(ctx context.Context, mh multihash.Multihash, space did.DID) (allocation.Allocation, error)
- func (d *DynamoAllocationStore) List(ctx context.Context, mh multihash.Multihash, ...) ([]allocation.Allocation, error)
- func (d *DynamoAllocationStore) Put(ctx context.Context, alloc allocation.Allocation) error
- type DynamoProviderContextTable
- func (d *DynamoProviderContextTable) Delete(ctx context.Context, p peer.ID, contextID []byte) error
- func (d *DynamoProviderContextTable) Get(ctx context.Context, p peer.ID, contextID []byte) ([]byte, error)
- func (d *DynamoProviderContextTable) Put(ctx context.Context, p peer.ID, contextID []byte, data []byte) error
- type DynamoRanLinkIndex
- type HandlerContext
- type KeyFormatterFunc
- type S3BlobPresigner
- type S3BlobStore
- func (s *S3BlobStore) Get(ctx context.Context, digest multihash.Multihash, opts ...blobstore.GetOption) (blobstore.Object, error)
- func (s *S3BlobStore) PresignClient() presigner.RequestPresigner
- func (s *S3BlobStore) Put(ctx context.Context, digest multihash.Multihash, size uint64, body io.Reader) error
- type S3IndexerProofs
- type S3Store
Constants ¶
This section is empty.
Variables ¶
var ErrDynamoRecordNotFound = errors.New("no record found in dynamo table")
ErrDynamoRecordNotFound is used when there is no record in a dynamo table (given that GetItem does not actually error)
var ErrIndexingServiceProofsMissing = errors.New("indexing service proofs are missing")
var ErrMissingSecret = errors.New("missing value for secret")
ErrMissingSecret means that the value returned from Secrets was empty
Functions ¶
Types ¶
type Config ¶
type Config struct {
Config aws.Config
S3Options []func(*s3.Options)
DynamoOptions []func(*dynamodb.Options)
SentryDSN string
SentryEnvironment string
AllocationsTableName string
AcceptanceTableName string
BlobStoreBucketEndpoint string
BlobStoreBucketRegion string
BlobStoreBucketAccessKeyID string
BlobStoreBucketSecretAccessKey string
BlobStoreBucketKeyPattern string
BlobStoreBucket string
AggregatesBucket string
AggregatesPrefix string
BufferBucket string
BufferPrefix string
ChunkLinksTableName string
MetadataTableName string
IPNIStoreBucket string
IPNIStorePrefix string
IPNIAnnounceURLs []url.URL
ClaimStoreBucket string
ClaimStorePrefix string
PublicURL string
IndexingServiceDID string
IndexingServiceURL string
IndexingServiceProof string
UploadServiceDID did.DID
UploadServiceURL *url.URL
IPNIPublisherAnnounceAddress string
BlobsPublicURL string
RanLinkIndexTableName string
ReceiptStoreBucket string
ReceiptStorePrefix string
SQSPublishingQueueID string
SQSAdvertisementPublishingQueueID string
PublishingBucket string
PrincipalMapping map[string]string
principal.Signer
}
type DynamoAcceptanceStore ¶ added in v0.0.18
type DynamoAcceptanceStore struct {
// contains filtered or unexported fields
}
DynamoAcceptanceStore implements the AcceptanceStore interface on dynamodb
func NewDynamoAcceptanceStore ¶ added in v0.0.18
func NewDynamoAcceptanceStore(cfg aws.Config, tableName string, opts ...func(*dynamodb.Options)) *DynamoAcceptanceStore
NewDynamoAcceptanceStore returns an AcceptanceStore connected to a AWS DynamoDB table
func (*DynamoAcceptanceStore) Get ¶ added in v0.0.18
func (d *DynamoAcceptanceStore) Get(ctx context.Context, mh multihash.Multihash, space did.DID) (acceptance.Acceptance, error)
func (*DynamoAcceptanceStore) List ¶ added in v0.0.18
func (d *DynamoAcceptanceStore) List(ctx context.Context, mh multihash.Multihash, options ...acceptancestore.ListOption) ([]acceptance.Acceptance, error)
List implements acceptancestore.AcceptanceStore.
func (*DynamoAcceptanceStore) Put ¶ added in v0.0.18
func (d *DynamoAcceptanceStore) Put(ctx context.Context, acc acceptance.Acceptance) error
Put implements acceptancestore.AcceptanceStore.
type DynamoAllocationStore ¶
type DynamoAllocationStore struct {
// contains filtered or unexported fields
}
DynamoAllocationStore implements the AllocationStore interface on dynamodb
func NewDynamoAllocationStore ¶
func NewDynamoAllocationStore(cfg aws.Config, tableName string, opts ...func(*dynamodb.Options)) *DynamoAllocationStore
NewDynamoAllocationStore returns an AllocationStore connected to a AWS DynamoDB table
func (*DynamoAllocationStore) Get ¶ added in v0.0.14
func (d *DynamoAllocationStore) Get(ctx context.Context, mh multihash.Multihash, space did.DID) (allocation.Allocation, error)
func (*DynamoAllocationStore) List ¶
func (d *DynamoAllocationStore) List(ctx context.Context, mh multihash.Multihash, options ...allocationstore.ListOption) ([]allocation.Allocation, error)
List implements allocationstore.AllocationStore.
func (*DynamoAllocationStore) Put ¶
func (d *DynamoAllocationStore) Put(ctx context.Context, alloc allocation.Allocation) error
Put implements allocationstore.AllocationStore.
type DynamoProviderContextTable ¶
type DynamoProviderContextTable struct {
// contains filtered or unexported fields
}
DynamoProviderContextTable implements the store.ProviderContextTable interface on dynamodb
func NewDynamoProviderContextTable ¶
func NewDynamoProviderContextTable(cfg aws.Config, tableName string, opts ...func(*dynamodb.Options)) *DynamoProviderContextTable
NewDynamoProviderContextTable returns a ProviderContextTable connected to a AWS DynamoDB table
type DynamoRanLinkIndex ¶
type DynamoRanLinkIndex struct {
// contains filtered or unexported fields
}
DynamoRanLinkIndex implements the store.ProviderContextTable interface on dynamodb
func NewDynamoRanLinkIndex ¶
func NewDynamoRanLinkIndex(cfg aws.Config, tableName string, opts ...func(*dynamodb.Options)) *DynamoRanLinkIndex
NewDynamoRanLinkIndex returns a ProviderContextTable connected to a AWS DynamoDB table
type HandlerContext ¶ added in v0.0.13
type HandlerContext struct {
// contains filtered or unexported fields
}
func NewHandlerContext ¶ added in v0.0.13
func NewHandlerContext(w http.ResponseWriter, r *http.Request) *HandlerContext
NewHandlerContext creates a new context that satisfies [server.RequestContext] and allows echo style handlers to be used with AWS lambda.
func (*HandlerContext) Request ¶ added in v0.0.13
func (c *HandlerContext) Request() *http.Request
func (*HandlerContext) Response ¶ added in v0.0.13
func (c *HandlerContext) Response() *echo.Response
type KeyFormatterFunc ¶
func NewPatternKeyFormatter ¶
func NewPatternKeyFormatter(pattern string) KeyFormatterFunc
NewPatternKeyFormatter creates a key formatter which replaces instances of "{blob}" in the provided pattern with the base58btc encoding of the multihash digest.
type S3BlobPresigner ¶
type S3BlobPresigner struct {
// contains filtered or unexported fields
}
type S3BlobStore ¶
type S3BlobStore struct {
// contains filtered or unexported fields
}
S3BlobStore implements the blobstore.BlobStore interface on S3
func NewS3BlobStore ¶
func NewS3BlobStore(cfg aws.Config, bucket string, formatKey KeyFormatterFunc, opts ...func(*s3.Options)) *S3BlobStore
func (*S3BlobStore) Get ¶
func (s *S3BlobStore) Get(ctx context.Context, digest multihash.Multihash, opts ...blobstore.GetOption) (blobstore.Object, error)
Get implements blobstore.Blobstore.
func (*S3BlobStore) PresignClient ¶
func (s *S3BlobStore) PresignClient() presigner.RequestPresigner
type S3IndexerProofs ¶
type S3IndexerProofs struct {
// contains filtered or unexported fields
}
S3IndexerProofs returns delegation proofs for the indexer
func NewS3IndexerProofs ¶
func (*S3IndexerProofs) Get ¶
func (s *S3IndexerProofs) Get(ctx context.Context) ([]delegation.Proof, error)
Get implements store.Store.
type S3Store ¶
type S3Store struct {
// contains filtered or unexported fields
}
S3Store implements the store.Store interface on S3