Documentation ¶
Overview ¶
Package url wraps javascript url object and funcions.
Index ¶
- func Create(obj interface{}) string
- func Revoke(link string)
- type Params
- func (p *Params) Append(name, value string) *Params
- func (p *Params) Delete(name string) *Params
- func (p *Params) Foreach(fn func(key, value string))
- func (p *Params) Get(name string) (string, bool)
- func (p *Params) GetAll(name string) []string
- func (p *Params) Has(name string) bool
- func (p *Params) JSValue() js.Value
- func (p *Params) Set(name, value string) *Params
- func (p *Params) String() string
- type URL
- func (u *URL) Hash() string
- func (u *URL) Host() string
- func (u *URL) Hostname() string
- func (u *URL) Href() string
- func (u *URL) JSValue() js.Value
- func (u *URL) Origin() string
- func (u *URL) Params() *Params
- func (u *URL) Password() string
- func (u *URL) Pathname() string
- func (u *URL) Port() string
- func (u *URL) Protocol() string
- func (u *URL) Querystring() string
- func (u *URL) Search() string
- func (u *URL) SetHash(hash string) *URL
- func (u *URL) SetHost(host string) *URL
- func (u *URL) SetHostname(hostname string) *URL
- func (u *URL) SetHref(href string) *URL
- func (u *URL) SetPassword(password string) *URL
- func (u *URL) SetPathname(pathname string) *URL
- func (u *URL) SetPort(port int) *URL
- func (u *URL) SetProtocol(protocol string) *URL
- func (u *URL) SetQuerystring(query string) *URL
- func (u *URL) SetSearch(search string) *URL
- func (u *URL) SetUsername(username string) *URL
- func (u *URL) String() string
- func (u *URL) Username() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Revoke ¶
func Revoke(link string)
Revoke releases an existing object URL. https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL
Types ¶
type Params ¶
type Params struct {
// contains filtered or unexported fields
}
Params represents javascript URLSearchParams. https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams
type URL ¶
type URL struct {
// contains filtered or unexported fields
}
URL represents jaavascript url. https://developer.mozilla.org/en-US/docs/Web/API/URL
func (*URL) Querystring ¶
Querystring returns query string in the url.
func (*URL) SetHostname ¶
SetHostname sets hostname property.
func (*URL) SetPassword ¶
SetPassword sets password property.
func (*URL) SetPathname ¶
SetPathname sets pathname property.
func (*URL) SetProtocol ¶
SetProtocol sets protocol property. Append ":" automatically if protocol is not end with ":".
func (*URL) SetQuerystring ¶
SetQuerystring sets query string in the url.
func (*URL) SetUsername ¶
SetUsername sets username property.