Documentation ¶
Index ¶
- func AddAllRequiredSvcs(nodeCreds, org, url, arch, versionRange string, ...)
- func CreateInputFile(nodeOrg, pattern, arch, nodeIdTok, inputFile string)
- func DoIt(org, pattern, nodeIdTok, userPw, email, inputFile string, ...)
- func GetHighestService(nodeCreds, org, url, arch string, versionRanges []string) exchange.ServiceDefinition
- func ReadAndVerifyPolicFile(jsonFilePath string, nodePol *externalpolicy.ExternalPolicy)
- func ReadInputFile(filePath string, inputFileStruct *InputFile)
- type ExchangeNodes
- type GlobalSet
- type InputFile
- type MicroWork
- type SvcMapValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAllRequiredSvcs ¶
func AddAllRequiredSvcs(nodeCreds, org, url, arch, versionRange string, allRequiredSvcs map[string]*SvcMapValue)
AddAllRequiredSvcs
func CreateInputFile ¶
func CreateInputFile(nodeOrg, pattern, arch, nodeIdTok, inputFile string)
CreateInputFile runs thru the services used by this pattern (descending into all required services) and collects the user input needed
func DoIt ¶
func DoIt(org, pattern, nodeIdTok, userPw, email, inputFile string, nodeOrgFromFlag string, patternFromFlag string, nodeName string, nodepolicyFlag string)
DoIt registers this node to Horizon with a pattern
func GetHighestService ¶
func GetHighestService(nodeCreds, org, url, arch string, versionRanges []string) exchange.ServiceDefinition
GetHighestService queries the exchange for all versions of this service and returns the highest version that is within at least 1 of the version ranges
func ReadAndVerifyPolicFile ¶
func ReadAndVerifyPolicFile(jsonFilePath string, nodePol *externalpolicy.ExternalPolicy)
read and verify a node policy file
func ReadInputFile ¶
Types ¶
type ExchangeNodes ¶
type GlobalSet ¶
type GlobalSet struct { Type string `json:"type"` ServiceSpecs persistence.ServiceSpecs `json:"service_specs,omitempty"` Variables map[string]interface{} `json:"variables"` }
These structs are used to parse the registration input file. These are also used by the hzn dev code.
type MicroWork ¶
type MicroWork struct { Org string `json:"org"` Url string `json:"url"` VersionRange string `json:"versionRange,omitempty"` //optional Variables map[string]interface{} `json:"variables"` }
Use for services. This is used by other cli sub-cmds too.
type SvcMapValue ¶
type SvcMapValue struct { Org string URL string Arch string VersionRanges []string // all the version ranges we find for this service as we descend thru the required services HighestVersion string // filled in when we have to find the highest service to get its required services. Is valid at the end if len(VersionRanges)==1 UserInputs []exchange.UserInput }
Click to show internal directories.
Click to hide internal directories.