Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindAllEnv ¶
Types ¶
type AuthConfig ¶
type AuthConfig struct {
ConfigFile ConfigFileAuth
GoogleOAuthConfig *oauth2.Config
}
type ConfigFileAuth ¶
type ConfigFileAuth struct {
// RestrictedEmailDomains sets the restricted email domains for the instance.
RestrictedEmailDomains []string `mapstructure:"restrictedEmailDomains" json:"restrictedEmailDomains,omitempty"`
// BasedAuthEnabled controls whether email and password-based login is enabled for this
// Hatchet instance
BasicAuthEnabled bool `mapstructure:"basicAuthEnabled" json:"basicAuthEnabled,omitempty" default:"true"`
// SetEmailVerified controls whether the user's email is automatically set to verified
SetEmailVerified bool `mapstructure:"setEmailVerified" json:"setEmailVerified,omitempty" default:"false"`
// Configuration options for the cookie
Cookie ConfigFileAuthCookie `mapstructure:"cookie" json:"cookie,omitempty"`
Google ConfigFileAuthGoogle `mapstructure:"google" json:"google,omitempty"`
}
type ConfigFileAuthCookie ¶
type ConfigFileAuthCookie struct {
Name string `mapstructure:"name" json:"name,omitempty" default:"hatchet"`
Domain string `mapstructure:"domain" json:"domain,omitempty"`
Secrets string `mapstructure:"secrets" json:"secrets,omitempty"`
Insecure bool `mapstructure:"insecure" json:"insecure,omitempty" default:"false"`
}
type ConfigFileAuthGoogle ¶
type ConfigFileAuthGoogle struct {
Enabled bool `mapstructure:"enabled" json:"enabled,omitempty" default:"false"`
ClientID string `mapstructure:"clientID" json:"clientID,omitempty"`
ClientSecret string `mapstructure:"clientSecret" json:"clientSecret,omitempty"`
Scopes []string `mapstructure:"scopes" json:"scopes,omitempty" default:"[\"openid\", \"profile\", \"email\"]"`
}
type ConfigFileRuntime ¶
type ConfigFileRuntime struct {
// Port is the port that the core server listens on
Port int `mapstructure:"port" json:"port,omitempty" default:"8080"`
// ServerURL is the full server URL of the instance, including protocol.
ServerURL string `mapstructure:"url" json:"url,omitempty" default:"http://localhost:8080"`
// GRPCPort is the port that the grpc service listens on
GRPCPort int `mapstructure:"grpcPort" json:"grpcPort,omitempty" default:"7070"`
// GRPCBindAddress is the address that the grpc server binds to. Should set to 0.0.0.0 if binding in docker container.
GRPCBindAddress string `mapstructure:"grpcBindAddress" json:"grpcBindAddress,omitempty" default:"127.0.0.1"`
// GRPCInsecure controls whether the grpc server is insecure or uses certs
GRPCInsecure bool `mapstructure:"grpcInsecure" json:"grpcInsecure,omitempty" default:"false"`
}
General server runtime options
type RabbitMQConfigFile ¶
type RabbitMQConfigFile struct {
URL string `mapstructure:"url" json:"url,omitempty" validate:"required" default:"amqp://user:password@localhost:5672/"`
}
type ServerConfig ¶
type ServerConfig struct {
*database.Config
Auth AuthConfig
Runtime ConfigFileRuntime
Services []string
Namespaces []string
TaskQueue taskqueue.TaskQueue
Logger *zerolog.Logger
TLSConfig *tls.Config
SessionStore *cookie.UserSessionStore
Validator validator.Validator
Ingestor ingestor.Ingestor
OpenTelemetry shared.OpenTelemetryConfigFile
}
func (*ServerConfig) HasService ¶
func (c *ServerConfig) HasService(name string) bool
type ServerConfigFile ¶
type ServerConfigFile struct {
Auth ConfigFileAuth `mapstructure:"auth" json:"auth,omitempty"`
Runtime ConfigFileRuntime `mapstructure:"runtime" json:"runtime,omitempty"`
TaskQueue TaskQueueConfigFile `mapstructure:"taskQueue" json:"taskQueue,omitempty"`
Services []string `` /* 141-byte string literal not displayed */
TLS shared.TLSConfigFile `mapstructure:"tls" json:"tls,omitempty"`
Logger shared.LoggerConfigFile `mapstructure:"logger" json:"logger,omitempty"`
OpenTelemetry shared.OpenTelemetryConfigFile `mapstructure:"otel" json:"otel,omitempty"`
}
type TaskQueueConfigFile ¶
type TaskQueueConfigFile struct {
Kind string `mapstructure:"kind" json:"kind,omitempty" validate:"required"`
RabbitMQ RabbitMQConfigFile `mapstructure:"rabbitmq" json:"rabbitmq,omitempty" validate:"required"`
}
Click to show internal directories.
Click to hide internal directories.