cfg

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Flags *Flags
}

Config contains the configuration.

func New

func New() *Config

New returns a new instance of Config.

func (*Config) Cwd

func (c *Config) Cwd() (string, error)

Cwd returns the current working directory.

type Flags

type Flags struct {
	Addr                    string `envconfig:"SERVICE_LENS_ADDR" default:":8084"`
	DatabaseURI             string `envconfig:"SERVICE_LENS_DATABASE_URI" default:"postgres://root@host.docker.internal:26257/defaultdb?sslmode=disable"`
	DatabaseTablePrefix     string `envconfig:"SERVICE_LENS_DATABASE_TABLE_PREFIX" default:"service_lens_"`
	FGAApiUrl               string `envconfig:"SERVICE_LENS_FGA_API_URL" default:"http://host.docker.internal:8080"`
	FGAStoreID              string `envconfig:"SERVICE_LENS_FGA_STORE_ID" default:""`
	FGAAuthorizationModelID string `envconfig:"SERVICE_LENS_FGA_AUTHORIZATION_MODEL_ID" default:""`
	OIDCIssuer              string `envconfig:"SERVICE_LENS_OIDC_ISSUER" default:""`
	OIDCAudience            string `envconfig:"SERVICE_LENS_OIDC_AUDIENCE" default:""`
	GitHubCallbackURL       string `envconfig:"SERVICE_LENS_GITHUB_CALLBACK_URL" default:"http://localhost:8084/auth/github/callback"`
	GitHubClientID          string `envconfig:"SERVICE_LENS_GITHUB_CLIENT_ID" default:""`
	GitHubClientSecret      string `envconfig:"SERVICE_LENS_GITHUB_CLIENT_SECRET" default:""`
}

Flags contains the command line flags.

func NewFlags

func NewFlags() *Flags

NewFlags returns a new instance of Flags.

Jump to

Keyboard shortcuts

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