check

package
v0.23.2 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check[T any](
	parser graph.NodeParser[T],
	display func(node *graph.Node[T]) string,
	cfg *Config,
	callbacks graph.LoadCallbacks[T],
) error

Types

type BlackListEntry added in v0.23.2

type BlackListEntry struct {
	To     string `yaml:"to"`
	Reason string `yaml:"reason"`
}

func (*BlackListEntry) UnmarshalYAML added in v0.23.2

func (v *BlackListEntry) UnmarshalYAML(unmarshal func(interface{}) error) error

type Config

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

func (*Config) Check

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

func (*Config) Init

func (c *Config) Init(path string)

type WhiteListEntries added in v0.23.2

type WhiteListEntries struct {
	To     []string `yaml:"to"`
	Reason string   `yaml:"reason"`
}

func (*WhiteListEntries) UnmarshalYAML added in v0.23.2

func (v *WhiteListEntries) UnmarshalYAML(unmarshal func(interface{}) error) error

Jump to

Keyboard shortcuts

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