controllers

package
v0.0.0-...-20171d7 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2015 License: MIT Imports: 15 Imported by: 5 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiController

type ApiController struct {
	beego.Controller
}

ApiController is the custom controller to provide APIs.

func (*ApiController) DeleteProjectAndBuilds

func (c *ApiController) DeleteProjectAndBuilds()

DeleteProjectAndBuilds deletes the project and the relative builds.

func (*ApiController) GetAccountInfo

func (c *ApiController) GetAccountInfo()

GetAccountInfo return the info of github user.

func (*ApiController) GetAccountOrganizations

func (c *ApiController) GetAccountOrganizations()

GetAccountOrganizations return the organizations of github user.

func (*ApiController) GetAccountProjects

func (c *ApiController) GetAccountProjects()

GetAccountProjects returns the projects of github user.

func (*ApiController) GetAccountToken

func (c *ApiController) GetAccountToken()

GetAccountToken returns github oauth token as string.

func (*ApiController) GetActiveBuilds

func (c *ApiController) GetActiveBuilds()

GetActiveBuilds get build data from database.

func (*ApiController) GetBuild

func (c *ApiController) GetBuild()

GetBuild gets the build id and return the build object.

func (*ApiController) GetBuildLogsAll

func (c *ApiController) GetBuildLogsAll()

GetBuildLogsAll return all logs of the build.

func (*ApiController) GetBuildLogsIndex

func (c *ApiController) GetBuildLogsIndex()

GetBuildLogsIndex return the single build log with the index.

func (*ApiController) GetBuildsAll

func (c *ApiController) GetBuildsAll()

GetBuildsAll read all builds from database.

func (*ApiController) GetBuildsWithProjectName

func (c *ApiController) GetBuildsWithProjectName()

GetBuildsWithProjectName gets project name in url and return the project object.

func (*ApiController) GetProject

func (c *ApiController) GetProject()

GetProject take project id and return the project.

func (*ApiController) GetProjectBadge

func (c *ApiController) GetProjectBadge()

GetProjectBadge takes project id and return the badge image of its status.

func (*ApiController) GetProjectBadgeMarkdown

func (c *ApiController) GetProjectBadgeMarkdown()

GetProjectBadgeMarkdown returns the markdown link of the status badge.

func (*ApiController) GetProjectBadgeUrl

func (c *ApiController) GetProjectBadgeUrl()

GetProjectBadgeUrl returns the url of the status badge.

func (*ApiController) GetProjectsAll

func (c *ApiController) GetProjectsAll()

GetProjectsAll return all projects from database.

func (*ApiController) GetSearchBuilds

func (c *ApiController) GetSearchBuilds()

GetSearchBuilds get search string and return related builds.

func (*ApiController) GetWorkersAll

func (c *ApiController) GetWorkersAll()

GetWorkerAll returns all workers from database.

func (*ApiController) GetWorkersAllStatus

func (c *ApiController) GetWorkersAllStatus()

GetWorkersAllStatus take the parameter of status and return the workers.

func (*ApiController) LoginGithub

func (c *ApiController) LoginGithub()

func (*ApiController) LoginGithubCallback

func (c *ApiController) LoginGithubCallback()

func (*ApiController) NewBuild

func (c *ApiController) NewBuild()

Newbuild processes POST data to build record and add it in database.

func (*ApiController) NewProject

func (c *ApiController) NewProject()

NewProject get request body and add project in database.

func (*ApiController) TriggerGithubPushHook

func (c *ApiController) TriggerGithubPushHook()

TriggerGithubPushHook processes github push hook to trigger build.

func (*ApiController) TriggerGitlabPushHook

func (c *ApiController) TriggerGitlabPushHook()

TriggerGitlabPushHook processes gitlab push hook to trigger build.

type GetBuildLogsIndexResponse

type GetBuildLogsIndexResponse struct {
	Log  string `json:"log"`
	Next bool   `json:"next`
}

GetBuildLogsIndexResponse is the json struct to return to archci server.

type GithubOauthRepositories

type GithubOauthRepositories []struct {
	ID    int `json:"id"`
	Owner struct {
		Login             string `json:"login"`
		ID                int    `json:"id"`
		AvatarURL         string `json:"avatar_url"`
		HTMLURL           string `json:"html_url"`
		GravatarID        string `json:"gravatar_id"`
		Type              string `json:"type"`
		SiteAdmin         bool   `json:"site_admin"`
		URL               string `json:"url"`
		EventsURL         string `json:"events_url"`
		FollowingURL      string `json:"following_url"`
		FollowersURL      string `json:"followers_url"`
		GistsURL          string `json:"gists_url"`
		OrganizationsURL  string `json:"organizations_url"`
		ReceivedEventsURL string `json:"received_events_url"`
		ReposURL          string `json:"repos_url"`
		StarredURL        string `json:"starred_url"`
		SubscriptionsURL  string `json:"subscriptions_url"`
	} `json:"owner"`
	Name            string    `json:"name"`
	FullName        string    `json:"full_name"`
	Description     string    `json:"description"`
	Homepage        string    `json:"homepage"`
	DefaultBranch   string    `json:"default_branch"`
	CreatedAt       time.Time `json:"created_at"`
	PushedAt        time.Time `json:"pushed_at"`
	UpdatedAt       time.Time `json:"updated_at"`
	HTMLURL         string    `json:"html_url"`
	CloneURL        string    `json:"clone_url"`
	GitURL          string    `json:"git_url"`
	SSHURL          string    `json:"ssh_url"`
	SvnURL          string    `json:"svn_url"`
	Language        string    `json:"language"`
	Fork            bool      `json:"fork"`
	ForksCount      int       `json:"forks_count"`
	OpenIssuesCount int       `json:"open_issues_count"`
	StargazersCount int       `json:"stargazers_count"`
	WatchersCount   int       `json:"watchers_count"`
	Size            int       `json:"size"`
	Permissions     struct {
		Admin bool `json:"admin"`
		Pull  bool `json:"pull"`
		Push  bool `json:"push"`
	} `json:"permissions"`
	Private          bool        `json:"private"`
	HasIssues        bool        `json:"has_issues"`
	HasWiki          bool        `json:"has_wiki"`
	HasDownloads     bool        `json:"has_downloads"`
	TeamID           interface{} `json:"team_id"`
	URL              string      `json:"url"`
	ArchiveURL       string      `json:"archive_url"`
	AssigneesURL     string      `json:"assignees_url"`
	BlobsURL         string      `json:"blobs_url"`
	BranchesURL      string      `json:"branches_url"`
	CollaboratorsURL string      `json:"collaborators_url"`
	CommentsURL      string      `json:"comments_url"`
	CommitsURL       string      `json:"commits_url"`
	CompareURL       string      `json:"compare_url"`
	ContentsURL      string      `json:"contents_url"`
	ContributorsURL  string      `json:"contributors_url"`
	DownloadsURL     string      `json:"downloads_url"`
	EventsURL        string      `json:"events_url"`
	ForksURL         string      `json:"forks_url"`
	GitCommitsURL    string      `json:"git_commits_url"`
	GitRefsURL       string      `json:"git_refs_url"`
	GitTagsURL       string      `json:"git_tags_url"`
	HooksURL         string      `json:"hooks_url"`
	IssueCommentURL  string      `json:"issue_comment_url"`
	IssueEventsURL   string      `json:"issue_events_url"`
	IssuesURL        string      `json:"issues_url"`
	KeysURL          string      `json:"keys_url"`
	LabelsURL        string      `json:"labels_url"`
	LanguagesURL     string      `json:"languages_url"`
	MergesURL        string      `json:"merges_url"`
	MilestonesURL    string      `json:"milestones_url"`
	NotificationsURL string      `json:"notifications_url"`
	PullsURL         string      `json:"pulls_url"`
	ReleasesURL      string      `json:"releases_url"`
	StargazersURL    string      `json:"stargazers_url"`
	StatusesURL      string      `json:"statuses_url"`
	SubscribersURL   string      `json:"subscribers_url"`
	SubscriptionURL  string      `json:"subscription_url"`
	TagsURL          string      `json:"tags_url"`
	TreesURL         string      `json:"trees_url"`
	TeamsURL         string      `json:"teams_url"`
}

type GithubOauthUser

type GithubOauthUser struct {
	Login             string    `json:"login"`
	ID                int       `json:"id"`
	AvatarURL         string    `json:"avatar_url"`
	HTMLURL           string    `json:"html_url"`
	GravatarID        string    `json:"gravatar_id"`
	Name              string    `json:"name"`
	Company           string    `json:"company"`
	Blog              string    `json:"blog"`
	Location          string    `json:"location"`
	Email             string    `json:"email"`
	Hireable          bool      `json:"hireable"`
	PublicRepos       int       `json:"public_repos"`
	PublicGists       int       `json:"public_gists"`
	Followers         int       `json:"followers"`
	Following         int       `json:"following"`
	CreatedAt         time.Time `json:"created_at"`
	UpdatedAt         time.Time `json:"updated_at"`
	Type              string    `json:"type"`
	SiteAdmin         bool      `json:"site_admin"`
	URL               string    `json:"url"`
	EventsURL         string    `json:"events_url"`
	FollowingURL      string    `json:"following_url"`
	FollowersURL      string    `json:"followers_url"`
	GistsURL          string    `json:"gists_url"`
	OrganizationsURL  string    `json:"organizations_url"`
	ReceivedEventsURL string    `json:"received_events_url"`
	ReposURL          string    `json:"repos_url"`
	StarredURL        string    `json:"starred_url"`
	SubscriptionsURL  string    `json:"subscriptions_url"`
}

type MainController

type MainController struct {
	beego.Controller
}

MainController is generated as the default controller.

func (*MainController) Get

func (c *MainController) Get()

Get will render the single-page application.

Jump to

Keyboard shortcuts

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