app

package
v0.0.0-...-75db7dd Latest Latest
Warning

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

Go to latest
Published: May 22, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JobHref

func JobHref(jobID interface{}) string

JobHref returns the resource href.

func MountJobController

func MountJobController(service *goa.Service, ctrl JobController)

MountJobController "mounts" a Job resource controller on the given service.

func MountProjectController

func MountProjectController(service *goa.Service, ctrl ProjectController)

MountProjectController "mounts" a Project resource controller on the given service.

func ProjectHref

func ProjectHref(projectID interface{}) string

ProjectHref returns the resource href.

Types

type JobController

type JobController interface {
	goa.Muxer
	Show(*ShowJobContext) error
	ShowLatest(*ShowLatestJobContext) error
}

JobController is the controller interface for the Job actions.

type JobsProjectContext

type JobsProjectContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	ProjectID int
}

JobsProjectContext provides the project jobs action context.

func NewJobsProjectContext

func NewJobsProjectContext(ctx context.Context, r *http.Request, service *goa.Service) (*JobsProjectContext, error)

NewJobsProjectContext parses the incoming request URL and body, performs validations and creates the context used by the project controller jobs action.

func (*JobsProjectContext) NotFound

func (ctx *JobsProjectContext) NotFound() error

NotFound sends a HTTP response with status code 404.

func (*JobsProjectContext) OKLight

OKLight sends a HTTP response with status code 200.

type ListProjectContext

type ListProjectContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
}

ListProjectContext provides the project list action context.

func NewListProjectContext

func NewListProjectContext(ctx context.Context, r *http.Request, service *goa.Service) (*ListProjectContext, error)

NewListProjectContext parses the incoming request URL and body, performs validations and creates the context used by the project controller list action.

func (*ListProjectContext) OK

OK sends a HTTP response with status code 200.

type OctorunnerJob

type OctorunnerJob struct {
	// The git commit ID specific to this job
	CommitID string              `form:"commitID" json:"commitID" xml:"commitID"`
	Data     []*OctorunnerOutput `form:"data,omitempty" json:"data,omitempty" xml:"data,omitempty"`
	// Extra information, this might contain error information
	Extra string `form:"extra" json:"extra" xml:"extra"`
	// Unique job ID
	ID int `form:"id" json:"id" xml:"id"`
	// The iteration ID of this job. A job might be ran multiple times.
	Iteration int `form:"iteration" json:"iteration" xml:"iteration"`
	// The name of the job
	Job string `form:"job" json:"job" xml:"job"`
	// The project this job belongs to
	Project int `form:"project" json:"project" xml:"project"`
	// The status of the job
	Status string `form:"status" json:"status" xml:"status"`
}

A job that was ran after a commit on a project (default view)

Identifier: application/vnd.octorunner.job+json; view=default

func (*OctorunnerJob) Validate

func (mt *OctorunnerJob) Validate() (err error)

Validate validates the OctorunnerJob media type instance.

type OctorunnerJobCollection

type OctorunnerJobCollection []*OctorunnerJob

OctorunnerJobCollection is the media type for an array of OctorunnerJob (default view)

Identifier: application/vnd.octorunner.job+json; type=collection; view=default

func (OctorunnerJobCollection) Validate

func (mt OctorunnerJobCollection) Validate() (err error)

Validate validates the OctorunnerJobCollection media type instance.

type OctorunnerJobLight

type OctorunnerJobLight struct {
	// The git commit ID specific to this job
	CommitID string `form:"commitID" json:"commitID" xml:"commitID"`
	// Extra information, this might contain error information
	Extra string `form:"extra" json:"extra" xml:"extra"`
	// Unique job ID
	ID int `form:"id" json:"id" xml:"id"`
	// The iteration ID of this job. A job might be ran multiple times.
	Iteration int `form:"iteration" json:"iteration" xml:"iteration"`
	// The name of the job
	Job string `form:"job" json:"job" xml:"job"`
	// The project this job belongs to
	Project int `form:"project" json:"project" xml:"project"`
	// The status of the job
	Status string `form:"status" json:"status" xml:"status"`
}

A job that was ran after a commit on a project (light view)

Identifier: application/vnd.octorunner.job+json; view=light

func (*OctorunnerJobLight) Validate

func (mt *OctorunnerJobLight) Validate() (err error)

Validate validates the OctorunnerJobLight media type instance.

type OctorunnerJobLightCollection

type OctorunnerJobLightCollection []*OctorunnerJobLight

OctorunnerJobCollection is the media type for an array of OctorunnerJob (light view)

Identifier: application/vnd.octorunner.job+json; type=collection; view=light

func (OctorunnerJobLightCollection) Validate

func (mt OctorunnerJobLightCollection) Validate() (err error)

Validate validates the OctorunnerJobLightCollection media type instance.

type OctorunnerOutput

type OctorunnerOutput struct {
	// The data, which is a single line of stdout or stderr
	Data *string `form:"data,omitempty" json:"data,omitempty" xml:"data,omitempty"`
	// Unique output ID
	ID *int `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// The git commit ID specific to this job
	Timestamp *time.Time `form:"timestamp,omitempty" json:"timestamp,omitempty" xml:"timestamp,omitempty"`
}

Output contains a single line of output of a job (default view)

Identifier: application/vnd.octorunner.output+json; view=default

type OctorunnerProject

type OctorunnerProject struct {
	// Unique project ID
	ID int `form:"id" json:"id" xml:"id"`
	// The project name
	Name string `form:"name" json:"name" xml:"name"`
	// The project's owner
	Owner string `form:"owner" json:"owner" xml:"owner"`
}

A (github) project that Octorunner ran jobs for (default view)

Identifier: application/vnd.octorunner.project+json; view=default

func (*OctorunnerProject) Validate

func (mt *OctorunnerProject) Validate() (err error)

Validate validates the OctorunnerProject media type instance.

type OctorunnerProjectCollection

type OctorunnerProjectCollection []*OctorunnerProject

OctorunnerProjectCollection is the media type for an array of OctorunnerProject (default view)

Identifier: application/vnd.octorunner.project+json; type=collection; view=default

func (OctorunnerProjectCollection) Validate

func (mt OctorunnerProjectCollection) Validate() (err error)

Validate validates the OctorunnerProjectCollection media type instance.

type ProjectController

type ProjectController interface {
	goa.Muxer
	Jobs(*JobsProjectContext) error
	List(*ListProjectContext) error
	Show(*ShowProjectContext) error
}

ProjectController is the controller interface for the Project actions.

type ShowJobContext

type ShowJobContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	JobID int
}

ShowJobContext provides the job show action context.

func NewShowJobContext

func NewShowJobContext(ctx context.Context, r *http.Request, service *goa.Service) (*ShowJobContext, error)

NewShowJobContext parses the incoming request URL and body, performs validations and creates the context used by the job controller show action.

func (*ShowJobContext) NotFound

func (ctx *ShowJobContext) NotFound() error

NotFound sends a HTTP response with status code 404.

func (*ShowJobContext) OK

func (ctx *ShowJobContext) OK(r *OctorunnerJob) error

OK sends a HTTP response with status code 200.

func (*ShowJobContext) OKLight

func (ctx *ShowJobContext) OKLight(r *OctorunnerJobLight) error

OKLight sends a HTTP response with status code 200.

type ShowLatestJobContext

type ShowLatestJobContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
}

ShowLatestJobContext provides the job showLatest action context.

func NewShowLatestJobContext

func NewShowLatestJobContext(ctx context.Context, r *http.Request, service *goa.Service) (*ShowLatestJobContext, error)

NewShowLatestJobContext parses the incoming request URL and body, performs validations and creates the context used by the job controller showLatest action.

func (*ShowLatestJobContext) NotFound

func (ctx *ShowLatestJobContext) NotFound() error

NotFound sends a HTTP response with status code 404.

func (*ShowLatestJobContext) OK

OK sends a HTTP response with status code 200.

func (*ShowLatestJobContext) OKLight

OKLight sends a HTTP response with status code 200.

type ShowProjectContext

type ShowProjectContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	ProjectID int
}

ShowProjectContext provides the project show action context.

func NewShowProjectContext

func NewShowProjectContext(ctx context.Context, r *http.Request, service *goa.Service) (*ShowProjectContext, error)

NewShowProjectContext parses the incoming request URL and body, performs validations and creates the context used by the project controller show action.

func (*ShowProjectContext) NotFound

func (ctx *ShowProjectContext) NotFound() error

NotFound sends a HTTP response with status code 404.

func (*ShowProjectContext) OK

OK sends a HTTP response with status code 200.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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