common

package
v2.7.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2020 License: Apache-2.0 Imports: 10 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEmpty

func IsEmpty(name string) (bool, error)

Types

type IdentityJSONFile

type IdentityJSONFile struct {
	SerialNumber string `json:"serialNumber" dict:"SERIAL_NUMBER"`
	OU           string `json:"OU" dict:"OU"`
	DeviceID     string `json:"DeviceID" dict:"DEVICE_ID"`
	// HardwareVersion is a string identitying the type of hardware and version of hardware
	HardwareVersion string `json:"hardwareVersion" dict:"HARDWARE_VERSION"`
	EdgePlatform    string `dict:"EDGE_PLATFORM"`
	RadioConfig     string `json:"radioConfig" dict:"RADIO_CONFIG"`
	LEDConfig       string `json:"ledConfig" dict:"LED_CONFIG"`
	LEDProfile      string `json:"ledConfig" dict:"LED_COLOR_PROFILE"`
	ConfigCategory  string `json:"category" dict:"CONFIG_CATEGORY"`
	EthernetMAC     []byte `json:"ethernetMAC"`
	SixMAC          []byte `json:"sixBMAC"`
	// hash []string  // ??
	GatewayServicesAddress  string           `json:"gatewayServicesAddress" dict:"GW_SERVICES_URL"`
	GatewayServicesResource string           `dict:"GW_SERVICES_RESRC"`
	APIServerAddress        string           `json:"apiServerAddress" dict:"API_SERVICES_URL"`
	MccConfig               string           `json:"mcc_config" dict:"MCC_CONFIG"`
	SSL                     *IdentitySSLData `json:"ssl"`
}

IdentityJSONFile is a structure which holds data which is read from identity.json - a file generated by the Pelion Edge Gateway provisioning tools.

func ReadIdentityFile

func ReadIdentityFile(path string, dict *templates.TemplateVarDictionary, log maestroSpecs.Logger) (identityData *IdentityJSONFile, err error)

type IdentitySSLData

type IdentitySSLData struct {
	Client *IdentitySSLKeySet `json:"client"`
	Server *IdentitySSLKeySet `json:"server"`
	CA     *IdentitySSLKeySet `json:"ca"`
}

IdentitySSLData is a structure to hold SSL information for this gateway node

type IdentitySSLKeySet

type IdentitySSLKeySet struct {
	// not all fields always used
	Key          string `json:"key"`
	Cert         string `json:"certificate"`
	CA           string `json:"ca"`
	Intermediate string `json:"intermediate"`
}

IdentitySSLKeySet is used to hold a set of SSL key pair/ca/intermediate data

Jump to

Keyboard shortcuts

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