credentials

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: MIT Imports: 3 Imported by: 0

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

Jump to

Keyboard shortcuts

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