record

package
v2.8.7 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapRecordsToProto

func MapRecordsToProto(records []Record) []*proto.Record

Types

type AuthenticityDetails added in v2.7.0

type AuthenticityDetails struct {
	Signatures []authenticity.Signature
}

AuthenticityDetails represents details related to the authenticity of a record, including signatures.

func NewAuthenticityDetailsFromProto added in v2.7.0

func NewAuthenticityDetailsFromProto(r *proto.AuthenticityDetails) *AuthenticityDetails

func (*AuthenticityDetails) ToProto added in v2.7.0

type AvailabilityDetails added in v2.7.0

type AvailabilityDetails struct {
	ContentType *string
	Size        int64
}

AvailabilityDetails represents details related to the availability of a record, including content type and size.

func NewAvailabilityDetailsFromProto added in v2.7.0

func NewAvailabilityDetailsFromProto(r *proto.AvailabilityDetails) *AvailabilityDetails

func (*AvailabilityDetails) ToProto added in v2.7.0

type EncryptionDetails added in v2.7.0

type EncryptionDetails struct {
	Alg     *string
	Key     *string
	Subject *string
}

EncryptionDetails represents details related to the encryption of a record, including algorithm, key, and subject.

func NewEncryptionDetailsFromProto added in v2.7.0

func NewEncryptionDetailsFromProto(r *proto.EncryptionDetails) *EncryptionDetails

func (*EncryptionDetails) ToProto added in v2.7.0

type IntegrityDetails added in v2.7.0

type IntegrityDetails struct {
	Hash  string
	Proof *integrity.Proof
}

IntegrityDetails represents details related to the integrity of a record, including hash and proof.

func NewIntegrityDetailsFromProto added in v2.7.0

func NewIntegrityDetailsFromProto(r *proto.IntegrityDetails) *IntegrityDetails

func (*IntegrityDetails) ToProto added in v2.7.0

func (r *IntegrityDetails) ToProto() *proto.IntegrityDetails

type Record

type Record struct {
	Payload []byte
	// contains filtered or unexported fields
}

Record represents a record with payload, hash, and configuration data.

func NewRecordFromProto

func NewRecordFromProto(r *proto.Record, configData *proto.ConfigData) Record

func (*Record) GetHash

func (r *Record) GetHash() (string, error)

GetHash retrieves the hash of the record.

func (*Record) GetPayload added in v2.7.0

func (r *Record) GetPayload() ([]byte, error)

GetPayload retrieves the payload of the record.

func (*Record) Retrieve

func (r *Record) Retrieve() []byte

Retrieve returns the payload of the record.

func (*Record) SetProof

func (r *Record) SetProof(proof integrity.Proof) error

SetProof sets the proof for a record.

func (*Record) ToProto

func (r *Record) ToProto() *proto.Record

type RecordDetails added in v2.7.0

type RecordDetails struct {
	IntegrityDetails    *IntegrityDetails
	AuthenticityDetails *AuthenticityDetails
	EncryptionDetails   *EncryptionDetails
	AvailabilityDetails *AvailabilityDetails
}

RecordDetails represents all details related to a record, including integrity, authenticity, encryption, and availability details.

func NewRecordDetailsFromProto added in v2.7.0

func NewRecordDetailsFromProto(r *proto.RecordDetails, configData *proto.ConfigData) RecordDetails

func (*RecordDetails) ToProto added in v2.7.0

func (r *RecordDetails) ToProto() *proto.RecordDetails

Jump to

Keyboard shortcuts

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