endpoint

package
v0.0.0-...-a2da514 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Descriptor

type Descriptor struct {
	Name   string
	Type   string
	Values []*Descriptor
	// contains filtered or unexported fields
}

type Endpoint

type Endpoint interface {
	Name() string
	Request() *Descriptor
	Response() *Descriptor
	Options() Options
	Call(Request, interface{}) error
}

func Extract

func Extract(v interface{}) ([]Endpoint, error)

type Headers

type Headers map[string]string

func NewHeaders

func NewHeaders(m ...map[string]string) Headers

type Option

type Option interface {
	Apply(Endpoint)
}

type Options

type Options struct {
	Labels map[string]string
}

type Request

type Request interface {
	Context() context.Context
	Body() interface{}
	Headers() Headers
}

func NewRequest

func NewRequest(ctx context.Context, v interface{}, headers ...map[string]string) Request

Jump to

Keyboard shortcuts

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