Documentation ¶
Index ¶
- func CheckFlagValid(wireguard WGConfig, cmd string) error
- func CreateEmoji() string
- func HandleFlags(args []string) (*string, *string, *string, *bool, *bool)
- func ReadPubKey(sshKeyPath string) (ssh.AuthMethod, error)
- func RetrievePubKey(sshKey string) (string, error)
- func SortedListPeer(listPeer []map[string]string)
- type WGConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckFlagValid ¶
CheckFlagValid Checks that nothing is missing or that a flag as all the requirements
func CreateEmoji ¶
func CreateEmoji() string
CreateEmoji Creates the planet emoji present in the Asteroid help info
func HandleFlags ¶
HandleFlags init flags and checks which was given
func ReadPubKey ¶
func ReadPubKey(sshKeyPath string) (ssh.AuthMethod, error)
ReadPubKey Reads ssh key previously obtained
func RetrievePubKey ¶
RetrievePubKey Will go to the .ssh folder in the user $HOME, retrieve the ssh key and connect to the Wireguard server
func SortedListPeer ¶
SortedListPeer Sorts to show list with asc order
Types ¶
type WGConfig ¶
type WGConfig struct { PeerKey string PeerCIDR string PeerDeleteKey string GenerateFile bool GenerateOutput bool ServerPubKey string // contains filtered or unexported fields }
WGConfig Struct is for all related info to create peer on WG server
func (WGConfig) RetrieveWGConfig ¶
RetrieveWGConfig Will call the show, writeFile or WriteOutput Wiregard config function
Click to show internal directories.
Click to hide internal directories.