Documentation
¶
Index ¶
- Variables
- type CreateAddressRefDeps
- type CreateAddressRefInput
- type CreateAddressRefOutput
- type CreateChainMetadataDeps
- type CreateChainMetadataInput
- type CreateChainMetadataOutput
- type CreateContractMetadataDeps
- type CreateContractMetadataInput
- type CreateContractMetadataOutput
- type UpdateAddressRefDeps
- type UpdateAddressRefInput
- type UpdateAddressRefOutput
- type UpdateChainMetadataDeps
- type UpdateChainMetadataInput
- type UpdateChainMetadataOutput
- type UpdateContractMetadataDeps
- type UpdateContractMetadataInput
- type UpdateContractMetadataOutput
- type UpdateEnvMetadataDeps
- type UpdateEnvMetadataInput
- type UpdateEnvMetadataOutput
Constants ¶
This section is empty.
Variables ¶
var CreateAddressRefOp = cldfops.NewOperation( "catalog-create-address-ref", semver.MustParse("1.0.0"), "Add address ref entries to the Catalog service", func(b cldfops.Bundle, deps CreateAddressRefDeps, input CreateAddressRefInput) (CreateAddressRefOutput, error) { dataStore := cldfdatastore.NewMemoryDataStore() err := dataStore.Merge(deps.DataStore) if err != nil { return CreateAddressRefOutput{}, fmt.Errorf("failed to create memory data store: %w", err) } for i, item := range input.AddressRefs { err = dataStore.Addresses().Add(item) if err != nil { return CreateAddressRefOutput{}, fmt.Errorf("failed to create address ref entry %d in catalog store: %w", i, err) } } b.Logger.Infow("Catalog AddressRef created successfully") return CreateAddressRefOutput{DataStore: dataStore}, nil }, )
CreateAddressRefOp creates address ref entries in the Catalog service.
var CreateChainMetadataOp = cldfops.NewOperation( "catalog-create-chain-metadata", semver.MustParse("1.0.0"), "Add chain metadata entries to the Catalog service", func(b cldfops.Bundle, deps CreateChainMetadataDeps, input CreateChainMetadataInput) (CreateChainMetadataOutput, error) { dataStore := cldfdatastore.NewMemoryDataStore() err := dataStore.Merge(deps.DataStore) if err != nil { return CreateChainMetadataOutput{}, fmt.Errorf("failed to create memory data store: %w", err) } for i, item := range input.ChainMetadata { err = dataStore.ChainMetadata().Add(item) if err != nil { return CreateChainMetadataOutput{}, fmt.Errorf("failed to create chain metadata entry %d in catalog store: %w", i, err) } } b.Logger.Infow("Catalog ChainMetadata created successfully") return CreateChainMetadataOutput{DataStore: dataStore}, nil }, )
CreateChainMetadataOp creates chain metadata entries in the Catalog service.
var CreateContractMetadataOp = cldfops.NewOperation( "catalog-create-contract-metadata", semver.MustParse("1.0.0"), "Add contract metadata entries to the Catalog service", func(b cldfops.Bundle, deps CreateContractMetadataDeps, input CreateContractMetadataInput) (CreateContractMetadataOutput, error) { dataStore := cldfdatastore.NewMemoryDataStore() err := dataStore.Merge(deps.DataStore) if err != nil { return CreateContractMetadataOutput{}, fmt.Errorf("failed to create memory data store: %w", err) } for i, item := range input.ContractMetadata { err = dataStore.ContractMetadata().Add(item) if err != nil { return CreateContractMetadataOutput{}, fmt.Errorf("failed to create contract metadata entry %d in catalog store: %w", i, err) } } b.Logger.Infow("Catalog ContractMetadata created successfully") return CreateContractMetadataOutput{DataStore: dataStore}, nil }, )
CreateContractMetadataOp creates contract metadata entries in the Catalog service.
var UpdateAddressRefOp = cldfops.NewOperation( "catalog-update-address-ref", semver.MustParse("1.0.0"), "Update address ref entries in the Catalog service", func(b cldfops.Bundle, deps UpdateAddressRefDeps, input UpdateAddressRefInput) (UpdateAddressRefOutput, error) { dataStore := cldfdatastore.NewMemoryDataStore() err := dataStore.Merge(deps.DataStore) if err != nil { return UpdateAddressRefOutput{}, fmt.Errorf("failed to create memory data store: %w", err) } for i, item := range input.AddressRefs { err = dataStore.Addresses().Update(item) if err != nil { return UpdateAddressRefOutput{}, fmt.Errorf("failed to update address ref entry %d in catalog store: %w", i, err) } } b.Logger.Infow("Catalog AddressRef updated successfully") return UpdateAddressRefOutput{DataStore: dataStore}, nil }, )
UpdateAddressRefOp updates existing address ref entries in the Catalog service.
var UpdateChainMetadataOp = cldfops.NewOperation( "catalog-update-chain-metadata", semver.MustParse("1.0.0"), "Update chain metadata entries in the Catalog service", func(b cldfops.Bundle, deps UpdateChainMetadataDeps, input UpdateChainMetadataInput) (UpdateChainMetadataOutput, error) { dataStore := cldfdatastore.NewMemoryDataStore() err := dataStore.Merge(deps.DataStore) if err != nil { return UpdateChainMetadataOutput{}, fmt.Errorf("failed to create memory data store: %w", err) } for i, item := range input.ChainMetadata { err = dataStore.ChainMetadata().Update(item) if err != nil { return UpdateChainMetadataOutput{}, fmt.Errorf("failed to update chain metadata entry %d in catalog store: %w", i, err) } } b.Logger.Infow("Catalog ChainMetadata updated successfully") return UpdateChainMetadataOutput{DataStore: dataStore}, nil }, )
UpdateChainMetadataOp updates existing chain metadata entries in the Catalog service.
var UpdateContractMetadataOp = cldfops.NewOperation( "catalog-update-contract-metadata", semver.MustParse("1.0.0"), "Update contract metadata entries in the Catalog service", func(b cldfops.Bundle, deps UpdateContractMetadataDeps, input UpdateContractMetadataInput) (UpdateContractMetadataOutput, error) { dataStore := cldfdatastore.NewMemoryDataStore() err := dataStore.Merge(deps.DataStore) if err != nil { return UpdateContractMetadataOutput{}, fmt.Errorf("failed to create memory data store: %w", err) } for i, item := range input.ContractMetadata { err = dataStore.ContractMetadata().Update(item) if err != nil { return UpdateContractMetadataOutput{}, fmt.Errorf("failed to update contract metadata entry %d in catalog store: %w", i, err) } } b.Logger.Infow("Catalog ContractMetadata updated successfully") return UpdateContractMetadataOutput{DataStore: dataStore}, nil }, )
UpdateContractMetadataOp updates existing contract metadata entries in the Catalog service.
var UpdateEnvMetadataOp = cldfops.NewOperation( "catalog-update-env-metadata", semver.MustParse("1.0.0"), "Update env metadata entries in the Catalog service", func(b cldfops.Bundle, deps UpdateEnvMetadataDeps, input UpdateEnvMetadataInput) (UpdateEnvMetadataOutput, error) { dataStore := cldfdatastore.NewMemoryDataStore() err := dataStore.Merge(deps.DataStore) if err != nil { return UpdateEnvMetadataOutput{}, fmt.Errorf("failed to create memory data store: %w", err) } err = dataStore.EnvMetadata().Set(input.EnvMetadata) if err != nil { return UpdateEnvMetadataOutput{}, fmt.Errorf("failed to update env metadata in catalog store: %w", err) } b.Logger.Infow("Catalog EnvMetadata updated successfully") return UpdateEnvMetadataOutput{DataStore: dataStore}, nil }, )
UpdateEnvMetadataOp updates existing env metadata entries in the Catalog service.
Functions ¶
This section is empty.
Types ¶
type CreateAddressRefDeps ¶ added in v0.3.0
type CreateAddressRefDeps struct {
DataStore cldfdatastore.DataStore
}
CreateAddressRefDeps holds non-serializable dependencies for the CreateAddressRefOp operation.
type CreateAddressRefInput ¶ added in v0.3.0
type CreateAddressRefInput struct {
AddressRefs []cldfdatastore.AddressRef
}
CreateAddressRefInput is the serializable input of a CreateAddressRefOp invocation.
type CreateAddressRefOutput ¶ added in v0.3.0
type CreateAddressRefOutput struct {
DataStore cldfdatastore.MutableDataStore
}
CreateAddressRefOutput is the serializable output of a CreateAddressRefOp invocation.
type CreateChainMetadataDeps ¶
type CreateChainMetadataDeps struct {
DataStore cldfdatastore.DataStore
}
CreateChainMetadataDeps holds non-serializable dependencies for the CreateChainMetadataOp operation.
type CreateChainMetadataInput ¶
type CreateChainMetadataInput struct {
ChainMetadata []cldfdatastore.ChainMetadata
}
CreateChainMetadataInput is the serializable input of a CreateChainMetadataOp invocation.
type CreateChainMetadataOutput ¶
type CreateChainMetadataOutput struct {
DataStore cldfdatastore.MutableDataStore
}
CreateChainMetadataOutput is the serializable output of a CreateChainMetadataOp invocation.
type CreateContractMetadataDeps ¶
type CreateContractMetadataDeps struct {
DataStore cldfdatastore.DataStore
}
CreateContractMetadataDeps holds non-serializable dependencies for the CreateContractMetadataOp operation.
type CreateContractMetadataInput ¶
type CreateContractMetadataInput struct {
ContractMetadata []cldfdatastore.ContractMetadata
}
CreateContractMetadataInput is the serializable input of a CreateContractMetadataOp invocation.
type CreateContractMetadataOutput ¶
type CreateContractMetadataOutput struct {
DataStore cldfdatastore.MutableDataStore
}
CreateContractMetadataOutput is the serializable output of a CreateContractMetadataOp invocation.
type UpdateAddressRefDeps ¶ added in v0.3.0
type UpdateAddressRefDeps struct {
DataStore cldfdatastore.DataStore
}
UpdateAddressRefDeps holds non-serializable dependencies for the UpdateAddressRefOp operation.
type UpdateAddressRefInput ¶ added in v0.3.0
type UpdateAddressRefInput struct {
AddressRefs []cldfdatastore.AddressRef
}
UpdateAddressRefInput is the serializable input of an UpdateAddressRefOp invocation.
type UpdateAddressRefOutput ¶ added in v0.3.0
type UpdateAddressRefOutput struct {
DataStore cldfdatastore.MutableDataStore
}
UpdateAddressRefOutput is the serializable output of an UpdateAddressRefOp invocation.
type UpdateChainMetadataDeps ¶ added in v0.2.0
type UpdateChainMetadataDeps struct {
DataStore cldfdatastore.DataStore
}
UpdateChainMetadataDeps holds non-serializable dependencies for the UpdateChainMetadataOp operation.
type UpdateChainMetadataInput ¶ added in v0.2.0
type UpdateChainMetadataInput struct {
ChainMetadata []cldfdatastore.ChainMetadata
}
UpdateChainMetadataInput is the serializable input of an UpdateChainMetadataOp invocation.
type UpdateChainMetadataOutput ¶ added in v0.2.0
type UpdateChainMetadataOutput struct {
DataStore cldfdatastore.MutableDataStore
}
UpdateChainMetadataOutput is the serializable output of an UpdateChainMetadataOp invocation.
type UpdateContractMetadataDeps ¶ added in v0.2.0
type UpdateContractMetadataDeps struct {
DataStore cldfdatastore.DataStore
}
UpdateContractMetadataDeps holds non-serializable dependencies for the UpdateContractMetadataOp operation.
type UpdateContractMetadataInput ¶ added in v0.2.0
type UpdateContractMetadataInput struct {
ContractMetadata []cldfdatastore.ContractMetadata
}
UpdateContractMetadataInput is the serializable input of an UpdateContractMetadataOp invocation.
type UpdateContractMetadataOutput ¶ added in v0.2.0
type UpdateContractMetadataOutput struct {
DataStore cldfdatastore.MutableDataStore
}
UpdateContractMetadataOutput is the serializable output of an UpdateContractMetadataOp invocation.
type UpdateEnvMetadataDeps ¶ added in v0.3.0
type UpdateEnvMetadataDeps struct {
DataStore cldfdatastore.DataStore
}
UpdateEnvMetadataDeps holds non-serializable dependencies for the UpdateEnvMetadataOp operation.
type UpdateEnvMetadataInput ¶ added in v0.3.0
type UpdateEnvMetadataInput struct {
EnvMetadata cldfdatastore.EnvMetadata
}
UpdateEnvMetadataInput is the serializable input of an UpdateEnvMetadataOp invocation.
type UpdateEnvMetadataOutput ¶ added in v0.3.0
type UpdateEnvMetadataOutput struct {
DataStore cldfdatastore.MutableDataStore
}
UpdateEnvMetadataOutput is the serializable output of an UpdateEnvMetadataOp invocation.