config

package
v0.0.0-...-1f14666 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	sync.RWMutex

	ForKindsRules []ForKindRules `yaml:"forKindsRules,omitempty"`
	AdminGroups   []string       `yaml:"adminGroups,omitempty"`
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig() *Config

func (*Config) GetAdminGroups

func (cfg *Config) GetAdminGroups() []string

func (*Config) GetRulesForKind

func (cfg *Config) GetRulesForKind(kind string) []Rule

func (*Config) ParseYaml

func (cfg *Config) ParseYaml(data []byte) error

type ForKindRules

type ForKindRules struct {
	ApiVersion string `yaml:"apiVersion,omitempty"`
	Kind       string `yaml:"kind"`
	Rules      []Rule `yaml:"rules"`
}

type Rule

type Rule struct {
	Field string      `yaml:"field"`
	Type  string      `yaml:"type"`
	Op    string      `yaml:"op"`
	Value interface{} `yaml:"value"`
}

Jump to

Keyboard shortcuts

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