core

package
v0.0.1-dev.8 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WorkloadResultStatusValuesType = workloadResultStatusValuesType{
	Succeeded: "Succeeded",
	Failed:    "Failed",
	Skipped:   "Skipped",
}

Functions

This section is empty.

Types

type ADOConfig

type ADOConfig struct {
	PAT string `mapstructure:"PAT"`
}

type AzureDevOps

type AzureDevOps struct {
	OrganisationName  string
	ProjectName       string
	PAT               string
	WikiRemoteUrl     string
	WikiRepoRemoteUrl string
	WorkloadFeedName  string
}

func (*AzureDevOps) CreatePullRequest

func (ado *AzureDevOps) CreatePullRequest(repositoryName string, sourceBranchName string, targetBranchName string, title string) (*int, error)

func (*AzureDevOps) CreateWikiIfNotExists

func (ado *AzureDevOps) CreateWikiIfNotExists(wikiName string, gitUserName string, gitUserEmail string) error

func (*AzureDevOps) GetIdentityId

func (ado *AzureDevOps) GetIdentityId() (*uuid.UUID, error)

func (*AzureDevOps) GetSets

func (ado *AzureDevOps) GetSets() (*[]SetCollection, error)

func (*AzureDevOps) GetWorkloadInfo

func (ado *AzureDevOps) GetWorkloadInfo() (*[]Workload, error)

func (*AzureDevOps) SetPullRequestAutoComplete

func (ado *AzureDevOps) SetPullRequestAutoComplete(repositoryName string, pullRequestId *int, identityId *uuid.UUID) error

type Config

type Config struct {
	ADO ADOConfig `mapstructure:"ADO"`
	Git GitConfig `mapstructure:"Git"`
}

type ExtraParameter

type ExtraParameter struct {
	Name  string `yaml:"name"`
	Value string `yaml:"value"`
}

type GitConfig

type GitConfig struct {
	UserEmail string `mapstructure:"UserEmail"`
	UserName  string `mapstructure:"UserName"`
}

type Manifest

type Manifest struct {
	Version         int64               `yaml:"version"`
	Environment     string              `yaml:"environment"`
	FilePath        string              `yaml:"-"`
	NextEnvironment string              `yaml:"nextEnvironment"`
	Set             string              `yaml:"set"`
	Workloads       []*WorkloadInstance `yaml:"workloads"`
}

func LoadManifest

func LoadManifest(filePath string) (Manifest, error)

func LoadManifestFromString

func LoadManifestFromString(manifestContent string) (Manifest, error)

func (*Manifest) PrintHeader

func (m *Manifest) PrintHeader()

func (*Manifest) PrintWorkloadsSummary

func (m *Manifest) PrintWorkloadsSummary()

func (*Manifest) Save

func (m *Manifest) Save() error

type Set

type Set struct {
	Name        string
	Environment string
	Next        *Set
	Previous    *Set
	Manifest    *Manifest
}

type SetCollection

type SetCollection struct {
	Name  string
	Entry *Set
	Sets  []*Set
}

type Workload

type Workload struct {
	Name      string
	Version   string
	Build     string
	Readme    string
	Instances []*WorkloadInstance
}

type WorkloadDestroyPreventedError

type WorkloadDestroyPreventedError struct {
	Workload *WorkloadInstance
}

func (*WorkloadDestroyPreventedError) Error

type WorkloadIndex

type WorkloadIndex struct {
	Workloads []Workload
}

type WorkloadInstance

type WorkloadInstance struct {
	ExtraParameters []ExtraParameter `yaml:"extraParameters"`
	Name            string           `yaml:"name"`
	PreventDestroy  bool             `yaml:"preventDestroy"`
	Type            string           `yaml:"type"`
	Version         string           `yaml:"version"`
}

func (*WorkloadInstance) GetTypeProjectAndRepositoryNames

func (w *WorkloadInstance) GetTypeProjectAndRepositoryNames() (string, string)

func (*WorkloadInstance) PrintHeader

func (w *WorkloadInstance) PrintHeader()

type WorkloadResult

type WorkloadResult struct {
	FinishTime *time.Time
	Link       string
	QueueTime  *time.Time
	Status     WorkloadResultStatus
	Workload   *WorkloadInstance
}

func (*WorkloadResult) PrintResult

func (d *WorkloadResult) PrintResult()

type WorkloadResultStatus

type WorkloadResultStatus string

Jump to

Keyboard shortcuts

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