diff --git a/plugins/buildpacks/triggers.go b/plugins/buildpacks/triggers.go index 50f95da98..d06e387e4 100644 --- a/plugins/buildpacks/triggers.go +++ b/plugins/buildpacks/triggers.go @@ -9,14 +9,14 @@ import ( "github.com/dokku/dokku/plugins/common" ) -// runs the install step for the buildpacks plugin +// TriggerInstall runs the install step for the buildpacks plugin func TriggerInstall() { if err := common.PropertySetup("buildpacks"); err != nil { common.LogFail(fmt.Sprintf("Unable to install the buildpacks plugin: %s", err.Error())) } } -// destroys the buildpacks property for a given app container +// TriggerPostDelete destroys the buildpacks property for a given app container func TriggerPostDelete(appName string) { err := common.PropertyDestroy("buildpacks", appName) if err != nil { @@ -24,7 +24,7 @@ func TriggerPostDelete(appName string) { } } -// writes a .buildpacks file into the app +// TriggerPostExtract writes a .buildpacks file into the app func TriggerPostExtract(appName string, sourceWorkDir string) { buildpacks, err := common.PropertyListGet("buildpacks", appName, "buildpacks") if err != nil { diff --git a/plugins/network/subcommands.go b/plugins/network/subcommands.go index 74449c6f6..3e5cdc7d2 100644 --- a/plugins/network/subcommands.go +++ b/plugins/network/subcommands.go @@ -6,7 +6,7 @@ import ( "github.com/dokku/dokku/plugins/common" ) -// rebuilds network settings for all apps +// CommandRebuildall rebuilds network settings for all apps func CommandRebuildall() { apps, err := common.DokkuApps() if err != nil { @@ -17,7 +17,7 @@ func CommandRebuildall() { } } -// displays a network report for one or more apps +// CommandReport displays a network report for one or more apps func CommandReport(appName string, infoFlag string) { if strings.HasPrefix(appName, "--") { infoFlag = appName @@ -38,7 +38,7 @@ func CommandReport(appName string, infoFlag string) { ReportSingleApp(appName, infoFlag) } -// set or clear a network property for an app +// CommandSet set or clear a network property for an app func CommandSet(appName string, property string, value string) { if property == "bind-all-interfaces" && value == "" { value = "false" diff --git a/plugins/network/triggers.go b/plugins/network/triggers.go index 46796b50e..22f8f3956 100644 --- a/plugins/network/triggers.go +++ b/plugins/network/triggers.go @@ -11,7 +11,7 @@ import ( "github.com/dokku/dokku/plugins/proxy" ) -// runs the install step for the network plugin +// TriggerInstall runs the install step for the network plugin func TriggerInstall() { if err := common.PropertySetup("network"); err != nil { common.LogFail(fmt.Sprintf("Unable to install the network plugin: %s", err.Error())) @@ -39,7 +39,7 @@ func TriggerInstall() { } } -// computes the ports for a given app container +// TriggerNetworkComputePorts computes the ports for a given app container func TriggerNetworkComputePorts(appName string, processType string, isHerokuishContainer bool) { if processType != "web" { return @@ -68,7 +68,7 @@ func TriggerNetworkComputePorts(appName string, processType string, isHerokuishC fmt.Fprint(os.Stdout, strings.Join(ports, " ")) } -// writes true or false to stdout whether a given app has network config +// TriggerNetworkConfigExists writes true or false to stdout whether a given app has network config func TriggerNetworkConfigExists(appName string) { if HasNetworkConfig(appName) { fmt.Fprintln(os.Stdout, "true") @@ -78,32 +78,32 @@ func TriggerNetworkConfigExists(appName string) { fmt.Fprintln(os.Stdout, "false") } -// write the ipaddress to stdout for a given app container +// TriggerNetworkGetIppaddr writes the ipaddress to stdout for a given app container func TriggerNetworkGetIppaddr(appName string, processType string, containerID string) { ipAddress := GetContainerIpaddress(appName, processType, containerID) fmt.Fprintln(os.Stdout, ipAddress) } -// returns the listeners (host:port combinations) for a given app container +// TriggerNetworkGetListeners returns the listeners (host:port combinations) for a given app container func TriggerNetworkGetListeners(appName string) { listeners := GetListeners(appName) fmt.Fprint(os.Stdout, strings.Join(listeners, " ")) } -// write the port to stdout for a given app container +// TriggerNetworkGetPort writes the port to stdout for a given app container func TriggerNetworkGetPort(appName string, processType string, isHerokuishContainer bool, containerID string) { port := GetContainerPort(appName, processType, isHerokuishContainer, containerID) fmt.Fprintln(os.Stdout, port) } -// writes the network property to stdout for a given app container +// TriggerNetworkGetProperty writes the network property to stdout for a given app container func TriggerNetworkGetProperty(appName string, property string) { defaultValue := GetDefaultValue(property) value := common.PropertyGetDefault("network", appName, property, defaultValue) fmt.Fprintln(os.Stdout, value) } -// writes the ip to disk +// TriggerNetworkWriteIpaddr writes the ip to disk func TriggerNetworkWriteIpaddr(appName string, processType string, containerIndex string, ip string) { if appName == "" { common.LogFail("Please specify an app to run the command on") @@ -128,7 +128,7 @@ func TriggerNetworkWriteIpaddr(appName string, processType string, containerInde } } -// writes the port to disk +// TriggerNetworkWritePort writes the port to disk func TriggerNetworkWritePort(appName string, processType string, containerIndex string, port string) { if appName == "" { common.LogFail("Please specify an app to run the command on") @@ -153,7 +153,7 @@ func TriggerNetworkWritePort(appName string, processType string, containerIndex } } -// cleanup network files for a new app clone +// TriggerPostAppCloneSetup cleans up network files for a new app clone func TriggerPostAppCloneSetup(appName string) { success := PostAppCloneSetup(appName) if !success { @@ -161,7 +161,7 @@ func TriggerPostAppCloneSetup(appName string) { } } -// set bind-all-interfaces to false by default +// TriggerPostCreate sets bind-all-interfaces to false by default func TriggerPostCreate(appName string) { err := common.PropertyWrite("network", appName, "bind-all-interfaces", "false") if err != nil { @@ -169,7 +169,7 @@ func TriggerPostCreate(appName string) { } } -// destroys the network property for a given app container +// TriggerPostDelete destroys the network property for a given app container func TriggerPostDelete(appName string) { err := common.PropertyDestroy("network", appName) if err != nil { diff --git a/plugins/resource/triggers.go b/plugins/resource/triggers.go index e8e7027f6..530f5a1a0 100644 --- a/plugins/resource/triggers.go +++ b/plugins/resource/triggers.go @@ -98,7 +98,7 @@ func TriggerPostDelete(appName string) error { return common.PropertyDestroy("resource", appName) } -// writes the resource key to stdout for a given app container +// TriggerResourceGetProperty writes the resource key to stdout for a given app container func TriggerResourceGetProperty(appName string, processType string, resourceType string, key string) error { value, err := GetResourceValue(appName, processType, resourceType, key) if err != nil {