config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	Scheme  string
	Address NetAddress
	User    UserCredential
}

Connection's address and user credential.

func (Connection) String

func (c Connection) String() string

String combines user and address into the form "user:password@host:port".

func (Connection) URL

func (c Connection) URL() string

String combines scheme, user and address into the form "user:password@host:port".

type NetAddress

type NetAddress struct {
	Host string
	Port int
}

NetAddress.

func (NetAddress) Network

func (a NetAddress) Network() string

Network returns "".

func (NetAddress) String

func (a NetAddress) String() string

String combines host and port into a network address of the form "host:port". If host contains a colon, as found in literal IPv6 addresses, then JoinHostPort returns "[host]:port".

type UserCredential

type UserCredential struct {
	User     string
	Password *string
}

UserCredential consists of a user and a password.

func NewUserCredential

func NewUserCredential(user string, password string) UserCredential

NewUserCredential creates a user credentia.

func (UserCredential) String

func (u UserCredential) String() string

String combines user and password into the form "user:password".

Jump to

Keyboard shortcuts

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