files

package
v0.0.0-...-72a49af Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEndpointHostNotIP = errors.New("endpoint host is not an IP")

Functions

func ReadFromFile

func ReadFromFile(filepath string) (content string, isSet bool, err error)

ReadFromFile reads the content of the file as a string, and returns if the file was present or not with isSet.

func ReadPEMFile

func ReadPEMFile(filepath string) (base64Str string, isSet bool, err error)

Types

type Source

type Source struct {
	// contains filtered or unexported fields
}

func New

func New(warner Warner) (source *Source)

func (*Source) Get

func (s *Source) Get(key string) (value string, isSet bool)

func (*Source) KeyTransform

func (s *Source) KeyTransform(key string) string

func (*Source) String

func (s *Source) String() string

type Warner

type Warner interface {
	Warnf(format string, a ...interface{})
}

type WireguardConfig

type WireguardConfig struct {
	PrivateKey   *string
	PreSharedKey *string
	Addresses    *string
	PublicKey    *string
	EndpointIP   *string
	EndpointPort *string
}

func ParseWireguardConf

func ParseWireguardConf(path string) (config WireguardConfig, err error)

Jump to

Keyboard shortcuts

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