fs

package
v0.0.0-...-38cc344 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CWD

func CWD() string

CWD : Current Working Directory

func CreateProject

func CreateProject(projectPath string) error

CreateProject : Save a project to file

func CurrentWorkingDir

func CurrentWorkingDir() string

CurrentWorkingDir : Returns the current users home directory or exits with error if not found

func PathExists

func PathExists(path string) bool

PathExists : Simple check to see if a folder or file exists

func SitesFolders

func SitesFolders() []string

SitesFolders : Returns list of folders found within '~/Sites'

func UserHomeDir

func UserHomeDir() string

UserHomeDir : Returns the current users home dir or exits with error if not found

Types

type BaseFolderStruct

type BaseFolderStruct struct {
	Name       string `json:"name"`
	Path       string `json:"path"`
	HasCompose bool   `json:"hasCompose"`
	Hidden     bool   `json:"hidden"`
}

BaseFolderStruct : Base folder

func FoldersFromPath

func FoldersFromPath(path string) []BaseFolderStruct

FoldersFromPath : Get a list of folders from path

type SitesFoldersWithComposeStruct

type SitesFoldersWithComposeStruct struct {
	Name        string `json:"name"`
	Path        string `json:"path"`
	ComposeFile string `json:"composeFile"`
	Compose     YamlDockerComposeStruct
	Containers  []types.ContainerJSON `json:"containers"`
}

SitesFoldersWithComposeStruct : Simple struct for attaching compose data to folder

func FolderParseComposeFile

func FolderParseComposeFile(path string) (SitesFoldersWithComposeStruct, error)

FolderParseComposeFile : Look for and parse docker compose file into struct

func GetProjects

func GetProjects() []SitesFoldersWithComposeStruct

GetProjects : Get slice of projects saved

func SitesFoldersWithCompose

func SitesFoldersWithCompose() []SitesFoldersWithComposeStruct

SitesFoldersWithCompose : Returns folders found within '~/Sites' with their compose data attached

func SitesFoldersWithComposeRunning

func SitesFoldersWithComposeRunning() []SitesFoldersWithComposeStruct

SitesFoldersWithComposeRunning : Returns list of folders that have a running container along with compose struct

func SitesFoldersWithComposeStopped

func SitesFoldersWithComposeStopped() []SitesFoldersWithComposeStruct

SitesFoldersWithComposeStopped : Returns list of folders that have a stopped container along with compose struct

type YamlDockerComposeStruct

type YamlDockerComposeStruct struct {
	Services map[string]service
	Networks struct {
		Default struct {
			External struct {
				Name string
			}
		}
	}
}

YamlDockerComposeStruct : test

func YamlParseDockerCompose

func YamlParseDockerCompose(path string) YamlDockerComposeStruct

YamlParseDockerCompose : Takes a yaml string and returns a data struct of that string content

Jump to

Keyboard shortcuts

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