state

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultState = State{
	Version: 1,
}

Functions

func GetDefaultStateFilepath

func GetDefaultStateFilepath() (string, error)

func WriteStateFile

func WriteStateFile(path string, state *State) error

Types

type State

type State struct {
	Version                      int             `json:"version"`
	AccountID                    *int64          `json:"account_id"`
	MachineID                    *int64          `json:"machine_id"`
	LatestKnownVersion           *semver.Version `json:"latest_known_version,omitempty"`
	LastestKnownVersionUpdatedAt *time.Time      `json:"latest_known_version_updated_at"`
	// contains filtered or unexported fields
}

func ReadStateFile

func ReadStateFile(path string, dflt *State) (*State, error)

func (*State) WriteBack

func (cfg *State) WriteBack() error

Jump to

Keyboard shortcuts

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