model

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const StateFileVersion = "v1"

Variables

This section is empty.

Functions

This section is empty.

Types

type ResourceState

type ResourceState struct {
	APIVersion string          `json:"apiVersion"`
	Kind       string          `json:"kind"`
	Metadata   *map[string]any `json:"metadata"`
}

func NewResourceState

func NewResourceState(res resource.Resource) ResourceState

func (*ResourceState) Equal

func (r *ResourceState) Equal(other *ResourceState) bool

func (*ResourceState) ToResource

func (r *ResourceState) ToResource() resource.Resource

type State

type State struct {
	Version     string          `json:"version"`
	LastUpdated string          `json:"lastUpdated"`
	Resources   []ResourceState `json:"resources"`
}

func NewState

func NewState() *State

func (*State) AddManagedResource

func (s *State) AddManagedResource(res resource.Resource)

func (*State) GetRemovedResources

func (s *State) GetRemovedResources(activeResources []resource.Resource) []resource.Resource

func (*State) IsResourceManaged

func (s *State) IsResourceManaged(ressource resource.Resource) bool

func (*State) RemoveManagedResource

func (s *State) RemoveManagedResource(res resource.Resource)

func (*State) RemoveManagedResourceKindName

func (s *State) RemoveManagedResourceKindName(kind schema.Kind, name string)

func (*State) RemoveManagedResourceVKM

func (s *State) RemoveManagedResourceVKM(apiVersion, kind string, metadata *map[string]any)

Jump to

Keyboard shortcuts

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