api

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientTLS

type ClientTLS struct {
	// CA
	Ca string

	// Public Crt
	Crt string
}

ClientTLS defines client crt and key

type Config

type Config interface {
	GetConfigPath(path string) string
	GetClientCert() (string, errors.Error)
	GetNamedClientOverride() map[string]*ClientTLS
	GetSchemaConfig(contentType string) (*SchemaConfig, errors.Error)
	GetCaCerts() ([]string, errors.Error)
	GetPeerClientKey() (string, errors.Error)
	GetCryptoProvider() (string, errors.Error)
	IsSystemCertPoolEnabled() bool
	TimeoutOrDefault(timeoutType HTTPClientTimeoutType) time.Duration
	IsPeerTLSConfigEnabled() bool
	IsHeaderAllowed(name string) bool
}

Config configuration interface

type HTTPClientTimeoutType added in v0.1.4

type HTTPClientTimeoutType int

HTTPClientTimeoutType enumerates the different types of timeouts used by http client

const (
	Global HTTPClientTimeoutType = iota
	TransportTLSHandshake
	TransportResponseHeader
	TransportExpectContinue
	TransportIdleConn
	DialerTimeout
	DialerKeepAlive
)

Timeouts used by HTTP client

type HTTPSnapRequest added in v0.1.5

type HTTPSnapRequest struct {
	URL         string            // required
	Headers     map[string]string // required
	Body        string            // required
	NamedClient string            // optional
	PinSet      []string          // optional
}

HTTPSnapRequest is used to invoke http snap

type SchemaConfig

type SchemaConfig struct {
	// Content type
	Type string

	// Request schema
	Request string

	// Response schema
	Response string
}

SchemaConfig defines request and response schemas for content type

Jump to

Keyboard shortcuts

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