model

package
v1.97.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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"`
	UpdateTypes    []string `json:"update-types,omitempty" yaml:"update-types,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      bool   `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"`
	Directory            *string        `json:"directory,omitempty" yaml:"directory,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 DependencySubmissionRequest added in v1.71.0

type DependencySubmissionRequest struct {
	Version   int8              `json:"version" yaml:"version"`
	Sha       string            `json:"sha" yaml:"sha"`
	Ref       string            `json:"ref" yaml:"ref"`
	Job       map[string]any    `json:"job" yaml:"job"`
	Detector  map[string]any    `json:"detector" yaml:"detector"`
	Manifests map[string]any    `json:"manifests" yaml:"manifests"`
	Metadata  map[string]string `json:"metadata" yaml:"metadata"`
}

type Ecosystem added in v1.63.0

type Ecosystem struct {
	Name           string         `json:"name" yaml:"name"`
	PackageManager VersionManager `json:"package_manager" yaml:"package_manager,omitempty"`
	Language       VersionManager `json:"language" yaml:"language,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,omitempty" yaml:"dependency-name,omitempty"`
	DependencyVersion string                  `json:"dependency-version,omitempty" yaml:"dependency-version,omitempty"`
	Directory         *string                 `json:"directory,omitempty" yaml:"directory,omitempty"`
	PRNumber          *int                    `json:"pr-number,omitempty" yaml:"pr-number,omitempty"`
	Dependencies      *[]ExistingPRDependency `json:"dependencies,omitempty" yaml:"dependencies,omitempty"`
}

type ExistingPRDependency added in v1.76.1

type ExistingPRDependency struct {
	DependencyName    string  `json:"dependency-name" yaml:"dependency-name"`
	DependencyVersion string  `json:"dependency-version,omitempty" yaml:"dependency-version,omitempty"`
	DependencyRemoved bool    `json:"dependency-removed,omitempty" yaml:"dependency-removed,omitempty"`
	Directory         *string `json:"directory,omitempty" yaml:"directory,omitempty"`
}

type ExistingPullRequests added in v1.76.1

type ExistingPullRequests []ExistingPR

func (ExistingPullRequests) MarshalJSON added in v1.76.1

func (e ExistingPullRequests) MarshalJSON() ([]byte, error)

func (ExistingPullRequests) MarshalYAML added in v1.76.1

func (e ExistingPullRequests) MarshalYAML() (any, error)

func (*ExistingPullRequests) UnmarshalJSON added in v1.76.1

func (e *ExistingPullRequests) UnmarshalJSON(data []byte) error

func (*ExistingPullRequests) UnmarshalYAML added in v1.76.1

func (e *ExistingPullRequests) UnmarshalYAML(unmarshal func(any) error) error

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 {
	Command                    RunCommand           `json:"command" yaml:"command,omitempty"`
	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       ExistingPullRequests `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"`
	UpdateCooldown             *UpdateCooldown      `json:"cooldown,omitempty" yaml:"cooldown,omitempty"`
	ExcludePaths               []string             `json:"exclude-paths" yaml:"exclude-paths,omitempty"`
	MultiEcosystemUpdate       bool                 `json:"multi-ecosystem-update" yaml:"multi-ecosystem-update,omitempty"`
}

Job is the data that is passed to the updater.

func (*Job) UseCaseInsensitiveFileSystem added in v1.68.0

func (j *Job) UseCaseInsensitiveFileSystem() bool

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 RecordEcosystemMeta added in v1.63.0

type RecordEcosystemMeta struct {
	Ecosystem Ecosystem `json:"ecosystem" yaml:"ecosystem"`
}

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 RecordUpdateJobWarning added in v1.87.0

type RecordUpdateJobWarning struct {
	WarnType        string `json:"warn-type" yaml:"warn-type"`
	WarnTitle       string `json:"warn-title" yaml:"warn-title"`
	WarnDescription string `json:"warn-description" yaml:"warn-description"`
}

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 RunCommand added in v1.72.0

type RunCommand string
const (
	UpdateFilesCommand RunCommand = "update"
	VersionCommand     RunCommand = "version"
	RecreateCommand    RunCommand = "recreate"
	SecurityCommand    RunCommand = "security"
	UpdateGraphCommand RunCommand = "graph"
)

type SmokeTest added in v1.69.0

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

SmokeTest 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 UpdateCooldown added in v1.62.0

type UpdateCooldown struct {
	DefaultDays     *int     `json:"default-days,omitempty" yaml:"default-days,omitempty"`
	SemverMajorDays *int     `json:"semver-major-days,omitempty" yaml:"semver-major-days,omitempty"`
	SemverMinorDays *int     `json:"semver-minor-days,omitempty" yaml:"semver-minor-days,omitempty"`
	SemverPatchDays *int     `json:"semver-patch-days,omitempty" yaml:"semver-patch-days,omitempty"`
	Include         []string `json:"include,omitempty" yaml:"include,omitempty"`
	Exclude         []string `json:"exclude,omitempty" yaml:"exclude,omitempty"`
}

func (*UpdateCooldown) Validate added in v1.92.0

func (c *UpdateCooldown) Validate() error

Validate rejects negative cooldown days. Zero is valid and means no cooldown.

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"`
}

type VersionManager added in v1.63.0

type VersionManager struct {
	Name        string         `json:"name" yaml:"name"`
	Version     string         `json:"version" yaml:"version"`
	RawVersion  string         `json:"raw_version" yaml:"raw_version"`
	Requirement map[string]any `json:"requirement,omitempty" yaml:"requirement,omitempty"`
}

Jump to

Keyboard shortcuts

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