Documentation
¶
Index ¶
- Variables
- func ComparePassword(hashedPassword string, password string) bool
- func DownloadFile(url string) ([]byte, error)
- func DownloadFileTo(url string, path string) error
- func ExecCommand(command []string) ([]byte, error)
- func GenerateID(length int) string
- func GeneratePassword(p string) string
- func GenerateToken(id string, expiration time.Duration, signingMethod string, signingKey string) (string, error)
- func GetCorrectSigningMethod(signingMethod string) string
- func GetVersionInfo() string
- func HasSupportedScheme(urlStr string) bool
- func IsValidSourceURL(urlStr string) bool
- func LoadPrivateKey(signingMethod string, signingKey string) error
- func ParseDuration(s string) (time.Duration, error)
- func ParseHumanDuration(durationStr string) (time.Duration, error)
- func SetupLogger(logFormat string, logLevel log.Level)
Constants ¶
This section is empty.
Variables ¶
View Source
var DataDir string
View Source
var ECDSAPrivateKey *ecdsa.PrivateKey
View Source
var EdDSAPrivateKey ed25519.PrivateKey
View Source
var (
LibraVersion, _ = types.ParseVersion(rawVersion)
)
View Source
var RSAPrivateKey *rsa.PrivateKey
Functions ¶
func ComparePassword ¶
func DownloadFile ¶
func DownloadFileTo ¶
func ExecCommand ¶
func GenerateID ¶
func GeneratePassword ¶
func GenerateToken ¶
func GetCorrectSigningMethod ¶
func GetVersionInfo ¶
func GetVersionInfo() string
func HasSupportedScheme ¶
func IsValidSourceURL ¶
func LoadPrivateKey ¶
func ParseDuration ¶
ParseDuration parses a duration string. examples: "10d", "-1.5w" or "3Y4M5d". Add time units are "d"="D", "w"="W".
func SetupLogger ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.