state

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BillingPeriod

type BillingPeriod string

func ParseBillingPeriod

func ParseBillingPeriod(period string) (*BillingPeriod, error)

func (*BillingPeriod) IsPastDue

func (period *BillingPeriod) IsPastDue() bool

func (*BillingPeriod) UnmarshalJSON

func (period *BillingPeriod) UnmarshalJSON(bytes []byte) error

type Config

type Config struct {
	RepositoryPath string
	QueriesPath    string
	BucketName     string
	ReportName     string

	StateFilePath string
}

type State

type State struct {
	Version            string               `json:"version"`
	ReportLastModified map[string]time.Time `json:"reportLastModified"`

	Periods []BillingPeriod `json:"BillingPeriod"`
}

func Init

func Init() *State

func Load

func Load(config *Config) (*State, error)

func (*State) Save

func (state *State) Save(config *Config) error

Jump to

Keyboard shortcuts

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