Documentation
¶
Index ¶
- func OrgSlug(vcs, org string) string
- func Slug(vcs, org, project string) string
- type Bitbucket
- type Client
- func (c *Client) DoRequest(req *http.Request, resp interface{}) (statusCode int, err error)
- func (c *Client) GetCurrentLogin() (*CurrentLogin, error)
- func (c *Client) GetCurrentUserFollowedProject() (*UserProfile, error)
- func (c *Client) HasProjectEnvironmentVariable(vcs, org, project, name string) (bool, error)
- func (c *Client) ListAllContext(organizationSlug string) ([]Context, error)
- func (c *Client) ListAllInsightsWorkflowRuns(projectSlug, workflowName, branch, startDate, endDate string, ...) ([]InsightsWorkflowRun, error)
- func (c *Client) ListContext(organizationSlug, pageToken string) (*ContextResponse, error)
- func (c *Client) ListContextEnvironmentVariable(contextId, pageToken string) (*EnvironmentVariableResponse, error)
- func (c *Client) ListInsightsWorkflowRuns(projectSlug, workflowName, branch, startDate, endDate, pageToken string, ...) (*InsightsWorkflowRunResponse, error)
- func (c *Client) ListOrganizations() (*[]OrganizationResponse, error)
- func (c *Client) ListPipelines(vcs, org string) (*PipelineResponse, error)
- func (c *Client) ListPipelinesWorkflow(pipelineId string) (*WorkflowResponse, error)
- func (c *Client) NewRequest(method string, u *url.URL, payload interface{}) (req *http.Request, err error)
- type Config
- type Context
- type ContextResponse
- type CurrentLogin
- type EmailAuthentication
- type EnvironmentVariable
- type EnvironmentVariableResponse
- type FollowedProject
- type HTTPError
- type Identities
- type IdentityDetails
- type InsightsWorkflowRun
- type InsightsWorkflowRunResponse
- type OrganizationResponse
- type PipelineResponse
- type UserProfile
- type Workflow
- type WorkflowResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetCurrentLogin ¶ added in v1.0.0
func (c *Client) GetCurrentLogin() (*CurrentLogin, error)
func (*Client) GetCurrentUserFollowedProject ¶ added in v1.1.0
func (c *Client) GetCurrentUserFollowedProject() (*UserProfile, error)
Private user profile API endpoint: https://circleci.com/api/private/me
func (*Client) HasProjectEnvironmentVariable ¶
func (*Client) ListAllContext ¶ added in v0.1.0
func (*Client) ListAllInsightsWorkflowRuns ¶ added in v0.3.0
func (*Client) ListContext ¶ added in v0.1.0
func (c *Client) ListContext(organizationSlug, pageToken string) (*ContextResponse, error)
func (*Client) ListContextEnvironmentVariable ¶ added in v0.1.0
func (c *Client) ListContextEnvironmentVariable(contextId, pageToken string) (*EnvironmentVariableResponse, error)
func (*Client) ListInsightsWorkflowRuns ¶ added in v0.3.0
func (*Client) ListOrganizations ¶ added in v0.1.0
func (c *Client) ListOrganizations() (*[]OrganizationResponse, error)
func (*Client) ListPipelines ¶
func (c *Client) ListPipelines(vcs, org string) (*PipelineResponse, error)
func (*Client) ListPipelinesWorkflow ¶
func (c *Client) ListPipelinesWorkflow(pipelineId string) (*WorkflowResponse, error)
type ContextResponse ¶ added in v0.1.0
type CurrentLogin ¶ added in v1.0.0
type EmailAuthentication ¶ added in v1.1.0
type EnvironmentVariable ¶ added in v0.1.0
type EnvironmentVariableResponse ¶ added in v0.1.0
type EnvironmentVariableResponse struct {
Items []EnvironmentVariable `json:"items"`
NextPageToken string `json:"next_page_token"`
}
type FollowedProject ¶ added in v1.1.0
type Identities ¶ added in v1.1.0
type Identities struct {
Bitbucket IdentityDetails `json:"bitbucket"`
}
type IdentityDetails ¶ added in v1.1.0
type IdentityDetails struct {
AvatarURL string `json:"avatar_url"`
ExternalID string `json:"external_id"`
ID string `json:"id"`
Name string `json:"name"`
User bool `json:"user?"`
Domain string `json:"domain"`
Type string `json:"type"`
Authorized bool `json:"authorized?"`
ProviderID string `json:"provider_id"`
Login string `json:"login"`
}
type InsightsWorkflowRun ¶ added in v0.3.0
type InsightsWorkflowRun struct {
ID string `json:"id"`
WorkflowName string `json:"workflow_name"`
ProjectSlug string `json:"project_slug"`
Branch string `json:"branch"`
Duration int `json:"duration"`
CreatedAt time.Time `json:"created_at"`
StoppedAt time.Time `json:"stopped_at"`
CreditsUsed int `json:"credits_used"`
Status string `json:"status"`
}
type InsightsWorkflowRunResponse ¶ added in v0.3.0
type InsightsWorkflowRunResponse struct {
Items []InsightsWorkflowRun `json:"items"`
NextPageToken string `json:"next_page_token"`
}
type OrganizationResponse ¶ added in v0.1.0
type PipelineResponse ¶
type PipelineResponse struct {
Items []struct {
ID string `json:"id"`
Errors []struct {
Type string `json:"type"`
Message string `json:"message"`
} `json:"errors"`
ProjectSlug string `json:"project_slug"`
UpdatedAt time.Time `json:"updated_at"`
Number int `json:"number"`
TriggerParameters map[string]interface{} `json:"trigger_parameters"`
State string `json:"state"`
CreatedAt time.Time `json:"created_at"`
Trigger struct {
Type string `json:"type"`
ReceivedAt time.Time `json:"received_at"`
Actor struct {
Login string `json:"login"`
AvatarURL string `json:"avatar_url"`
} `json:"actor"`
} `json:"trigger"`
Vcs struct {
ProviderName string `json:"provider_name"`
TargetRepositoryURL string `json:"target_repository_url"`
Branch string `json:"branch"`
ReviewID string `json:"review_id"`
ReviewURL string `json:"review_url"`
Revision string `json:"revision"`
Tag string `json:"tag"`
Commit struct {
Subject string `json:"subject"`
Body string `json:"body"`
} `json:"commit"`
OriginRepositoryURL string `json:"origin_repository_url"`
} `json:"vcs"`
} `json:"items"`
NextPageToken string `json:"next_page_token"`
}
type UserProfile ¶ added in v1.1.0
type UserProfile struct {
EnrolledBetas []interface{} `json:"enrolled_betas"`
InBetaProgram bool `json:"in_beta_program"`
SelectedEmail string `json:"selected_email"`
AvatarURL *string `json:"avatar_url"`
TrialEnd string `json:"trial_end"`
Admin bool `json:"admin"`
BasicEmailPrefs string `json:"basic_email_prefs"`
SignInCount int `json:"sign_in_count"`
EmailAuthentication EmailAuthentication `json:"email_authentication"`
AnalyticsID string `json:"analytics_id"`
Name string `json:"name"`
GravatarID *string `json:"gravatar_id"`
FollowedProjects []FollowedProject `json:"followed_projects"`
DaysLeftInTrial int `json:"days_left_in_trial"`
PrivacyOptout bool `json:"privacy_optout"`
Parallelism int `json:"parallelism"`
Student bool `json:"student"`
BitbucketAuthorized bool `json:"bitbucket_authorized"`
WebUIPipelinesOptout string `json:"web_ui_pipelines_optout"`
Bitbucket Bitbucket `json:"bitbucket"`
DevAdmin bool `json:"dev_admin"`
AllEmails []string `json:"all_emails"`
CreatedAt string `json:"created_at"`
Identities Identities `json:"identities"`
Login string `json:"login"`
OrganizationPrefs map[string]interface{} `json:"organization_prefs"`
PusherID string `json:"pusher_id"`
WebUIPipelinesFirstOptIn bool `json:"web_ui_pipelines_first_opt_in"`
NumProjectsFollowed int `json:"num_projects_followed"`
}
type Workflow ¶ added in v0.3.0
type Workflow struct {
PipelineID string `json:"pipeline_id"`
CanceledBy string `json:"canceled_by"`
ID string `json:"id"`
Name string `json:"name"`
ProjectSlug string `json:"project_slug"`
ErroredBy string `json:"errored_by"`
Tag string `json:"tag"`
Status string `json:"status"`
StartedBy string `json:"started_by"`
PipelineNumber int `json:"pipeline_number"`
CreatedAt time.Time `json:"created_at"`
StoppedAt time.Time `json:"stopped_at"`
}
type WorkflowResponse ¶
Click to show internal directories.
Click to hide internal directories.