Documentation ¶
Index ¶
- Constants
- Variables
- func AddOrgPost(c *gin.Context)
- func CertsJobDelete(c *gin.Context)
- func GetAllCertsJob4IBP(c *gin.Context)
- func GetAllServices(c *gin.Context)
- func GetCertsJobByUid(uid string) ([]couch.Job, error)
- func GetCertsPendingJobs(c *gin.Context)
- func GetJobStatus(c *gin.Context)
- func GetList(c *gin.Context, suffix string) ([]string, error)
- func GetPendingCertsByUid(uid string) ([]couch.Job, error)
- func GetPendingCreate(c *gin.Context)
- func GetPendingCreateByUid(uid string) ([]couch.Job, error)
- func IbpCerts(c *gin.Context)
- func IbpCertsPost(c *gin.Context)
- func IbpUI(c *gin.Context)
- func IcpNetworkDelete(c *gin.Context)
- func IcpNetworkGet(c *gin.Context)
- func IcpNetworkPost(c *gin.Context)
- func IcpUI(c *gin.Context)
- func MainUI(c *gin.Context)
- func ModuleTestDelete(c *gin.Context)
- func ModuleTestGet(c *gin.Context)
- func ModuleTestPost(c *gin.Context)
- func ModuleTestUI(c *gin.Context)
- func NetworkDelete(c *gin.Context)
- func NetworkGet(c *gin.Context)
- func NetworkPost(c *gin.Context)
- func NetworkUI(c *gin.Context)
- func ServiceDeleteByRequestId(c *gin.Context)
- func ServiceDeleteByServiceId(c *gin.Context)
- func ServiceGetByRequestId(c *gin.Context)
- func ServiceGetByServiceId(c *gin.Context)
- func ServicePost(c *gin.Context)
- func SetJenkins(jenkins jenkins.Jenkins)
- func SortItems(theList []HFRDItem)
- func SortServices(theList []Service)
- func TestGet(c *gin.Context)
- func TestPost(c *gin.Context)
- type HFRDItem
- type HFRDItemList
- type ItemList
- type NetworkConfig
- type Plan
- type Service
- type ServiceList
- type Test
Constants ¶
View Source
const ( // Query parameters related constants ENV = "env" REQUEST_ID_REQ = "requestid" REQUEST_ID_RES = "Request-Id" UID = "uid" LOCATION = "loc" PLAN_NAME = "name" // environment names BX_STAGING = "bxstaging" // Bluemix staging: supports STARTER and ENTERPRISE plans BX_PROD = "bxproduction" // Bluemix production: supports STARTER and ENTERPRISE plans CM = "cm" // cluster manager: supports ENTERPRISE plan only DEFAULT_ENV = BX_STAGING // Plan names STARTER = "sp" // Starter plan: available in BX_* environments ENTERPRISE = "ep" // Enterprise plan: available on BX_* and CM environments // Network configurations for cluster manager environment // ONLY required for cm environment DEFAULT_NUM_OF_ORGS = 1 // number or organizations per network DEFAULT_NUM_OF_PEERS = 2 // number of peers per organization NUM_OF_ORGS_KEY = "numOfOrgs" NUM_OF_PEERS_KEY = "numOfPeers" LEDGER_TYPE_KEY = "ledgerType" // See https://github.ibm.com/IBM-Blockchain/manager-v1/blob/49d29b036f9435da489d7b36ad18eeb30dfa8cac/bluemix-fabric-functions.js#L521 LEVELDB = "levelDB" COUCHDB = "couch" QUEUEID = "queueid" CHARTPATH = "chartpath" // certs tar support CERT_VERSION_KEY = "certsVersion" CERT_V1 = "v1" CERT_V2 = "v2" CONN_JSON = "connection.json" CONN_YAML = "connection.yml" IDENTITY = "identity.json" KEYFILES = "keyfiles" SEP = string(filepath.Separator) )
Variables ¶
View Source
var ( // Supported environments and plans SUPPORTED_ENV = map[string][]string{ BX_STAGING: []string{STARTER, ENTERPRISE}, BX_PROD: []string{STARTER, ENTERPRISE}, CM: []string{ENTERPRISE}, } )
Functions ¶
func AddOrgPost ¶
func CertsJobDelete ¶
func GetAllCertsJob4IBP ¶
func GetAllServices ¶
func GetCertsPendingJobs ¶
get all pending getting IBP network certs job by user id
func GetJobStatus ¶
func GetPendingCreate ¶
get all pending create IBP network job by user id
func IbpCertsPost ¶
func IcpNetworkDelete ¶
func IcpNetworkGet ¶
func IcpNetworkPost ¶
func ModuleTestDelete ¶
func ModuleTestGet ¶
func ModuleTestPost ¶
func ModuleTestUI ¶
func NetworkDelete ¶
func NetworkGet ¶
func NetworkPost ¶
func ServiceGetByRequestId ¶
func ServiceGetByServiceId ¶
func ServicePost ¶
func SetJenkins ¶
TODO: This should only be called by testing files...
func SortServices ¶
func SortServices(theList []Service)
Types ¶
type HFRDItemList ¶
type NetworkConfig ¶
type Plan ¶
type Plan struct { Env string `json:"env"` // bxstaging, bxproduction, cm, etc... Location string `json:"loc"` // Only required for Enterprise Plan Name string `json:"name"` // Starter or Enterprise plan, [sp, ep] Config NetworkConfig `json:"config"` // Customized network configuration. Only required for cm environment }
Plan struct holds metadata of a blockchain network, like environment(bxstaging, bxproduction, cm and more to come) Testers should be able to choose where the blockchain network to be created, like "ZBC01 in POK" for performance testers
type Service ¶
type Service struct { NetworkId string `json:"networkId"` ServiceId string `json:"serviceId"` PlanName string `json:"planName"` Env string `json:"env"` CreatedAt string `json:"createdAt"` // Human readable format JobName string `json:"jobName"` JobId string `json:"jobId"` Location string `json:"location,omitempty"` // location id of IBP Enterprise Plan NumOfOrgs int `json:"numOfOrgs,omitempty"` // number of organizations-- IBP EP NumOfPeers int `json:"numOfPeers,omitempty"` // number of peers per organization-- IBP EP LedgerType string `json:"ledgerType,omitempty"` // ledger type: couch/levelDB-- IBP EP }
a subset of couch.Network
func GetServicesByUid ¶
type ServiceList ¶
type ServiceList []Service
func (ServiceList) Len ¶
func (I ServiceList) Len() int
func (ServiceList) Less ¶
func (I ServiceList) Less(i, j int) bool
func (ServiceList) Swap ¶
func (I ServiceList) Swap(i, j int)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.