types

package
v2.6.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBConfig

type DBConfig struct {
	Host     string `toml:"host" json:"host"`
	User     string `toml:"user" json:"user"`
	Password string `toml:"password" json:"password"`
	Port     int    `toml:"port" json:"port"`

	Timeout string `toml:"timeout" json:"timeout"`

	ReplicationUser     string `toml:"replication_user" json:"replication_user"`
	ReplicationPassword string `toml:"replication_password" json:"replication_password"`
	ReplicationNet      string `toml:"replication_net" json:"replication_net"`
}

DBConfig is the DB configuration.

type URLs

type URLs []url.URL

URLs defines a wrapper slice of URLs.

func NewURLs

func NewURLs(strs []string) (URLs, error)

NewURLs returns a URLs using a slice of formatted URL string.

func (URLs) Len

func (us URLs) Len() int

Len returns the length of URLs.

func (URLs) Less

func (us URLs) Less(i, j int) bool

Less compares two URL and return the less one.

func (*URLs) Sort

func (us *URLs) Sort()

Sort sorts URLs.

func (URLs) String

func (us URLs) String() string

String returns a string of URLs separated by comma.

func (URLs) StringSlice

func (us URLs) StringSlice() []string

StringSlice returns a slice of formatted URL string.

func (URLs) Swap

func (us URLs) Swap(i, j int)

Swap swaps two URLs item.

Jump to

Keyboard shortcuts

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