client

package
v0.0.0-...-819b30b Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildRequest

func BuildRequest(ctx context.Context, httpMethod string, addr string, relativePath string, in interface{}, body interface{}) (*http.Request, error)

func Call

func Call(ctx context.Context, c Client, req *http.Request, res interface{}, opts ...CallOption) error

func Parse

func Parse(_ context.Context, in interface{}) (header map[string][]string, uri map[string][]string, query map[string][]string, err error)

Types

type CallOption

type CallOption func(o CallOptions)

type CallOptions

type CallOptions interface {
	Options() CallOptions
}

type Client

type Client interface {
	Do(ctx context.Context, req *http.Request, opts ...CallOption) (*http.Response, error)
}

type ParseFunc

type ParseFunc func(ctx context.Context, req interface{}) (header map[string][]string, uri map[string][]string, query map[string][]string, err error)

Jump to

Keyboard shortcuts

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