Documentation ¶
Index ¶
- Constants
- func DeleteCertsJobById(id string, ver string) (string, error)
- func ForceSaveJob(job *Job) (string, error)
- func ForceSaveNetwork(network Network) (string, error)
- func GetCertsJobByUserId(uid string) (*kivik.Rows, error)
- func GetNetworkByServiceId(serviceId string) (*kivik.Rows, error)
- func GetNetworkByUserId(uid string) (*kivik.Rows, error)
- func GetPendingCertsByUserId(uid string) (*kivik.Rows, error)
- func GetPendingCreateByUserId(uid string) (*kivik.Rows, error)
- func GetPendingJobs() (*kivik.Rows, error)
- type Job
- type Network
Constants ¶
View Source
const ( // DB name JOB_DB = "hfrd_job" NETWORK_DB = "hfrd_network" SEPARATOR = "_" // Job DB Design Doc DESIGN_ID_JOB = "_design/apiserver_v1" PENDING_JOBS_VIEW = "pending_jobs" // For jobs with empty status and method of "POST" or "DELETE" PENDING_CREATE_BY_UID = "pending_create_by_uid" ALL_CERTS_JOB_VIEW = "all_certs_jobs" // Network DB Design Doc DESIGN_ID_NETWORK = "_design/apiserver_v1" BY_SERVICEID = "byServiceId" BY_USERID = "byUserId" )
Variables ¶
This section is empty.
Functions ¶
func ForceSaveNetwork ¶
func GetPendingJobs ¶
return all network creation job with empty status
Types ¶
type Job ¶
type Job struct { ID string `json:"_id"` Rev string `json:"_rev,omitempty"` Name string `json:"name"` QueueId string `json:"queueId"` JobId string `json:"jobId"` Status string `json:"status"` ServiceId string `json:"serviceId"` // only available for service deletion job Method string `json:"method"` // POST or DELETE User string `json:"user"` Email string `json:"email"` PlanName string `json:"planName"` // ONLY available for service creation job Env string `json:"env"` // ONLY available for service creation job Location string `json:"location"` // location id for IBP Enterprise Plan NumOfOrgs int `json:"numOfOrgs"` // number of organizations NumOfPeers int `json:"numOfPeers"` // number of peers LedgerType string `json:"ledgerType"` // ledger type }
type Network ¶
type Network struct { ID string `json:"_id"` Rev string `json:"_rev,omitempty"` NetworkId string `json:"networkId"` ServiceId string `json:"serviceId"` User string `json:"user"` Email string `json:"email"` Network map[string]interface{} `json:"network"` // contain all Orgs' key and secret // Deleting: false, Deleted: false -> network is active from hfrd perspective // Deleting: true, Deleted: false -> deleting, job not completed yet // Deleting: false, Deleted: true -> blockchain network is completely deleted // Deleting: true, Deleted: true -> should NOT happen Deleting bool `json:"deleting"` Deleted bool `json:"deleted"` PlanName string `json:"planName"` Env string `json:"env"` CreatedAt int64 `json:"createdAt"` // Unix timestamp in seconds JobId string `json:"jobId"` JobName string `json:"jobName"` Location string `json:"location"` // location id for IBP Enterprise Plan NumOfOrgs int `json:"numOfOrgs"` // number of organizations NumOfPeers int `json:"numOfPeers"` // number of peers LedgerType string `json:"ledgerType"` // ledger type }
Click to show internal directories.
Click to hide internal directories.