blockchains

package
v0.0.0-...-d823fe1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BCSInstance

type BCSInstance struct {
	Basic      Basic     `json:"basic_info"`
	Channels   []Channel `json:"channels"`
	Peer       []Peer    `json:"peer_info"`
	LightPeer  []Peer    `json:"loght_peer_info"`
	Orderer    Peer      `json:"orderer_info"`
	CouchDB    CouchDB   `json:"couch_db_info"`
	DMSKafka   DMSKafka  `json:"dms_kafka_info"`
	IEF        IEF       `json:"ief_info"`
	SFS        SFS       `json:"sfs_info"`
	Agent      Peer      `json:"agent_info"`
	RestfulAPI Peer      `json:"restapi_info"`
	PVC        PVC       `json:"evs_pvc_info"`
	TaskServer Peer      `json:"tc3_taskserver_info"`
	OBS        OBS       `json:"obs_bucket_info"`
}

type Basic

type Basic struct {
	ID                       string       `json:"id"`
	Name                     string       `json:"name"`
	KernelType               string       `json:"kernel_type"`
	Version                  string       `json:"version"`
	VersionType              int          `json:"version_type"`
	VolumeType               string       `json:"volume_type"`
	ServiceType              string       `json:"service_type"`
	PurchaseType             string       `json:"purchase_type"`
	SignAlgorithm            string       `json:"sign_algorithm"`
	Consensus                string       `json:"consensus"`
	ChargingMode             int          `json:"charging_mode"`
	DatabaseType             string       `json:"database_type"`
	ClusterID                string       `json:"cluster_id"`
	ClusterName              string       `json:"cluster_name"`
	ClusterType              string       `json:"cluster_type"`
	ClusterPlatformType      string       `json:"cluster_platform_type"`
	ClusterAvailabilityZone  string       `json:"cluster_az"`
	CreatedTime              string       `json:"created_time"`
	DeployType               string       `json:"deploy_type"`
	DeployScale              int          `json:"deploy_scale"`
	DeployStatus             int          `json:"deploy_status"`
	DetailStatus             DetailStatus `json:"detail_status"`
	IsCrossRegion            bool         `json:"is_cross_region"`
	IsSupportRollback        bool         `json:"is_support_rollback"`
	IsSupportRestful         bool         `json:"is_support_restful"`
	IsSupportTc3             bool         `json:"is_support_tc3"`
	IsOldService             bool         `json:"is_old_service"`
	OldServiceVersion        string       `json:"old_service_version"`
	AgentPortalAddress       []string     `json:"agent_portal_addrs"`
	Status                   string       `json:"status"`
	ProcessStatus            string       `json:"process_status"`
	Tc3TaskServerPortalAddrs []string     `json:"tc3_taskserver_portal_addrs"`
	TotalDeployPeer          int          `json:"total_deploy_peer"`
	OrderStatus              int          `json:"order_status"`
	OrderInfo                OrderInfo    `json:"order_info"`
	OrderFadeCache           int          `json:"order_fade_cache"`
	OrderFadeEnable          bool         `json:"order_fade_enable"`
	IEFClusterInfo           IEFCluster   `json:"ief_cluster_info"`
	IEFAPIVersion            string       `json:"iefapi_version"`
}

type BlockChain

type BlockChain struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type BlockInfo

type BlockInfo struct {
	BatchTimeout      int `json:"batch_timeout,omitempty"`
	MaxMessageCount   int `json:"max_message_count,omitempty"`
	PreferredMaxbytes int `json:"preferred_maxbytes,omitempty"`
}

BlockInfo is the turbo struct that will be used to creating a bcs instance

type CCEClusterInfo

type CCEClusterInfo struct {
	ID   string `json:"cluster_id" required:"true"`
	Name string `json:"cluster_name" required:"true"`
}

CCEClusterInfo is the CCE cluster struct that will be used to associate when creating a bcs instance

type CCECreateInfo

type CCECreateInfo struct {
	NodeNum          int    `json:"node_num" required:"true"`
	Flavor           string `json:"node_flavor" required:"true"`
	ClusterFlavor    string `json:"cce_flavor" required:"true"`
	Password         string `json:"init_node_pwd" required:"true"`
	AvailabilityZone string `json:"az" required:"true"`
	PlatformType     string `json:"cluster_platform_type" required:"true"`
}

CCECreateInfo is the struct that will be used to specify the creation of a new CCE cluster when creating a bcs instance

type CCEEngine

type CCEEngine struct {
	Cluster       StatusDetail `json:"cluster"`
	Network       StatusDetail `json:"network"`
	SecurityGroup StatusDetail `json:"security_group"`
}

type Channel

type Channel struct {
	Name        string              `json:"name"`
	OrgNames    []string            `json:"org_names"`
	OrgNameHash []string            `json:"org_name_hash"`
	Peers       map[string][]string `json:"peers"`
}

type ChannelInfo

type ChannelInfo struct {
	Name        string   `json:"name" required:"true"`
	OrgNames    []string `json:"org_names" required:"true"`
	Description string   `json:"desctiption,omitempty"`
}

ChannelInfo is the channel struct that will be used to creating a bcs instance

type CouchDB

type CouchDB struct {
	User string `json:"user"`
}

type CouchDBInfo

type CouchDBInfo struct {
	UserName string `json:"user_name" required:"true"`
	Password string `json:"password" required:"true"`
}

CouchDBInfo is the couch database struct that will be used to creating a bcs instance

type CreateOpts

type CreateOpts struct {
	Name                string          `json:"name" required:"true"`
	ClusterType         string          `json:"cluster_type" required:"true"`
	CreateNewCluster    *bool           `json:"create_new_cluster" required:"true"`
	EnterpriseProjectId string          `json:"enterprise_project_id" required:"true"`
	FabricVersion       string          `json:"fabric_version" required:"true"`
	Password            string          `json:"resource_password" required:"true"`
	VersionType         int             `json:"version_type" required:"true"`
	BlockChainType      string          `json:"blockchain_type,omitempty"`
	Consensus           string          `json:"consensus,omitempty"`
	SignAlgorithm       string          `json:"sign_algorithm,omitempty"`
	VolumeType          string          `json:"volume_type,omitempty"`
	EvsDiskType         string          `json:"evs_disk_type,omitempty"`
	OrgDiskSize         int             `json:"org_disk_size,omitempty"`
	DatabaseType        string          `json:"database_type,omitempty"`
	OrdererNodeNumber   int             `json:"orderer_node_number,omitempty"`
	EIPEnable           bool            `json:"use_eip,omitempty"`
	BandwidthSize       int             `json:"bandwidth_size,omitempty"`
	CCEClusterInfo      *CCEClusterInfo `json:"cce_cluster_info,omitempty"`
	CCECreateInfo       *CCECreateInfo  `json:"cce_create_info,omitempty"`
	IEFDeployMode       int             `json:"ief_deploy_mode,omitempty"`
	IEFNodesInfo        []IEFNode       `json:"ief_nodes_info,omitempty"`
	PeerOrgs            []PeerOrg       `json:"peer_orgs,omitempty"`
	Channels            []ChannelInfo   `json:"channels,omitempty"`
	CouchDBInfo         *CouchDBInfo    `json:"couchdb_info,omitempty"`
	SFSTurbo            *SFSTurbo       `json:"turbo_info,omitempty"`
	Block               *BlockInfo      `json:"block_info,omitempty"`
	Kafka               *KafkaInfo      `json:"kafka_create_info,omitempty"`
	TC3Need             bool            `json:"tc3_need,omitempty"`
	RestfulAPISupport   bool            `json:"restful_api_support,omitempty"`
	IsInvitee           bool            `json:"is_invitee,omitempty"`
	InvitorInfo         *InvitorInfo    `json:"invitor_infos,omitempty"`
}

CreateOpts is a struct which will be used to create a bcs instance

func (CreateOpts) ToInstancesCreateMap

func (opts CreateOpts) ToInstancesCreateMap() (map[string]interface{}, error)

type CreateOptsBuilder

type CreateOptsBuilder interface {
	ToInstancesCreateMap() (map[string]interface{}, error)
}

type CreateResponse

type CreateResponse struct {
	ID   string `json:"blockchain_id"`
	Name string `json:"blockchain_name"`
}

type CreateResult

type CreateResult struct {
	// contains filtered or unexported fields
}

CreateResult is a struct that represents the result of CreateNewBlockchain

func Create

func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)

Create is a method by which can be able to access the create function that create a bcs instance

func (CreateResult) Extract

func (r CreateResult) Extract() (*CreateResponse, error)

type DMSKafka

type DMSKafka struct {
	Address         []string `json:"addr"`
	Name            string   `json:"name"`
	Status          string   `json:"status"`
	NodeCount       int      `json:"node_cnt"`
	OrderFadeEnable bool     `json:"order_fade_enable"`
	OrderFadeCache  int      `json:"order_fade_cache"`
}

type DeleteOpts

type DeleteOpts struct {
	IsDeleteStorage  bool `q:"is_delete_storage"`
	IsDeleteOBS      bool `q:"is_delete_obs"`
	IsDeleteResource bool `q:"is_delete_resource"`
}

DeleteOpts is a struct which will be used to delete an existing bcs instance

func (DeleteOpts) ToInstanceDeleteQuery

func (opts DeleteOpts) ToInstanceDeleteQuery() (string, error)

type DeleteOptsBuilder

type DeleteOptsBuilder interface {
	ToInstanceDeleteQuery() (string, error)
}

type DeleteResult

type DeleteResult struct {
	// contains filtered or unexported fields
}

DeleteResult is a struct that represents the result of DeleteBlockchain

func Delete

func Delete(client *golangsdk.ServiceClient, opts DeleteOptsBuilder, id string) (r DeleteResult)

Delete is a method to delete an existing bcs instance

func (DeleteResult) Extract

func (r DeleteResult) Extract() error

type DetailStatus

type DetailStatus struct {
	AgentStatus     string `json:"agent_status"`
	ConsensusStatus string `json:"consensus_status"`
	OrgStatus       string `json:"org_status"`
	PeerStatus      string `json:"peer_status"`
	PluginStatus    string `json:"plugin_status"`
}

type IEF

type IEF struct {
	DeployMode int `json:"deploy_mode"`
}

type IEFCluster

type IEFCluster struct {
	GroupID      string `json:"group_id"`
	GroupName    string `json:"group_name"`
	InstanceID   string `json:"instance_id"`
	InstanceName string `json:"instance_name"`
}

type IEFNode

type IEFNode struct {
	ID        string `json:"id" required:"true"`
	Status    string `json:"status" required:"true"`
	IPAddress string `json:"public_ip_address" required:"true"`
}

IEFNode is the IEF node struct that will be used to associate when creating a bcs instance

type InvitorInfo

type InvitorInfo struct {
	TenantID     string `json:"tenant_id" required:"true"`
	ProjectID    string `json:"project_id" required:"true"`
	BlockchainID string `json:"blockchain_id" required:"true"`
}

InvitorInfo is the invitor struct that be used to config when creating a bcs instance

type KafkaInfo

type KafkaInfo struct {
	Flavor           string `json:"spec" required:"true"`
	Storage          int    `json:"storage" required:"true"`
	AvailabilityZone string `json:"az" required:"true"`
}

KafkaInfo is the block generation struct that be used to config when creating a bcs instance

type ListResult

type ListResult struct {
	// contains filtered or unexported fields
}

ListResult is a struct that represents the result of ListBlockchain

func List

func List(client *golangsdk.ServiceClient) (r ListResult)

List is a method to obtain the detailed information list of all existing bcs instance

func (ListResult) Extract

func (r ListResult) Extract() (*[]BlockChain, error)

type Node

type Node struct {
	Port     string   `json:"ip_port"`
	Channels []string `json:"channels"`
}

type NodePeer

type NodePeer struct {
	Name    string `json:"name" required:"true"`
	Count   int    `json:"node_count" required:"true"`
	PVCName string `json:"pvc_name,omitempty"`
}

NodePeer is the peer organization struct that will be used to add a peer organization to an existing bcs instance

type NodesResult

type NodesResult struct {
	// contains filtered or unexported fields
}

NodesResult is a struct that represents the result of ShowBlockchainNode

func GetNodes

func GetNodes(client *golangsdk.ServiceClient, id string) (r NodesResult)

GetNodes is a method to obtain the node information list of an existing bcs instance

func (NodesResult) Extract

func (r NodesResult) Extract() (*map[string]Org, error)

type OBS

type OBS struct {
	Name    string `json:"name"`
	Address string `json:"addr"`
}

type OrderInfo

type OrderInfo struct {
	Delete            int    `json:"delete"`
	Operate           int    `json:"operate"`
	OrderID           string `json:"order_id"`
	OrderStatus       int    `json:"order_status"`
	OrderType         int    `json:"order_type"`
	Release           int    `json:"release"`
	ResourceErrorCode string `json:"resource_error_code"`
	ResourceStatus    int    `json:"resource_status"`
}

type Org

type Org struct {
	OrgMSPID  string          `json:"org_msp_id"`
	OrgDomain string          `json:"org_domain"`
	Peers     map[string]Node `json:"peers"`
}

type PVC

type PVC struct {
	DeployMode int `json:"deploy_mode"`
}

type Peer

type Peer struct {
	Name         string        `json:"name"`
	NodeCount    int           `json:"node_cnt"`
	Status       string        `json:"status"`
	StatusDetail string        `json:"status_detail"`
	PVCName      string        `json:"pvc_name"`
	Address      []PeerAddress `json:"address"`
}

type PeerAddress

type PeerAddress struct {
	DomainPort string `json:"domain_port"`
	IPPort     string `json:"ip_port"`
}

type PeerOrg

type PeerOrg struct {
	Name      string `json:"name" required:"true"`
	NodeCount int    `json:"node_count" required:"true"`
}

PeerOrg is the peer organization struct that will be used to creating a bcs instance

type SFS

type SFS struct {
	Name    string `json:"name"`
	PVCName string `json:"pvc_name"`
	Address string `json:"addr"`
	Type    string `json:"type"`
}

type SFSTurbo

type SFSTurbo struct {
	ShareType        string `json:"share_type" required:"true"`
	Type             string `json:"type" required:"true"`
	AvailabilityZone string `json:"availability_zone" required:"true"`
	Flavor           string `json:"resource_spec_code" required:"true"`
}

SFSTurbo is the turbo struct that will be used to creating a bcs instance

type ShowResult

type ShowResult struct {
	// contains filtered or unexported fields
}

ShowResult is a struct that represents the result of ShowBlockchainDetail

func Get

func Get(client *golangsdk.ServiceClient, id string) (r ShowResult)

Get is a method to obtain the detailed information of an existing bcs instance

func (ShowResult) Extract

func (r ShowResult) Extract() (*BCSInstance, error)

type Status

type Status struct {
	BCSStatus   StatusDetail `json:"bcs"`
	EIPStatus   StatusDetail `json:"eip"`
	SFSStatus   StatusDetail `json:"sfs"`
	OBSStatus   StatusDetail `json:"obs"`
	KafkaStatus StatusDetail `json:"kafka"`
	CCEStatus   CCEEngine    `json:"cce"`
}

type StatusDetail

type StatusDetail struct {
	StartTime string `json:"start_time"`
	EndTime   string `json:"end_time"`
	Status    string `json:"status"`
	Detail    string `json:"detail"`
}

type StatusResult

type StatusResult struct {
	// contains filtered or unexported fields
}

StatusResult is a struct that represents the result of ShowBlockchainStatus

func GetStatus

func GetStatus(client *golangsdk.ServiceClient, id string) (r StatusResult)

GetStatus is a method to obtain all block status of an existing bcs instance

func (StatusResult) Extract

func (r StatusResult) Extract() (*Status, error)

type UpdateOpts

type UpdateOpts struct {
	NodePeer  []NodePeer `json:"node_orgs" required:"true"`
	PublicIPs []IEFNode  `json:"publicips,omitempty"`
}

UpdateOpts is a struct which will be used to update an existing bcs instance

func (UpdateOpts) ToInstancesUpdateMap

func (opts UpdateOpts) ToInstancesUpdateMap() (map[string]interface{}, error)

type UpdateOptsBuilder

type UpdateOptsBuilder interface {
	ToInstancesUpdateMap() (map[string]interface{}, error)
}

type UpdateResult

type UpdateResult struct {
	// contains filtered or unexported fields
}

UpdateResult is a struct which represents the result of UpdateBlockchain

func Update

func Update(client *golangsdk.ServiceClient, opts UpdateOptsBuilder, id string) (r UpdateResult)

Update is a method to update an existing bcs instance

func (UpdateResult) Extract

func (r UpdateResult) Extract() error

Jump to

Keyboard shortcuts

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