client

package
v0.0.0-...-888544b Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBaseURL   = "https://192.168.0.1"
	DefaultUserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) " +
		"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36"
)

Variables

This section is empty.

Functions

func DefaultDerivePasswordWebUI

func DefaultDerivePasswordWebUI(password, salt, saltWebUI []byte) string

DefaultDerivePasswordWebUI calls DerivePasswordWebUI with the default values for `iter` and `keyLenBytes`.

Types

type Client

type Client interface {
	Login(context.Context) error
	Logout(context.Context) error
	SetAuth(ctx context.Context, user, pass string) error
}

func New

func New(p Params) (Client, error)

type Params

type Params struct {
	httpdoer.HTTPDoer
	BaseURL                          string
	UserAgent                        string
	Username, Password               string
	DefaultUsername, DefaultPassword string
	TryDefaultAuthFirst              bool
	SetAuthIfDefault                 bool
	TLSVerify                        bool
}

func (Params) WithDefaults

func (p Params) WithDefaults() Params

Jump to

Keyboard shortcuts

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