config

package
v0.13.6 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check[T any](
	ctx context.Context,
	parserBuilder dep_tree.NodeParserBuilder[T],
	cfg *Config,
) error

Types

type CheckError

type CheckError []error

func (CheckError) Error

func (e CheckError) Error() string

type Config

type Config struct {
	Path                      string
	Entrypoints               []string            `yaml:"entrypoints"`
	AllowCircularDependencies bool                `yaml:"allowCircularDependencies"`
	Aliases                   map[string][]string `yaml:"aliases"`
	WhiteList                 map[string][]string `yaml:"allow"`
	BlackList                 map[string][]string `yaml:"deny"`
}

func ParseConfig

func ParseConfig(cfgPath string) (*Config, error)

func (*Config) Check

func (c *Config) Check(from, to string) (bool, error)

func (*Config) Validate

func (c *Config) Validate(start string, destinations func(from string) []string) ([]string, error)

Jump to

Keyboard shortcuts

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