// New returns a new ActivityPub storage provider.
// If multipleTagQueryCapable is set to true, then reference queries can be done using both the object IRI and activity
// type tags at the same time. NodeInfo uses this to optimize memory usage. Right now only the MongoDB provider
// supports this setting.
New returns a new ActivityPub storage provider.
If multipleTagQueryCapable is set to true, then reference queries can be done using both the object IRI and activity
type tags at the same time. NodeInfo uses this to optimize memory usage. Right now only the MongoDB provider
supports this setting.
// New returns a new ActivityPub storage provider . // If multipleTagQueryCapable is set to true then reference queries can be done using both the object IRI and activity // type tags at the same time . NodeInfo uses this to optimize memory usage . Right now only the MongoDB provider // supports this setting .
func New(serviceName string, provider ariesstorage.Provider, multipleTagQueryCapable bool) (*Provider, error) {
	stores, err := openStores(provider)
	if err != nil {
		return nil, fmt.Errorf("failed to open stores: %w", err)
	}
	return &Provider{
		serviceName:             serviceName,
		activityStore:           stores.activities,
		referenceStore:          stores.reference,
		actorStore:              stores.actor,
		multipleTagQueryCapable: multipleTagQueryCapable,
	}, nil
}
func New ( serviceName string , provider ariesstorage . Provider , multipleTagQueryCapable bool ) ( * Provider , error ) { stores , err := openStores ( provider ) if err != nil { return nil , fmt . Errorf ( " " , err ) } return & Provider { serviceName : serviceName , activityStore : stores . activities , referenceStore : stores . reference , actorStore : stores . actor , multipleTagQueryCapable : multipleTagQueryCapable , } , nil }
New returns a new ActivityPub storage provider.
New returns a new ActivityPub storage provider .