Documentation
¶
Index ¶
- func NewHandler(server server.ServerView[server.Service]) handler.Func
- func NewUCANServer(storageService Service, options ...server.Option) (server.ServerView[server.Service], error)
- type Option
- func WithAcceptanceDatastore(dstore datastore.Datastore) Option
- func WithAcceptanceStore(acceptanceStore acceptancestore.AcceptanceStore) Option
- func WithAllocationDatastore(dstore datastore.Datastore) Option
- func WithAllocationStore(allocationStore allocationstore.AllocationStore) Option
- func WithAsyncPublisher(p publisher.AsyncPublisher) Option
- func WithBlobsAccess(access access.Access) Option
- func WithBlobsPresigner(blobStorePresigner presigner.RequestPresigner) Option
- func WithBlobsPublicURL(blobStorePublicURL url.URL) Option
- func WithBlobstore(blobStore blobstore.Blobstore) Option
- func WithClaimDatastore(dstore datastore.Datastore) Option
- func WithClaimStore(claimStore claimstore.ClaimStore) Option
- func WithClaimValidationContext(ctx validator.ClaimContext) Option
- func WithIdentity(signer principal.Signer) Option
- func WithLogLevel(name string, level string) Option
- func WithPublicURL(url url.URL) Option
- func WithPublisherAnnounceAddress(addr multiaddr.Multiaddr) Option
- func WithPublisherBlobAddress(addr multiaddr.Multiaddr) Option
- func WithPublisherDatastore(dstore datastore.Datastore) Option
- func WithPublisherDirectAnnounce(announceURLs ...url.URL) Option
- func WithPublisherIndexingService(conn client.Connection) Option
- func WithPublisherIndexingServiceConfig(serviceDID ucan.Principal, serviceURL url.URL) Option
- func WithPublisherIndexingServiceProof(proof ...delegation.Proof) Option
- func WithPublisherStore(publisherStore store.PublisherStore) Option
- func WithReceiptDatastore(dstore datastore.Datastore) Option
- func WithReceiptStore(receiptStore receiptstore.ReceiptStore) Option
- func WithReplicatorDB(db *sql.DB) Option
- type Server
- type Service
- type StorageService
- func (s *StorageService) Blobs() blobs.Blobs
- func (s *StorageService) ClaimValidationContext() validator.ClaimContext
- func (s *StorageService) Claims() claims.Claims
- func (s *StorageService) Close(ctx context.Context) error
- func (s *StorageService) ID() principal.Signer
- func (s *StorageService) PDP() pdp.PDP
- func (s *StorageService) Receipts() receiptstore.ReceiptStore
- func (s *StorageService) Replicator() replicator.Replicator
- func (s *StorageService) Startup(ctx context.Context) error
- func (s *StorageService) UploadConnection() client.Connection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewUCANServer ¶
Types ¶
type Option ¶
type Option func(*config) error
func WithAcceptanceDatastore ¶ added in v0.0.18
WithAcceptanceDatastore configures the underlying datastore to use for storing acceptance records. Note: the datastore MUST have efficient support for prefix queries.
func WithAcceptanceStore ¶ added in v0.0.18
func WithAcceptanceStore(acceptanceStore acceptancestore.AcceptanceStore) Option
WithAcceptanceStore configures the acceptance store directly
func WithAllocationDatastore ¶
WithAllocationDatastore configures the underlying datastore to use for storing allocation records. Note: the datastore MUST have efficient support for prefix queries.
func WithAllocationStore ¶
func WithAllocationStore(allocationStore allocationstore.AllocationStore) Option
WithAllocationStore configures the allocation store directly
func WithAsyncPublisher ¶ added in v0.0.17
func WithAsyncPublisher(p publisher.AsyncPublisher) Option
WithAsyncPublisher configures the async publisher for IPNI advertisements (overrides any publisher specific config)
func WithBlobsAccess ¶
WithBlobsAccess configures the access instance for blob storage.
func WithBlobsPresigner ¶
func WithBlobsPresigner(blobStorePresigner presigner.RequestPresigner) Option
WithBlobsPresigner configures the blob storage to use a set presigner
func WithBlobsPublicURL ¶
WithBlobsPublicURL configures the blob storage to use a public URL
func WithBlobstore ¶
WithBlobstore configures the blob storage to use.
func WithClaimDatastore ¶
WithClaimDatastore configures the underlying datastore to use for storing content claims made by this node.
func WithClaimStore ¶
func WithClaimStore(claimStore claimstore.ClaimStore) Option
WithClaimStore configures the store for content claims directly
func WithClaimValidationContext ¶ added in v0.0.17
func WithClaimValidationContext(ctx validator.ClaimContext) Option
WithClaimValidationContext configures the validation context for use when validating UCANs.
func WithIdentity ¶
WithIdentity configures the storage service identity, used to sign UCAN invocations and receipts.
func WithLogLevel ¶
WithLogLevel changes the log level of a specific subsystem name=="*" changes all subsystems.
func WithPublicURL ¶
WithPublicURL configures the URL this storage node will be publically accessible from.
func WithPublisherAnnounceAddress ¶
WithPublisherAnnounceAddress sets the address put into announce messages to tell indexers where to fetch advertisements from.
func WithPublisherBlobAddress ¶
WithPublisherBlobAddress sets the multiaddr for blobs used by the publisher
func WithPublisherDatastore ¶
WithPublisherDatastore configures the underlying datastore to use for storing IPNI advertisements and their entries.
func WithPublisherDirectAnnounce ¶
WithPublisherDirectAnnounce sets IPNI node URLs to send direct HTTP announcements to.
func WithPublisherIndexingService ¶
func WithPublisherIndexingService(conn client.Connection) Option
WithPublisherIndexingService sets the client connection to the indexing UCAN service.
func WithPublisherIndexingServiceConfig ¶
WithPublisherIndexingServiceConfig configures UCAN service invocation details for communicating with the indexing service.
func WithPublisherIndexingServiceProof ¶
func WithPublisherIndexingServiceProof(proof ...delegation.Proof) Option
WithPublisherIndexingServiceProof configures proofs for UCAN invocations to the indexing service.
func WithPublisherStore ¶
func WithPublisherStore(publisherStore store.PublisherStore) Option
WithPublisherStore configures the store for IPNI advertisements and their entries directly.
func WithReceiptDatastore ¶
WithReceiptDatastore configures the underlying datastore for use storing receipts made for this node
func WithReceiptStore ¶
func WithReceiptStore(receiptStore receiptstore.ReceiptStore) Option
WithReceiptStore configures the store for receipts directly
func WithReplicatorDB ¶ added in v0.0.6
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) RegisterRoutes ¶ added in v0.0.12
type Service ¶
type Service interface {
// ID is the storage service identity, used to sign UCAN invocations and receipts.
ID() principal.Signer
// PDP handles PDP aggregation
PDP() pdp.PDP
// Blobs provides access to the blobs service.
Blobs() blobs.Blobs
// Claims provides access to the claims service.
Claims() claims.Claims
// Receipts provides access to receipts
Receipts() receiptstore.ReceiptStore
// Replicator provides access to the replication service
Replicator() replicator.Replicator
// UploadConnection provides the connection details to an upload service
UploadConnection() client.Connection
// ClaimValidationContext provides the context required for validating UCANs.
ClaimValidationContext() validator.ClaimContext
}
type StorageService ¶
func New ¶
func New(uploadServiceConn client.Connection, opts ...Option) (*StorageService, error)
func (*StorageService) Blobs ¶
func (s *StorageService) Blobs() blobs.Blobs
func (*StorageService) ClaimValidationContext ¶ added in v0.0.17
func (s *StorageService) ClaimValidationContext() validator.ClaimContext
func (*StorageService) Claims ¶
func (s *StorageService) Claims() claims.Claims
func (*StorageService) ID ¶
func (s *StorageService) ID() principal.Signer
func (*StorageService) PDP ¶
func (s *StorageService) PDP() pdp.PDP
func (*StorageService) Receipts ¶
func (s *StorageService) Receipts() receiptstore.ReceiptStore
func (*StorageService) Replicator ¶
func (s *StorageService) Replicator() replicator.Replicator
func (*StorageService) UploadConnection ¶
func (s *StorageService) UploadConnection() client.Connection