reducers

package
v0.29.4-rc.3 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseReducer

type BaseReducer struct {
	Path      string
	Key       string
	From      any
	To        any
	Lifecycle string
}

func NewBaseReducer

func NewBaseReducer(key string, from, to any, lifecycle, path string) *BaseReducer

func (*BaseReducer) GetFrom

func (r *BaseReducer) GetFrom() any

func (*BaseReducer) GetKey

func (r *BaseReducer) GetKey() string

func (*BaseReducer) GetLifecycle

func (r *BaseReducer) GetLifecycle() string

func (*BaseReducer) GetPath

func (r *BaseReducer) GetPath() string

func (*BaseReducer) GetTo

func (r *BaseReducer) GetTo() any

func (*BaseReducer) Prepare

func (r *BaseReducer) Prepare() map[any]any

type Reducer

type Reducer interface {
	Prepare() map[any]any
	GetLifecycle() string
	GetKey() string
	GetPath() string
	GetFrom() any
	GetTo() any
}

type Reducers

type Reducers []Reducer

func Build

func Build(
	statusDiffs r3diff.Changelog,
	rulesExtractor rules.Extractor,
	phase string,
) Reducers

func (Reducers) ByLifecycle

func (rs Reducers) ByLifecycle(lifecycle string) Reducers

func (Reducers) Combine

func (rs Reducers) Combine(origin map[string]map[any]any, key string) map[string]map[any]any

func (Reducers) ToString

func (rs Reducers) ToString() string

Jump to

Keyboard shortcuts

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