model

package
v1.52.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advisory

type Advisory struct {
	DependencyName     string   `json:"dependency-name" yaml:"dependency-name"`
	AffectedVersions   []string `json:"affected-versions" yaml:"affected-versions"`
	PatchedVersions    []string `json:"patched-versions" yaml:"patched-versions"`
	UnaffectedVersions []string `json:"unaffected-versions" yaml:"unaffected-versions"`
}

type Allowed

type Allowed struct {
	DependencyType string `json:"dependency-type,omitempty" yaml:"dependency-type,omitempty"`
	DependencyName string `json:"dependency-name,omitempty" yaml:"dependency-name,omitempty"`
	UpdateType     string `json:"update-type,omitempty" yaml:"update-type,omitempty"`
}

type AzureRepo added in v1.43.0

type AzureRepo struct {
	PackageManger string
	Org           string
	Project       string
	Repo          string
	Directory     string
}

func NewAzureRepo added in v1.43.0

func NewAzureRepo(packageManager string, repo string, directory string) *AzureRepo

NewAzureRepo parses a repo string and returns an AzureRepo struct Expects a repo string in the format org/project/_git/repo

type ClosePullRequest

type ClosePullRequest struct {
	DependencyNames []string `json:"dependency-names" yaml:"dependency-names"`
	Reason          string   `json:"reason" yaml:"reason"`
}

type CommitOptions

type CommitOptions struct {
	Prefix            string  `json:"prefix,omitempty" yaml:"prefix,omitempty"`
	PrefixDevelopment string  `json:"prefix-development,omitempty" yaml:"prefix-development,omitempty"`
	IncludeScope      *string `json:"include-scope,omitempty" yaml:"include-scope,omitempty"`
}

type Condition

type Condition struct {
	DependencyName     string     `json:"dependency-name" yaml:"dependency-name"`
	Source             string     `json:"source,omitempty" yaml:"source,omitempty"`
	UpdateTypes        []string   `json:"update-types,omitempty" yaml:"update-types,omitempty"`
	UpdatedAt          *time.Time `json:"updated-at,omitempty" yaml:"updated-at,omitempty"`
	VersionRequirement string     `json:"version-requirement,omitempty" yaml:"version-requirement,omitempty"`
}

type CreatePullRequest

type CreatePullRequest struct {
	BaseCommitSha          string           `json:"base-commit-sha" yaml:"base-commit-sha"`
	Dependencies           []Dependency     `json:"dependencies" yaml:"dependencies"`
	UpdatedDependencyFiles []DependencyFile `json:"updated-dependency-files" yaml:"updated-dependency-files"`
	PRTitle                string           `json:"pr-title" yaml:"pr-title,omitempty"`
	PRBody                 string           `json:"pr-body" yaml:"pr-body,omitempty"`
	CommitMessage          string           `json:"commit-message" yaml:"commit-message,omitempty"`
	DependencyGroup        map[string]any   `json:"dependency-group" yaml:"dependency-group,omitempty"`
}

type Credential added in v1.9.0

type Credential map[string]any

type Dependency

type Dependency struct {
	Name                 string         `json:"name"`
	PreviousRequirements *[]Requirement `json:"previous-requirements,omitempty" yaml:"previous-requirements,omitempty"`
	PreviousVersion      string         `json:"previous-version,omitempty" yaml:"previous-version,omitempty"`
	Requirements         []Requirement  `json:"requirements"`
	Version              *string        `json:"version" yaml:"version"`
	Removed              bool           `json:"removed,omitempty" yaml:"removed,omitempty"`
}

type DependencyFile

type DependencyFile struct {
	Content         string `json:"content" yaml:"content"`
	ContentEncoding string `json:"content_encoding" yaml:"content_encoding"`
	Deleted         bool   `json:"deleted" yaml:"deleted"`
	Directory       string `json:"directory" yaml:"directory"`
	Name            string `json:"name" yaml:"name"`
	Operation       string `json:"operation" yaml:"operation"`
	SupportFile     bool   `json:"support_file" yaml:"support_file"`
	SymlinkTarget   string `json:"symlink_target,omitempty" yaml:"symlink_target,omitempty"`
	Type            string `json:"type" yaml:"type"`
	Mode            string `json:"mode" yaml:"mode,omitempty"`
}

type ExistingGroupPR added in v1.21.0

type ExistingGroupPR struct {
	DependencyGroupName string       `json:"dependency-group-name" yaml:"dependency-group-name"`
	Dependencies        []ExistingPR `json:"dependencies" yaml:"dependencies"`
}

type ExistingPR

type ExistingPR struct {
	DependencyName    string `json:"dependency-name" yaml:"dependency-name"`
	DependencyVersion string `json:"dependency-version" yaml:"dependency-version"`
}

type Experiment

type Experiment map[string]any

type Group added in v1.19.0

type Group struct {
	GroupName string         `json:"name,omitempty" yaml:"name,omitempty"`
	AppliesTo *string        `json:"applies-to,omitempty" yaml:"applies-to,omitempty"`
	Rules     map[string]any `json:"rules,omitempty" yaml:"rules,omitempty"`
}

type IncrementMetric added in v1.18.2

type IncrementMetric struct {
	Metric string         `json:"metric" yaml:"metric"`
	Tags   map[string]any `json:"tags" yaml:"tags"`
}

type Input

type Input struct {
	// Job is the data given to the updater
	Job Job `yaml:"job"`
	// Credentials is the registry info and tokens to pass to the Proxy
	Credentials []Credential `yaml:"credentials,omitempty"`
}

Input is the input to a job

type Job

type Job struct {
	PackageManager             string            `json:"package-manager" yaml:"package-manager"`
	AllowedUpdates             []Allowed         `json:"allowed-updates" yaml:"allowed-updates,omitempty"`
	Debug                      bool              `json:"debug" yaml:"debug,omitempty"`
	DependencyGroups           []Group           `json:"dependency-groups" yaml:"dependency-groups,omitempty"`
	Dependencies               []string          `json:"dependencies" yaml:"dependencies,omitempty"`
	DependencyGroupToRefresh   *string           `json:"dependency-group-to-refresh" yaml:"dependency-group-to-refresh,omitempty"`
	ExistingPullRequests       [][]ExistingPR    `json:"existing-pull-requests" yaml:"existing-pull-requests,omitempty"`
	ExistingGroupPullRequests  []ExistingGroupPR `json:"existing-group-pull-requests" yaml:"existing-group-pull-requests,omitempty"`
	Experiments                Experiment        `json:"experiments" yaml:"experiments,omitempty"`
	IgnoreConditions           []Condition       `json:"ignore-conditions" yaml:"ignore-conditions,omitempty"`
	LockfileOnly               bool              `json:"lockfile-only" yaml:"lockfile-only,omitempty"`
	RequirementsUpdateStrategy *string           `json:"requirements-update-strategy" yaml:"requirements-update-strategy,omitempty"`
	SecurityAdvisories         []Advisory        `json:"security-advisories" yaml:"security-advisories,omitempty"`
	SecurityUpdatesOnly        bool              `json:"security-updates-only" yaml:"security-updates-only,omitempty"`
	Source                     Source            `json:"source" yaml:"source"`
	UpdateSubdependencies      bool              `json:"update-subdependencies" yaml:"update-subdependencies,omitempty"`
	UpdatingAPullRequest       bool              `json:"updating-a-pull-request" yaml:"updating-a-pull-request,omitempty"`
	VendorDependencies         bool              `json:"vendor-dependencies" yaml:"vendor-dependencies,omitempty"`
	RejectExternalCode         bool              `json:"reject-external-code" yaml:"reject-external-code,omitempty"`
	RepoPrivate                bool              `json:"repo-private" yaml:"repo-private,omitempty"`
	CommitMessageOptions       *CommitOptions    `json:"commit-message-options" yaml:"commit-message-options,omitempty"`
	CredentialsMetadata        []Credential      `json:"credentials-metadata" yaml:"-"`
	MaxUpdaterRunTime          int               `json:"max-updater-run-time" yaml:"max-updater-run-time,omitempty"`
}

Job is the data that is passed to the updater.

type MarkAsProcessed

type MarkAsProcessed struct {
	BaseCommitSha string `json:"base-commit-sha" yaml:"base-commit-sha"`
}

type Output

type Output struct {
	// Type is the kind of data to be checked, e.g. update_dependency_list, create_pull_request, etc
	Type string `yaml:"type"`
	// Expect is the data expected to be sent
	Expect UpdateWrapper `yaml:"expect"`
}

Output is the expected output given the inputs

type RecordEcosystemVersions added in v1.28.0

type RecordEcosystemVersions struct {
	EcosystemVersions map[string]any `json:"ecosystem_versions" yaml:"ecosystem_versions"`
}

type RecordUpdateJobError added in v1.9.0

type RecordUpdateJobError struct {
	ErrorType    string         `json:"error-type" yaml:"error-type"`
	ErrorDetails map[string]any `json:"error-details" yaml:"error-details"`
}

type RecordUpdateJobUnknownError added in v1.40.0

type RecordUpdateJobUnknownError struct {
	ErrorType    string         `json:"error-type" yaml:"error-type"`
	ErrorDetails map[string]any `json:"error-details" yaml:"error-details"`
}

type Requirement

type Requirement struct {
	File            string             `json:"file" yaml:"file"`
	Groups          []any              `json:"groups" yaml:"groups"`
	Metadata        *map[string]any    `json:"metadata,omitempty" yaml:"metadata,omitempty"`
	Requirement     *string            `json:"requirement" yaml:"requirement"`
	Source          *RequirementSource `json:"source" yaml:"source"`
	Version         string             `json:"version,omitempty" yaml:"version,omitempty"`
	PreviousVersion string             `json:"previous-version,omitempty" yaml:"previous-version,omitempty"`
}

type RequirementSource

type RequirementSource map[string]any

type Scenario

type Scenario struct {
	// Input is the input parameters
	Input Input `yaml:"input"`
	// Output is the list of expected outputs
	Output []Output `yaml:"output,omitempty"`
}

Scenario is a way to test a job by asserting the outputs.

type Source

type Source struct {
	Provider    string   `json:"provider" yaml:"provider,omitempty"`
	Repo        string   `json:"repo" yaml:"repo,omitempty"`
	Directory   string   `json:"directory,omitempty" yaml:"directory,omitempty"`
	Directories []string `json:"directories,omitempty" yaml:"directories,omitempty"`
	Branch      string   `json:"branch,omitempty" yaml:"branch,omitempty"`
	Commit      string   `json:"commit,omitempty" yaml:"commit,omitempty"`

	Hostname    *string `json:"hostname" yaml:"hostname,omitempty"`         // Must be provided if APIEndpoint is
	APIEndpoint *string `json:"api-endpoint" yaml:"api-endpoint,omitempty"` // Must be provided if Hostname is
}

Source is a reference to some source code

type UpdateDependencyList

type UpdateDependencyList struct {
	Dependencies    []Dependency `json:"dependencies" yaml:"dependencies"`
	DependencyFiles []string     `json:"dependency_files" yaml:"dependency_files"`
}

type UpdatePullRequest

type UpdatePullRequest struct {
	BaseCommitSha          string           `json:"base-commit-sha" yaml:"base-commit-sha"`
	DependencyNames        []string         `json:"dependency-names" yaml:"dependency-names"`
	UpdatedDependencyFiles []DependencyFile `json:"updated-dependency-files" yaml:"updated-dependency-files"`
	PRTitle                string           `json:"pr-title" yaml:"pr-title,omitempty"`
	PRBody                 string           `json:"pr-body" yaml:"pr-body,omitempty"`
	CommitMessage          string           `json:"commit-message" yaml:"commit-message,omitempty"`
	DependencyGroup        map[string]any   `json:"dependency-group" yaml:"dependency-group,omitempty"`
}

type UpdateWrapper

type UpdateWrapper struct {
	Data any `json:"data" yaml:"data"`
}

Jump to

Keyboard shortcuts

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