utils

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormathBasicAuth

func FormathBasicAuth(ui *url.Userinfo) string

func Identity

func Identity() (string, error)

func IsHTTPResponseError

func IsHTTPResponseError(resp *http.Response, err error) (bool, error)

IsHTTPResponseError checks if the response/error indicates a failure and returns an error with context

func IsNetWorkError

func IsNetWorkError(err error) (bool, error)

IsNetWorkError checks if the request error indicates a failure and returns an error with context

func ParseBasicAuth

func ParseBasicAuth(auth string) *url.Userinfo

Types

type UserValue

type UserValue struct {
	Name     string
	Password string
	Groups   []string
}

func (*UserValue) Set

func (d *UserValue) Set(s string) error

func (*UserValue) String

func (d *UserValue) String() string

func (*UserValue) Type

func (d *UserValue) Type() string

type UsersValue

type UsersValue struct {
	Users []UserValue
}

func (*UsersValue) Set

func (d *UsersValue) Set(s string) error

func (*UsersValue) String

func (d *UsersValue) String() string

func (*UsersValue) Type

func (d *UsersValue) Type() string

Jump to

Keyboard shortcuts

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