Documentation
¶
Index ¶
- type MetadataSmartContract
- func (s *MetadataSmartContract) AddAggregator(ctx contractapi.TransactionContextInterface, aggregatorId int, ...) error
- func (s *MetadataSmartContract) AddAggregatorModelMetadata(ctx contractapi.TransactionContextInterface, aggregatorId int, epoch int, ...) error
- func (s *MetadataSmartContract) AddParticipant(ctx contractapi.TransactionContextInterface, participantId int, ...) error
- func (s *MetadataSmartContract) AddParticipantModelMetadata(ctx contractapi.TransactionContextInterface, participantId int, epoch int, ...) error
- func (s *MetadataSmartContract) AggregatorExists(ctx contractapi.TransactionContextInterface, aggregatorId int) (bool, error)
- func (s *MetadataSmartContract) AggregatorModelMetadataExists(ctx contractapi.TransactionContextInterface, aggregatorId int, epoch int) (bool, error)
- func (s *MetadataSmartContract) DeleteAggregator(ctx contractapi.TransactionContextInterface, aggregatorId int) error
- func (s *MetadataSmartContract) DeleteAggregatorModelMetadata(ctx contractapi.TransactionContextInterface, aggregatorId int, epoch int) error
- func (s *MetadataSmartContract) DeleteAllAggregatorModelMetadata(ctx contractapi.TransactionContextInterface) error
- func (s *MetadataSmartContract) DeleteAllAggregators(ctx contractapi.TransactionContextInterface) error
- func (s *MetadataSmartContract) DeleteAllParticipantModelMetadata(ctx contractapi.TransactionContextInterface) error
- func (s *MetadataSmartContract) DeleteAllParticipants(ctx contractapi.TransactionContextInterface) error
- func (s *MetadataSmartContract) DeleteParticipant(ctx contractapi.TransactionContextInterface, participantId int) error
- func (s *MetadataSmartContract) DeleteParticipantModelMetadata(ctx contractapi.TransactionContextInterface, participantId int, epoch int) error
- func (s *MetadataSmartContract) GetAggregator(ctx contractapi.TransactionContextInterface, aggregatorId int) (*shared.Aggregator, error)
- func (s *MetadataSmartContract) GetAggregatorModelMetadata(ctx contractapi.TransactionContextInterface, aggregatorId int, epoch int) (*shared.AggregatorModelMetadata, error)
- func (s *MetadataSmartContract) GetAllAggregatorModelMetadata(ctx contractapi.TransactionContextInterface) ([]*shared.AggregatorModelMetadata, error)
- func (s *MetadataSmartContract) GetAllAggregatorModelMetadataByAggregator(ctx contractapi.TransactionContextInterface, aggregatorId int) ([]*shared.AggregatorModelMetadata, error)
- func (s *MetadataSmartContract) GetAllAggregators(ctx contractapi.TransactionContextInterface) ([]*shared.Aggregator, error)
- func (s *MetadataSmartContract) GetAllLogs(ctx contractapi.TransactionContextInterface) ([]shared.LogEntry, error)
- func (s *MetadataSmartContract) GetAllParticipantModelMetadata(ctx contractapi.TransactionContextInterface) ([]*shared.ParticipantModelMetadata, error)
- func (s *MetadataSmartContract) GetAllParticipantModelMetadataByEpoch(ctx contractapi.TransactionContextInterface, epoch int) ([]*shared.ParticipantModelMetadata, error)
- func (s *MetadataSmartContract) GetAllParticipantModelMetadataByParticipant(ctx contractapi.TransactionContextInterface, participantId int) ([]*shared.ParticipantModelMetadata, error)
- func (s *MetadataSmartContract) GetAllParticipants(ctx contractapi.TransactionContextInterface) ([]*shared.Participant, error)
- func (s *MetadataSmartContract) GetParticipant(ctx contractapi.TransactionContextInterface, participantId int) (*shared.Participant, error)
- func (s *MetadataSmartContract) GetParticipantModelMetadata(ctx contractapi.TransactionContextInterface, participantId int, epoch int) (*shared.ParticipantModelMetadata, error)
- func (s *MetadataSmartContract) ParticipantExists(ctx contractapi.TransactionContextInterface, participantId int) (bool, error)
- func (s *MetadataSmartContract) ParticipantModelMetadataExists(ctx contractapi.TransactionContextInterface, participantId int, epoch int) (bool, error)
- func (s *MetadataSmartContract) UpdateAggregator(ctx contractapi.TransactionContextInterface, aggregatorId int, ...) error
- func (s *MetadataSmartContract) UpdateAggregatorModelMetadata(ctx contractapi.TransactionContextInterface, aggregatorId int, epoch int, ...) error
- func (s *MetadataSmartContract) UpdateParticipant(ctx contractapi.TransactionContextInterface, participantId int, ...) error
- func (s *MetadataSmartContract) UpdateParticipantModelMetadata(ctx contractapi.TransactionContextInterface, participantId int, epoch int, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetadataSmartContract ¶
type MetadataSmartContract struct {
contractapi.Contract
}
MetadataSmartContract provides functions for managing metadata records in the world state of a Fabric network.
func (*MetadataSmartContract) AddAggregator ¶
func (s *MetadataSmartContract) AddAggregator(ctx contractapi.TransactionContextInterface, aggregatorId int, communicationKeysCyphersJSON string) error
AddAggregator issues a new aggregator record to the world state with the given details. The record is bound to the client's identity.
func (*MetadataSmartContract) AddAggregatorModelMetadata ¶
func (s *MetadataSmartContract) AddAggregatorModelMetadata( ctx contractapi.TransactionContextInterface, aggregatorId int, epoch int, modelHashCid string, participantIdsJSON string, ) error
AddAggregatorModelMetadata issues a new aggregator's model aggregation metadata record to the world state with the given details. Can only be done by the owner of the aggregator or an admin.
func (*MetadataSmartContract) AddParticipant ¶
func (s *MetadataSmartContract) AddParticipant( ctx contractapi.TransactionContextInterface, participantId int, encapsulatedKey string, homomorphicSharedKeyCypher string, communicationKeyCypher string, ) error
AddParticipant issues a participant record to the world state with the given details. The record is bound to the client's identity.
func (*MetadataSmartContract) AddParticipantModelMetadata ¶
func (s *MetadataSmartContract) AddParticipantModelMetadata( ctx contractapi.TransactionContextInterface, participantId int, epoch int, modelHashCid string, homomorphicHash string, ) error
AddParticipantModelMetadata issues a new participant's model update metadata record to the world state with the given details. Can only be done by the owner of the participant or an admin.
func (*MetadataSmartContract) AggregatorExists ¶
func (s *MetadataSmartContract) AggregatorExists(ctx contractapi.TransactionContextInterface, aggregatorId int) (bool, error)
AggregatorExists returns true when an aggregator record for the given aggregatorId exists in the world state
func (*MetadataSmartContract) AggregatorModelMetadataExists ¶
func (s *MetadataSmartContract) AggregatorModelMetadataExists(ctx contractapi.TransactionContextInterface, aggregatorId int, epoch int) (bool, error)
AggregatorModelMetadataExists returns true when an aggregator model metadata record for the given epoch exists in the world state.
func (*MetadataSmartContract) DeleteAggregator ¶
func (s *MetadataSmartContract) DeleteAggregator(ctx contractapi.TransactionContextInterface, aggregatorId int) error
DeleteAggregator deletes a given aggregator record from the world state. Can only be done by the owner of the aggregator or an admin.
func (*MetadataSmartContract) DeleteAggregatorModelMetadata ¶
func (s *MetadataSmartContract) DeleteAggregatorModelMetadata(ctx contractapi.TransactionContextInterface, aggregatorId int, epoch int) error
DeleteAggregatorModelMetadata deletes a given aggregator model metadata record from the world state. Can only be done by the owner of the aggregator or an admin.
func (*MetadataSmartContract) DeleteAllAggregatorModelMetadata ¶
func (s *MetadataSmartContract) DeleteAllAggregatorModelMetadata(ctx contractapi.TransactionContextInterface) error
DeleteAllAggregatorModelMetadata deletes all aggregator model metadata records from the world state. Can only be done by an admin.
func (*MetadataSmartContract) DeleteAllAggregators ¶
func (s *MetadataSmartContract) DeleteAllAggregators(ctx contractapi.TransactionContextInterface) error
DeleteAllAggregators deletes all aggregator records from the world state. Can only be done by an admin.
func (*MetadataSmartContract) DeleteAllParticipantModelMetadata ¶
func (s *MetadataSmartContract) DeleteAllParticipantModelMetadata(ctx contractapi.TransactionContextInterface) error
DeleteAllParticipantModelMetadata deletes all participant model metadata records from the world state. Can only be done by an admin.
func (*MetadataSmartContract) DeleteAllParticipants ¶
func (s *MetadataSmartContract) DeleteAllParticipants(ctx contractapi.TransactionContextInterface) error
DeleteAllParticipants deletes all participant records from the world state. Can only be done by an admin.
func (*MetadataSmartContract) DeleteParticipant ¶
func (s *MetadataSmartContract) DeleteParticipant(ctx contractapi.TransactionContextInterface, participantId int) error
DeleteParticipant deletes a given participant record from the world state. Can only be done by the owner of the participant or an admin.
func (*MetadataSmartContract) DeleteParticipantModelMetadata ¶
func (s *MetadataSmartContract) DeleteParticipantModelMetadata(ctx contractapi.TransactionContextInterface, participantId int, epoch int) error
DeleteParticipantModelMetadata deletes a given participant model metadata record from the world state. Can only be done by the owner of the participant or an admin.
func (*MetadataSmartContract) GetAggregator ¶
func (s *MetadataSmartContract) GetAggregator(ctx contractapi.TransactionContextInterface, aggregatorId int) (*shared.Aggregator, error)
GetAggregator returns the aggregator record stored in the world state for the given aggregatorId.
func (*MetadataSmartContract) GetAggregatorModelMetadata ¶
func (s *MetadataSmartContract) GetAggregatorModelMetadata(ctx contractapi.TransactionContextInterface, aggregatorId int, epoch int) (*shared.AggregatorModelMetadata, error)
GetAggregatorModelMetadata returns the aggregator's model aggregation metadata record stored in the world state for the given epoch.
func (*MetadataSmartContract) GetAllAggregatorModelMetadata ¶
func (s *MetadataSmartContract) GetAllAggregatorModelMetadata(ctx contractapi.TransactionContextInterface) ([]*shared.AggregatorModelMetadata, error)
GetAllAggregatorModelMetadata returns all aggregator model metadata records found in the world state.
func (*MetadataSmartContract) GetAllAggregatorModelMetadataByAggregator ¶
func (s *MetadataSmartContract) GetAllAggregatorModelMetadataByAggregator(ctx contractapi.TransactionContextInterface, aggregatorId int) ([]*shared.AggregatorModelMetadata, error)
GetAllAggregatorModelMetadataByAggregator returns all aggregator model metadata records found in the world state.
func (*MetadataSmartContract) GetAllAggregators ¶
func (s *MetadataSmartContract) GetAllAggregators(ctx contractapi.TransactionContextInterface) ([]*shared.Aggregator, error)
GetAllAggregators returns all aggregator records found in the world state.
func (*MetadataSmartContract) GetAllLogs ¶
func (s *MetadataSmartContract) GetAllLogs(ctx contractapi.TransactionContextInterface) ([]shared.LogEntry, error)
GetAllLogs returns the history for all objects in the world state. Can only be done by the admin.
func (*MetadataSmartContract) GetAllParticipantModelMetadata ¶
func (s *MetadataSmartContract) GetAllParticipantModelMetadata(ctx contractapi.TransactionContextInterface) ([]*shared.ParticipantModelMetadata, error)
GetAllParticipantModelMetadata returns all participant model metadata records found in the world state.
func (*MetadataSmartContract) GetAllParticipantModelMetadataByEpoch ¶
func (s *MetadataSmartContract) GetAllParticipantModelMetadataByEpoch(ctx contractapi.TransactionContextInterface, epoch int) ([]*shared.ParticipantModelMetadata, error)
GetAllParticipantModelMetadataByEpoch returns all participant model metadata records found in the world state for the given epoch.
func (*MetadataSmartContract) GetAllParticipantModelMetadataByParticipant ¶
func (s *MetadataSmartContract) GetAllParticipantModelMetadataByParticipant(ctx contractapi.TransactionContextInterface, participantId int) ([]*shared.ParticipantModelMetadata, error)
GetAllParticipantModelMetadataByParticipant returns all participant model metadata records found in the world state created by the participant.
func (*MetadataSmartContract) GetAllParticipants ¶
func (s *MetadataSmartContract) GetAllParticipants(ctx contractapi.TransactionContextInterface) ([]*shared.Participant, error)
GetAllParticipants returns all participant records found in the world state.
func (*MetadataSmartContract) GetParticipant ¶
func (s *MetadataSmartContract) GetParticipant(ctx contractapi.TransactionContextInterface, participantId int) (*shared.Participant, error)
GetParticipant returns the participant record stored in the world state for the given id.
func (*MetadataSmartContract) GetParticipantModelMetadata ¶
func (s *MetadataSmartContract) GetParticipantModelMetadata(ctx contractapi.TransactionContextInterface, participantId int, epoch int) (*shared.ParticipantModelMetadata, error)
GetParticipantModelMetadata returns the participant's model update metadata record stored in the world state for the given participantId and epoch.
func (*MetadataSmartContract) ParticipantExists ¶
func (s *MetadataSmartContract) ParticipantExists(ctx contractapi.TransactionContextInterface, participantId int) (bool, error)
ParticipantExists returns true when a participant record for the given id exists in the world state.
func (*MetadataSmartContract) ParticipantModelMetadataExists ¶
func (s *MetadataSmartContract) ParticipantModelMetadataExists(ctx contractapi.TransactionContextInterface, participantId int, epoch int) (bool, error)
ParticipantModelMetadataExists returns true when a participant model metadata record for the given participantId and epoch exists in the world state.
func (*MetadataSmartContract) UpdateAggregator ¶
func (s *MetadataSmartContract) UpdateAggregator(ctx contractapi.TransactionContextInterface, aggregatorId int, communicationKeysCyphersJSON string) error
UpdateAggregator updates an existing aggregator record in the world state with provided parameters. Can only be done by the owner of the aggregator or an admin.
func (*MetadataSmartContract) UpdateAggregatorModelMetadata ¶
func (s *MetadataSmartContract) UpdateAggregatorModelMetadata( ctx contractapi.TransactionContextInterface, aggregatorId int, epoch int, modelHashCid string, participantIdsJSON string, ) error
UpdateAggregatorModelMetadata updates an existing aggregator model metadata record in the world state with provided parameters. Can only be done by the owner of the aggregator or an admin.
func (*MetadataSmartContract) UpdateParticipant ¶
func (s *MetadataSmartContract) UpdateParticipant( ctx contractapi.TransactionContextInterface, participantId int, encapsulatedKey string, homomorphicSharedKeyCypher string, communicationKeyCypher string, ) error
UpdateParticipant updates a participant record in the world state with provided parameters. Can only be done by the owner of the participant or an admin.
func (*MetadataSmartContract) UpdateParticipantModelMetadata ¶
func (s *MetadataSmartContract) UpdateParticipantModelMetadata( ctx contractapi.TransactionContextInterface, participantId int, epoch int, modelHashCid string, homomorphicHash string, ) error
UpdateParticipantModelMetadata updates an existing participant model metadata record in the world state with provided parameters. Can only be done by the owner of the participant or an admin.