Documentation ¶
Index ¶
- Constants
- func SetOperation(ctx context.Context, op string)
- type Server
- type ServerOption
- func WithAddress(addr string) ServerOption
- func WithErrorEncoder(en kHttp.EncodeErrorFunc) ServerOption
- func WithFilter(filters ...kHttp.FilterFunc) ServerOption
- func WithMiddleware(m ...middleware.Middleware) ServerOption
- func WithRequestDecoder(dec kHttp.DecodeRequestFunc) ServerOption
- func WithResponseEncoder(en kHttp.EncodeResponseFunc) ServerOption
- func WithStrictSlash(strictSlash bool) ServerOption
- func WithTLSConfig(c *tls.Config) ServerOption
- func WithTimeout(timeout time.Duration) ServerOption
- type Transport
- func (tr *Transport) Endpoint() string
- func (tr *Transport) Kind() transport.Kind
- func (tr *Transport) Operation() string
- func (tr *Transport) PathTemplate() string
- func (tr *Transport) ReplyHeader() transport.Header
- func (tr *Transport) Request() *http.Request
- func (tr *Transport) RequestHeader() transport.Header
- type Transporter
Constants ¶
View Source
const (
KindGin transport.Kind = "gin"
)
Variables ¶
This section is empty.
Functions ¶
func SetOperation ¶
SetOperation sets the transport operation.
Types ¶
type ServerOption ¶
type ServerOption func(*Server)
func WithAddress ¶
func WithAddress(addr string) ServerOption
func WithErrorEncoder ¶
func WithErrorEncoder(en kHttp.EncodeErrorFunc) ServerOption
func WithFilter ¶
func WithFilter(filters ...kHttp.FilterFunc) ServerOption
func WithMiddleware ¶
func WithMiddleware(m ...middleware.Middleware) ServerOption
func WithRequestDecoder ¶
func WithRequestDecoder(dec kHttp.DecodeRequestFunc) ServerOption
func WithResponseEncoder ¶
func WithResponseEncoder(en kHttp.EncodeResponseFunc) ServerOption
func WithStrictSlash ¶
func WithStrictSlash(strictSlash bool) ServerOption
func WithTLSConfig ¶
func WithTLSConfig(c *tls.Config) ServerOption
func WithTimeout ¶
func WithTimeout(timeout time.Duration) ServerOption
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
Transport is an HTTP transport.
func (*Transport) PathTemplate ¶
PathTemplate returns the http path template.
func (*Transport) ReplyHeader ¶
ReplyHeader returns the reply header.
func (*Transport) RequestHeader ¶
RequestHeader returns the request header.
type Transporter ¶
type Transporter interface { transport.Transporter Request() *http.Request PathTemplate() string }
Transporter is http Transporter
Click to show internal directories.
Click to hide internal directories.