config

package
v1.7.5 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate added in v1.7.5

func Validate(config *Config) error

Types

type AuthorizationConfig

type AuthorizationConfig struct {
	Enabled       bool
	KetoServerURL string `validate:"required_if=Enabled True"`
}

type Config

type Config struct {
	APIHost       string `validate:"required"`
	EncryptionKey string `validate:"required"`
	Environment   string `validate:"required"`
	Port          int    `validate:"required"`
	SentryDSN     string
	OauthClientID string

	Streams Streams `validate:"dive,required"`
	Docs    Documentations

	Applications  []models.Application `validate:"dive"`
	Authorization *AuthorizationConfig `validate:"required"`
	Database      *DatabaseConfig      `validate:"required"`
	Mlflow        *MlflowConfig        `validate:"required"`
	UI            *UIConfig
}

func Load added in v1.7.5

func Load(paths ...string) (*Config, error)

func LoadAndValidate added in v1.7.5

func LoadAndValidate(paths ...string) (*Config, error)

func NewDefaultConfig added in v1.7.5

func NewDefaultConfig() *Config

func (*Config) ListenAddress

func (c *Config) ListenAddress() string

type DatabaseConfig

type DatabaseConfig struct {
	Host          string `validate:"required"`
	Port          int    `validate:"required"`
	User          string `validate:"required"`
	Password      string `validate:"required"`
	Database      string `validate:"required"`
	MigrationPath string `validate:"required,url"`
}

type Documentation added in v1.3.1

type Documentation struct {
	Label string `json:"label"`
	Href  string `json:"href"`
}

type Documentations added in v1.3.1

type Documentations []Documentation

type MlflowConfig

type MlflowConfig struct {
	TrackingURL string `validated:"required,url"`
}

type Streams added in v1.7.5

type Streams map[string][]string

type UIConfig

type UIConfig struct {
	StaticPath string `validated:"required"`
	IndexPath  string `validated:"required"`

	ClockworkUIHomepage string `json:"REACT_APP_CLOCKWORK_UI_HOMEPAGE"`
	KubeflowUIHomepage  string `json:"REACT_APP_KUBEFLOW_UI_HOMEPAGE"`
}

UIConfig stores the configuration for the UI.

Jump to

Keyboard shortcuts

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