config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultWorkingDir = "tmp"

	TargetRepo = "repo"
	TargetSrc  = "src"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	WorkingDir    string         `yaml:"working_dir"`
	GithubConfigs []GithubConfig `yaml:"github_configs"`
}

func Parse

func Parse(buf []byte) (*Config, error)

func ParseFromFile

func ParseFromFile(file string) (*Config, error)

type ConftestConfig

type ConftestConfig struct {
	Target   string   `yaml:"target"`
	Input    string   `yaml:"input"`
	Combine  bool     `yaml:"combine"`
	Policies []string `yaml:"policies"`
}

type GithubConfig

type GithubConfig struct {
	ApiEndpoint    string `yaml:"api_endpoint,omitempty"`
	UploadEndpoint string `yaml:"upload_endpoint,omitempty"`

	RepoConfigs []RepoConfig `yaml:"repo_configs"`
	// contains filtered or unexported fields
}

func (GithubConfig) Domain

func (c GithubConfig) Domain() string

func (GithubConfig) EnvvarName

func (c GithubConfig) EnvvarName() string

type Regexp

type Regexp struct {
	*regexp.Regexp
	UsedWithRepo bool
	UsedWithSrc  bool
}

func (*Regexp) UnmarshalYAML

func (r *Regexp) UnmarshalYAML(unmarshal func(interface{}) error) error

type RepoConfig

type RepoConfig struct {
	Owner           string           `yaml:"owner"`
	Regex           *Regexp          `yaml:"regex,omitempty"`
	ConftestConfigs []ConftestConfig `yaml:"conftest_configs"`
}

func (*RepoConfig) UnmarshalYAML

func (c *RepoConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

Jump to

Keyboard shortcuts

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