models

package
v0.0.0-...-0327c36 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitZerologger

func InitZerologger(ctx context.Context, logLevel string, prettyPrint bool) context.Context

Types

type Env

type Env struct {
	// Radix API related settings
	RadixClusterType string `envconfig:"RADIX_CLUSTER_TYPE" required:"true" desc:"Used to set radix-api URL, set by operator in-cluster"`
	APIEnvironment   string `envconfig:"RADIX_ENVIRONMENT" required:"true" desc:"Used to set radix-api URL, set by operator in-cluster"`
	ClusterName      string `envconfig:"RADIX_CLUSTERNAME" required:"true" desc:"Used to set radix-api URL, set by operator in-cluster"`
	DNSZone          string `envconfig:"RADIX_DNS_ZONE" required:"true" desc:"Used to set radix-api URL, set by operator in-cluster"`
	UseLocalRadixApi bool   `envconfig:"USE_LOCAL_RADIX_API" desc:"Set Radix API client to localhost:3002"`

	// Application settings
	DbDSN string `envconfig:"DB_DSN" required:"true" desc:"Database DSN for connecting to the Radix Vulnerability Scanner database"`

	// Auth settings
	OidcAudience string `envconfig:"TOKEN_AUDIENCE" required:"true" default:"6dae42f8-4368-4678-94ff-3960e28e3630" desc:"OIDC token audience"`
	OidcIssuer   string `` /* 137-byte string literal not displayed */

	// Logging and server settings
	LogPrettyPrint bool   `envconfig:"PRETTY_PRINT" default:"false" desc:"Enable pretty print for logs"`
	LogLevel       string `envconfig:"LOG_LEVEL" default:"INFO" desc:"Logging level"`
	Port           string `envconfig:"PORT" default:"3003" desc:"Port to run the server on"`
	UseProfiler    bool   `envconfig:"USE_PROFILER" default:"false" desc:"Enable profiler endpoint on localhost:7070"`
}

Env instance variables

func MustParseEnv

func MustParseEnv() Env

func (*Env) GetRadixAPISchemes

func (env *Env) GetRadixAPISchemes() []string

func (*Env) GetRadixAPIURL

func (env *Env) GetRadixAPIURL() string

type Identity

type Identity struct {
	jwt.RegisteredClaims
}

type User

type User struct {
	Identity auth.IDToken
	RawToken string
}

Jump to

Keyboard shortcuts

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