service

package
v0.0.0-...-a76d37d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Configs map[string]*config.Config
)

Functions

func Get

func Get(configID string) *config.Config

func GetASyncConfig

func GetASyncConfig() map[string]config.Config

func GetBytes

func GetBytes(configID string) []byte

func InitConfig

func InitConfig(in *pb.ReqInit)

func Recover

func Recover(configIDs []string)

func RecoverConfig

func RecoverConfig(configs map[string]*config.Config)

Types

type CertificateAuthority

type CertificateAuthority struct {
	ConfigID                string `json:"configID"` // ConfigID 配置唯一ID
	CertName                string `json:"certName"`
	URL                     string `json:"url"`
	TLSCACertPath           string `json:"tlsCACertPath"`
	TLSCACertClientKeyPath  string `json:"tlsCACertClientKeyPath"`
	TLSCACertClientCertPath string `json:"tlsCACertClientCertPath"`
	CAName                  string `json:"caName"`
	EnrollId                string `json:"enrollId"`
	EnrollSecret            string `json:"enrollSecret"`
}

func (*CertificateAuthority) Trans2pb

type CertificateAuthoritySelf

type CertificateAuthoritySelf struct {
	ConfigID     string `json:"configID"` // ConfigID 配置唯一ID
	LeagueName   string `json:"leagueName"`
	CertName     string `json:"certName"`
	URL          string `json:"url"`
	CAName       string `json:"caName"`
	EnrollId     string `json:"enrollId"`
	EnrollSecret string `json:"enrollSecret"`
}

func (*CertificateAuthoritySelf) Trans2pb

type ChainCodeCollectionsConfig

type ChainCodeCollectionsConfig struct {
	ConfigID    string `json:"configID"` // ConfigID 配置唯一ID
	ChainCodeID string `json:"chainCodeID"`
	OrgName     string `json:"orgName"`
	OrgUser     string `json:"orgUser"`
	ChannelID   string `json:"channelID"`
	PeerName    string `json:"peerName"`
}

type ChannelCreate

type ChannelCreate struct {
	ConfigID   string `json:"configID"` // ConfigID 配置唯一ID
	LeagueName string `json:"leagueName"`
	ChannelID  string `json:"channelID"`
}

type ChannelJoin

type ChannelJoin struct {
	ConfigID  string `json:"configID"` // ConfigID 配置唯一ID
	OrgName   string `json:"orgName"`
	OrgUser   string `json:"orgUser"`
	ChannelID string `json:"channelID"`
}

type ChannelList

type ChannelList struct {
	ConfigID string `json:"configID"` // ConfigID 配置唯一ID
	OrgName  string `json:"orgName"`
	OrgUser  string `json:"orgUser"`
	PeerName string `json:"peerName"`
}

type ChannelPeer

type ChannelPeer struct {
	ConfigID       string `json:"configID"` // ConfigID 配置唯一ID
	ChannelName    string `json:"channelName"`
	PeerName       string `json:"peerName"`
	EndorsingPeer  bool   `json:"endorsingPeer"`
	ChainCodeQuery bool   `json:"chainCodeQuery"`
	LedgerQuery    bool   `json:"ledgerQuery"`
	EventSource    bool   `json:"eventSource"`
}

func (*ChannelPeer) Trans2pb

func (c *ChannelPeer) Trans2pb() *pb.ReqChannelPeer

type ChannelPolicyDiscovery

type ChannelPolicyDiscovery struct {
	ConfigID       string `json:"configID"` // ConfigID 配置唯一ID
	ChannelName    string
	InitialBackOff string
	MaxBackOff     string
	MaxTargets     int32
	Attempts       int32
	BackOffFactor  float32
}

func (*ChannelPolicyDiscovery) Trans2pb

type ChannelPolicyEvent

type ChannelPolicyEvent struct {
	ConfigID                         string `json:"configID"` // ConfigID 配置唯一ID
	ChannelName                      string `json:"channelName"`
	ResolverStrategy                 string `json:"resolverStrategy"`
	Balance                          string `json:"balance"`
	PeerMonitorPeriod                string `json:"peerMonitorPeriod"`
	BlockHeightLagThreshold          int64  `json:"blockHeightLagThreshold"`
	ReconnectBlockHeightLagThreshold int64  `json:"reconnectBlockHeightLagThreshold"`
}

func (*ChannelPolicyEvent) Trans2pb

type ChannelPolicyQuery

type ChannelPolicyQuery struct {
	ConfigID       string  `json:"configID"` // ConfigID 配置唯一ID
	ChannelName    string  `json:"channelName"`
	InitialBackOff string  `json:"initialBackOff"`
	MaxBackOff     string  `json:"maxBackOff"`
	MinResponses   int32   `json:"minResponses"`
	MaxTargets     int32   `json:"maxTargets"`
	Attempts       int32   `json:"attempts"`
	BackOffFactor  float32 `json:"backOffFactor"`
}

func (*ChannelPolicyQuery) Trans2pb

type Client

type Client struct {
	ConfigID     string `json:"configID"`     // ConfigID 配置唯一ID
	TlS          bool   `json:"tls"`          // TlS 是否开启TLS,默认false
	Organization string `json:"organization"` // Organization 这个应用程序实例属于哪个组织?值必须是在“组织”下定义的组织的名称,如:Org1
	Level        string `json:"level"`        // Level 日志级别,debug、info、warn、error等
	CryptoConfig string `json:"cryptoConfig"` // CryptoConfig 带有密钥和证书的MSP目录的根目录
	KeyPath      string `json:"keyPath"`      // KeyPath 客户端密钥,用于TLS与节点和排序服务的握手
	CertPath     string `json:"certPath"`     // CertPath 客户端证书,用于TLS与节点和排序服务的握手
}

func (*Client) Trans2pb

func (c *Client) Trans2pb() *pb.ReqClient

type ClientCustom

type ClientCustom struct {
	ConfigID     string                     `json:"configID"` // ConfigID 配置唯一ID
	Client       *Client                    `json:"client"`
	Peer         *config.ClientPeer         `json:"peer"`
	EventService *config.ClientEventService `json:"eventService"`
	Order        *config.ClientOrder        `json:"order"`
	Global       *config.ClientGlobal       `json:"global"`
	BCCSP        *config.ClientBCCSP        `json:"bccsp"`
}

func (*ClientCustom) Trans2pb

func (c *ClientCustom) Trans2pb() *pb.ReqClientCustom

type ClientSelf

type ClientSelf struct {
	ConfigID     string `json:"configID"` // ConfigID 配置唯一ID
	TlS          bool   `json:"tls"`      // TlS 是否开启TLS,默认false
	LeagueName   string `json:"leagueName"`
	UserName     string `json:"userName"`
	Organization string `json:"organization"` // Organization 这个应用程序实例属于哪个组织?值必须是在“组织”下定义的组织的名称,如:Org1
	Level        string `json:"level"`        // Level 日志级别,debug、info、warn、error等
}

func (*ClientSelf) Trans2pb

func (c *ClientSelf) Trans2pb() *pb.ReqClientSelf

type Install

type Install struct {
	ConfigID string `json:"configID"` // ConfigID 配置唯一ID
	OrgName  string `json:"orgName"`
	OrgUser  string `json:"orgUser"`
	Name     string `json:"name"`
	Source   string `json:"source"`
	Path     string `json:"path"`
	Version  string `json:"version"`
}

type Installed

type Installed struct {
	ConfigID string `json:"configID"` // ConfigID 配置唯一ID
	OrgName  string `json:"orgName"`
	OrgUser  string `json:"orgUser"`
	PeerName string `json:"peerName"`
}

type Instantiate

type Instantiate struct {
	ConfigID     string   `json:"configID"` // ConfigID 配置唯一ID
	OrderOrgName string   `json:"orderOrgName"`
	OrgUser      string   `json:"orgUser"`
	ChannelID    string   `json:"channelID"`
	Name         string   `json:"name"`
	Path         string   `json:"path"`
	Version      string   `json:"version"`
	OrgPolicies  []string `json:"orgPolicies"`
	Args         [][]byte `json:"args"`
}

type Instantiated

type Instantiated struct {
	Installed
	ChannelID string `json:"channelID"`
}

type Invoke

type Invoke struct {
	ConfigID        string   `json:"configID"` // ConfigID 配置唯一ID
	ChannelID       string   `json:"channelID"`
	ChainCodeID     string   `json:"chainCodeID"`
	OrgName         string   `json:"orgName"`
	OrgUser         string   `json:"orgUser"`
	Fcn             string   `json:"fcn"`
	Args            [][]byte `json:"args"`
	TargetEndpoints []string `json:"targetEndpoints"`
}

type InvokeAsync

type InvokeAsync struct {
	Invoke
	Callback string `json:"callback"`
}

type Order

type Order struct {
	ConfigID              string `json:"configID"` // ConfigID 配置唯一ID
	OrderName             string `json:"orderName"`
	URL                   string `json:"url"`
	SSLTargetNameOverride string `json:"sslTargetNameOverride"`
	KeepAliveTime         string `json:"keepAliveTime"`
	KeepAliveTimeout      string `json:"keepAliveTimeout"`
	TLSCACerts            string `json:"tlsCACerts"`
	KeepAlivePermit       bool   `json:"keepAlivePermit"`
	FailFast              bool   `json:"failFast"`
	AllowInsecure         bool   `json:"allowInsecure"`
}

func (*Order) Trans2pb

func (o *Order) Trans2pb() *pb.ReqOrder

type OrderConfig

type OrderConfig struct {
	ConfigID  string `json:"configID"` // ConfigID 配置唯一ID
	OrgName   string `json:"orgName"`
	OrgUser   string `json:"orgUser"`
	ChannelID string `json:"channelID"`
	OrderURL  string `json:"orderURL"`
}

type OrderSelf

type OrderSelf struct {
	ConfigID         string `json:"configID"` // ConfigID 配置唯一ID
	LeagueName       string `json:"leagueName"`
	OrderName        string `json:"orderName"`
	URL              string `json:"url"`
	KeepAliveTime    string `json:"keepAliveTime"`
	KeepAliveTimeout string `json:"keepAliveTimeout"`
	KeepAlivePermit  bool   `json:"keepAlivePermit"`
	FailFast         bool   `json:"failFast"`
	AllowInsecure    bool   `json:"allowInsecure"`
}

func (*OrderSelf) Trans2pb

func (o *OrderSelf) Trans2pb() *pb.ReqOrderSelf

type OrganizationsOrder

type OrganizationsOrder struct {
	ConfigID   string            `json:"configID"` // ConfigID 配置唯一ID
	MspID      string            `json:"mspID"`
	CryptoPath string            `json:"cryptoPath"`
	Users      map[string]string `json:"users"`
}

func (*OrganizationsOrder) Trans2pb

type OrganizationsOrderSelf

type OrganizationsOrderSelf struct {
	ConfigID   string `json:"configID"` // ConfigID 配置唯一ID
	LeagueName string `json:"leagueName"`
}

func (*OrganizationsOrderSelf) Trans2pb

type OrganizationsOrg

type OrganizationsOrg struct {
	ConfigID               string            `json:"configID"` // ConfigID 配置唯一ID
	OrgName                string            `json:"orgName"`
	MspID                  string            `json:"mspID"`
	CryptoPath             string            `json:"cryptoPath"`
	Users                  map[string]string `json:"users"`
	Peers                  []string          `json:"peers"`
	CertificateAuthorities []string          `json:"certificateAuthorities"`
}

func (*OrganizationsOrg) Trans2pb

func (o *OrganizationsOrg) Trans2pb() *pb.ReqOrganizationsOrg

type OrganizationsOrgSelf

type OrganizationsOrgSelf struct {
	ConfigID               string   `json:"configID"` // ConfigID 配置唯一ID
	LeagueName             string   `json:"leagueName"`
	Peers                  []string `json:"peers"`
	CertificateAuthorities []string `json:"certificateAuthorities"`
}

func (*OrganizationsOrgSelf) Trans2pb

type Peer

type Peer struct {
	ConfigID              string `json:"configID"` // ConfigID 配置唯一ID
	PeerName              string `json:"peerName"`
	URL                   string `json:"url"`
	EventUrl              string `json:"eventUrl"`
	SSLTargetNameOverride string `json:"sslTargetNameOverride"`
	KeepAliveTime         string `json:"keepAliveTime"`
	KeepAliveTimeout      string `json:"keepAliveTimeout"`
	TLSCACerts            string `json:"tlsCACerts"`
	KeepAlivePermit       bool   `json:"keepAlivePermit"`
	FailFast              bool   `json:"failFast"`
	AllowInsecure         bool   `json:"allowInsecure"`
}

func (*Peer) Trans2pb

func (p *Peer) Trans2pb() *pb.ReqPeer

type PeerSelf

type PeerSelf struct {
	ConfigID         string `json:"configID"` // ConfigID 配置唯一ID
	LeagueName       string `json:"leagueName"`
	PeerName         string `json:"peerName"`
	URL              string `json:"url"`
	EventUrl         string `json:"eventUrl"`
	KeepAliveTime    string `json:"keepAliveTime"`
	KeepAliveTimeout string `json:"keepAliveTimeout"`
	KeepAlivePermit  bool   `json:"keepAlivePermit"`
	FailFast         bool   `json:"failFast"`
	AllowInsecure    bool   `json:"allowInsecure"`
}

func (*PeerSelf) Trans2pb

func (p *PeerSelf) Trans2pb() *pb.ReqPeerSelf

type Query

type Query struct {
	Invoke
}

type Upgrade

type Upgrade struct {
	Instantiate
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL