secretread

package
v1.2.2-dev.33 Latest Latest
Warning

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

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

Documentation

Overview

******************************************************************************

  • Copyright 2020 Redis Labs *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. *
  • @author: Diana Atanasova
  • @author: Andre Srinivasan ******************************************************************************

******************************************************************************

  • Copyright 2020 Redis Labs *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. *
  • @author: Diana Atanasova
  • @author: Andre Srinivasan ******************************************************************************

******************************************************************************

  • Copyright 2020 Redis Labs *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. *
  • @author: Diana Atanasova
  • @author: Andre Srinivasan ******************************************************************************

******************************************************************************

  • Copyright 2020 Redis Labs *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. *
  • @author: Diana Atanasova
  • @author: Andre Srinivasan ******************************************************************************

Index

Constants

View Source
const Confdir = "res"
View Source
const ConfigFileName = "configuration.toml"
View Source
const SecretStore = "EDGEX_SECURITY_SECRET_STORE"
View Source
const ServiceKey = "edgex-redis"
View Source
const VaultToken = "X-Vault-Token"

Variables

This section is empty.

Functions

func GetCredentials

func GetCredentials(lc logger.LoggingClient, secureConfig Configuration) (map[string]DatabaseInfo, error)

Types

type Configuration

type Configuration struct {
	Writable    WritableInfo
	Service     ServiceInfo
	SecretStore SecretStoreInfo
	Databases   map[string]DatabaseInfo
}

func LoadConfig

func LoadConfig(lc logger.LoggingClient) (Configuration, error)

type DatabaseInfo

type DatabaseInfo struct {
	Username string
	Password string
}

type SecretStoreInfo

type SecretStoreInfo struct {
	vault.SecretConfig
	TokenFile    string
	PasswordFile string
}

type ServiceInfo

type ServiceInfo struct {
	// BootTimeout indicates, in milliseconds, how long the service will retry connecting to mongo database
	// before giving up. Default is 30,000.
	BootTimeout int
}

type WritableInfo

type WritableInfo struct {
	LogLevel       string
	RequestTimeout int
}

Jump to

Keyboard shortcuts

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