freddo

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2014 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Name     string
	Branches map[string][]*Branch
	Secret   []byte
	Script   string
}

func NewApp

func NewApp(name string) *App

func (*App) AddBranch

func (a *App) AddBranch(ref, script string) *Branch

func (*App) HmacEqual

func (a *App) HmacEqual(msg []byte, msgSig string) (bool, error)

type Branch

type Branch struct {
	Script      string
	UpdateQueue chan string
}

func NewBranch

func NewBranch(script string) *Branch

func (*Branch) LoopQueue

func (b *Branch) LoopQueue()

func (*Branch) QueueUpdate

func (b *Branch) QueueUpdate() error

func (*Branch) RunScript

func (b *Branch) RunScript() ([]byte, error)

func (*Branch) Update

func (b *Branch) Update()

type ConfigTOML

type ConfigTOML struct {
	Apps map[string]struct {
		Secret string
		Branch []struct {
			Ref    string
			Script string
		}
	}
}

type Freddo

type Freddo struct {
	Apps map[string]*App
}

func NewFreddo

func NewFreddo(configFile string) (*Freddo, error)

Read config and return freddo object.

func (*Freddo) UpdateApp

func (f *Freddo) UpdateApp(c web.C, w http.ResponseWriter, req *http.Request)

type WebhookPayload

type WebhookPayload struct {
	Ref string `json:"ref"`
}

Jump to

Keyboard shortcuts

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