config

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBranch = "main"
View Source
const DefaultDepot = "import"

Variables

This section is empty.

Functions

This section is empty.

Types

type BranchMapping

type BranchMapping struct {
	Name   string `yaml:"name"`   // Regex for branch
	Prefix string `yaml:"prefix"` // Prefix to prepend to matching branches
}

type Config

type Config struct {
	ImportDepot    string          `yaml:"import_depot"`
	ImportPath     string          `yaml:"import_path"`
	DefaultBranch  string          `yaml:"default_branch"`
	BranchMappings []BranchMapping `yaml:"branch_mappings"`
	TypeMaps       []string        `yaml:"typemaps"`
	ReTypeMaps     []RegexpTypeMap
}

Config for gitp4transfer

func LoadConfigFile

func LoadConfigFile(filename string) (*Config, error)

LoadConfigFile - loads config file

func LoadConfigString

func LoadConfigString(content []byte) (*Config, error)

LoadConfigString - loads a string

func Unmarshal

func Unmarshal(config []byte) (*Config, error)

Unmarshal the config

type RegexpTypeMap added in v0.2.2

type RegexpTypeMap struct {
	Filetype journal.FileType // String for path
	RePath   *regexp.Regexp   // Compiled regexp
}

ReTypeMap - parsed into regexp

Jump to

Keyboard shortcuts

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