files

package
v0.77.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultDirectory is the directory within the home folder in which configuration, credential and cache files will
	// be stored.
	DefaultDirectory = ".config/hcp"

	// FolderMode is the mode the configuration folder will be set to if it is automatically created.
	//
	// It is set to 755 as the .config folder might be used by other applications in the future and the names of
	// contained files are not sensitive.
	// The mode is not enforced and can be changed or set by pre-creating the folder.
	FolderMode = os.FileMode(0755)

	// FileMode is the mode the files in the configuration will be set to if they are automatically created.
	//
	// It is set to only be accessible by the user that executes the application as the file contains credentials.
	// The mode is not enforced and can be changed or set by pre-creating the file(s).
	FileMode = os.FileMode(0700)

	// TokenCacheFileName is the name of the cache file within the configuration folder.
	TokenCacheFileName = "creds-cache.json"
)

Variables

This section is empty.

Functions

func TokenCacheFile added in v0.72.0

func TokenCacheFile() (string, error)

TokenCacheFile will return the absolute path to the token cache file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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