record
import "github.com/bloock/bloock-sdk-go/v2/entity/record"
Index
- func MapRecordsToProto(records []Record) []*proto.Record
- type AuthenticityDetails
- type AvailabilityDetails
- type EncryptionDetails
- type IntegrityDetails
- type Record
- type RecordDetails
MapRecordsToProto
func MapRecordsToProto
func MapRecordsToProto(records []Record) []*proto.Record
AuthenticityDetails
type AuthenticityDetails
AuthenticityDetails represents details related to the authenticity of a record, including signatures.
type AuthenticityDetails struct {
Signatures []authenticity.Signature
}
NewAuthenticityDetailsFromProto
func NewAuthenticityDetailsFromProto
func NewAuthenticityDetailsFromProto(r *proto.AuthenticityDetails) *AuthenticityDetails
AuthenticityDetails.ToProto
func (*AuthenticityDetails) ToProto
func (r *AuthenticityDetails) ToProto() *proto.AuthenticityDetails
AvailabilityDetails
type AvailabilityDetails
AvailabilityDetails represents details related to the availability of a record, including content type and size.
type AvailabilityDetails struct {
ContentType *string
Size int64
}
NewAvailabilityDetailsFromProto
func NewAvailabilityDetailsFromProto
func NewAvailabilityDetailsFromProto(r *proto.AvailabilityDetails) *AvailabilityDetails
AvailabilityDetails.ToProto
func (*AvailabilityDetails) ToProto
func (r *AvailabilityDetails) ToProto() *proto.AvailabilityDetails
EncryptionDetails
type EncryptionDetails
EncryptionDetails represents details related to the encryption of a record, including algorithm, key, and subject.
type EncryptionDetails struct {
Alg *string
Key *string
Subject *string
}
NewEncryptionDetailsFromProto
func NewEncryptionDetailsFromProto
func NewEncryptionDetailsFromProto(r *proto.EncryptionDetails) *EncryptionDetails
EncryptionDetails.ToProto
func (*EncryptionDetails) ToProto
func (r *EncryptionDetails) ToProto() *proto.EncryptionDetails
IntegrityDetails
type IntegrityDetails
IntegrityDetails represents details related to the integrity of a record, including hash and proof.
type IntegrityDetails struct {
Hash string
Proof *integrity.Proof
}
NewIntegrityDetailsFromProto
func NewIntegrityDetailsFromProto
func NewIntegrityDetailsFromProto(r *proto.IntegrityDetails) *IntegrityDetails
IntegrityDetails.ToProto
func (*IntegrityDetails) ToProto
func (r *IntegrityDetails) ToProto() *proto.IntegrityDetails
Record
type Record
Record represents a record with payload, hash, and configuration data.
type Record struct {
Payload []byte
// contains filtered or unexported fields
}
NewRecordFromProto
func NewRecordFromProto
func NewRecordFromProto(r *proto.Record, configData *proto.ConfigData) Record
Record.GetHash
func (*Record) GetHash
func (r *Record) GetHash() (string, error)
GetHash retrieves the hash of the record.
Record.GetPayload
func (*Record) GetPayload
func (r *Record) GetPayload() ([]byte, error)
GetPayload retrieves the payload of the record.
Record.Retrieve
func (*Record) Retrieve
func (r *Record) Retrieve() []byte
Retrieve returns the payload of the record.
Record.SetProof
func (*Record) SetProof
func (r *Record) SetProof(proof integrity.Proof) error
SetProof sets the proof for a record.
Record.ToProto
func (*Record) ToProto
func (r *Record) ToProto() *proto.Record
RecordDetails
type RecordDetails
RecordDetails represents all details related to a record, including integrity, authenticity, encryption, and availability details.
type RecordDetails struct {
IntegrityDetails *IntegrityDetails
AuthenticityDetails *AuthenticityDetails
EncryptionDetails *EncryptionDetails
AvailabilityDetails *AvailabilityDetails
}
NewRecordDetailsFromProto
func NewRecordDetailsFromProto
func NewRecordDetailsFromProto(r *proto.RecordDetails, configData *proto.ConfigData) RecordDetails
RecordDetails.ToProto
func (*RecordDetails) ToProto
func (r *RecordDetails) ToProto() *proto.RecordDetails
Generated by gomarkdoc