state

package
v1.11.3 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package state provides a state to save the user work in a database.

Index

Constants

View Source
const (
	// FileName is a static file name for state that is generated beside the .tf file
	FileName = "state.json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Getter

type Getter interface {
	// GetState
	GetState() *state.NetworkState
}

Getter interface for local state

type LocalFileState

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

LocalFileState struct is the local state file

func NewLocalFileState

func NewLocalFileState() LocalFileState

NewLocalFileState generates a new local state

func (*LocalFileState) Delete

func (f *LocalFileState) Delete(FileName string) error

Delete deletes state,json file

func (*LocalFileState) GetState

func (f *LocalFileState) GetState() *state.NetworkState

GetState returns the current state

func (*LocalFileState) Load

func (f *LocalFileState) Load(FileName string) error

Load loads state from state.json file

func (*LocalFileState) Save

func (f *LocalFileState) Save(FileName string) error

Save saves the state to the state,json file

Jump to

Keyboard shortcuts

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