customresource

package
v0.0.0-...-0542aae Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2019 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(s storage.Store, appID int, key []byte, kc *rest.Config, mappings []Mapping) *controller

Types

type Handler

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

func (*Handler) HandleState

func (h *Handler) HandleState(ss *state.State) error

type Mapping

type Mapping struct {
	Group, Version, Kind string
	BrigadeProject       string
}

type Object

type Object struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   map[string]interface{} `json:"spec"`
	Status Status                 `json:"status"`
}

type Payload

type Payload struct {
	Type         string      `json:"type"`
	Token        string      `json:"token"`
	TokenExpires time.Time   `json:"tokenExpires"`
	Body         interface{} `json:"body"`
	AppID        int         `json:"-"`
	InstID       int         `json:"-"`
	Commit       string      `json:"commit"`
	Branch       string      `json:"branch"`

	Owner   string `json:"owner"`
	Repo    string `json:"repo"`
	Pull    string `json:"pull"`
	PullURL string `json:"pullURL"`
}

Payload represents the data sent as the payload of an event.

type State

type State struct {
	Object Object `json:"object"`
}

type Status

type Status struct {
	Phase string `json:"phase"`
}

Jump to

Keyboard shortcuts

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