repomgr

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Code generated by options-gen. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoDepHasNoModuleReq

type GoDepHasNoModuleReq struct {
	Module string
}

type GoDepModMinVersionReq

type GoDepModMinVersionReq struct {
	Module     string
	MinVersion string
}

type GoVersion added in v0.2.0

type GoVersion struct {
	MinVersion string
}

type OptOptionsSetter

type OptOptionsSetter func(o *Options)

func WithPrivateKey

func WithPrivateKey(opt string) OptOptionsSetter

type Options

type Options struct {
	// contains filtered or unexported fields
}

func NewOptions

func NewOptions(
	spec Spec,
	options ...OptOptionsSetter,
) Options

func (*Options) Validate

func (o *Options) Validate() error

type PolicySpec

type PolicySpec struct {
	ID    string
	Name  string
	Rules []RuleSpec
}

type Repo

type Repo struct {
	AbsPath       string
	GoModFilename string
	GoModFile     modfile.File
}

type RepoManager

type RepoManager struct {
	// contains filtered or unexported fields
}

func New

func New(opts Options) (*RepoManager, error)

func (*RepoManager) Run

func (m *RepoManager) Run() error

type RepoReport

type RepoReport struct {
	RepoSpec RepoSpec
	Repo     Repo
	Warnings []string
}

type RepoSpec

type RepoSpec struct {
	Name     string
	Path     string
	Type     string
	Policies []string
}

type Rule

type Rule func(Repo) []string

type RuleName

type RuleName string
const (
	RuleNameGoDepModMinVersion RuleName = "go-dep-module-min-version"
	RuleNameGoDepHasNoModule   RuleName = "go-dep-has-no-module"
	RuleNameGoVersion          RuleName = "go-version"
)

type RuleSpec

type RuleSpec struct {
	Rule   RuleName
	Params any
}

type Spec

type Spec struct {
	Version  string
	Policies []PolicySpec
	Repos    []RepoSpec
}

func ParseSpec

func ParseSpec(filename string) (*Spec, error)

Jump to

Keyboard shortcuts

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