flags

package
v0.0.0-...-ae451d1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFlagsMap

func GetFlagsMap(cmdFlags *Flags, maps ...map[string]interface{}) map[string]interface{}

GetFlagsMap returns a map containing Flags, based on mapstructure keys It can be passed extra maps whose k:v's will also be added to the returned map SourceDetails k:v's trump passed in duplicates

func ParseLogLevel

func ParseLogLevel(logLevel string) zerolog.Level

ParseLogLevel parses value of LogLevel into a zerolog level

Types

type Flags

type Flags struct {
	RawEventLogging  bool   `help:"Enable raw event logging." env:"RAW_EVENT_LOGGING" mapstructure:"-"`
	LogLevel         string `help:"Set logging level" env:"LOG_LEVEL" mapstructure:"-"`
	Stage            string `help:"The development stage." env:"STAGE" mapstructure:"stage"`
	Branch           string `help:"The git branch this code originated." env:"BRANCH" mapstructure:"branch"`
	DependencyBranch string `help:"Git branch for downstream dependencies" env:"DEPENDENCY_BRANCH" mapstructure:"-"`
	AWSAccountID     string `help:"The aws account ID." env:"AWS_ACCOUNT_ID" mapstructure:"aws_account_id"`
	RunLocal         bool   `help:"Run HTTP server locally on port 3000" env:"RUN_LOCAL" mapstructure:"-"`
	SentryDSN        string `help:"The sentry DSN string for error logging." env:"SENTRY_DSN" mapstructure:"-"`
	MeetupStoreName  string `help:"AWS DynamoDB table name for Bearer Token Store" env:"MEETUP_TABLE_NAME" mapstructure:"-"`
	CustomDomainName string `help:"Custom Domain Name for the environment'" env:"DNS_NAME" mapstructure:"-"`
}

Flags the flags/env vars passed to the service to configure it Limit these to items the user should pass in.

Jump to

Keyboard shortcuts

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