tfc_hooks

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunTaskHandler

func RunTaskHandler(c echo.Context) error

Types

type NotificationHandler

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

func NewNotificationHandler

func NewNotificationHandler(api tfc_api.ApiClient, stream runstream.StreamClient) *NotificationHandler

func (*NotificationHandler) Handler

func (h *NotificationHandler) Handler() func(c echo.Context) error

type NotificationPayload

type NotificationPayload struct {
	PayloadVersion              int       `json:"payload_version"`
	NotificationConfigurationId string    `json:"notification_configuration_id"`
	RunUrl                      string    `json:"run_url"`
	RunId                       string    `json:"run_id"`
	RunMessage                  string    `json:"run_message"`
	RunCreatedAt                time.Time `json:"run_created_at"`
	RunCreatedBy                string    `json:"run_created_by"`
	WorkspaceId                 string    `json:"workspace_id"`
	WorkspaceName               string    `json:"workspace_name"`
	OrganizationName            string    `json:"organization_name"`
	Notifications               []struct {
		Message      string        `json:"message"`
		Trigger      string        `json:"trigger"`
		RunStatus    tfe.RunStatus `json:"run_status"`
		RunUpdatedAt time.Time     `json:"run_updated_at"`
		RunUpdatedBy string        `json:"run_updated_by"`
	} `json:"notifications"`
}

type RunTaskCallback

type RunTaskCallback struct {
	Data struct {
		Type       string `json:"type"`
		Attributes struct {
			Status  string `json:"status"`
			Message string `json:"message"`
			Url     string `json:"url"`
		} `json:"attributes"`
	} `json:"data"`
}

type RunTaskEvent

type RunTaskEvent struct {
	PayloadVersion             int         `json:"payload_version"`
	AccessToken                string      `json:"access_token"`
	TaskResultId               string      `json:"task_result_id"`
	TaskResultEnforcementLevel string      `json:"task_result_enforcement_level"`
	TaskResultCallbackUrl      string      `json:"task_result_callback_url"`
	RunAppUrl                  string      `json:"run_app_url"`
	RunId                      string      `json:"run_id"`
	RunMessage                 string      `json:"run_message"`
	RunCreatedAt               time.Time   `json:"run_created_at"`
	RunCreatedBy               string      `json:"run_created_by"`
	WorkspaceId                string      `json:"workspace_id"`
	WorkspaceName              string      `json:"workspace_name"`
	WorkspaceAppUrl            string      `json:"workspace_app_url"`
	OrganizationName           string      `json:"organization_name"`
	PlanJsonApiUrl             string      `json:"plan_json_api_url"`
	VcsRepoUrl                 string      `json:"vcs_repo_url"`
	VcsBranch                  string      `json:"vcs_branch"`
	VcsPullRequestUrl          interface{} `json:"vcs_pull_request_url"`
	VcsCommitUrl               string      `json:"vcs_commit_url"`
}

Jump to

Keyboard shortcuts

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