Documentation
¶
Index ¶
- Variables
- func BuildBrevHome(fs afero.Fs, userHome string) error
- func CatFile(filePath string) (string, error)
- func DeleteFile(fs afero.Fs, filepath string) error
- func GetActiveOrgsPath(home string) string
- func GetBrevCloudflaredBinaryPath(home string) string
- func GetBrevHome(userHome string) string
- func GetBrevSSHConfigPath(home string) string
- func GetNewBackupSSHConfigFileName() string
- func GetNewBackupSSHConfigFilePath(home string) string
- func GetOnboardingStepPath(home string) string
- func GetPersonalSettingsPath(home string) string
- func GetSSHPrivateKeyFileName() string
- func GetSSHPrivateKeyPath(home string) string
- func GetUserSSHConfigPath(home string) (string, error)
- func OverwriteJSON(fs afero.Fs, filepath string, v interface{}) error
- func ReadJSON(fs afero.Fs, unsafeFilePathString string, v interface{}) error
- func ReadString(fs afero.Fs, unsafeFilePathString string) (string, error)
- func WritePersonalSettings(fs afero.Fs, home string, settings *PersonalSettings) error
- func WriteSSHPrivateKey(fs afero.Fs, data string, home string) error
- type PersonalSettings
Constants ¶
This section is empty.
Variables ¶
View Source
var AppFs = afero.NewOsFs()
Functions ¶
func DeleteFile ¶
Delete a single file altogether.
func GetActiveOrgsPath ¶
func GetBrevCloudflaredBinaryPath ¶ added in v0.6.295
func GetBrevHome ¶ added in v0.6.0
func GetBrevSSHConfigPath ¶ added in v0.6.0
func GetNewBackupSSHConfigFileName ¶ added in v0.2.0
func GetNewBackupSSHConfigFileName() string
func GetNewBackupSSHConfigFilePath ¶ added in v0.2.0
func GetOnboardingStepPath ¶ added in v0.6.91
func GetPersonalSettingsPath ¶ added in v0.6.311
func GetSSHPrivateKeyFileName ¶
func GetSSHPrivateKeyFileName() string
func GetSSHPrivateKeyPath ¶ added in v0.6.0
func GetUserSSHConfigPath ¶ added in v0.2.0
func OverwriteJSON ¶
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 ReadJSON ¶
ReadJSON reads data from a file into the given struct
Usage:
var foo myStruct
files.ReadJSON("tmp/a.json", &foo)
func WritePersonalSettings ¶ added in v0.6.311
func WritePersonalSettings(fs afero.Fs, home string, settings *PersonalSettings) error
Types ¶
type PersonalSettings ¶ added in v0.6.311
type PersonalSettings struct {
DefaultEditor string `json:"default_editor"`
}
func ReadPersonalSettings ¶ added in v0.6.311
func ReadPersonalSettings(fs afero.Fs, home string) (*PersonalSettings, error)
Click to show internal directories.
Click to hide internal directories.