proxy

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type URL

type URL struct {
	URL *url.URL
}

URL implements YAML.Marshaler and yaml.Unmarshaler interfaces for url.URL.

func MustNewURL

func MustNewURL(u string) *URL

MustNewURL returns new URL for the given u.

func (*URL) GetURL

func (u *URL) GetURL() *url.URL

GetURL return the underlying url.

func (*URL) IsHTTPOrHTTPS

func (u *URL) IsHTTPOrHTTPS() bool

IsHTTPOrHTTPS returns true if u is http or https

func (*URL) MarshalYAML

func (u *URL) MarshalYAML() (interface{}, error)

MarshalYAML implements yaml.Marshaler interface.

func (*URL) NewDialFunc

func (u *URL) NewDialFunc(ac *promauth.Config) (fasthttp.DialFunc, error)

NewDialFunc returns dial func for the given u and ac.

func (*URL) SetFasthttpHeaders

func (u *URL) SetFasthttpHeaders(ac *promauth.Config, req *fasthttp.Request) error

SetFasthttpHeaders sets headers to req according to u and ac configs.

func (*URL) SetHeaders

func (u *URL) SetHeaders(ac *promauth.Config, req *http.Request) error

SetHeaders sets headers to req according to u and ac configs.

func (*URL) String

func (u *URL) String() string

String returns string representation of u.

func (*URL) UnmarshalTOML added in v0.2.0

func (u *URL) UnmarshalTOML(b []byte) error

func (*URL) UnmarshalText added in v0.2.0

func (u *URL) UnmarshalText(b []byte) error

func (*URL) UnmarshalYAML

func (u *URL) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements yaml.Unmarshaler interface.

Jump to

Keyboard shortcuts

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