utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Empty

func Empty(s *string) bool

Empty checks if a string referenced by s or s itself is empty.

func GetKongClient

func GetKongClient(opt KongClientConfig) (*kong.Client, error)

GetKongClient returns a Kong client

func UUID

func UUID() string

UUID will generate a random v14 unique identifier based upon random nunbers

Types

type ErrArray

type ErrArray struct {
	Errors []error
}

ErrArray holds an array of errors.

func (ErrArray) Error

func (e ErrArray) Error() string

Error returns a pretty string of errors present.

type HeaderRoundTripper

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

HeaderRoundTripper injects Headers into requests made via RT.

func (*HeaderRoundTripper) RoundTrip

func (t *HeaderRoundTripper) RoundTrip(req *http.Request) (*http.Response,
	error)

RoundTrip satisfies the RoundTripper interface.

type KongClientConfig

type KongClientConfig struct {
	Address string

	Headers []string

	TLSSkipVerify bool
	TLSServerName string

	TLSCACert string

	Debug bool
}

KongClientConfig holds config details to use to talk to a Kong server.

type KongRawState

type KongRawState struct {
	Services []*kong.Service
	Routes   []*kong.Route

	Plugins []*kong.Plugin

	Upstreams []*kong.Upstream
	Targets   []*kong.Target

	Certificates []*kong.Certificate
	SNIs         []*kong.SNI

	Consumers      []*kong.Consumer
	CustomEntities []*custom.Entity
}

KongRawState contains all of Kong Data

type Overrider

type Overrider interface {
	Override(interface{}) (interface{}, error)
}

Overrider can override properties in any type.

Jump to

Keyboard shortcuts

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