repository

package
v1.2.0-beta.14 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticityRepository

type AuthenticityRepository interface {
	SignWithLocalKey(ctx context.Context, data []byte, localKey key.LocalKey) (string, *record.Record, error)
	SignWithManagedKey(ctx context.Context, data []byte, managedKey key.ManagedKey) (string, *record.Record, error)
	SignWithLocalCertificate(ctx context.Context, data []byte, localCertificate key.LocalCertificate) (string, *record.Record, error)
	SignWithManagedCertificate(ctx context.Context, data []byte, managedCertificate key.ManagedCertificate) (string, *record.Record, error)
}

type AvailabilityRepository

type AvailabilityRepository interface {
	UploadHosted(ctx context.Context, file *domain.File, record record.Record) (string, error)
	UploadIpfs(ctx context.Context, file *domain.File, record record.Record) (string, error)
	UploadLocal(ctx context.Context, file *domain.File) (string, error)
	UploadTmp(ctx context.Context, file *domain.File, record record.Record) (string, error)
	RetrieveTmp(ctx context.Context, filename string) ([]byte, error)
	FindFile(ctx context.Context, dataID string) ([]byte, error)
}

type EncryptionRepository

type EncryptionRepository interface {
	EncryptWithLocalKey(ctx context.Context, data []byte, localKey key.LocalKey) (*record.Record, error)
	EncryptWithManagedKey(ctx context.Context, data []byte, managedKey key.ManagedKey) (*record.Record, error)
	EncryptWithManagedCertificate(ctx context.Context, data []byte, managedCertificate key.ManagedCertificate) (*record.Record, error)
}

type IntegrityRepository

type IntegrityRepository interface {
	Certify(ctx context.Context, file []byte) (domain.Certification, error)
}

type KeyRepository

type KeyRepository interface {
	LoadLocalKey(ctx context.Context, kty key.KeyType, key string) (*key.LocalKey, error)
	LoadManagedKey(ctx context.Context, kid string) (*key.ManagedKey, error)
	LoadLocalCertificate(ctx context.Context, pkcs12 []byte, pkcs12Password string) (*key.LocalCertificate, error)
	LoadManagedCertificate(ctx context.Context, kid string) (*key.ManagedCertificate, error)
}

type LocalStorageRepository

type LocalStorageRepository interface {
	Save(ctx context.Context, data []byte, filename string) error
	Retrieve(ctx context.Context, directory string, filename string) ([]byte, error)
}

type MetadataRepository

type MetadataRepository interface {
	SaveCertification(ctx context.Context, certification domain.Certification) error
	GetCertificationsByAnchorID(ctx context.Context, anchor int) (certification []domain.Certification, err error)
	ExistCertificationByHash(ctx context.Context, hash string) (bool, error)
	UpdateCertificationDataID(ctx context.Context, certification domain.Certification) error
	UpdateCertification(ctx context.Context, certification domain.Certification) error

	GetRecord(ctx context.Context, file []byte) (*record.Record, error)
	GetRecordDetails(ctx context.Context, file []byte) (*record.RecordDetails, error)
	GetFileHash(ctx context.Context, file []byte) (string, error)
}

type NotificationRepository

type NotificationRepository interface {
	NotifyCertification(hash string, file []byte) error
}

Directories

Path Synopsis
Package mock_repository is a generated GoMock package.
Package mock_repository is a generated GoMock package.

Jump to

Keyboard shortcuts

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