ports

package module
v0.0.0-...-176584a Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommandAdd

func CommandAdd(appName string, portMapStrings []string) error

CommandAdd adds port mappings to an app

func CommandClear

func CommandClear(appName string) error

CommandClear clears all port mappings for an app

func CommandList

func CommandList(appName string) error

CommandList is a cmd wrapper to list port mappings for an app

func CommandRemove

func CommandRemove(appName string, portMapStrings []string) error

CommandRemove removes specific port mappings from an app

func CommandReport

func CommandReport(appName string, format string, infoFlag string) error

CommandReport displays a ports report for one or more apps

func CommandSet

func CommandSet(appName string, portMapStrings []string) error

CommandSet sets port mappings for an app

func ReportSingleApp

func ReportSingleApp(appName string, format string, infoFlag string) error

ReportSingleApp is an internal function that displays the ports report for one or more apps

func TriggerInstall

func TriggerInstall() error

TriggerInstall migrates the ports config to properties

func TriggerPortsClear

func TriggerPortsClear(appName string) error

TriggerPortsClear removes all ports for the specified app

func TriggerPortsConfigure

func TriggerPortsConfigure(appName string) error

TriggerPortsConfigure ensures we have a port mapping

func TriggerPortsGet

func TriggerPortsGet(appName string, format string) error

TriggerPortsGet prints out the port mapping for a given app

func TriggerPortsGetAvailable

func TriggerPortsGetAvailable() error

TriggerPortsGetAvailable prints out an available port greater than 1024

func TriggerPortsGetProperty

func TriggerPortsGetProperty(appName string, key string) error

TriggerPortsGetProperty writes the ports key to stdout for a given app container

func TriggerPortsSetDetected

func TriggerPortsSetDetected(appName string, portMapString string) error

TriggerPortsSetDetected writes out detected ports

func TriggerPostAppCloneSetup

func TriggerPostAppCloneSetup(oldAppName string, newAppName string) error

TriggerPostAppCloneSetup creates new ports files

func TriggerPostAppRenameSetup

func TriggerPostAppRenameSetup(oldAppName string, newAppName string) error

TriggerPostAppRenameSetup renames ports files

func TriggerPostCertsRemove

func TriggerPostCertsRemove(appName string) error

TriggerPostCertsRemove unsets port config vars after SSL cert is added

func TriggerPostCertsUpdate

func TriggerPostCertsUpdate(appName string) error

TriggerPostCertsUpdate sets port config vars after SSL cert is added

func TriggerPostDelete

func TriggerPostDelete(appName string) error

TriggerPostDelete is the ports post-delete plugin trigger

Types

type PortMap

type PortMap struct {
	// ContainerPort is the port on the container
	ContainerPort int `json:"container_port"`

	// HostPort is the port on the host
	HostPort int `json:"host_port"`

	// Scheme is the scheme of the port mapping
	Scheme string `json:"scheme"`
}

PortMap is a struct that contains a scheme:host-port:container-port mapping

func (PortMap) AllowsPersistence

func (p PortMap) AllowsPersistence() bool

AllowsPersistence returns true if the port map is not to be persisted

func (PortMap) String

func (p PortMap) String() string

Directories

Path Synopsis
src

Jump to

Keyboard shortcuts

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