Documentation ¶
Overview ¶
Package models implements database persistence framework to API primitives.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Build ¶
type Build struct { ID int64 `yaml:"id" db:"id"` RepoFullName string `yaml:"repo_full_name" db:"repo_full_name"` CommitHash string `yaml:"commit_hash" db:"commit_hash"` CommitMessage string `yaml:"commit_message" db:"commit_message"` StartedAt *time.Time `yaml:"started_at" db:"started_at"` Success bool `yaml:"success" db:"success"` Log string `yaml:"log" db:"log"` CompletedAt *time.Time `yaml:"completed_at" db:"completed_at"` *Recipe }
Build defines the necessary data to run a build successfully.
type BuildRepository ¶
type BuildRepository interface { Bootstrap() error Register(build *Build) (*Build, error) MarkInProgress(build *Build) error MarkComplete(build *Build) error GetLastBuild(repoFullName string) (*Build, error) ListByRepoFullName(repoFullName string) ([]*Build, error) SweepExpired(timeout time.Duration) (int64, error) }
BuildRepository manipulate a collection of Build requests.
type Configuration ¶
Configuration defines the internal parameters for the application.
func LoadConfiguration ¶
func LoadConfiguration(r io.Reader) (Configuration, error)
LoadConfiguration loads a given fd with YAML content into Configuration.
type Recipe ¶
type Recipe struct { Concurrency int64 `yaml:"concurrency" db:"concurrency"` Clone string `yaml:"clone" db:"clone"` SlackWebhook string `yaml:"slack_webhook" db:"slack_webhook"` GithubSecret string `yaml:"github_secret" db:"github_secret"` Environment string `yaml:"environment" db:"environment"` Commands string `yaml:"commands" db:"commands"` Timeout *time.Duration `yaml:"timeout" db:"timeout"` }
Recipe defines the environment necessary to make a build.
Click to show internal directories.
Click to hide internal directories.