rest

package
v1.315.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: MIT Imports: 13 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoRequest maps.StringAny = nil

NoRequest to use for the client.

Functions

func Delete

func Delete(path string, handler content.Handler)

Delete for rest.

func Get

func Get(path string, handler content.Handler)

Get for rest.

func Post

func Post(path string, handler content.Handler)

Post for rest.

func Put

func Put(path string, handler content.Handler)

Put for rest.

func Register

func Register(mu *http.ServeMux, ct *content.Content, p *sync.BufferPool)

Register for rpc.

func Route

func Route(path string, handler content.Handler)

Route for rest.

Types

type Client added in v1.315.0

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

Client for rest.

func NewClient added in v1.315.0

func NewClient(opts ...ClientOption) *Client

NewClient for rest.

func (*Client) Invoke added in v1.315.0

func (c *Client) Invoke(ctx context.Context, method, url string, req maps.StringAny) (res maps.StringAny, err error)

Invoke for rest.

type ClientOption added in v1.315.0

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

ClientOption for rest.

func WithClientContentType added in v1.315.0

func WithClientContentType(ct string) ClientOption

WithClientContentType for rest.

func WithClientRoundTripper added in v1.315.0

func WithClientRoundTripper(rt http.RoundTripper) ClientOption

WithSenderRoundTripper for rest.

func WithClientTimeout added in v1.315.0

func WithClientTimeout(timeout string) ClientOption

WithClientTimeout for rest.

Jump to

Keyboard shortcuts

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