types

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgeBucket

type AgeBucket struct {
	Label     string        `json:"label"`
	MinAge    time.Duration `json:"min_age"`
	MaxAge    time.Duration `json:"max_age"`
	Count     int           `json:"count"`
	TotalSize int64         `json:"total_size"`
}

AgeBucket represents an age bucket in distribution analysis

func (*AgeBucket) Validate

func (a *AgeBucket) Validate() error

Validate validates an AgeBucket struct

type AgeDistribution

type AgeDistribution struct {
	Buckets []AgeBucket `json:"buckets"`
}

AgeDistribution represents upload age analysis

func (*AgeDistribution) Validate

func (a *AgeDistribution) Validate() error

Validate validates an AgeDistribution struct

type Bucket

type Bucket struct {
	Name    string            `json:"name" csv:"name"`
	Region  string            `json:"region" csv:"region"`
	Uploads []MultipartUpload `json:"uploads,omitempty" csv:"-"`
}

Bucket represents an S3 bucket

func (*Bucket) Validate

func (b *Bucket) Validate() error

Validate validates a Bucket struct

type CostBreakdown

type CostBreakdown struct {
	TotalMonthlyCost float64            `json:"total_monthly_cost" csv:"total_monthly_cost"`
	ByRegion         map[string]float64 `json:"by_region" csv:"-"`
	ByStorageClass   map[string]float64 `json:"by_storage_class" csv:"-"`
	Currency         string             `json:"currency" csv:"currency"`
}

CostBreakdown represents cost analysis

func (*CostBreakdown) Validate

func (c *CostBreakdown) Validate() error

Validate validates a CostBreakdown struct

type DeleteOptions

type DeleteOptions struct {
	DryRun      bool
	Force       bool
	OlderThan   *time.Duration
	SmallerThan *int64
	LargerThan  *int64
	BucketName  string
	Quiet       bool
}

DeleteOptions contains options for delete operations

func (*DeleteOptions) Validate

func (d *DeleteOptions) Validate() error

Validate validates DeleteOptions struct

type DryRunResult

type DryRunResult struct {
	TotalUploads          int                `json:"total_uploads"`
	TotalSize             int64              `json:"total_size"`
	EstimatedSavings      float64            `json:"estimated_savings"`
	Currency              string             `json:"currency"`
	UploadsByBucket       map[string]int     `json:"uploads_by_bucket"`
	SizeByBucket          map[string]int64   `json:"size_by_bucket"`
	SavingsByBucket       map[string]float64 `json:"savings_by_bucket"`
	UploadsByRegion       map[string]int     `json:"uploads_by_region"`
	SizeByRegion          map[string]int64   `json:"size_by_region"`
	SavingsByRegion       map[string]float64 `json:"savings_by_region"`
	UploadsByStorageClass map[string]int     `json:"uploads_by_storage_class"`
	SizeByStorageClass    map[string]int64   `json:"size_by_storage_class"`
	SavingsByStorageClass map[string]float64 `json:"savings_by_storage_class"`
	Uploads               []MultipartUpload  `json:"uploads,omitempty"`
	GeneratedAt           time.Time          `json:"generated_at"`
	Command               string             `json:"command"`
	Filters               string             `json:"filters,omitempty"`
}

DryRunResult represents the result of a dry-run deletion operation

func (*DryRunResult) Validate

func (d *DryRunResult) Validate() error

Validate validates DryRunResult struct

type ExportOptions

type ExportOptions struct {
	Format     string // csv, json
	OutputFile string
	Filter     string
}

ExportOptions contains options for export operations

func (*ExportOptions) Validate

func (e *ExportOptions) Validate() error

Validate validates ExportOptions struct

type ListOptions

type ListOptions struct {
	Region     string
	BucketName string
	MaxResults int
	Offset     int
}

ListOptions contains options for listing operations

func (*ListOptions) Validate

func (l *ListOptions) Validate() error

Validate validates ListOptions struct

type MultipartUpload

type MultipartUpload struct {
	Bucket       string    `json:"bucket" csv:"bucket"`
	Key          string    `json:"key" csv:"key"`
	UploadID     string    `json:"upload_id" csv:"upload_id"`
	Initiated    time.Time `json:"initiated" csv:"initiated"`
	Size         int64     `json:"size" csv:"size"`
	StorageClass string    `json:"storage_class" csv:"storage_class"`
	Region       string    `json:"region" csv:"region"`
}

MultipartUpload represents an incomplete multipart upload

func (*MultipartUpload) Validate

func (m *MultipartUpload) Validate() error

Validate validates a MultipartUpload struct

type SizeReport

type SizeReport struct {
	TotalSize           int64            `json:"total_size" csv:"total_size"`
	TotalCount          int              `json:"total_count" csv:"total_count"`
	ByStorageClass      map[string]int64 `json:"by_storage_class" csv:"-"`
	ByBucket            map[string]int64 `json:"by_bucket" csv:"-"`
	InaccessibleBuckets []string         `json:"inaccessible_buckets" csv:"-"`
}

SizeReport represents storage usage information

func (*SizeReport) Validate

func (s *SizeReport) Validate() error

Validate validates a SizeReport struct

type ValidationError

type ValidationError struct {
	Field   string
	Message string
}

ValidationError represents a validation error

func (ValidationError) Error

func (e ValidationError) Error() string

Jump to

Keyboard shortcuts

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