tasks

package
v0.14.0-alpha3 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const RAW_BUILD_DEFINITION_TABLE = "azure_api_build_definitions"
View Source
const RAW_REPOSITORIES_TABLE = "azure_api_repositories"

Variables

View Source
var CollectApiBuildDefinitionMeta = core.SubTaskMeta{
	Name:        "collectApiBuild",
	EntryPoint:  CollectApiBuildDefinitions,
	Required:    true,
	Description: "Collect BuildDefinition data from Azure api",
	DomainTypes: []string{core.DOMAIN_TYPE_CICD},
}
View Source
var CollectApiRepoMeta = core.SubTaskMeta{
	Name:        "collectApiRepo",
	EntryPoint:  CollectApiRepositories,
	Required:    true,
	Description: "Collect repositories data from Azure api",
	DomainTypes: []string{core.DOMAIN_TYPE_CODE},
}
View Source
var ExtractApiBuildDefinitionMeta = core.SubTaskMeta{
	Name:        "extractApiBuild",
	EntryPoint:  ExtractApiBuildDefinition,
	Required:    true,
	Description: "Extract raw BuildDefinition data into tool layer table azure_repos",
	DomainTypes: []string{core.DOMAIN_TYPE_CICD},
}
View Source
var ExtractApiRepoMeta = core.SubTaskMeta{
	Name:        "extractApiRepo",
	EntryPoint:  ExtractApiRepositories,
	Required:    true,
	Description: "Extract raw Repositories data into tool layer table azure_repos",
	DomainTypes: []string{core.DOMAIN_TYPE_CODE},
}

Functions

func CollectApiBuildDefinitions

func CollectApiBuildDefinitions(taskCtx core.SubTaskContext) errors.Error

func CollectApiRepositories

func CollectApiRepositories(taskCtx core.SubTaskContext) errors.Error

func CreateApiClient

func CreateApiClient(taskCtx core.TaskContext, connection *models.AzureConnection) (*helper.ApiAsyncClient, errors.Error)

func ExtractApiBuildDefinition

func ExtractApiBuildDefinition(taskCtx core.SubTaskContext) errors.Error

func ExtractApiRepositories

func ExtractApiRepositories(taskCtx core.SubTaskContext) errors.Error

Types

type ApiRepoResponse

type ApiRepoResponse AzureApiRepo

type AzureApiBuildDefinition

type AzureApiBuildDefinition struct {
	Quality    string `json:"quality"`
	AuthoredBy struct {
		DisplayName string `json:"displayName"`
		URL         string `json:"url"`
		Links       struct {
			Avatar struct {
				Href string `json:"href"`
			} `json:"avatar"`
		} `json:"_links"`
		ID         string `json:"id"`
		UniqueName string `json:"uniqueName"`
		ImageURL   string `json:"imageUrl"`
		Descriptor string `json:"descriptor"`
	} `json:"authoredBy"`
	Queue struct {
		Links struct {
			Self struct {
				Href string `json:"href"`
			} `json:"self"`
		} `json:"_links"`
		ID   int    `json:"id"`
		Name string `json:"name"`
		URL  string `json:"url"`
		Pool struct {
			ID       int    `json:"id"`
			Name     string `json:"name"`
			IsHosted bool   `json:"isHosted"`
		} `json:"pool"`
	} `json:"queue"`
	ID          int       `json:"id"`
	Name        string    `json:"name"`
	URL         string    `json:"url"`
	URI         string    `json:"uri"`
	Path        string    `json:"path"`
	Type        string    `json:"type"`
	QueueStatus string    `json:"queueStatus"`
	Revision    int       `json:"revision"`
	CreatedDate time.Time `json:"createdDate"`
	Project     struct {
		ID             string    `json:"id"`
		Name           string    `json:"name"`
		URL            string    `json:"url"`
		State          string    `json:"state"`
		Revision       int       `json:"revision"`
		Visibility     string    `json:"visibility"`
		LastUpdateTime time.Time `json:"lastUpdateTime"`
	} `json:"project"`
}

type AzureApiParams

type AzureApiParams struct {
	ConnectionId uint64
	Project      string
}

type AzureApiRepo

type AzureApiRepo struct {
	ID      string `json:"id"`
	Name    string `json:"name"`
	URL     string `json:"url"`
	Project struct {
		ID             string    `json:"id"`
		Name           string    `json:"name"`
		URL            string    `json:"url"`
		State          string    `json:"state"`
		Revision       int       `json:"revision"`
		Visibility     string    `json:"visibility"`
		LastUpdateTime time.Time `json:"lastUpdateTime"`
	} `json:"project"`
	DefaultBranch string `json:"defaultBranch"`
	Size          int    `json:"size"`
	RemoteURL     string `json:"remoteUrl"`
	SSHURL        string `json:"sshUrl"`
	WebURL        string `json:"webUrl"`
	IsDisabled    bool   `json:"isDisabled"`
}

type AzureOptions

type AzureOptions struct {
	ConnectionId uint64 `json:"connectionId"`
	Project      string
	Since        string
	Tasks        []string `json:"tasks,omitempty"`
}

func DecodeAndValidateTaskOptions

func DecodeAndValidateTaskOptions(options map[string]interface{}) (*AzureOptions, errors.Error)

type AzureTaskData

type AzureTaskData struct {
	Options    *AzureOptions
	ApiClient  *helper.ApiAsyncClient
	Connection *models.AzureConnection
	Repo       *models.AzureRepo
}

Jump to

Keyboard shortcuts

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