config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteConfig

func WriteConfig(path string, cfg *Config) error

WriteConfig writes a configuration to a YAML file

Types

type CatalogConfig

type CatalogConfig struct {
	Type   string        `yaml:"type"`
	SQLite *SQLiteConfig `yaml:"sqlite,omitempty"`
	REST   *RESTConfig   `yaml:"rest,omitempty"`
	JSON   *JSONConfig   `yaml:"json,omitempty"`
}

CatalogConfig holds catalog-specific configuration

type Config

type Config struct {
	Name     string        `yaml:"name"`
	Version  string        `yaml:"version,omitempty"`
	Catalog  CatalogConfig `yaml:"catalog"`
	Storage  StorageConfig `yaml:"storage"`
	Metadata Metadata      `yaml:"metadata,omitempty"`
}

Config represents the main Icebox configuration

func FindConfig

func FindConfig() (string, *Config, error)

FindConfig searches for a .icebox.yml file in the current directory or parents

func ReadConfig

func ReadConfig(path string) (*Config, error)

ReadConfig reads a configuration from a YAML file

type FileSystemConfig

type FileSystemConfig struct {
	RootPath string `yaml:"root_path"`
}

FileSystemConfig holds local filesystem storage configuration

type JSONConfig added in v0.4.0

type JSONConfig struct {
	URI       string `yaml:"uri"`       // Path to the catalog.json file
	Warehouse string `yaml:"warehouse"` // Warehouse root path for table storage
}

JSONConfig holds JSON catalog configuration

type MemoryConfig

type MemoryConfig struct {
}

MemoryConfig holds in-memory storage configuration

type Metadata

type Metadata struct {
	CreatedAt   string            `yaml:"created_at,omitempty"`
	Description string            `yaml:"description,omitempty"`
	Tags        []string          `yaml:"tags,omitempty"`
	Properties  map[string]string `yaml:"properties,omitempty"`
}

Metadata holds additional project metadata

type OAuthConfig

type OAuthConfig struct {
	Token      string `yaml:"token,omitempty"`
	Credential string `yaml:"credential,omitempty"`
	AuthURL    string `yaml:"auth_url,omitempty"`
	Scope      string `yaml:"scope,omitempty"`
}

OAuthConfig holds OAuth authentication configuration

type RESTConfig

type RESTConfig struct {
	URI               string            `yaml:"uri"`
	Credentials       map[string]string `yaml:"credentials,omitempty"`
	OAuth             *OAuthConfig      `yaml:"oauth,omitempty"`
	SigV4             *SigV4Config      `yaml:"sigv4,omitempty"`
	TLS               *TLSConfig        `yaml:"tls,omitempty"`
	WarehouseLocation string            `yaml:"warehouse_location,omitempty"`
	MetadataLocation  string            `yaml:"metadata_location,omitempty"`
	Prefix            string            `yaml:"prefix,omitempty"`
	AdditionalProps   map[string]string `yaml:"additional_properties,omitempty"`
}

RESTConfig holds REST catalog configuration

type S3Config

type S3Config struct {
	Bucket          string `yaml:"bucket"`
	Region          string `yaml:"region,omitempty"`
	Endpoint        string `yaml:"endpoint,omitempty"`
	AccessKeyID     string `yaml:"access_key_id,omitempty"`
	SecretAccessKey string `yaml:"secret_access_key,omitempty"`
}

S3Config holds S3-compatible storage configuration

type SQLiteConfig

type SQLiteConfig struct {
	Path string `yaml:"path"`
}

SQLiteConfig holds SQLite catalog configuration

type SigV4Config

type SigV4Config struct {
	Enabled bool   `yaml:"enabled"`
	Region  string `yaml:"region,omitempty"`
	Service string `yaml:"service,omitempty"`
}

SigV4Config holds AWS Signature Version 4 authentication configuration

type StorageConfig

type StorageConfig struct {
	Type       string            `yaml:"type"`
	FileSystem *FileSystemConfig `yaml:"filesystem,omitempty"`
	Memory     *MemoryConfig     `yaml:"memory,omitempty"`
	S3         *S3Config         `yaml:"s3,omitempty"`
}

StorageConfig holds storage-specific configuration

type TLSConfig

type TLSConfig struct {
	SkipVerify bool `yaml:"skip_verify,omitempty"`
}

TLSConfig holds TLS configuration

Jump to

Keyboard shortcuts

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