provider

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Debug bool

Debug controls whether VPC provider operations are logged

Functions

This section is empty.

Types

type CloudFrontProvider added in v0.1.3

type CloudFrontProvider struct {
	ReadOnlyProvider
	// contains filtered or unexported fields
}

CloudFrontProvider provides access to AWS CloudFront distributions and functions

func NewCloudFrontProvider added in v0.1.3

func NewCloudFrontProvider(profile, region string) (*CloudFrontProvider, error)

NewCloudFrontProvider creates a new CloudFront provider

func (*CloudFrontProvider) Name added in v0.1.3

func (p *CloudFrontProvider) Name() string

func (*CloudFrontProvider) OpenStream added in v0.1.3

func (p *CloudFrontProvider) OpenStream(ctx context.Context, path string) (StreamingFile, error)

func (*CloudFrontProvider) Read added in v0.1.3

func (p *CloudFrontProvider) Read(ctx context.Context, path string) ([]byte, error)

func (*CloudFrontProvider) ReadDir added in v0.1.3

func (p *CloudFrontProvider) ReadDir(ctx context.Context, path string) ([]Entry, error)

func (*CloudFrontProvider) Stat added in v0.1.3

func (p *CloudFrontProvider) Stat(ctx context.Context, path string) (*Entry, error)

type EC2Provider

type EC2Provider struct {
	ReadOnlyProvider
	// contains filtered or unexported fields
}

EC2Provider provides access to AWS EC2 instances

func NewEC2Provider

func NewEC2Provider(profile, region string) (*EC2Provider, error)

NewEC2Provider creates a new EC2 provider

func (*EC2Provider) Delete added in v0.1.2

func (p *EC2Provider) Delete(ctx context.Context, path string) error

Delete removes a file from the remote filesystem

func (*EC2Provider) Name

func (p *EC2Provider) Name() string

func (*EC2Provider) OpenStream added in v0.1.3

func (p *EC2Provider) OpenStream(ctx context.Context, path string) (StreamingFile, error)

OpenStream opens a streaming file for logs/latest.log

func (*EC2Provider) Read

func (p *EC2Provider) Read(ctx context.Context, path string) ([]byte, error)

func (*EC2Provider) ReadDir

func (p *EC2Provider) ReadDir(ctx context.Context, path string) ([]Entry, error)

func (*EC2Provider) Stat

func (p *EC2Provider) Stat(ctx context.Context, path string) (*Entry, error)

func (*EC2Provider) Write added in v0.1.2

func (p *EC2Provider) Write(ctx context.Context, path string, data []byte) error

Write writes data to a path

type ECSProvider added in v0.1.3

type ECSProvider struct {
	ReadOnlyProvider
	// contains filtered or unexported fields
}

ECSProvider provides access to AWS ECS clusters and services

func NewECSProvider added in v0.1.3

func NewECSProvider(profile, region string) (*ECSProvider, error)

NewECSProvider creates a new ECS provider

func (*ECSProvider) Name added in v0.1.3

func (p *ECSProvider) Name() string

func (*ECSProvider) OpenStream added in v0.1.3

func (p *ECSProvider) OpenStream(ctx context.Context, path string) (StreamingFile, error)

func (*ECSProvider) Read added in v0.1.3

func (p *ECSProvider) Read(ctx context.Context, path string) ([]byte, error)

func (*ECSProvider) ReadDir added in v0.1.3

func (p *ECSProvider) ReadDir(ctx context.Context, path string) ([]Entry, error)

func (*ECSProvider) Stat added in v0.1.3

func (p *ECSProvider) Stat(ctx context.Context, path string) (*Entry, error)

type Entry

type Entry struct {
	Name       string
	IsDir      bool
	Size       int64
	ModTime    time.Time
	Executable bool
}

Entry represents a file or directory entry

type IAMProvider

type IAMProvider struct {
	ReadOnlyProvider
	// contains filtered or unexported fields
}

IAMProvider provides access to AWS IAM resources

func NewIAMProvider

func NewIAMProvider(profile, region string) (*IAMProvider, error)

NewIAMProvider creates a new IAM provider

func (*IAMProvider) Name

func (p *IAMProvider) Name() string

func (*IAMProvider) Read

func (p *IAMProvider) Read(ctx context.Context, path string) ([]byte, error)

func (*IAMProvider) ReadDir

func (p *IAMProvider) ReadDir(ctx context.Context, path string) ([]Entry, error)

func (*IAMProvider) Stat

func (p *IAMProvider) Stat(ctx context.Context, path string) (*Entry, error)

type LambdaProvider

type LambdaProvider struct {
	ReadOnlyProvider
	// contains filtered or unexported fields
}

LambdaProvider provides access to AWS Lambda functions

func NewLambdaProvider

func NewLambdaProvider(profile, region string) (*LambdaProvider, error)

NewLambdaProvider creates a new Lambda provider

func (*LambdaProvider) Name

func (p *LambdaProvider) Name() string

func (*LambdaProvider) OpenStream added in v0.1.3

func (p *LambdaProvider) OpenStream(ctx context.Context, path string) (StreamingFile, error)

OpenStream opens a streaming file for logs/latest.log

func (*LambdaProvider) Read

func (p *LambdaProvider) Read(ctx context.Context, path string) ([]byte, error)

func (*LambdaProvider) ReadDir

func (p *LambdaProvider) ReadDir(ctx context.Context, path string) ([]Entry, error)

func (*LambdaProvider) Stat

func (p *LambdaProvider) Stat(ctx context.Context, path string) (*Entry, error)

type LogsProvider

type LogsProvider struct {
	ReadOnlyProvider
	// contains filtered or unexported fields
}

LogsProvider provides access to CloudWatch Logs

func NewLogsProvider

func NewLogsProvider(profile, region string) (*LogsProvider, error)

NewLogsProvider creates a new CloudWatch Logs provider

func (*LogsProvider) Name

func (p *LogsProvider) Name() string

func (*LogsProvider) OpenStream

func (p *LogsProvider) OpenStream(ctx context.Context, path string) (StreamingFile, error)

OpenStream opens a streaming file for events.log files

func (*LogsProvider) Read

func (p *LogsProvider) Read(ctx context.Context, path string) ([]byte, error)

func (*LogsProvider) ReadDir

func (p *LogsProvider) ReadDir(ctx context.Context, path string) ([]Entry, error)

func (*LogsProvider) Stat

func (p *LogsProvider) Stat(ctx context.Context, path string) (*Entry, error)

type Provider

type Provider interface {
	// Name returns the provider name (e.g., "s3", "dynamodb")
	Name() string

	// ReadDir lists entries at the given path
	ReadDir(ctx context.Context, path string) ([]Entry, error)

	// Read returns the content of a file at the given path
	Read(ctx context.Context, path string) ([]byte, error)

	// Stat returns info about a single entry
	Stat(ctx context.Context, path string) (*Entry, error)

	// Write writes content to a file (optional, can return fs.ErrPermission)
	Write(ctx context.Context, path string, data []byte) error

	// Delete removes a file (optional, can return fs.ErrPermission)
	Delete(ctx context.Context, path string) error
}

Provider defines the interface for AWS resource providers

type ReadOnlyProvider

type ReadOnlyProvider struct{}

ReadOnlyProvider provides a base implementation that returns permission errors for writes

func (*ReadOnlyProvider) Delete

func (p *ReadOnlyProvider) Delete(ctx context.Context, path string) error

func (*ReadOnlyProvider) Write

func (p *ReadOnlyProvider) Write(ctx context.Context, path string, data []byte) error

type Route53Provider

type Route53Provider struct {
	ReadOnlyProvider
	// contains filtered or unexported fields
}

Route53Provider provides access to AWS Route 53

func NewRoute53Provider

func NewRoute53Provider(profile string) (*Route53Provider, error)

NewRoute53Provider creates a new Route 53 provider

func (*Route53Provider) Name

func (p *Route53Provider) Name() string

func (*Route53Provider) Read

func (p *Route53Provider) Read(ctx context.Context, path string) ([]byte, error)

func (*Route53Provider) ReadDir

func (p *Route53Provider) ReadDir(ctx context.Context, path string) ([]Entry, error)

func (*Route53Provider) Stat

func (p *Route53Provider) Stat(ctx context.Context, path string) (*Entry, error)

type S3Provider

type S3Provider struct {
	ReadOnlyProvider
	// contains filtered or unexported fields
}

S3Provider provides access to S3 buckets and objects

func NewS3Provider

func NewS3Provider(profile, region string) (*S3Provider, error)

NewS3Provider creates a new S3 provider

func (*S3Provider) Delete

func (p *S3Provider) Delete(ctx context.Context, path string) error

func (*S3Provider) Name

func (p *S3Provider) Name() string

func (*S3Provider) Read

func (p *S3Provider) Read(ctx context.Context, path string) ([]byte, error)

func (*S3Provider) ReadDir

func (p *S3Provider) ReadDir(ctx context.Context, path string) ([]Entry, error)

func (*S3Provider) Stat

func (p *S3Provider) Stat(ctx context.Context, path string) (*Entry, error)

func (*S3Provider) Write

func (p *S3Provider) Write(ctx context.Context, path string, data []byte) error

type SSMProvider

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

SSMProvider provides access to SSM Parameter Store

func NewSSMProvider

func NewSSMProvider(profile, region string) (*SSMProvider, error)

NewSSMProvider creates a new SSM provider

func (*SSMProvider) Delete

func (p *SSMProvider) Delete(ctx context.Context, path string) error

func (*SSMProvider) Name

func (p *SSMProvider) Name() string

func (*SSMProvider) Read

func (p *SSMProvider) Read(ctx context.Context, path string) ([]byte, error)

func (*SSMProvider) ReadDir

func (p *SSMProvider) ReadDir(ctx context.Context, path string) ([]Entry, error)

func (*SSMProvider) Stat

func (p *SSMProvider) Stat(ctx context.Context, path string) (*Entry, error)

func (*SSMProvider) Write

func (p *SSMProvider) Write(ctx context.Context, path string, data []byte) error

type SecretsProvider

type SecretsProvider struct {
	ReadOnlyProvider
	// contains filtered or unexported fields
}

SecretsProvider provides access to AWS Secrets Manager

func NewSecretsProvider

func NewSecretsProvider(profile, region string) (*SecretsProvider, error)

NewSecretsProvider creates a new Secrets Manager provider

func (*SecretsProvider) Name

func (p *SecretsProvider) Name() string

func (*SecretsProvider) Read

func (p *SecretsProvider) Read(ctx context.Context, path string) ([]byte, error)

func (*SecretsProvider) ReadDir

func (p *SecretsProvider) ReadDir(ctx context.Context, path string) ([]Entry, error)

func (*SecretsProvider) Stat

func (p *SecretsProvider) Stat(ctx context.Context, path string) (*Entry, error)

type StreamingFile

type StreamingFile interface {
	io.ReadCloser
	// Size returns the current known size (-1 if unknown/streaming)
	Size() int64
}

StreamingFile represents a file that can be read incrementally

type StreamingProvider

type StreamingProvider interface {
	// OpenStream opens a file for streaming read. Returns nil if not streamable.
	OpenStream(ctx context.Context, path string) (StreamingFile, error)
}

StreamingProvider is implemented by providers that support streaming file reads

type VPCProvider

type VPCProvider struct {
	ReadOnlyProvider
	// contains filtered or unexported fields
}

VPCProvider provides access to AWS VPCs

func NewVPCProvider

func NewVPCProvider(profile, region string) (*VPCProvider, error)

NewVPCProvider creates a new VPC provider

func (*VPCProvider) Name

func (p *VPCProvider) Name() string

func (*VPCProvider) Read

func (p *VPCProvider) Read(ctx context.Context, path string) ([]byte, error)

func (*VPCProvider) ReadDir

func (p *VPCProvider) ReadDir(ctx context.Context, path string) ([]Entry, error)

func (*VPCProvider) Stat

func (p *VPCProvider) Stat(ctx context.Context, path string) (*Entry, error)

Jump to

Keyboard shortcuts

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