config

package
v0.1.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ConfigFileName = "ingestkit.config.json"
	SchemaDir      = "ingestkit"
	SchemaFileName = "schema.yaml"
)

Variables

This section is empty.

Functions

func DetectLanguage

func DetectLanguage() string

DetectLanguage tries to detect the project language from context

func FindConfig

func FindConfig() (string, error)

FindConfig searches for config file in current and parent directories

func GetSchemaPath

func GetSchemaPath() string

GetSchemaPath returns the path to the schema file

func SaveConfig

func SaveConfig(cfg *Config) error

SaveConfig writes the config file to the current directory

Types

type Config

type Config struct {
	Version   string          `json:"version"`
	APIURL    string          `json:"apiUrl"`
	APIKey    string          `json:"apiKey"`
	TenantID  string          `json:"tenantId"`
	Generator GeneratorConfig `json:"generator"`
}

Config represents the IngestKit configuration file

func DefaultConfig

func DefaultConfig(language, tenantID string) *Config

DefaultConfig returns a new config with sensible defaults

func LoadConfig

func LoadConfig() (*Config, error)

LoadConfig reads the config file from the current directory

type GeneratorConfig

type GeneratorConfig struct {
	Language string `json:"language"` // python, typescript, go
	Output   string `json:"output"`   // ./ingestkit
}

GeneratorConfig holds SDK generation settings

Jump to

Keyboard shortcuts

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