Documentation
¶
Index ¶
- type Client
- func (c *Client) GetDecryptedS3Config(conn *connection.Connection, jobConfig *types.S3JobConfig) (*S3Config, error)
- func (c *Client) GetS3Client(ctx context.Context, jobConfig *types.S3JobConfig, connectionID ...string) (*s3Client, *S3Config, error)
- func (c *Client) HasS3Connection(ctx context.Context) bool
- type Config
- type S3Config
- type UploadFormat
- type UploadRequest
- type UploadResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents an S3 integration client
func NewClient ¶
func NewClient( connectionRepo connection.Repository, encryptionService security.EncryptionService, logger *logger.Logger, ) *Client
NewClient creates a new S3 client
func (*Client) GetDecryptedS3Config ¶
func (c *Client) GetDecryptedS3Config(conn *connection.Connection, jobConfig *types.S3JobConfig) (*S3Config, error)
GetDecryptedS3Config decrypts credentials and combines with job configuration
func (*Client) GetS3Client ¶
func (c *Client) GetS3Client(ctx context.Context, jobConfig *types.S3JobConfig, connectionID ...string) (*s3Client, *S3Config, error)
GetS3Client returns a configured S3 client with the provided job config and connection ID
type Config ¶
type Config struct {
// From sync_config.s3
Bucket string
Region string
KeyPrefix string
Compression types.S3CompressionType
Encryption types.S3EncryptionType
// From encrypted_secret_data
AWSAccessKeyID string
AWSSecretAccessKey string
}
Config represents the configuration for S3 integration
func NewConfigFromConnection ¶
func NewConfigFromConnection(secretData *types.S3ConnectionMetadata, exportConfig *types.S3ExportConfig) *Config
NewConfigFromConnection creates a Config from S3ConnectionMetadata (secrets) and S3ExportConfig (settings)
type S3Config ¶
type S3Config struct {
AWSAccessKeyID string
AWSSecretAccessKey string
AWSSessionToken string // Optional: for temporary credentials
Bucket string
Region string
KeyPrefix string
Compression types.S3CompressionType
Encryption types.S3EncryptionType
EndpointURL string
VirtualHostStyle bool
MaxFileSizeMB int
}
S3Config holds decrypted S3 configuration
type UploadFormat ¶
type UploadFormat string
UploadFormat represents the upload file format
const ( UploadFormatCSV UploadFormat = "csv" UploadFormatJSON UploadFormat = "json" UploadFormatParquet UploadFormat = "parquet" )
type UploadRequest ¶
type UploadRequest struct {
FileName string // File name (without path)
Data []byte // Data to upload
Format UploadFormat // File format
EntityType string // Entity type being uploaded (e.g., "feature_usage", "invoice")
Timestamp time.Time // Timestamp for the upload
Compress bool // Whether to compress the data
ContentType string // Content type (optional, will be inferred if empty)
}
UploadRequest represents a request to upload data to S3
type UploadResponse ¶
type UploadResponse struct {
FileURL string // S3 URL of the uploaded file
Bucket string // S3 bucket name
Key string // S3 object key
FileSizeBytes int64 // Size of the file in bytes
CompressedSize int64 // Size after compression (if compressed)
UploadedAt time.Time // Time of upload
}
UploadResponse represents the response after uploading data to S3
Click to show internal directories.
Click to hide internal directories.