gcs

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

+marmot:name=Google Cloud Storage +marmot:description=Discovers buckets from Google Cloud Storage. +marmot:status=experimental +marmot:features=Assets

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	plugin.BaseConfig `json:",inline"`

	// Connection options
	ProjectID       string `json:"project_id" description:"Google Cloud project ID" validate:"required"`
	CredentialsFile string `json:"credentials_file,omitempty" description:"Path to service account JSON file"`
	CredentialsJSON string `json:"credentials_json,omitempty" description:"Service account JSON content" sensitive:"true"`
	Endpoint        string `json:"endpoint,omitempty" description:"Custom endpoint URL (for fake-gcs-server or other emulators)"`
	DisableAuth     bool   `json:"disable_auth,omitempty" description:"Disable authentication (for local emulators)"`

	// Discovery options
	IncludeMetadata    bool `json:"include_metadata" description:"Include bucket metadata like labels" default:"true"`
	IncludeObjectCount bool `json:"include_object_count" description:"Count objects in each bucket (can be slow for large buckets)" default:"false"`

	// Filtering
	Filter *plugin.Filter `json:"filter,omitempty" description:"Filter buckets by name pattern"`
}

Config for Google Cloud Storage plugin +marmot:config

type GCSBucketFields

type GCSBucketFields struct {
	BucketName             string `json:"bucket_name" metadata:"bucket_name" description:"Name of the bucket"`
	Location               string `json:"location" metadata:"location" description:"Geographic location of the bucket"`
	LocationType           string `json:"location_type" metadata:"location_type" description:"Location type (region, dual-region, multi-region)"`
	StorageClass           string `json:"storage_class" metadata:"storage_class" description:"Default storage class (STANDARD, NEARLINE, COLDLINE, ARCHIVE)"`
	Created                string `json:"created" metadata:"created" description:"Bucket creation timestamp"`
	Versioning             string `json:"versioning" metadata:"versioning" description:"Whether object versioning is enabled"`
	RequesterPays          bool   `json:"requester_pays" metadata:"requester_pays" description:"Whether requester pays for access"`
	Encryption             string `json:"encryption" metadata:"encryption" description:"Encryption type (google-managed or customer-managed)"`
	KMSKey                 string `json:"kms_key" metadata:"kms_key" description:"Customer-managed encryption key name"`
	LoggingEnabled         bool   `json:"logging_enabled" metadata:"logging_enabled" description:"Whether access logging is enabled"`
	LifecycleRulesCount    int    `json:"lifecycle_rules_count" metadata:"lifecycle_rules_count" description:"Number of lifecycle rules configured"`
	RetentionPeriodSeconds int64  `json:"retention_period_seconds" metadata:"retention_period_seconds" description:"Retention period in seconds"`
	ObjectCount            int64  `json:"object_count" metadata:"object_count" description:"Number of objects in the bucket"`
}

GCSBucketFields defines metadata fields for GCS buckets +marmot:metadata

type Source

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

func (*Source) Discover

func (s *Source) Discover(ctx context.Context, pluginConfig plugin.RawPluginConfig) (*plugin.DiscoveryResult, error)

func (*Source) Validate

func (s *Source) Validate(rawConfig plugin.RawPluginConfig) (plugin.RawPluginConfig, error)

Jump to

Keyboard shortcuts

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