url

package
v0.0.81 Latest Latest
Warning

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

Go to latest
Published: May 21, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(ctx context.Context, options ...ClientOption) (*Client, error)

func (*Client) ApplyOptions

func (o *Client) ApplyOptions(options ...ClientOption) *Client

func (*Client) Encode

func (c *Client) Encode(data interface{}) (string, error)

can convert struct to url encode for url paratment

type ClientOption

type ClientOption interface {
	// contains filtered or unexported methods
}

A ClientOption sets options.

type ClientOptionFunc

type ClientOptionFunc func(*Client)

ClientOptionFunc wraps a function that modifies Client into an implementation of the ClientOption interface.

type DefaultUrlCodec

type DefaultUrlCodec struct{}

default url codec

func (DefaultUrlCodec) Escape

func (u DefaultUrlCodec) Escape(s string) string

func (DefaultUrlCodec) UnEscape

func (u DefaultUrlCodec) UnEscape(s string) (string, error)

type EmptyClientOption

type EmptyClientOption struct{}

EmptyClientOption does not alter the configuration. It can be embedded in another structure to build custom options.

This API is EXPERIMENTAL.

type UrlCodec

type UrlCodec interface {
	Escape(s string) string
	UnEscape(s string) (string, error)
}

type Value

type Value interface {
	Encode(value reflect.Value) string
}

Jump to

Keyboard shortcuts

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