Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Credentials ¶
type Credentials struct { Username string `json:"username"` Password string `json:"password"` Remember bool `json:"remember"` Strict bool `json:"strict"` // contains filtered or unexported fields }
Credentials is a struct that holds the username and password for the Unifi controller
func NewCredentials ¶
func NewCredentials(username string, password string) Credentials
NewCredentials creates a new Credentials struct to be used to log into the Unifi controller
func (Credentials) HttpPayload ¶
func (u Credentials) HttpPayload() *strings.Reader
HttpPayload returns the Credentials struct as a strings.Reader to be used in an http request.go as the body
func (Credentials) LogValue ¶
func (u Credentials) LogValue() slog.Value
LogValue returns the Credentials struct as a slog.Value for logging.
func (Credentials) String ¶
func (u Credentials) String() string
String returns the Credentials struct as a string
Click to show internal directories.
Click to hide internal directories.