url

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package url contains the URL structure.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PathSplitQuery

func PathSplitQuery(pathAndQuery string) (string, string)

PathSplitQuery splits a path from a query.

Types

type URL

type URL url.URL

URL is a RTSP URL. This is basically an HTTP URL with some additional functions to handle control attributes.

func Parse

func Parse(s string) (*URL, error)

Parse parses a RTSP URL.

func (*URL) Clone

func (u *URL) Clone() *URL

Clone clones a URL.

func (*URL) CloneWithoutCredentials

func (u *URL) CloneWithoutCredentials() *URL

CloneWithoutCredentials clones a URL without its credentials.

func (*URL) Hostname

func (u *URL) Hostname() string

Hostname returns u.Host, stripping any valid port number if present.

If the result is enclosed in square brackets, as literal IPv6 addresses are, the square brackets are removed from the result.

func (*URL) Port

func (u *URL) Port() string

Port returns the port part of u.Host, without the leading colon.

If u.Host doesn't contain a valid numeric port, Port returns an empty string.

func (*URL) RTSPPathAndQuery

func (u *URL) RTSPPathAndQuery() (string, bool)

RTSPPathAndQuery returns the path and query of a RTSP URL.

func (*URL) String

func (u *URL) String() string

String implements fmt.Stringer.

Jump to

Keyboard shortcuts

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