hook

package
v0.0.0-...-398aefc Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HealthPath = "/health"
)

Variables

This section is empty.

Functions

func Atoi

func Atoi(in string) int

Types

type FakeResponse

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

func NewFakeRespone

func NewFakeRespone(t *testing.T) *FakeResponse

func (*FakeResponse) Header

func (r *FakeResponse) Header() http.Header

func (*FakeResponse) Write

func (r *FakeResponse) Write(body []byte) (int, error)

func (*FakeResponse) WriteHeader

func (r *FakeResponse) WriteHeader(status int)

type Hook

type Hook struct {
	Name       string
	Namespace  string
	ForwardURL string
	Headers    map[string][]string
	Body       []byte
}

Hook struct to hold everything related to a hook.

func FromV1Alpha1Hook

func FromV1Alpha1Hook(h *v1alpha12.Hook) Hook

FromV1Alpha1Hook converts from a v1alpha1.Hook to a Hook.

type Options

type Options struct {
	Path       string
	Version    string
	ForwardURL string
	// contains filtered or unexported fields
}

Options struct containing all options.

func NewHook

func NewHook() (*Options, error)

NewHook create a new hook handler.

func (*Options) Handle

func (o *Options) Handle(mux *mux.Router)

func (*Options) Start

func (o *Options) Start() error

type Sender

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

func NewSender

func NewSender() Sender

Jump to

Keyboard shortcuts

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