config

package
v0.0.0-...-99fe3a6 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultIdentityURL     = "http://localhost:8030"
	DefaultCredentialsPath = ".secret"

	NewSnapdPasswordKey  = "nats.%s.password"
	SnapdPasswordHash    = "private.nats.%s.password.hash"
	NewSnapd1PasswordKey = "nats.snapd1.password"
	Snapd1PasswordHash   = "private.nats.snapd1.password.hash"
)

Variables

View Source
var ConfigFS = afero.NewOsFs()

Functions

func GetPath

func GetPath(filename string) string

GetPath returns the full path to the data file

func RemoveParameters

func RemoveParameters() error

RemoveParameters removes the configuration parameters on the filesystem, effectively unregistering this device

func StoreParameters

func StoreParameters(c Settings) error

StoreParameters stores the configuration parameters on the filesystem

Types

type Settings

type Settings struct {
	IdentityURL     string `json:"url"`
	CredentialsPath string `json:"path"`
}

Settings defines the application configuration

func ReadParameters

func ReadParameters() *Settings

ReadParameters fetches the store config parameters

Jump to

Keyboard shortcuts

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