Documentation
¶
Index ¶
- type Client
- func NewClient(http core.HTTPContext, ctx core.IntegrationContext) (*Client, error)
- func NewClientWithAPIToken(http core.HTTPContext, parameters core.IntegrationPropertyStorageReader, ...) (*Client, error)
- func NewClientWithStorageContexts(http core.HTTPContext, parameters core.IntegrationPropertyStorageReader, ...) (*Client, error)
- func (c *Client) CreateNotification(params any) (*Notification, error)
- func (c *Client) CreateWebhookSecret(name, key string) (*Secret, error)
- func (c *Client) DeleteNotification(id string) error
- func (c *Client) DeleteSecret(name string) error
- func (c *Client) GetNotification(id string) (*Notification, error)
- func (c *Client) GetPipeline(id string) (*Pipeline, error)
- func (c *Client) GetProject(idOrName string) (*ProjectResponse, error)
- func (c *Client) GetSecret(id string) (*Secret, error)
- func (c *Client) ListPipelines(projectID string) ([]any, error)
- func (c *Client) ListProjects() ([]ProjectResponse, error)
- func (c *Client) RunWorkflow(params any) (*CreateWorkflowResponse, error)
- type CreateWorkflowResponse
- type Notification
- type NotificationMetadata
- type NotificationNotifySlack
- type NotificationNotifyWebhook
- type NotificationRule
- type NotificationRuleFilter
- type NotificationRuleNotify
- type NotificationSpec
- type Pipeline
- type PipelineResponse
- type ProjectMetadata
- type ProjectResponse
- type ProjectSpec
- type Secret
- type SecretMetadata
- type SecretSpecData
- type SecretSpecDataEnvVar
- type WebhookConfiguration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func NewClient ¶
func NewClient(http core.HTTPContext, ctx core.IntegrationContext) (*Client, error)
func NewClientWithAPIToken ¶
func NewClientWithAPIToken(http core.HTTPContext, parameters core.IntegrationPropertyStorageReader, apiToken string) (*Client, error)
func NewClientWithStorageContexts ¶
func NewClientWithStorageContexts(http core.HTTPContext, parameters core.IntegrationPropertyStorageReader, secrets core.IntegrationSecretStorageReader) (*Client, error)
func (*Client) CreateNotification ¶
func (c *Client) CreateNotification(params any) (*Notification, error)
func (*Client) CreateWebhookSecret ¶
func (*Client) DeleteNotification ¶
func (*Client) DeleteSecret ¶
func (*Client) GetNotification ¶
func (c *Client) GetNotification(id string) (*Notification, error)
func (*Client) GetProject ¶
func (c *Client) GetProject(idOrName string) (*ProjectResponse, error)
func (*Client) ListProjects ¶
func (c *Client) ListProjects() ([]ProjectResponse, error)
func (*Client) RunWorkflow ¶
func (c *Client) RunWorkflow(params any) (*CreateWorkflowResponse, error)
type CreateWorkflowResponse ¶
type Notification ¶
type Notification struct {
APIVersion string `json:"apiVersion"`
Kind string `json:"kind"`
Metadata NotificationMetadata `json:"metadata"`
Spec NotificationSpec `json:"spec"`
}
type NotificationMetadata ¶
type NotificationNotifySlack ¶
type NotificationRule ¶
type NotificationRule struct {
Name string `json:"name"`
Filter NotificationRuleFilter `json:"filter"`
Notify NotificationRuleNotify `json:"notify"`
}
type NotificationRuleFilter ¶
type NotificationRuleNotify ¶
type NotificationRuleNotify struct {
Webhook NotificationNotifyWebhook `json:"webhook"`
// TODO
// we don't really need this, but if it's not in the request,
// the API does not work properly.
// Once it's fixed, or we migrate to v2 API, we can remove it from here.
//
Slack NotificationNotifySlack `json:"slack"`
}
type NotificationSpec ¶
type NotificationSpec struct {
Rules []NotificationRule `json:"rules"`
}
type Pipeline ¶
type Pipeline struct {
PipelineName string `json:"name"`
PipelineID string `json:"ppl_id"`
WorkflowID string `json:"wf_id"`
State string `json:"state"`
Result string `json:"result"`
ResultReason string `json:"result_reason"`
BranchName string `json:"branch_name"`
CommitSHA string `json:"commit_sha"`
CommitMessage string `json:"commit_message"`
YAMLFileName string `json:"yaml_file_name"`
WorkingDirectory string `json:"working_directory"`
ProjectID string `json:"project_id"`
CreatedAt string `json:"created_at"`
DoneAt string `json:"done_at"`
RunningAt string `json:"running_at"`
ErrorDescription string `json:"error_description"`
TerminatedBy string `json:"terminated_by"`
PromotionOf string `json:"promotion_of"`
}
type PipelineResponse ¶
type PipelineResponse struct {
Pipeline *Pipeline `json:"pipeline"`
}
type ProjectMetadata ¶
type ProjectResponse ¶
type ProjectResponse struct {
Metadata *ProjectMetadata `json:"metadata"`
Spec *ProjectSpec `json:"spec"`
}
type ProjectSpec ¶
type ProjectSpec struct {
Repository struct {
URL string `json:"url"`
} `json:"repository"`
}
type Secret ¶
type Secret struct {
APIVersion string `json:"apiVersion"`
Kind string `json:"kind"`
Metadata SecretMetadata `json:"metadata"`
Data SecretSpecData `json:"data"`
}
type SecretMetadata ¶
type SecretSpecData ¶
type SecretSpecData struct {
EnvVars []SecretSpecDataEnvVar `json:"env_vars"`
}
type SecretSpecDataEnvVar ¶
type WebhookConfiguration ¶
type WebhookConfiguration struct {
Project string `json:"project"`
}
Click to show internal directories.
Click to hide internal directories.