statefile

package
v0.1.116 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DNSRecordKey

type DNSRecordKey struct {
	Record string
	Type   apiv1.DNSRecord_Type
}

type DNSRecordMap

type DNSRecordMap map[DNSRecordKey]DNSRecordValue

func (DNSRecordMap) List added in v0.1.107

func (m DNSRecordMap) List() []*apiv1.DNSRecord

func (DNSRecordMap) MarshalJSON

func (m DNSRecordMap) MarshalJSON() ([]byte, error)

func (DNSRecordMap) UnmarshalJSON

func (m DNSRecordMap) UnmarshalJSON(b []byte) error

type DNSRecordValue

type DNSRecordValue struct {
	Value   string
	Created bool
}

type Diff

type Diff struct {
	Apps            *MapDiff
	Dependencies    *MapDiff
	DNSRecords      *MapDiff
	DomainsInfo     *MapDiff
	PluginsRegistry map[string]*RegistryDiff
	PluginsOther    map[string]*MapDiff
	PluginsDelete   map[string]struct{}
}

func NewDiff

func NewDiff(state1, state2 *StateData) (*Diff, error)

func (*Diff) Apply

func (s *Diff) Apply(state *StateData) error

func (*Diff) IsEmpty

func (s *Diff) IsEmpty() bool

func (*Diff) String

func (s *Diff) String() string

type MapDiff

type MapDiff struct {
	// contains filtered or unexported fields
}

func NewMapDiff

func NewMapDiff(m1, m2 interface{}, maxLevel int) (*MapDiff, error)

func (*MapDiff) Apply

func (d *MapDiff) Apply(m interface{})

func (*MapDiff) IsEmpty

func (d *MapDiff) IsEmpty() bool

func (*MapDiff) String

func (d *MapDiff) String() string

type PluginState

type PluginState struct {
	Registry json.RawMessage            `json:"registry,omitempty"`
	Other    map[string]json.RawMessage `json:"other,omitempty"`
}

func PluginStateFromProto

func PluginStateFromProto(in *apiv1.PluginState) *PluginState

func (*PluginState) Proto

func (p *PluginState) Proto() *apiv1.PluginState

type RegistryDiff

type RegistryDiff struct {
	// contains filtered or unexported fields
}

func NewRegistryDiff

func NewRegistryDiff(m1, m2 *PluginState) (*RegistryDiff, error)

func (*RegistryDiff) Apply

func (d *RegistryDiff) Apply(m *PluginState) error

func (*RegistryDiff) IsEmpty

func (d *RegistryDiff) IsEmpty() bool

func (*RegistryDiff) String

func (d *RegistryDiff) String() string

type ResourceDiff

type ResourceDiff struct {
	Res          *registry.ResourceSerialized
	Properties   *MapDiff
	Dependencies *MapDiff
	DependedBy   *MapDiff
}

type StateData

type StateData struct {
	Version      int                               `json:"version"`
	Apps         map[string]*apiv1.AppState        `json:"apps"`
	Dependencies map[string]*apiv1.DependencyState `json:"dependencies"`
	Plugins      map[string]*PluginState           `json:"plugins_state"` // plugin name -> object -> state

	DNSRecords  DNSRecordMap        `json:"dns_records"`
	DomainsInfo []*apiv1.DomainInfo `json:"domains_info"`
}

func NewStateData

func NewStateData() *StateData

func ReadState

func ReadState(in []byte) (*StateData, error)

func (*StateData) AddDNSRecord

func (d *StateData) AddDNSRecord(v *apiv1.DNSRecord)

func (*StateData) DeepCopy

func (d *StateData) DeepCopy() *StateData

func (*StateData) IsEmpty added in v0.1.99

func (d *StateData) IsEmpty() bool

func (*StateData) Reset

func (d *StateData) Reset()

Jump to

Keyboard shortcuts

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