Documentation
¶
Index ¶
- Variables
- func IsConfigMapHasProfile(name string) bool
- func Run(ctx context.Context, config *rest.Config, ...) (err error)
- type AdminCredential
- type ChannelInfo
- type Client
- type CredentialStore
- type CryptoConfig
- type CryptoStore
- type Logging
- type Msg
- type MsgType
- type NodeEndpoint
- type OrganizationInfo
- type PeerInfo
- type Pem
- type Profile
- type Pusher
- type TLSCACerts
- type User
- type Watcher
- func (w *Watcher) ChannelDelete(obj interface{})
- func (w *Watcher) ChannelUpdate(old interface{}, new interface{})
- func (w *Watcher) HandleProfile(ctx context.Context, operatorNamespace string, channel *v1beta1.Channel) (err error)
- func (w *Watcher) ProfileConfigMapCreate(obj interface{})
- func (w *Watcher) ProfileConfigMapUpdate(old interface{}, new interface{})
- func (w *Watcher) SendProfile(fabProfile *network.FabProfile, networkName, channelID string, ...)
Constants ¶
This section is empty.
Variables ¶
var ( ErrWrongTypeChannel = errors.New("wrong type of channel") ErrWrongTypeConfigmap = errors.New("wrong type of configmap") )
Functions ¶
func IsConfigMapHasProfile ¶
Types ¶
type AdminCredential ¶
type AdminCredential struct {
ID string `yaml:"id,omitempty" json:"id,omitempty"`
Password string `yaml:"password,omitempty" json:"password" default:"passw0rd"`
}
+k8s:deepcopy-gen=true
type ChannelInfo ¶
type ChannelInfo struct {
// Peers which can be used to connect to this channel
Peers map[string]PeerInfo `yaml:"peers" json:"peers"`
}
ChannelInfo defines configurations when connect to this channel +k8s:deepcopy-gen=true
type Client ¶
type Client struct {
Organization string `yaml:"organization,omitempty" json:"organization,omitempty"`
Logging `yaml:"logging,omitempty" json:"logging,omitempty"`
// For blockchain explorer
AdminCredential `yaml:"adminCredential,omitempty" json:"adminCredential,omitempty"`
CredentialStore `yaml:"credentialStore,omitempty" json:"credentialStore,omitempty"`
TLSEnable bool `yaml:"tlsEnable,omitempty" json:"tlsEnable,omitempty"`
}
Client defines who is trying to connect with networks
type CredentialStore ¶
type CredentialStore struct {
Path string `yaml:"path,omitempty" json:"path,omitempty"`
CryptoStore `yaml:"cryptoStore,omitempty" json:"cryptoStore,omitempty"`
}
+k8s:deepcopy-gen=true
type CryptoConfig ¶
type CryptoConfig struct {
Path string `yaml:"path,omitempty" json:"path,omitempty"`
}
+k8s:deepcopy-gen=true
type CryptoStore ¶
type CryptoStore struct {
Path string `yaml:"path,omitempty" json:"path,omitempty"`
}
+k8s:deepcopy-gen=true
type Logging ¶
type Logging struct {
Level string `yaml:"level,omitempty" json:"level,omitempty"`
}
+k8s:deepcopy-gen=true
type NodeEndpoint ¶
type NodeEndpoint struct {
URL string `yaml:"url,omitempty" json:"url,omitempty"`
TLSCACerts `yaml:"tlsCACerts,omitempty" json:"tlsCACerts,omitempty"`
}
+k8s:deepcopy-gen=true
type OrganizationInfo ¶
type OrganizationInfo struct {
MSPID string `yaml:"mspid,omitempty" json:"mspid,omitempty"`
Users map[string]User `yaml:"users,omitempty" json:"users,omitempty"`
Peers []string `yaml:"peers,omitempty" json:"peers,omitempty"`
// For blockchain explorer
AdminPrivateKey Pem `yaml:"adminPrivateKey,omitempty" json:"adminPrivateKey,omitempty"`
SignedCert Pem `yaml:"signedCert,omitempty" json:"signedCert,omitempty"`
}
OrganizationInfo defines a organization along with its users and peers +k8s:deepcopy-gen=true
type PeerInfo ¶
type PeerInfo struct {
EndorsingPeer *bool `yaml:"endorsingPeer,omitempty" json:"endorsingPeer,omitempty"`
ChaincodeQuery *bool `yaml:"chaincodeQuery,omitempty" json:"chaincodeQuery,omitempty"`
LedgerQuery *bool `yaml:"ledgerQuery,omitempty" json:"ledgerQuery,omitempty"`
EventSource *bool `yaml:"eventSource,omitempty" json:"eventSource,omitempty"`
}
+k8s:deepcopy-gen=true
type Pem ¶
type Pem struct {
Pem string `yaml:"pem,omitempty" json:"pem,omitempty"`
}
+k8s:deepcopy-gen=true
type Profile ¶
type Profile struct {
Version string `yaml:"version,omitempty" json:"version,omitempty"`
Client `yaml:"client,omitempty" json:"client,omitempty"`
Channels map[string]ChannelInfo `yaml:"channels" json:"channels"`
Organizations map[string]OrganizationInfo `yaml:"organizations,omitempty" json:"organizations,omitempty"`
// Orderers defines all orderer endpoints which can be used
Orderers map[string]NodeEndpoint `yaml:"orderers,omitempty" json:"orderers,omitempty"`
// Peers defines all peer endpoints which can be used
Peers map[string]NodeEndpoint `yaml:"peers,omitempty" json:"peers,omitempty"`
}
Profile contasins all we need to connect with a blockchain network. Currently we use embedded pem by default +k8s:deepcopy-gen=true
type Pusher ¶
func (*Pusher) DeRegister ¶
type TLSCACerts ¶
type TLSCACerts struct {
Path string `yaml:"path,omitempty" json:"path,omitempty"`
Pem string `yaml:"pem,omitempty" json:"pem,omitempty"`
}
+k8s:deepcopy-gen=true
type User ¶
type User struct {
Name string `yaml:"name,omitempty" json:"name,omitempty"`
Key Pem `yaml:"key,omitempty" json:"key,omitempty"`
Cert Pem `yaml:"cert,omitempty" json:"cert,omitempty"`
}
User is the ca identity which has a private key(embedded pem) and signed certificate(embedded pem) +k8s:deepcopy-gen=true
type Watcher ¶
type Watcher struct {
Msg chan<- Msg
Client *kubernetes.Clientset
VClient *versioned.Clientset
Send sync.Map
OperatorNamespace string
}
func NewWatcher ¶
func (*Watcher) ChannelDelete ¶
func (w *Watcher) ChannelDelete(obj interface{})
func (*Watcher) ChannelUpdate ¶
func (w *Watcher) ChannelUpdate(old interface{}, new interface{})
func (*Watcher) HandleProfile ¶
func (*Watcher) ProfileConfigMapCreate ¶
func (w *Watcher) ProfileConfigMapCreate(obj interface{})
func (*Watcher) ProfileConfigMapUpdate ¶
func (w *Watcher) ProfileConfigMapUpdate(old interface{}, new interface{})
func (*Watcher) SendProfile ¶
func (w *Watcher) SendProfile(fabProfile *network.FabProfile, networkName, channelID string, channelStatus v1beta1.IBPCRStatusType)