Documentation ¶
Index ¶
- func CWD() string
- func CreateProject(projectPath string) error
- func CurrentWorkingDir() string
- func PathExists(path string) bool
- func SitesFolders() []string
- func UserHomeDir() string
- type BaseFolderStruct
- type SitesFoldersWithComposeStruct
- func FolderParseComposeFile(path string) (SitesFoldersWithComposeStruct, error)
- func GetProjects() []SitesFoldersWithComposeStruct
- func SitesFoldersWithCompose() []SitesFoldersWithComposeStruct
- func SitesFoldersWithComposeRunning() []SitesFoldersWithComposeStruct
- func SitesFoldersWithComposeStopped() []SitesFoldersWithComposeStruct
- type YamlDockerComposeStruct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateProject ¶
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 ¶
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