config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FeatureFlags

type FeatureFlags struct {

	// IsCommitMentionsEnabled enables commit mentions
	IsCommitMentionsEnabled bool `envconfig:"IS_COMMIT_MENTIONS_ENABLED" required:"false" default:"false"`

	// IsRepresentSecretsEnabled enables some blurring of secrets in logs
	IsRepresentSecretsEnabled bool `envconfig:"IS_REPRESENT_SECRETS_ENABLED" required:"false" default:"false"`
}

func LoadFeatureFlags

func LoadFeatureFlags() (*FeatureFlags, error)

LoadFeatureFlags loads the feature flags from the environment

type HTTPAPI

type HTTPAPI struct {
	// Asana Personal Access Token
	AsanaAPIKey string `envconfig:"ASANA_API_KEY" required:"true"`

	// Gitlab Secret Tokens
	GitlabSecretTokens []string `envconfig:"GITLAB_SECRET_TOKENS" required:"true"`

	// Asana last commit field name in task
	LastCommitFieldName string `envconfig:"LAST_COMMIT_FIELD_NAME" required:"true" default:"Last Commit"`

	// Gitlab API Access Token
	GitlabAPIKey string `envconfig:"GITLAB_API_KEY" required:"true"`

	// Gitlab Domain
	GitlabDomain string `envconfig:"GITLAB_DOMAIN" required:"true" default:"https://gitlab.com/api/v4/"`

	// Port to listen on
	Port string `envconfig:"PORT" required:"true" default:"80"`
}

HTTPAPI is the configuration for the API

func Load

func Load() (*HTTPAPI, error)

Load loads the configuration from the environment

Jump to

Keyboard shortcuts

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