config

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: LGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToAppConfig

func ToAppConfig(
	c Config,
	localRepoPath string,
	pathToGitCache string,
) (*app.Config, error)

func ToFile

func ToFile(c Config, path string) error

Types

type Config

type Config struct {
	// GlobalRewrites replaces <import1> with <import2>,
	// including imports in remote protofiles.
	GlobalRewrites map[string]string `yaml:"globalRewrites"`

	VendoredForeigns []string `yaml:"vendor"`

	// Paths to local protofiles or their directories
	// that should be added to the tree
	Paths []string `yaml:"paths"`

	// Output controls where to put the resulting tree.
	Output string `yaml:"output"`

	// RepoModuleName is current repo's name.
	RepoModuleName string `yaml:"moduleName"`

	Fetchers Fetchers `yaml:"fetchers"`

	// RepoToBranch maps repositories to desired branches.
	RepoToBranch map[string]string `yaml:"branches"`
}

Config is a model for pbtree.yaml.

func Default

func Default(repoName string) Config

func FromFile

func FromFile(path string) (*Config, error)

type FetcherConf added in v0.9.6

type FetcherConf struct {
	Pattern string `yaml:"pattern"`
	Type    string `yaml:"type"`
	Path    string `yaml:"path"`
}

type Fetchers

type Fetchers struct {
	Stack []FetcherConf `yaml:"stack"`
}

Jump to

Keyboard shortcuts

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