installationstate

package
v0.22.2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const StateStructVersion = 20220411

Variables

This section is empty.

Functions

This section is empty.

Types

type InstallationState

type InstallationState struct {
	LastCheck      string `json:"last_checked"`    // an RFC3339 encoded time stamp
	InstallationID string `json:"installation_id"` // a UUIDv4 string
	StructVersion  int64  `json:"struct_version"`
}

func Load

func Load() (InstallationState, error)

func (*InstallationState) IsValid

func (s *InstallationState) IsValid() bool

IsValid checks whether the struct was correctly deserialized, by checking if the StructVersion is populated

func (*InstallationState) Save

func (s *InstallationState) Save() error

Save the state NOTE: this updates the last checked time to the current time

Jump to

Keyboard shortcuts

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