model

package
v0.0.0-...-e1aef3f Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigKeys

func ConfigKeys(configs []Config) []string

func GroupNames

func GroupNames(groups []Group) []string

func StrategyNames

func StrategyNames(strategies []Strategy) []string

Types

type Config

type Config struct {
	Key         string     `json:"key,omitempty"`
	Description string     `json:"description,omitempty"`
	Activated   *bool      `json:"activated,omitempty"`
	Strategies  []Strategy `json:"strategies,omitempty"`
	Components  []string   `json:"components,omitempty"`
}

func GetConfigByKey

func GetConfigByKey(configs []Config, key string) Config

type Data

type Data struct {
	Snapshot Snapshot `json:"data,omitempty"`
}

type DiffDetails

type DiffDetails struct {
	Action  string   `json:"action"`
	Diff    string   `json:"diff"`
	Path    []string `json:"path"`
	Content any      `json:"content"`
}

type DiffResult

type DiffResult struct {
	Changes []DiffDetails `json:"changes"`
}

type Domain

type Domain struct {
	Group []Group `json:"group,omitempty"`
}

type Group

type Group struct {
	Name        string   `json:"name,omitempty"`
	Description string   `json:"description,omitempty"`
	Activated   *bool    `json:"activated,omitempty"`
	Config      []Config `json:"config,omitempty"`
}

func GetGroupByName

func GetGroupByName(groups []Group, name string) Group

type Snapshot

type Snapshot struct {
	Domain Domain `json:"domain,omitempty"`
}

type Strategy

type Strategy struct {
	Strategy  string   `json:"strategy,omitempty"`
	Activated *bool    `json:"activated,omitempty"`
	Operation string   `json:"operation,omitempty"`
	Values    []string `json:"values,omitempty"`
}

func GetStrategyByName

func GetStrategyByName(strategies []Strategy, name string) Strategy

Jump to

Keyboard shortcuts

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