internal

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2025 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBConnection

func DBConnection(host string, port int16, username string, password string, database string) *sql.DB

Establishes and checks DB connection and returns the connection.

func ParseCredentialsFile

func ParseCredentialsFile(credentialsFile string, username *string, password *string)

Try to parse a given credentialsFile and write the parsed credentials to `user` and `password` variables Credential files are required to be JSON object of the following spec: `{"username": "vspheredb", "password": "vspheredb"}`

If parsing fails, check exits with UNKNOWN state.

Types

type Credentials

type Credentials struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

Jump to

Keyboard shortcuts

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