cache

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const SchemaVersion = 1

Variables

View Source
var ErrCacheNotFound = fmt.Errorf("cache record not found")

Functions

This section is empty.

Types

type Cache

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

func New

func New(basePath string, maxAge time.Duration, provider string, accountID string, region string) *Cache

func (*Cache) ListAvailableServices

func (c *Cache) ListAvailableServices(includeExpired bool) []string

func (*Cache) LoadReport

func (c *Cache) LoadReport(services ...string) (*report.Report, error)

func (*Cache) Save

func (c *Cache) Save(r *report.Report) error

type Metadata

type Metadata struct {
	SchemaVersion   int      `json:"schema_version"`
	Provider        string   `json:"provider"`
	AccountID       string   `json:"account_id"`
	Region          string   `json:"region"`
	ServicesInScope []string `json:"services"`
}

type Record

type Record struct {
	SchemaVersion int           `json:"schema_version"`
	Service       string        `json:"service"`
	Results       types.Results `json:"results"`
	CreationTime  time.Time     `json:"creation_time"`
}

Jump to

Keyboard shortcuts

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