Versions in this module Expand all Collapse all v0 v0.0.1 Oct 16, 2020 Changes in this version + const Active + var ErrEmptyChannelsList = errors.New("channels list in configuration is empty") + var ErrEmptyThingsList = errors.New("things list in configuration empty") + var ErrFailedBootstrap = errors.New("failed to create bootstrap config") + var ErrFailedBootstrapRetrieval = errors.New("failed to retrieve bootstrap") + var ErrFailedBootstrapValidate = errors.New("failed to validate bootstrap config creation") + var ErrFailedCertCreation = errors.New("failed to create certificates") + var ErrFailedChannelCreation = errors.New("failed to create channel") + var ErrFailedChannelRetrieval = errors.New("failed to retrieve channel") + var ErrFailedThingCreation = errors.New("failed to create thing") + var ErrFailedThingRetrieval = errors.New("failed to retrieve thing") + var ErrFailedToCreateToken = errors.New("failed to create access token") + var ErrGatewayUpdate = errors.New("failed to updated gateway metadata") + var ErrMissingCredentials = errors.New("missing credentials") + var ErrUnauthorized = errors.New("unauthorized access") + func Save(c Config, file string) error + type Bootstrap struct + AutoWhiteList bool + Content map[string]interface{} + Provision bool + X509Provision bool + type Certs struct + HoursValid string + KeyBits int + KeyType string + type Channel struct + Metadata map[string]interface{} + Name string + type Config struct + Bootstrap Bootstrap + Certs Certs + Channels []Channel + File string + Server ServiceConf + Things []Thing + func Read(file string) (Config, error) + type Gateway struct + CfgID string + CtrlChannelID string + DataChannelID string + ExportChannelID string + ExternalID string + ExternalKey string + Type string + type Result struct + CACert string + Channels []SDK.Channel + ClientCert map[string]string + ClientKey map[string]string + Error string + Things []SDK.Thing + Whitelisted map[string]bool + type Service interface + Cert func(token, thingID, duration string, keyBits int) (string, string, error) + Mapping func(token string) (map[string]interface{}, error) + Provision func(token, name, externalID, externalKey string) (Result, error) + func New(cfg Config, sdk SDK.SDK, logger logger.Logger) Service + type ServiceConf struct + HTTPPort string + LogLevel string + MQTTURL string + MfAPIKey string + MfBSURL string + MfCertsURL string + MfPass string + MfUser string + MfWhiteListURL string + Port string + ServerCert string + ServerKey string + TLS bool + ThingsLocation string + UsersLocation string + type Thing struct + Metadata map[string]interface{} + Name string