aws

package
v0.0.0-...-1d44d98 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BillingDateFormat is the layout for parsing the AWS date format of 'yyyymmdd'.
	BillingDateFormat = "20060102"

	// ManifestSuffix is the extension of AWS Usage Data manifests.
	ManifestSuffix = ".json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AdditionalArtifact

type AdditionalArtifact struct {
	ArtifactType string `json:"artifactType"`
	Name         string `json:"name"`
}

type BillingPeriod

type BillingPeriod struct {
	Start Time `json:"start"`
	End   Time `json:"end"`
}

type Column

type Column struct {
	Category string `json:"category"`
	Name     string `json:"name"`
}

Column is a description of a field from a AWS usage report manifest file.

type Manifest

type Manifest struct {
	AssemblyID             string               `json:"assemblyId"`
	Account                string               `json:"account"`
	Columns                []Column             `json:"columns"`
	Charset                string               `json:"charset"`
	Compression            string               `json:"compression"`
	ContentType            string               `json:"contentType"`
	ReportID               string               `json:"reportId"`
	ReportName             string               `json:"reportName"`
	BillingPeriod          BillingPeriod        `json:"billingPeriod"`
	Bucket                 string               `json:"bucket"`
	ReportKeys             []string             `json:"reportKeys"`
	AdditionalArtifactKeys []AdditionalArtifact `json:"additionalArtifactKeys"`
}

Manifest is a representation of the file AWS provides with metadata for current usage information.

func (Manifest) DataDirectory

func (m Manifest) DataDirectory() string

Paths returns the directories containing usage data. The result will be free of duplicates.

type ManifestRetriever

type ManifestRetriever interface {
	RetrieveManifests() ([]*Manifest, error)
}

func NewManifestRetriever

func NewManifestRetriever(logger log.FieldLogger, region, bucket, prefix string) ManifestRetriever

type Time

type Time struct {
	time.Time
}

func (*Time) String

func (t *Time) String() string

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(b []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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