config

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package config provides the configuration for the file system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureConfig

type AzureConfig struct {
	// Azure configuration
	// Azure Blob Storage configuration
	AzureAccountName string `json:"account_name"`
	AzureAccountKey  string `json:"account_key,omitempty"`
	AzureSASToken    string `json:"sas_token,omitempty"`
	Container        string `json:"container"`
	AzureEndpoint    string `json:"endpoint"`
}

AzureConfig represents the configuration for Azure.

type FsConfig

type FsConfig struct {
	Azure    *AzureConfig `json:"azure,omitempty"`
	S3       *S3Config    `json:"s3,omitempty"`
	GCP      *GCPConfig   `json:"gcp,omitempty"`
	Provider string       `json:"provider"` // "azure", "s3" or "gcp"
}

FsConfig represents the configuration for the file system.

func LoadFSConfig

func LoadFSConfig(path string) (*FsConfig, error)

LoadFSConfig only decodes the azure file.

type GCPConfig

type GCPConfig struct {
	// Path to a GCP service account JSON file. If empty, the default credentials will be used.
	GCPServiceAccountFile string `json:"service_account_file,omitempty"`
	// Optional bucket name override. If empty, the bucket name is inferred from the path provided to NewFS.
	Bucket string `json:"bucket,omitempty"`
}

GCPConfig represents the configuration for GCP (Google Cloud Storage).

type S3Config

type S3Config struct {
	// S3 configuration
	S3ConfigFilePath     string
	S3CredentialFilePath string
	S3ProfileName        string
	S3StorageClass       string
	S3ChecksumAlgorithm  string
}

S3Config represents the configuration for S3.

Jump to

Keyboard shortcuts

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