config

package
v1.27.1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssumeRoleConfig added in v0.98.0

type AssumeRoleConfig struct {
	RoleARN    string `yaml:"roleArn"`
	ExternalID string `yaml:"externalId"`
}

AssumeRoleConfig is the assume role configuration.

type AuthConfig

type AuthConfig struct {
	Enable                 bool   `yaml:"enable"`
	RBACInternalServerAddr string `yaml:"rbacInternalServerAddr"`
}

AuthConfig is the authentication configuration.

type Config

type Config struct {
	GRPCPort         int `yaml:"grpcPort"`
	HTTPPort         int `yaml:"httpPort"`
	InternalGRPCPort int `yaml:"internalGrpcPort"`

	// GracefulShutdownDelay is the delay before shutting down the server.
	GracefulShutdownDelay time.Duration `yaml:"gracefulShutdownDelay"`

	Database    db.Config     `yaml:"database"`
	AuthConfig  AuthConfig    `yaml:"auth"`
	UsageSender sender.Config `yaml:"usageSender"`

	DefaultOrganization *DefaultOrganizationConfig `yaml:"defaultOrganization"`
	DefaultProject      *DefaultProjectConfig      `yaml:"defaultProject"`
	DefaultAPIKeys      []DefaultAPIKeyConfig      `yaml:"defaultApiKeys"`

	KMSConfig KMSConfig `yaml:"kms"`

	Debug DebugConfig `yaml:"debug"`
}

Config is the configuration.

func Parse

func Parse(path string) (Config, error)

Parse parses the configuration file at the given path, returning a new Config struct.

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the configuration.

type DebugConfig

type DebugConfig struct {
	Standalone bool   `yaml:"standalone"`
	SqlitePath string `yaml:"sqlitePath"`
}

DebugConfig is the debug configuration.

type DefaultAPIKeyConfig added in v0.99.0

type DefaultAPIKeyConfig struct {
	Name                     string `yaml:"name"`
	Secret                   string `yaml:"secret"`
	UserID                   string `yaml:"userId"`
	IsServiceAccount         bool   `yaml:"isServiceAccount"`
	ExcludedFromRateLimiting bool   `yaml:"excludedFromRateLimiting"`
}

DefaultAPIKeyConfig is the default API key configuration.

type DefaultOrganizationConfig

type DefaultOrganizationConfig struct {
	Title    string   `yaml:"title"`
	UserIDs  []string `yaml:"userIds"`
	TenantID string   `yaml:"tenantId"`
}

DefaultOrganizationConfig is the default organization configuration.

type DefaultProjectConfig

type DefaultProjectConfig struct {
	Title               string `yaml:"title"`
	KubernetesNamespace string `yaml:"kubernetesNamespace"`
}

DefaultProjectConfig is the default project configuration.

type KMSConfig added in v0.97.0

type KMSConfig struct {
	Enable     bool              `yaml:"enable"`
	KeyAlias   string            `yaml:"keyAlias"`
	Region     string            `yaml:"region"`
	AssumeRole *AssumeRoleConfig `yaml:"assumeRole"`
}

KMSConfig is AWS KMS configuration.

Jump to

Keyboard shortcuts

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