Documentation
¶
Index ¶
- func CalculateLocalPort(remotePort int) (int, error)
- func GetBastionHostConfig(bastionHostID string) (config.Atun, error)
- func GetBastionHostID() (string, error)
- func RenderTunnelStatusTable(status bool, rows [][]string) error
- func SetAWSCredentials(sess *session.Session) error
- func StartTunnel(app *config.Atun) (bool, [][]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateLocalPort ¶
CalculateLocalPort converts a remote port to a 5-digit local port. It prefixes "1" or "10" based on the port number. Calculate default Local port from defaultRemotePort. So 3306 would become 13306 and 5006 would become 15006. Take the port number and concat 1 or 10 to it so it becomes 5-digit 3306 -> 13306 5006 -> 15006 22 -> 10022 80 -> 10080
func GetBastionHostConfig ¶
GetBastionHostConfig Gets bastion host tags and unmarshalls it into a struct
func GetBastionHostID ¶ added in v0.5.1
GetBastionHostID retrieves the Bastion Host ID from AWS tags. It takes a session, tag name, and tag value as parameters and returns the instance ID of the Bastion Host.
func RenderTunnelStatusTable ¶
RenderTunnelStatusTable creates and renders a custom table with a given header and rows. It can be reused throughout the project.
func SetAWSCredentials ¶
Types ¶
This section is empty.