builder

package
v0.0.0-...-0f7d7ad Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2015 License: MPL-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DockerIgnore = `.git
.gitignore
`
)
View Source
const (
	ExecTimeout = 15 * time.Minute
)

Variables

View Source
var (
	MongoDBSessionMissing = errors.New("no MongoDB session information was provided")
)

Functions

func Exec

func Exec(cwd string, env map[string]string, command string, args ...string) error

Types

type Attatchment

type Attatchment struct {
	Fallback   string   `json:"fallback"`
	Color      string   `json:"color"`
	Pretext    string   `json:"pretext"`
	AuthorName string   `json:"author_name"`
	AuthorIcon string   `json:"author_icon"`
	Title      string   `json:"title"`
	TitleLink  string   `json:"title_link"`
	Text       string   `json:"text"`
	MarkdownIn []string `json:"mrkdwn_in"`
	Fields     []*Field `json:"fields"`
}

func NewAttatchment

func NewAttatchment() *Attatchment

type Builder

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

func NewBuilder

func NewBuilder(config *Config) (*Builder, error)

func (*Builder) Build

func (b *Builder) Build(pusher, user, repository, branch, commit, tag string)

func (*Builder) ServeBuilds

func (b *Builder) ServeBuilds(w http.ResponseWriter, r *http.Request)

func (*Builder) ServeKey

func (b *Builder) ServeKey(w http.ResponseWriter, r *http.Request)

func (*Builder) ServeWebhook

func (b *Builder) ServeWebhook(w http.ResponseWriter, r *http.Request)

type BuilderError

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

func (BuilderError) Error

func (b BuilderError) Error() string

type Config

type Config struct {
	CachePath, KeyPath, RegistryPrefix, SlackURL string
	Users, Branches                              []string
	MongoDBDialInfo                              *mgo.DialInfo
}

type ExecError

type ExecError struct {
	Command string
	Err     error
	Output  string
}

func NewExecError

func NewExecError(command string, args []string, err error, output string) ExecError

func (ExecError) Attatchment

func (e ExecError) Attatchment() *Attatchment

func (ExecError) Error

func (e ExecError) Error() string

type Field

type Field struct {
	Title string `json:"title"`
	Value string `json:"value"`
	Short bool   `json:"short"`
}

type Message

type Message struct {
	Text         string         `json:"text"`
	Attatchments []*Attatchment `json:"attachments"`
}

func NewMessage

func NewMessage() *Message

func (*Message) Attatch

func (m *Message) Attatch(attatchment *Attatchment)

func (*Message) Send

func (m *Message) Send(slackURL string) error

Jump to

Keyboard shortcuts

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