config

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AzureDevOpsProviderType = "azuredevops"
	GitHubProviderType      = "github"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureDevOps

type AzureDevOps struct {
	Pat string `json:"pat"`
}

type Configuration

type Configuration struct {
	Organizations []*Organization `json:"organizations" validate:"required,dive"`
}

func LoadConfiguration

func LoadConfiguration(fs afero.Fs, path string) (*Configuration, error)

LoadConfiguration parses and validates the configuration file at a given path.

type GitHub

type GitHub struct {
	AppID          int64  `json:"appID"`
	InstallationID int64  `json:"installationID"`
	PrivateKey     string `json:"privateKey"`
}

type Organization

type Organization struct {
	Provider     ProviderType  `json:"provider" validate:"required,oneof='azuredevops' 'github'"`
	AzureDevOps  AzureDevOps   `json:"azuredevops"`
	GitHub       GitHub        `json:"github"`
	Host         string        `json:"host,omitempty" validate:"required,hostname"`
	Scheme       string        `json:"scheme,omitempty" validate:"required"`
	Name         string        `json:"name" validate:"required"`
	Repositories []*Repository `json:"repositories" validate:"required,dive"`
}

func (*Organization) GetSecretName

func (o *Organization) GetSecretName(r *Repository) string

type ProviderType

type ProviderType string

type Repository

type Repository struct {
	Project            string   `json:"project"`
	Name               string   `json:"name" validate:"required"`
	Namespaces         []string `json:"namespaces" validate:"required"`
	SecretNameOverride string   `json:"secretNameOverride,omitempty"`
}

Jump to

Keyboard shortcuts

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