cmd

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2026 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// FirewallClient holds the initialized provider client implementing the Provider interface.
	FirewallClient generic.Provider
)

Functions

func GetCurrentIP added in v0.0.3

func GetCurrentIP() *cobra.Command

GetCurrentIP will return the current IP and print it to standard out. It invokes the same mechanisms to fetch the IP as the update command. This command will not update the fwsync configuration.

func Initialize

func Initialize() *cobra.Command

Initialize performs the first sync of the firewall rule. It will prompt the user to select the firewall rule with his or her name and then will update that firewall rule with their current public IP. Any existing source IPs on the firewall rule will be overwritten.

func List

func List() *cobra.Command

List prints out the current source IPs configured in ~/.fwsync and the source IPs active on the GCP Firewall.

func Sync

func Sync() *cobra.Command

Sync initiates a manual synchronization of the local configuration stored in ~/.fwsync to the desired GCP Firewall.

func Update

func Update() *cobra.Command

Update will intelligently update the firewall rule if the user's public IP has changed and doesn't exist in the current rule. If the IP is to be added and the number of IPs in the rule exceeds 5, the oldest IP is dropped from the list.

Types

This section is empty.

Jump to

Keyboard shortcuts

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