config

package
v0.0.0-...-b76c953 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppConfigDir = "./apps"
)
View Source
const (
	RunnerKeyFile = "runner.rsa"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	ID       string  `yaml:"id"`
	Name     string  `yaml:"name"`
	Provider string  `yaml:"provider"`
	Github   *Github `yaml:"github"`
}

type Config

type Config struct {
	Runner        *Runner        `yaml:"runner"`
	DeepCode      *DeepCode      `yaml:"deepcode"`
	Apps          []*App         `yaml:"apps"`
	Kubernetes    *Kubernetes    `yaml:"kubernetes"`
	RQLite        *RQLite        `yaml:"rqlite"`
	SAML          *SAML          `yaml:"saml"`
	ObjectStorage *ObjectStorage `yaml:"objectStorage"`
	Sentry        *Sentry        `yaml:"sentry"`
}

func LoadConfig

func LoadConfig(r io.Reader) (*Config, error)

type DeepCode

type DeepCode struct {
	Host      url.URL
	PublicKey *rsa.PublicKey
}

func (*DeepCode) UnmarshalYAML

func (d *DeepCode) UnmarshalYAML(unmarshal func(interface{}) error) error

type Github

type Github struct {
	AppID         string  `yaml:"appId"`
	ClientID      string  `yaml:"clientId"`
	ClientSecret  string  `yaml:"clientSecret"`
	WebhookSecret string  `yaml:"webhookSecret"`
	Host          url.URL `yaml:"-"`
	APIHost       url.URL `yaml:"-"`
	Slug          string  `yaml:"slug"`
	PrivateKey    *rsa.PrivateKey
}

func (*Github) UnmarshalYAML

func (g *Github) UnmarshalYAML(unmarshal func(interface{}) error) error

type ImageRegistry

type ImageRegistry struct {
	PullSecretName string  `yaml:"pullSecretName"`
	RegistryUrl    url.URL `yaml:"registryUrl"`
}

func (*ImageRegistry) ParseFromEnv

func (i *ImageRegistry) ParseFromEnv() error

type Kubernetes

type Kubernetes struct {
	Namespace     string            `yaml:"namespace"`
	NodeSelector  map[string]string `yaml:"nodeSelector"`
	ImageRegistry *ImageRegistry    `yaml:"imageRegistry"`
}

func (*Kubernetes) ParseFromEnv

func (k *Kubernetes) ParseFromEnv() error

func (*Kubernetes) UnmarshalYAML

func (k *Kubernetes) UnmarshalYAML(unmarshal func(interface{}) error) error

type ObjectStorage

type ObjectStorage struct {
	Provider   string `yaml:"provider"`
	Bucket     string `yaml:"bucket"`
	Credential string `yaml:"credential"`
}

type RQLite

type RQLite struct {
	Host string `yaml:"host"`
	Port int    `yaml:"port"`
}

func (*RQLite) ParseFromEnv

func (r *RQLite) ParseFromEnv() error

type Runner

type Runner struct {
	ID            string `json:"id"`
	ClientID      string `json:"clientId"`
	ClientSecret  string `json:"clientSecret"`
	WebhookSecret string `json:"webhookSecret"`
	Host          url.URL
	PrivateKey    *rsa.PrivateKey
}

func (*Runner) UnmarshalYAML

func (r *Runner) UnmarshalYAML(unmarshal func(interface{}) error) error

type SAML

type SAML struct {
	Enabled     bool             `json:"enabled"`
	Certificate *tls.Certificate `json:"-"`
	MetadataURL url.URL          `json:"metadataUrl"`
}

func (*SAML) UnmarshalYAML

func (s *SAML) UnmarshalYAML(unmarshal func(interface{}) error) error

type Sentry

type Sentry struct {
	DSN string `yaml:"dsn"`
}

Jump to

Keyboard shortcuts

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