handler

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddrPreference added in v0.3.0

type AddrPreference string
const (
	AddrPreferenceFirst AddrPreference = "first"
	AddrPreferenceLast  AddrPreference = "last"
	AddrPreferenceAll   AddrPreference = "all"
)

func (AddrPreference) MarshalText added in v0.3.0

func (p AddrPreference) MarshalText() (text []byte, err error)

func (AddrPreference) String added in v0.3.0

func (p AddrPreference) String() string

func (*AddrPreference) UnmarshalText added in v0.3.0

func (p *AddrPreference) UnmarshalText(text []byte) error

type ApiClient

type ApiClient interface {
	GetIdentity() (plex.IdentityDTO, error)
	GetResources() (plex.ResourcesDTO, error)
	GetPreferences() (plex.PreferencesDTO, error)
	UpdateCustomConnections(customConnections string) error
}

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(localClient, remoteClient ApiClient) *Handler

func (*Handler) SelectAddrs added in v0.3.0

func (h *Handler) SelectAddrs(interfaceAddrs []netip.Addr, preference AddrPreference) ([]netip.Addr, error)

func (*Handler) UpdateIPv6CustomAccessURLs added in v0.3.0

func (h *Handler) UpdateIPv6CustomAccessURLs(addrs []netip.Addr, capitalization IPv6URLCapitalization) error

type IPv6URLCapitalization added in v0.2.0

type IPv6URLCapitalization string
const (
	IPv6URLCapitalizationLower IPv6URLCapitalization = "lower"
	IPv6URLCapitalizationUpper IPv6URLCapitalization = "upper"
)

func (IPv6URLCapitalization) MarshalText added in v0.3.0

func (c IPv6URLCapitalization) MarshalText() (text []byte, err error)

func (IPv6URLCapitalization) String added in v0.3.0

func (c IPv6URLCapitalization) String() string

func (*IPv6URLCapitalization) UnmarshalText added in v0.3.0

func (c *IPv6URLCapitalization) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

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