octo

package
v2.0.0-...-a344945 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PlatformLinux   = "linux"
	PlatformWindows = "windows"
)
View Source
const (
	CraneVersion  = "0.8.0"
	GoVersion     = "1.20"
	PackVersion   = "0.30.0-pre2"
	RichGoVersion = "0.3.10"
	YJVersion     = "5.0.0"
	Namespace     = "pb"
)
View Source
const (
	FormatFile  = "file"
	FormatImage = "image"
)

Variables

View Source
var RemovedFiles []string

Functions

func Contribute

func Contribute(path string) error

func Exists

func Exists(path string) (bool, error)

func Find

func Find(path string, predicate Predicate) ([]string, error)

func NewDockerCredentialActions

func NewDockerCredentialActions(credentials []DockerCredentials) []actions.Step

func NewHttpCredentialActions

func NewHttpCredentialActions(credentials []HTTPCredentials) []actions.Step

func Remove

func Remove(descriptor Descriptor, removals []string) error

func StatikString

func StatikString(path string) string

func Write

func Write(descriptor Descriptor, contributions []Contribution) error

Types

type Action

type Action struct {
	Source string
	Target string
}

type Builder

type Builder struct {
	Repository string
}

type CodeOwner

type CodeOwner struct {
	Path  string
	Owner string
}

type Contribution

type Contribution struct {
	Path        string
	Permissions os.FileMode
	Structure   gotree.Tree
	Content     []byte
	Namespace   string
}

func ContributeActions

func ContributeActions(descriptor Descriptor) ([]Contribution, error)

func ContributeBuildModuleDependencies

func ContributeBuildModuleDependencies(descriptor Descriptor) ([]Contribution, error)

func ContributeBuilderDependencies

func ContributeBuilderDependencies(descriptor Descriptor) ([]Contribution, error)

func ContributeCodeOwners

func ContributeCodeOwners(descriptor Descriptor) Contribution

func ContributeCreateBuilder

func ContributeCreateBuilder(descriptor Descriptor) (*Contribution, error)

func ContributeCreatePackage

func ContributeCreatePackage(descriptor Descriptor) (*Contribution, error)

func ContributeDependabot

func ContributeDependabot(descriptor Descriptor) (*Contribution, error)

func ContributeDraftRelease

func ContributeDraftRelease(descriptor Descriptor) ([]Contribution, error)

func ContributeLabels

func ContributeLabels(descriptor Descriptor) ([]Contribution, error)

func ContributeLitePackages

func ContributeLitePackages(descriptor Descriptor) ([]Contribution, error)

func ContributeOfflinePackages

func ContributeOfflinePackages(descriptor Descriptor) ([]Contribution, error)

func ContributePackageDependencies

func ContributePackageDependencies(descriptor Descriptor) ([]Contribution, error)

func ContributeTest

func ContributeTest(descriptor Descriptor) (*Contribution, error)

func ContributeUpdateGo

func ContributeUpdateGo(descriptor Descriptor) (*Contribution, error)

func ContributeUpdatePipeline

func ContributeUpdatePipeline(descriptor Descriptor) (Contribution, error)

func NewActionContribution deprecated

func NewActionContribution(workflow actions.Workflow) (Contribution, error)

Deprecated: use NewActionContributionWithNamespace instead

func NewActionContributionWithNamespace

func NewActionContributionWithNamespace(namespace string, workflow actions.Workflow) (Contribution, error)

func NewDependabotContribution

func NewDependabotContribution(dependabot dependabot.Dependabot) (Contribution, error)

func NewDrafterContribution

func NewDrafterContribution(drafter release.Drafter) (Contribution, error)

func NewLabelsContribution

func NewLabelsContribution(labels []labels.Label) (Contribution, error)

type Dependency

type Dependency struct {
	Name           string
	Id             string
	VersionPattern string `yaml:"version_pattern"`
	PURLPattern    string `yaml:"purl_pattern"`
	CPEPattern     string `yaml:"cpe_pattern"`
	Uses           string
	With           map[string]interface{}
}

type Descriptor

type Descriptor struct {
	GitHub            *GitHub
	Path              string
	CodeOwners        []CodeOwner
	Builder           *Builder
	Package           *Package
	DockerCredentials []DockerCredentials `yaml:"docker_credentials"`
	HttpCredentials   []HTTPCredentials   `yaml:"http_credentials"`
	OfflinePackages   []OfflinePackage    `yaml:"offline_packages"`
	RepublishImages   []RepublishImage    `yaml:"republish_images"`
	Actions           []Action
	Dependencies      []Dependency
	Test              Test
}

func NewDescriptor

func NewDescriptor(path string) (Descriptor, error)

type DockerCredentials

type DockerCredentials struct {
	Registry string
	Username string
	Password string
}

type GitHub

type GitHub struct {
	Username           string
	Token              string
	Mappers            []string
	BuildpackTOMLPaths map[string]string `yaml:"buildpack_toml_paths"`
}

type HTTPCredentials

type HTTPCredentials struct {
	Host     string
	Username string
	Password string
}

type OfflinePackage

type OfflinePackage struct {
	Source     string
	Target     string
	SourcePath string `yaml:"source_path"`
	TagPrefix  string `yaml:"tag_prefix"`
	Platform   Platform
}

type Package

type Package struct {
	Repositories        []string
	Repository          string
	IncludeDependencies bool `yaml:"include_dependencies"`
	Register            bool
	RegistryToken       string `yaml:"registry_token"`
	Platform            Platform
	SourcePath          string `yaml:"source_path"`
	Enabled             bool
}

type Platform

type Platform struct {
	OS string
}

type Predicate

type Predicate func(string) bool

type RepublishImage

type RepublishImage struct {
	Source     string
	Target     string
	ID         string
	TagPrefix  string `yaml:"tag_prefix"`
	TargetRepo string `yaml:"target_repo"`
}

type Test

type Test struct {
	Steps []actions.Step
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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