Documentation
¶
Index ¶
- func PathEscape(dst, p []byte) []byte
- func PathUnescape(dst, p []byte) []byte
- func QueryEscape(dst, p []byte) []byte
- func QueryUnescape(dst, p []byte) []byte
- func Release(vec *Vector)
- func ReleaseNC(vec *Vector)
- type Helper
- type Pool
- type Vector
- func (vec *Vector) Auth() *vector.Node
- func (vec *Vector) AuthBytes() []byte
- func (vec *Vector) AuthString() string
- func (vec *Vector) Bytes() []byte
- func (vec *Vector) BytesEscaped() []byte
- func (vec *Vector) Hash() *vector.Node
- func (vec *Vector) HashBytes() []byte
- func (vec *Vector) HashString() string
- func (vec *Vector) Host() *vector.Node
- func (vec *Vector) HostBytes() []byte
- func (vec *Vector) HostString() string
- func (vec *Vector) Hostname() *vector.Node
- func (vec *Vector) HostnameBytes() []byte
- func (vec *Vector) HostnameString() string
- func (vec *Vector) Parse(s []byte) error
- func (vec *Vector) ParseCopy(s []byte) error
- func (vec *Vector) ParseCopyStr(s string) error
- func (vec *Vector) ParseCopyString(s string) error
- func (vec *Vector) ParseStr(s string) error
- func (vec *Vector) ParseString(s string) error
- func (vec *Vector) Password() *vector.Node
- func (vec *Vector) PasswordBytes() []byte
- func (vec *Vector) PasswordString() string
- func (vec *Vector) Path() *vector.Node
- func (vec *Vector) PathBytes() []byte
- func (vec *Vector) PathEscape(p []byte) []byte
- func (vec *Vector) PathString() string
- func (vec *Vector) PathUnescape(p []byte) []byte
- func (vec *Vector) Port() int
- func (vec *Vector) Query() *vector.Node
- func (vec *Vector) QueryBytes() []byte
- func (vec *Vector) QueryEscape(p []byte) []byte
- func (vec *Vector) QueryLen() int
- func (vec *Vector) QuerySort() *Vector
- func (vec *Vector) QueryString() string
- func (vec *Vector) QueryUnescape(p []byte) []byte
- func (vec *Vector) Scheme() *vector.Node
- func (vec *Vector) SchemeBytes() []byte
- func (vec *Vector) SchemeString() string
- func (vec *Vector) SetAuthBytes(auth []byte) *Vector
- func (vec *Vector) SetAuthString(auth string) *Vector
- func (vec *Vector) SetHashBytes(hash []byte) *Vector
- func (vec *Vector) SetHashString(hash string) *Vector
- func (vec *Vector) SetHostBytes(host []byte) *Vector
- func (vec *Vector) SetHostString(host string) *Vector
- func (vec *Vector) SetHostnameBytes(hostname []byte) *Vector
- func (vec *Vector) SetHostnameString(hostname string) *Vector
- func (vec *Vector) SetPasswordBytes(password []byte) *Vector
- func (vec *Vector) SetPasswordString(password string) *Vector
- func (vec *Vector) SetPathBytes(path []byte) *Vector
- func (vec *Vector) SetPathString(path string) *Vector
- func (vec *Vector) SetPort(port int) *Vector
- func (vec *Vector) SetQueryBytes(query []byte) *Vector
- func (vec *Vector) SetQueryString(query string) *Vector
- func (vec *Vector) SetSchemeBytes(scheme []byte) *Vector
- func (vec *Vector) SetSchemeString(scheme string) *Vector
- func (vec *Vector) SetUsernameBytes(username []byte) *Vector
- func (vec *Vector) SetUsernameString(username string) *Vector
- func (vec *Vector) Slashes() bool
- func (vec *Vector) String() string
- func (vec *Vector) StringEscaped() string
- func (vec *Vector) Username() *vector.Node
- func (vec *Vector) UsernameBytes() []byte
- func (vec *Vector) UsernameString() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PathEscape ¶
PathEscape escapes the string so it can be safely placed inside a URL query.
func PathUnescape ¶
PathUnescape does the inverse transformation of PathEscape.
func QueryEscape ¶
QueryEscape escapes the string so it can be safely placed inside a URL query.
func QueryUnescape ¶
QueryUnescape does the inverse transformation of QueryEscape.
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool represents URL vectors pool.
type Vector ¶
Vector represents URL parser.
func (*Vector) AuthString ¶
AuthString returns auth (username:password as string.
func (*Vector) BytesEscaped ¶
BytesEscaped returns escaped URL bytes.
In addition, escapes host and hash part.
func (*Vector) HashString ¶
HashString returns hash as string.
func (*Vector) HostString ¶
HostString returns host (hostname:port) as string.
func (*Vector) HostnameBytes ¶
HostnameBytes returns hostname as bytes.
func (*Vector) HostnameString ¶
HostnameString returns hostname as string.
func (*Vector) ParseCopyStr ¶
ParseCopyStr copies source string and parse it. DEPRECATED: use ParseCopyString instead.
func (*Vector) ParseCopyString ¶ added in v1.1.11
ParseCopyString copies source string and parse it.
func (*Vector) ParseString ¶ added in v1.1.11
ParseString parses source string.
func (*Vector) PasswordBytes ¶
PasswordBytes returns password as bytes.
func (*Vector) PasswordString ¶
PasswordString returns password as string.
func (*Vector) PathEscape ¶
PathEscape escapes the string so it can be safely placed inside a URL query.
Uses built-in buffer.
func (*Vector) PathString ¶
PathString returns password as string.
func (*Vector) PathUnescape ¶
PathUnescape does the inverse transformation of PathEscape.
func (*Vector) QueryBytes ¶
QueryBytes returns query as bytes.
func (*Vector) QueryEscape ¶
QueryEscape escapes the string so it can be safely placed inside a URL query.
Uses built-in buffer.
func (*Vector) QueryString ¶
QueryString returns query as string.
func (*Vector) QueryUnescape ¶
QueryUnescape does the inverse transformation of QueryEscape.
func (*Vector) SchemeBytes ¶
SchemeBytes returns scheme as bytes.
func (*Vector) SchemeString ¶
SchemeString returns scheme as string.
func (*Vector) SetAuthBytes ¶
SetAuthBytes replaces auth with bytes.
func (*Vector) SetAuthString ¶
SetAuthString replaces auth with string.
func (*Vector) SetHashBytes ¶
SetHashBytes replaces hash with bytes.
func (*Vector) SetHashString ¶
SetHashString replaces hash with string.
func (*Vector) SetHostBytes ¶
SetHostBytes replaces host with bytes.
func (*Vector) SetHostString ¶
SetHostString replaces host with string.
func (*Vector) SetHostnameBytes ¶
SetHostnameBytes replaces hostname with bytes.
func (*Vector) SetHostnameString ¶
SetHostnameString replaces hostname with string.
func (*Vector) SetPasswordBytes ¶
SetPasswordBytes replaces password with bytes.
func (*Vector) SetPasswordString ¶
SetPasswordString replaces password with string.
func (*Vector) SetPathBytes ¶
SetPathBytes replaces path with bytes.
func (*Vector) SetPathString ¶
SetPathString replaces path with string.
func (*Vector) SetQueryBytes ¶
SetQueryBytes replaces query with bytes.
func (*Vector) SetQueryString ¶
SetQueryString replaces query with string.
func (*Vector) SetSchemeBytes ¶
SetSchemeBytes replaces scheme with bytes.
func (*Vector) SetSchemeString ¶
SetSchemeString replaces scheme with string.
func (*Vector) SetUsernameBytes ¶
SetUsernameBytes replaces username with bytes.
func (*Vector) SetUsernameString ¶
SetUsernameString replaces username with string.
func (*Vector) StringEscaped ¶
StringEscaped returns escaped URL string.
In addition, escapes host and hash part.
func (*Vector) UsernameBytes ¶
UsernameBytes returns username as bytes.
func (*Vector) UsernameString ¶
UsernameString returns username as string.