util

package
v0.0.0-...-70e1626 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HREF

type HREF struct {
	// contains filtered or unexported fields
}

func NewHREF

func NewHREF(href string, base string) HREF

func (HREF) PercentEncodedString

func (h HREF) PercentEncodedString() (string, error)

Returns the normalized string representation for this HREF, encoded for URL uses.

func (HREF) QueryParameters

func (h HREF) QueryParameters() (url.Values, error)

Returns the query parameters present in this HREF, in the order they appear.

func (HREF) String

func (h HREF) String() (string, error)

Returns the normalized string representation for this HREF.

type QueryParameter

type QueryParameter struct {
	// contains filtered or unexported fields
}

type URITemplate

type URITemplate struct {
	// contains filtered or unexported fields
}

func NewURITemplate

func NewURITemplate(uri string) URITemplate

func (URITemplate) Description

func (u URITemplate) Description() string

func (URITemplate) Expand

func (u URITemplate) Expand(parameters map[string]string) string

Expands the HREF by replacing URI template variables by the given parameters.

func (URITemplate) Parameters

func (u URITemplate) Parameters() []string

List of URI template parameter keys.

Jump to

Keyboard shortcuts

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