files

package
v0.6.24 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppFs = afero.NewOsFs()

Functions

func BuildBrevHome added in v0.6.24

func BuildBrevHome(userHome string) error

func DeleteFile

func DeleteFile(filepath string) error

Delete a single file altogether.

func GetActiveOrgFile

func GetActiveOrgFile() string

func GetActiveOrgsPath

func GetActiveOrgsPath(home string) (string, error)

func GetBrevDirectory

func GetBrevDirectory() string

func GetBrevHome added in v0.6.0

func GetBrevHome(userHome string) (string, error)

func GetBrevSSHConfigPath added in v0.6.0

func GetBrevSSHConfigPath(home string) (string, error)

func GetKubeCertFileName

func GetKubeCertFileName() string

func GetNewBackupSSHConfigFileName added in v0.2.0

func GetNewBackupSSHConfigFileName() string

func GetNewBackupSSHConfigFilePath added in v0.2.0

func GetNewBackupSSHConfigFilePath(home string) (*string, error)

func GetOrCreateSSHConfigFile added in v0.2.0

func GetOrCreateSSHConfigFile(fs afero.Fs, home string) (afero.File, error)

func GetOrgCacheFile

func GetOrgCacheFile() string

func GetPersonalSettingsCache added in v0.6.5

func GetPersonalSettingsCache() string

func GetPersonalSettingsCachePath added in v0.6.5

func GetPersonalSettingsCachePath(home string) (string, error)

func GetSSHPrivateKeyFileName

func GetSSHPrivateKeyFileName() string

func GetSSHPrivateKeyPath added in v0.6.0

func GetSSHPrivateKeyPath(home string) (string, error)

func GetTailScaleOutFileName added in v0.6.22

func GetTailScaleOutFileName() string

func GetTailScaleOutFilePath added in v0.6.22

func GetTailScaleOutFilePath(home string) (*string, error)

func GetUserSSHConfigPath added in v0.2.0

func GetUserSSHConfigPath(home string) (string, error)

func GetWorkspaceCacheFile

func GetWorkspaceCacheFile() string

func OverwriteJSON

func OverwriteJSON(filepath string, v interface{}) error

OverwriteJSON data in the target file with data from the given struct

Usage (unstructured):

  OverwriteJSON("tmp/a/b/c.json", map[string]string{
	    "hi": "there",
  })

Usage (struct):

var foo myStruct
OverwriteJSON("tmp/a/b/c.json", foo)

func OverwriteString

func OverwriteString(filepath string, data string) error

OverwriteString data in the target file with data from the given string

Usage

OverwriteString("tmp/a/b/c.txt", "hi there")

func ReadJSON

func ReadJSON(fs afero.Fs, unsafeFilePathString string, v interface{}) error

ReadJSON reads data from a file into the given struct

Usage:

var foo myStruct
files.ReadJSON("tmp/a.json", &foo)

func ReadString

func ReadString(unsafeFilePathString string) (string, error)

func WriteSSHPrivateKey

func WriteSSHPrivateKey(fs afero.Fs, data string, home string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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