Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigClient ¶
type ConfigClient interface {
Get(stub shim.ChaincodeStubInterface, configKey *ConfigKey) (viper *viper.Viper, err error)
}
ConfigClient is used to publish messages
type ConfigManager ¶
type ConfigManager interface { //Save configuration - The submited payload should be in form of ConfigMessage Save(config []byte) error //Get configuration - Gets configuration based on config key. //For the valid config key retuned array will have only one element. //For the config key containing only MspID all configurations for that MspID will be returned Get(configKey ConfigKey) ([]*ConfigKV, error) //Delete configuration - //For the valid config one config message will be deleted //For the config key containing only MspID all configurations for that MspID will be deleted Delete(configKey ConfigKey) error }
ConfigManager is used to manage configuration in ledger(save,get,delete)
type ConfigMessage ¶
type ConfigMessage struct { MspID string Peers []PeerConfig }
ConfigMessage - has MSP identifier and collection of peers
func (ConfigMessage) IsValid ¶
func (cm ConfigMessage) IsValid() error
IsValid validates config message
type ConfigService ¶
type ConfigService interface { //Get returns the config bytes for the given channel and config key Get(channelID string, configKey ConfigKey) ([]byte, error) //GetViper returns a Viper instance that wraps the config for the given channel and config key. // If the config key doesn't exist then nil is returned. GetViper(channelID string, configKey ConfigKey, configType ConfigType) (*viper.Viper, error) }
ConfigService configuration service interface
type ConfigType ¶ added in v0.1.2
type ConfigType string
ConfigType indicates the type (format) of the configuration
const ( // YAML indicates that the configuration is in YAML format YAML ConfigType = "YAML" // JSON indicates that the configuration is in JSON format JSON ConfigType = "JSON" )
type PeerConfig ¶
PeerConfig identifier has peer identifier and collection of application configurations
func (PeerConfig) IsValid ¶
func (pc PeerConfig) IsValid() error
IsValid validates config messagegetIndexKey
Click to show internal directories.
Click to hide internal directories.