stencil

package
v0.0.0-...-a8e4d9d Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BashLinux

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

BashLinux sets up defaults for explaining how the user can interract with Harrow unconnected to a single language or framework.

func NewBashLinux

func NewBashLinux(configuration *Configuration) *BashLinux

func (*BashLinux) BuildAndPushDockerContainerTaskBody

func (self *BashLinux) BuildAndPushDockerContainerTaskBody() string

func (*BashLinux) CowsayTaskBody

func (self *BashLinux) CowsayTaskBody() string

CowsayTaskBody returns the body of the task for displaying a greeting using cowsay

func (*BashLinux) Create

func (self *BashLinux) Create() error

Create creates the following objects for this stencil:

Environments: demo, staging, production

Tasks (in test): "....", ".....", "....."

Tasks (in staging, production): "....."

func (*BashLinux) DeployFilesRsyncTaskBody

func (self *BashLinux) DeployFilesRsyncTaskBody() string

DeployFilesRsyncTaskBody returns the body of the task for deploying a simple directory of files using Rsync.

func (*BashLinux) DownloadCompileRedisBody

func (self *BashLinux) DownloadCompileRedisBody() string

func (*BashLinux) LintScriptsTaskBody

func (self *BashLinux) LintScriptsTaskBody() string

type CapistranoRails

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

CapistranoRails sets up default tasks and environments for working with a RubyOnRails application using capistrano.

func NewCapistranoRails

func NewCapistranoRails(configuration *Configuration) *CapistranoRails

func (*CapistranoRails) CheckDependenciesTaskBody

func (self *CapistranoRails) CheckDependenciesTaskBody() string

CheckDependenciesTaskBody returns the body of the "check dependencies" task.

func (*CapistranoRails) Create

func (self *CapistranoRails) Create() error

Create creates the following objects for this stencil:

Environments: test, staging, production

Tasks (in test): "bundle outdated", "rake notes", "rake test"

Tasks (in staging, production): "cap $env deploy"

func (*CapistranoRails) DeployTaskBody

func (self *CapistranoRails) DeployTaskBody() string

DeployTaskBody returns the body of the "deploy" task.

func (*CapistranoRails) NotesTaskBody

func (self *CapistranoRails) NotesTaskBody() string

NotesTaskBody returns the body of the task for displaying project notes.

func (*CapistranoRails) RunTestsTaskBody

func (self *CapistranoRails) RunTestsTaskBody() string

RunTestsTaskBody returns the body of the task for running the project's unit tests.

type Configuration

type Configuration struct {
	// UserUuid identifies the user who requested instantiation of
	// a stencil.
	UserUuid string

	// ProjectUuid identifies the project in which to create this
	// stencil.
	ProjectUuid string

	// NotifyViaEmail causes the stencil to set up an email
	// notifier, if it is set to any string containing an "@".
	NotifyViaEmail string

	// UrlHost is the host name to be used when generating URLs in
	// notifiers.
	UrlHost string

	Environments      EnvironmentStore
	Projects          ProjectStore
	Tasks             TaskStore
	Jobs              JobStore
	EmailNotifiers    EmailNotifierStore
	JobNotifiers      JobNotifierStore
	NotificationRules NotificationRuleStore
	Schedules         ScheduleStore
	GitTriggers       GitTriggerStore
	Secrets           SecretStore
	Users             UserStore
	Webhooks          WebhookStore
}

Configuration collects all the necessary components for creating stencils.

type EmailNotifierStore

type EmailNotifierStore interface {
	CreateEmailNotifier(notifier *domain.EmailNotifier) error
}

EmailNotifierStore allows a stencil to create email notifiers for a project.

type EnvironmentStore

type EnvironmentStore interface {
	CreateEnvironment(environment *domain.Environment) error
	FindEnvironmentByName(environmentName string) (*domain.Environment, error)
}

EnvironmentStore allows a stencil to create environments.

type Error

type Error struct {
	Operations []*ErrorOperation
}

Error collects information about failed operations

func NewError

func NewError() *Error

func (*Error) Add

func (self *Error) Add(operation string, thing interface{}, err error) *Error

func (*Error) Error

func (self *Error) Error() string

func (*Error) ToError

func (self *Error) ToError() error

type ErrorOperation

type ErrorOperation struct {
	Operation string
	Thing     interface{}
	Err       error
}

func (*ErrorOperation) Error

func (self *ErrorOperation) Error() string

type GitTriggerStore

type GitTriggerStore interface {
	CreateGitTrigger(gitTrigger *domain.GitTrigger) error
}

GitTriggerStore allows a stencil to create git triggers.

type JobNotifierStore

type JobNotifierStore interface {
	CreateJobNotifier(notifier *domain.JobNotifier) error
}

JobNotifierStore allows a stencil to create job notifiers for a project.

type JobStore

type JobStore interface {
	CreateJob(job *domain.Job) error
	FindJobByName(jobName string) (*domain.Job, error)
}

JobStore allows a stencil to create jobs for a project.

type NotificationRuleStore

type NotificationRuleStore interface {
	CreateNotificationRule(notificationRule *domain.NotificationRule) error
}

NotificationRuleStore allows a stencil to create notification rules for wiring up notifiers with jobs.

type ProjectDefaults

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

func NewProjectDefaults

func NewProjectDefaults(configuration *Configuration) *ProjectDefaults

func (*ProjectDefaults) Create

func (self *ProjectDefaults) Create() error

Create creates the default environment in the project given by the configured ProjectUuid.

type ProjectStore

type ProjectStore interface {
	FindProject(uuid string) (*domain.Project, error)
}

ProjectStore allows a stencil to load a project and provide the necessary context for creating other objects.

type ScheduleStore

type ScheduleStore interface {
	CreateSchedule(schedule *domain.Schedule) error
}

ScheduleStore allows a stencil to create a schedule for scheduling recurring jobs.

type ScriptEditorDefaults

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

ScriptEditorDefaults sets up defaults for supporting operation of the script editor. This is necessary for scheduling operations in order to test any scripts, when the user doesn't have any tasks yet.

func NewScriptEditorDefaults

func NewScriptEditorDefaults(configuration *Configuration) *ScriptEditorDefaults

func (*ScriptEditorDefaults) Create

func (self *ScriptEditorDefaults) Create() error

Create creates the following objects for this stencil:

Environments: default

Tasks: default

func (*ScriptEditorDefaults) DefaultTaskBody

func (self *ScriptEditorDefaults) DefaultTaskBody() string

func (*ScriptEditorDefaults) Environment

func (self *ScriptEditorDefaults) Environment() *domain.Environment

Environment returns the default environment as created by this stencil.

func (*ScriptEditorDefaults) Job

func (self *ScriptEditorDefaults) Job() *domain.Job

Job returns the default job as created by this stencil.

func (*ScriptEditorDefaults) Task

func (self *ScriptEditorDefaults) Task() *domain.Task

Task returns the default task as created by this stencil.

type SecretStore

type SecretStore interface {
	CreateSecret(secret *domain.Secret) error
}

SecretStore allows a stencil to create SSH secrets.

type TaskStore

type TaskStore interface {
	CreateTask(task *domain.Task) error
	FindTaskByName(taskName string) (*domain.Task, error)
}

TaskStore allows a stencil to create tasks for a project.

type UserStore

type UserStore interface {
	FindUser(uuid string) (*domain.User, error)
}

UserStore allows a stencil to load a user and provide the necessary context for creating other objects.

type WebhookStore

type WebhookStore interface {
	CreateWebhook(webhook *domain.Webhook) error
}

WebhookStore allows a stencil to create webhooks.

Jump to

Keyboard shortcuts

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