repository

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidResponse = errors.New("record couldn't send")

Functions

func NewBloockKeyRepository

func NewBloockKeyRepository(ctx context.Context, l zerolog.Logger) repository.KeyRepository

func NewMessageAggregatorRepository added in v1.3.0

func NewMessageAggregatorRepository(ctx context.Context, l zerolog.Logger, ent *connection.EntConnection) repository.MessageAggregatorRepository

func NewProcessRepository added in v1.3.0

Types

type BloockAuthenticityRepository

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

func (BloockAuthenticityRepository) SignWithLocalCertificate

func (b BloockAuthenticityRepository) SignWithLocalCertificate(ctx context.Context, data []byte, localCertificate key.LocalCertificate) (string, *record.Record, error)

func (BloockAuthenticityRepository) SignWithLocalKey

func (b BloockAuthenticityRepository) SignWithLocalKey(ctx context.Context, data []byte, localKey key.LocalKey) (string, *record.Record, error)

func (BloockAuthenticityRepository) SignWithManagedCertificate

func (b BloockAuthenticityRepository) SignWithManagedCertificate(ctx context.Context, data []byte, managedCertificate key.ManagedCertificate, accessControl *key.AccessControl) (string, *record.Record, error)

func (BloockAuthenticityRepository) SignWithManagedKey

func (b BloockAuthenticityRepository) SignWithManagedKey(ctx context.Context, data []byte, managedKey key.ManagedKey, accessControl *key.AccessControl) (string, *record.Record, error)

type BloockAvailabilityRepository

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

func (BloockAvailabilityRepository) FindFile

func (b BloockAvailabilityRepository) FindFile(ctx context.Context, id string) ([]byte, error)

func (BloockAvailabilityRepository) RetrieveLocal added in v1.3.0

func (b BloockAvailabilityRepository) RetrieveLocal(ctx context.Context, filePath string) ([]byte, error)

func (BloockAvailabilityRepository) RetrieveTmp

func (b BloockAvailabilityRepository) RetrieveTmp(ctx context.Context, filename string) ([]byte, error)

func (BloockAvailabilityRepository) UploadHosted

func (b BloockAvailabilityRepository) UploadHosted(ctx context.Context, file *domain.File, record record.Record) (string, error)

func (BloockAvailabilityRepository) UploadIpfs

func (b BloockAvailabilityRepository) UploadIpfs(ctx context.Context, file *domain.File, record record.Record) (string, error)

func (BloockAvailabilityRepository) UploadLocal

func (b BloockAvailabilityRepository) UploadLocal(ctx context.Context, file *domain.File) (string, error)

func (BloockAvailabilityRepository) UploadTmp

func (b BloockAvailabilityRepository) UploadTmp(ctx context.Context, file *domain.File, record record.Record) (string, error)

type BloockEncryptionRepository

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

func (BloockEncryptionRepository) EncryptWithLocalKey

func (b BloockEncryptionRepository) EncryptWithLocalKey(ctx context.Context, data []byte, localKey key.LocalKey) (*record.Record, error)

func (BloockEncryptionRepository) EncryptWithManagedCertificate

func (b BloockEncryptionRepository) EncryptWithManagedCertificate(ctx context.Context, data []byte, managedCertificate key.ManagedCertificate, accessControl *key.AccessControl) (*record.Record, error)

func (BloockEncryptionRepository) EncryptWithManagedKey

func (b BloockEncryptionRepository) EncryptWithManagedKey(ctx context.Context, data []byte, managedKey key.ManagedKey, accessControl *key.AccessControl) (*record.Record, error)

func (BloockEncryptionRepository) LoadLocalCertificate

func (b BloockEncryptionRepository) LoadLocalCertificate(ctx context.Context, pkcs12 []byte, pkcs12Password string) (*key.LocalCertificate, error)

func (BloockEncryptionRepository) LoadLocalKey

func (b BloockEncryptionRepository) LoadLocalKey(ctx context.Context, kty key.KeyType, key string) (*key.LocalKey, error)

func (BloockEncryptionRepository) LoadManagedCertificate

func (b BloockEncryptionRepository) LoadManagedCertificate(ctx context.Context, kid string) (*key.ManagedCertificate, error)

func (BloockEncryptionRepository) LoadManagedKey

func (b BloockEncryptionRepository) LoadManagedKey(ctx context.Context, kid string) (*key.ManagedKey, error)

type BloockIntegrityRepository

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

func (BloockIntegrityRepository) Certify

func (BloockIntegrityRepository) CertifyFromHash added in v1.3.0

func (b BloockIntegrityRepository) CertifyFromHash(ctx context.Context, hash string, apiKey string) (domain.Certification, error)

func (BloockIntegrityRepository) GetProof added in v1.3.0

func (b BloockIntegrityRepository) GetProof(ctx context.Context, hash string, apiKey string) (json.RawMessage, error)

type BloockKeyRepository

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

type BloockMetadataRepository

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

func (BloockMetadataRepository) ExistCertificationByHash

func (s BloockMetadataRepository) ExistCertificationByHash(ctx context.Context, hash string) (bool, error)

func (BloockMetadataRepository) FindCertificationByHash added in v1.3.0

func (s BloockMetadataRepository) FindCertificationByHash(ctx context.Context, hash string) (domain.Certification, error)

func (BloockMetadataRepository) GetCertificationByHashAndAnchorID added in v1.3.0

func (s BloockMetadataRepository) GetCertificationByHashAndAnchorID(ctx context.Context, hash string, anchorID int) (domain.Certification, domain.Proof, error)

func (BloockMetadataRepository) GetCertificationsByAnchorID

func (s BloockMetadataRepository) GetCertificationsByAnchorID(ctx context.Context, anchorID int) ([]domain.Certification, error)

func (BloockMetadataRepository) GetFileHash

func (f BloockMetadataRepository) GetFileHash(ctx context.Context, file []byte) (string, error)

func (BloockMetadataRepository) GetRecord

func (f BloockMetadataRepository) GetRecord(ctx context.Context, file []byte) (*record.Record, error)

func (BloockMetadataRepository) GetRecordDetails

func (f BloockMetadataRepository) GetRecordDetails(ctx context.Context, file []byte) (*record.RecordDetails, error)

func (BloockMetadataRepository) SaveCertification

func (s BloockMetadataRepository) SaveCertification(ctx context.Context, certification domain.Certification) error

func (BloockMetadataRepository) UpdateCertification

func (c BloockMetadataRepository) UpdateCertification(ctx context.Context, certification domain.Certification) error

func (BloockMetadataRepository) UpdateCertificationDataID

func (s BloockMetadataRepository) UpdateCertificationDataID(ctx context.Context, cert domain.Certification) error

func (BloockMetadataRepository) UpdateCertificationProof added in v1.3.0

func (s BloockMetadataRepository) UpdateCertificationProof(ctx context.Context, cert domain.Certification, proof json.RawMessage) error

type HttpNotificationRepository

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

func (HttpNotificationRepository) NotifyCertification

func (h HttpNotificationRepository) NotifyCertification(hash string, file []byte) error

type MerkleTreeRepository added in v1.3.0

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

func NewMerkleTreeRepository added in v1.3.0

func NewMerkleTreeRepository(l zerolog.Logger) MerkleTreeRepository

func (MerkleTreeRepository) Create added in v1.3.0

type MessageAggregatorRepository added in v1.3.0

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

func (MessageAggregatorRepository) ExistRoot added in v1.3.0

func (s MessageAggregatorRepository) ExistRoot(ctx context.Context, root string) (bool, error)

func (MessageAggregatorRepository) FindMessageByHash added in v1.3.0

func (s MessageAggregatorRepository) FindMessageByHash(ctx context.Context, hash string) (domain.Message, error)

func (MessageAggregatorRepository) GetMessagesByRootAndAnchorID added in v1.3.0

func (s MessageAggregatorRepository) GetMessagesByRootAndAnchorID(ctx context.Context, root string, anchorID int) ([]domain.Message, error)

func (MessageAggregatorRepository) GetPendingMessages added in v1.3.0

func (s MessageAggregatorRepository) GetPendingMessages(ctx context.Context) ([]domain.Message, error)

func (MessageAggregatorRepository) SaveMessage added in v1.3.0

func (s MessageAggregatorRepository) SaveMessage(ctx context.Context, message domain.Message) error

func (MessageAggregatorRepository) UpdateMessage added in v1.3.0

type ProcessRepository added in v1.3.0

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

func (ProcessRepository) FindProcessByID added in v1.3.0

func (p ProcessRepository) FindProcessByID(ctx context.Context, id uuid.UUID) (domain.Process, error)

func (ProcessRepository) List added in v1.3.0

func (ProcessRepository) SaveProcess added in v1.3.0

func (p ProcessRepository) SaveProcess(ctx context.Context, process domain.Process, isAggregated bool) error

func (ProcessRepository) UpdateAggregatedAnchorID added in v1.3.0

func (p ProcessRepository) UpdateAggregatedAnchorID(ctx context.Context, anchorID int) error

func (ProcessRepository) UpdateStatusByAnchorID added in v1.3.0

func (p ProcessRepository) UpdateStatusByAnchorID(ctx context.Context, anchorID int) error

Directories

Path Synopsis
sql
connection/mocks
Package mock_connection is a generated GoMock package.
Package mock_connection is a generated GoMock package.
ent

Jump to

Keyboard shortcuts

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