Documentation ¶
Index ¶
- Constants
- func CACStoreLogin(_ *viper.Viper, store *pksigner.Store) (*pksigner.Store, error)
- func CheckAWSRegion(v *viper.Viper) (string, error)
- func CheckAuth(v *viper.Viper) error
- func CheckBuild(v *viper.Viper) error
- func CheckCAC(v *viper.Viper) error
- func CheckCSRF(v *viper.Viper) error
- func CheckCert(v *viper.Viper) error
- func CheckDatabase(v *viper.Viper, logger *zap.Logger) error
- func CheckDatabaseRetry(v *viper.Viper) error
- func CheckDebugFlags(_ *viper.Viper) error
- func CheckDevlocal(v *viper.Viper) error
- func CheckEIA(v *viper.Viper) error
- func CheckEmail(v *viper.Viper) error
- func CheckEntrustCert(v *viper.Viper) error
- func CheckEnvironment(v *viper.Viper) error
- func CheckFeatureFlag(_ *viper.Viper) error
- func CheckGEX(v *viper.Viper) error
- func CheckGEXSFTP(v *viper.Viper) error
- func CheckHosts(v *viper.Viper) error
- func CheckIWS(v *viper.Viper) error
- func CheckListeners(v *viper.Viper) error
- func CheckLogging(v *viper.Viper) error
- func CheckMiddleWare(v *viper.Viper) error
- func CheckMigration(v *viper.Viper) error
- func CheckMigrationFile(v *viper.Viper) error
- func CheckMigrationGenPath(v *viper.Viper) error
- func CheckMigrationPath(v *viper.Viper) error
- func CheckOutboundIP(logger *zap.Logger)
- func CheckPorts(v *viper.Viper) error
- func CheckRedis(v *viper.Viper) error
- func CheckRoute(v *viper.Viper) error
- func CheckServices(v *viper.Viper) error
- func CheckSession(v *viper.Viper) error
- func CheckStorage(v *viper.Viper) error
- func CheckSwagger(v *viper.Viper) error
- func CheckTelemetry(v *viper.Viper) (*telemetry.Config, error)
- func CheckWebserver(v *viper.Viper) error
- func GetCACStore(v *viper.Viper) (*pksigner.Store, error)
- func InitAWSFlags(flag *pflag.FlagSet)
- func InitAuthFlags(flag *pflag.FlagSet)
- func InitBuildFlags(flag *pflag.FlagSet)
- func InitCACFlags(flag *pflag.FlagSet)
- func InitCSRFFlags(flag *pflag.FlagSet)
- func InitCertFlags(flag *pflag.FlagSet)
- func InitDatabase(v *viper.Viper, logger *zap.Logger) (*pop.Connection, error)
- func InitDatabaseFlags(flag *pflag.FlagSet)
- func InitDatabaseRetryFlags(flag *pflag.FlagSet)
- func InitDebugFlags(flag *pflag.FlagSet)
- func InitDevlocalFlags(flag *pflag.FlagSet)
- func InitEIAFlags(flag *pflag.FlagSet)
- func InitEmailFlags(flag *pflag.FlagSet)
- func InitEntrustCertFlags(flag *pflag.FlagSet)
- func InitEnvironmentFlags(flag *pflag.FlagSet)
- func InitFeatureFlags(flag *pflag.FlagSet)
- func InitGEXFlags(flag *pflag.FlagSet)
- func InitGEXSFTP(logger *zap.Logger, sshClient *ssh.Client) (*sftp.Client, error)
- func InitGEXSFTPFlags(flag *pflag.FlagSet)
- func InitGEXSSH(logger *zap.Logger, v *viper.Viper) (*ssh.Client, error)
- func InitHostFlags(flag *pflag.FlagSet)
- func InitIWSFlags(flag *pflag.FlagSet)
- func InitListenerFlags(flag *pflag.FlagSet)
- func InitLoggingFlags(flag *pflag.FlagSet)
- func InitMiddlewareFlags(flag *pflag.FlagSet)
- func InitMigrationFileFlags(flag *pflag.FlagSet)
- func InitMigrationFlags(flag *pflag.FlagSet)
- func InitMigrationGenPathFlags(flag *pflag.FlagSet)
- func InitMigrationPathFlags(flag *pflag.FlagSet)
- func InitPortFlags(flag *pflag.FlagSet)
- func InitRedis(appCtx appcontext.AppContext, v *viper.Viper) (*redis.Pool, error)
- func InitRedisFlags(flag *pflag.FlagSet)
- func InitRouteFlags(flag *pflag.FlagSet)
- func InitServiceFlags(flag *pflag.FlagSet)
- func InitSessionFlags(flag *pflag.FlagSet)
- func InitStorageFlags(flag *pflag.FlagSet)
- func InitSwaggerFlags(flag *pflag.FlagSet)
- func InitTelemetryFlags(flag *pflag.FlagSet)
- func InitWebserverFlags(flag *pflag.FlagSet)
- func LogLevelIsDebug(v *viper.Viper) bool
- func ParseCertificates(str string) []string
- func ParsePrivateKey(str string) []string
- func PingPopConnection(c *pop.Connection, logger *zap.Logger) error
- func ValidateHost(v *viper.Viper, flagname string) error
- func ValidatePort(v *viper.Viper, flagname string) error
- func ValidateProtocol(v *viper.Viper, flagname string) error
- func ValidateSessionLifetime(v *viper.Viper, flagname string) error
- func ValidateSessionTimeout(v *viper.Viper, flagname string) error
- func ValidateStacktraceLength(v *viper.Viper, flagname string) error
- func ValidateURL(v *viper.Viper, flagname string) error
- type ErrInvalidLabel
- type ErrInvalidPKCS7
- type ErrInvalidPath
- type FeatureFlagConfig
Constants ¶
const ( //RA Summary: gosec - G101 - Password Management: Hardcoded Password //RA: This line was flagged because of use of the word "secret" //RA: This line is used to identify the name of the flag. ClientAuthSecretKeyFlag is the Client Auth Secret Key Flag. //RA: This value of this variable does not store an application secret. //RA Developer Status: Mitigated //RA Validator Status: Mitigated //RA Validator: jneuner@mitre.org //RA Modified Severity: CAT III // #nosec G101 // ClientAuthSecretKeyFlag is the Client Auth Secret Key Flag ClientAuthSecretKeyFlag string = "client-auth-secret-key" // Okta API key flag //RA Summary: gosec - G101 - Password Management: Hardcoded Password //RA: This line was flagged because of use of the word "key" //RA: This line is used to identify the name of the flag. OktaApiKeyFlag is the Okta API Key Flag. //RA: This value of this variable does not store an application secret. //RA Developer Status: Mitigated //RA Validator Status: Mitigated //RA Validator: leodis.f.scott.civ@mail.mil //RA Modified Severity: CAT III // #nosec G101 OktaAPIKeyFlag string = "okta-api-key" // Okta flags for local development environment that serves test-milmove.okta.mil // Okta tenant flags OktaTenantOrgURLFlag string = "okta-tenant-org-url" // OktaTenantCallbackPortFlag is the test-milmove Callback Port Flag OktaTenantCallbackPortFlag string = "okta-tenant-callback-port" // OktaTenantCallbackPortFlag is the test-milmove Callback Protocol Flag OktaTenantCallbackProtocolFlag string = "okta-tenant-callback-protocol" // Okta Customer client id and secret flags OktaCustomerClientIDFlag string = "okta-customer-client-id" OktaCustomerCallbackURL string = "okta-customer-callback-url" // RA Summary: gosec - G101 - Password Management: Hardcoded Password // RA: This line was flagged because of use of the word "secret" // RA: This line is used to identify the name of the flag. OktaCustomerSecretKeyFlag is the Okta Customer Application Secret Key Flag. // RA: This value of this variable does not store an application secret. // RA Developer Status: RA Request // RA Validator Status: Mitigated // RA Validator: leodis.f.scott.civ@mail.mil // RA Modified Severity: CAT III // #nosec G101 OktaCustomerSecretKeyFlag string = "okta-customer-secret-key" // Okta Office client id and secret flags OktaOfficeClientIDFlag string = "okta-office-client-id" OktaOfficeCallbackURL string = "okta-office-callback-url" // RA Summary: gosec - G101 - Password Management: Hardcoded Password // RA: This line was flagged because of use of the word "secret" // RA: This line is used to identify the name of the flag. OktaOfficeSecretKeyFlag is the Okta Office Application Secret Key Flag. // RA: This value of this variable does not store an application secret. // RA Developer Status: RA Request // RA Validator Status: Mitigated // RA Validator: leodis.f.scott.civ@mail.mil // RA Modified Severity: CAT III // #nosec G101 OktaOfficeSecretKeyFlag string = "okta-office-secret-key" // Okta Admin client id and secret flags OktaAdminClientIDFlag string = "okta-admin-client-id" OktaAdminCallbackURL string = "okta-admin-callback-url" // RA Summary: gosec - G101 - Password Management: Hardcoded Password // RA: This line was flagged because of use of the word "secret" // RA: This line is used to identify the name of the flag. OktaAdminSecretKeyFlag is the Okta Admin Application Secret Key Flag. // RA: This value of this variable does not store an application secret. // RA Developer Status: RA Request // RA Validator Status: Mitigated // RA Validator: leodis.f.scott.civ@mail.mil // RA Modified Severity: CAT III // #nosec G101 OktaAdminSecretKeyFlag string = "okta-admin-secret-key" OktaOfficeGroupIDFlag string = "okta-office-group-id" OktaCustomerGroupIDFlag string = "okta-customer-group-id" )
Set of flags used for authentication
const ( // AWSRegionFlag is the generic AWS Region Flag AWSRegionFlag string = "aws-region" // aws-sdk-go-v2 does not expose a constant for the regions anymore AWSRegionUSGovWest1 = "us-gov-west-1" )
const ( // BuildRootFlag is the build root flag BuildRootFlag string = "build-root" // DefaultBuildRoot Path to the build directory DefaultBuildRoot string = "build" )
const ( // CACFlag indicates that a CAC should be used CACFlag string = "cac" // PKCS11ModuleFlag is the location of the PCKS11 module to use with the smart card PKCS11ModuleFlag string = "pkcs11module" // TokenLabelFlag is the Token Label to use with the smart card TokenLabelFlag string = "tokenlabel" // CertLabelFlag is the Certificate Label to use with the smart card CertLabelFlag string = "certlabel" // KeyLabelFlag is the Key Label to use with the smart card KeyLabelFlag string = "keylabel" )
const ( // DevlocalCAFlag is the Devlocal CA Flag DevlocalCAFlag string = "devlocal-ca" // DoDCAPackageFlag is the DoD CA Package Flag DoDCAPackageFlag string = "dod-ca-package" // MoveMilDoDCACertFlag is the Move.mil DoD CA Cert Flag MoveMilDoDCACertFlag string = "move-mil-dod-ca-cert" // MoveMilDoDTLSCertFlag is the Move.mil DoD TLS Cert Flag MoveMilDoDTLSCertFlag string = "move-mil-dod-tls-cert" // MoveMilDoDTLSKeyFlag is the Move.mil DoD TLS Key Flag MoveMilDoDTLSKeyFlag string = "move-mil-dod-tls-key" )
const ( // EntrustL1KCertFlag is the Entrust L1K Cert Flag EntrustL1KCertFlag string = "entrust-l1k-cert" // EntrustG2CertFlag is the Entrust G2 Cert Flag EntrustG2CertFlag string = "entrust-g2-cert" )
const ( // DbDebugFlag is the DB Debug flag DbDebugFlag string = "db-debug" // DbEnvFlag is the DB environment flag DbEnvFlag string = "db-env" // DbNameFlag is the DB name flag DbNameFlag string = "db-name" // DbHostFlag is the DB host flag DbHostFlag string = "db-host" // DbPortFlag is the DB port flag DbPortFlag string = "db-port" // DbUserFlag is the DB user flag DbUserFlag string = "db-user" // DbPasswordFlag is the DB password flag DbPasswordFlag string = "db-password" // DbPoolFlag is the DB pool flag DbPoolFlag string = "db-pool" // DbIdlePoolFlag is the DB idle pool flag DbIdlePoolFlag string = "db-idle-pool" // DbSSLModeFlag is the DB SSL Mode flag DbSSLModeFlag string = "db-ssl-mode" // DbSSLRootCertFlag is the DB SSL Root Cert flag DbSSLRootCertFlag string = "db-ssl-root-cert" // DbIamFlag is the DB IAM flag DbIamFlag string = "db-iam" // DbIamRoleFlag is the DB IAM Role flag DbIamRoleFlag string = "db-iam-role" // DbRegionFlag is the DB Region flag DbRegionFlag string = "db-region" // DbUseInstrumentedDriverFlag indicates if additional db // instrumentation should be done DbInstrumentedFlag = "db-instrumented" // DbConnMaxLifetimeFlag configures the maximum connection // lifetime in seconds DbConnMaxLifetimeFlag = "db-conn-max-lifetime" // DbConnMaxIdleFlag configures the maximum connection idle time // in seconds DbConnMaxIdleTimeFlag = "db-conn-max-idle-time" // DbEnvContainer is the Container DB Env name DbEnvContainer string = "container" // DbEnvTest is the Test DB Env name DbEnvTest string = "test" // DbEnvDevelopment is the Development DB Env name DbEnvDevelopment string = "development" // DbNameTest The name of the test database DbNameTest string = "test_db" // SSLModeDisable is the disable SSL Mode SSLModeDisable string = "disable" // SSLModeAllow is the allow SSL Mode SSLModeAllow string = "allow" // SSLModePrefer is the prefer SSL Mode SSLModePrefer string = "prefer" // SSLModeRequire is the require SSL Mode SSLModeRequire string = "require" // SSLModeVerifyCA is the verify-ca SSL Mode SSLModeVerifyCA string = "verify-ca" // SSLModeVerifyFull is the verify-full SSL Mode SSLModeVerifyFull string = "verify-full" // DbPoolDefault is the default db pool connections DbPoolDefault = awsRdsT3SmallMaxConnections // DbIdlePoolDefault is the default db idle pool connections DbIdlePoolDefault = 2 // DbPoolMax is the upper limit the db pool can use for connections which constrains the user input DbPoolMax int = awsRdsT3SmallMaxConnections // DbConnMaxLifetimeDefault is how long a connection should be // left open to the database. 1 hour is picked arbitrarily DbConnMaxLifetimeDefault = 1 * time.Hour // DbConnMaxIdleTimeDefault is how long a connection remains idle // before being closed. 15 minutes is picked arbitrarily DbConnMaxIdleTimeDefault = 15 * time.Minute )
const ( // DbRetryIntervalFlag is the DB retry interval flag DbRetryIntervalFlag string = "db-retry-interval" // DbRetryMaxFlag is the DB retry maximum flag DbRetryMaxFlag string = "db-retry-max" )
const ( // EIAKeyFlag is the EIA Key Flag EIAKeyFlag string = "eia-key" // EIAURLFlag is the EIA URL Flag EIAURLFlag string = "eia-url" )
const ( // EmailBackendFlag is the Email Backend Flag EmailBackendFlag string = "email-backend" // AWSSESRegionFlag is the AWS SES Region Flag AWSSESRegionFlag string = "aws-ses-region" // AWSSESDomainFlag is the AWS SES Domain Flag AWSSESDomainFlag string = "aws-ses-domain" // SysAdminEmail is flag for the System Administrators' email SysAdminEmail string = "sys-admin-email" )
const ( // EnvironmentFlag is the Environment Flag EnvironmentFlag string = "environment" // ReviewBaseDomainFlag is the base domain name for review apps ReviewBaseDomainFlag = "review-base-domain" // ReviewBaseDomainDefault is the default base domain for review apps ReviewBaseDomainDefault = "review.localhost" // EnvironmentExperimental is the Experimental Environment name EnvironmentExperimental string = "experimental" // EnvironmentTest is the Test Environment name EnvironmentTest string = "test" // EnvironmentDevelopment is the Development Environment name EnvironmentDevelopment string = "development" // EnvironmentDemo is the GovCloud demo Environment name EnvironmentDemo string = "demo" // EnvironmentLoadtest is the GovCloud loadtest Environment name EnvironmentLoadtest string = "loadtest" // EnvironmentExp is the GovCloud exp Environment name EnvironmentExp string = "exp" // EnvironmentStg is the GovCloud stg Environment name EnvironmentStg string = "stg" // EnvironmentPrd is the GovCloud prd Environment name EnvironmentPrd string = "prd" // EnvironmentReview is a reviewapp EnvironmentReview string = "review" )
const ( // FeatureFlagServerURLFlag is the URL to the feature flag server FeatureFlagServerURLFlag string = "feature-flag-server-url" // FeatureFlagAPITokenFlag is the api token FeatureFlagAPITokenFlag string = "feature-flag-api-token" )
const ( // GEXBasicAuthUsernameFlag is the GEX Basic Auth Username Flag GEXBasicAuthUsernameFlag string = "gex-basic-auth-username" //RA Summary: gosec - G101 - Password Management: Hardcoded Password //RA: This line was flagged because of use of the word "password" //RA: This line is used to identify the name of the flag. GEXBasicAuthPasswordFlag is the GEX Basic Auth Password Flag. //RA: This value of this variable does not store an application password. //RA Developer Status: Mitigated //RA Validator Status: Mitigated //RA Validator: jneuner@mitre.org //RA Modified Severity: CAT III // #nosec G101 // GEXBasicAuthPasswordFlag is the GEX Basic Auth Password Flag GEXBasicAuthPasswordFlag string = "gex-basic-auth-password" // GEXSendProdInvoiceFlag is the GEX Send Prod Invoice Flag GEXSendProdInvoiceFlag string = "gex-send-prod-invoice" // GEXURLFlag is the GEX URL FLag GEXURLFlag string = "gex-url" // SendToSyncada is the flag to control if we try sending files to syncada or not SendToSyncada string = "send-to-syncada" )
Set of flags used for GEX
const ( // GEXSFTPPortFlag is the ENV var for the GEX SFTP port GEXSFTPPortFlag string = "gex-sftp-port" // GEXSFTPUserIDFlag is the ENV var for the GEX SFTP user ID GEXSFTPUserIDFlag string = "gex-sftp-user-id" // GEXSFTPIPAddressFlag is the ENV var for the GEX SFTP IP address GEXSFTPIPAddressFlag string = "gex-sftp-ip-address" //RA Summary: gosec - G101 - Password Management: Hardcoded Password //RA: This line was flagged because of use of the word "password" //RA: This line is used to identify the name of the flag. GEXSFTPPasswordFlag is the GEX SFTP Password Flag. //RA: See MB-7727 and MB-7728 for tracking future work to resolve this issue //RA: App should implement public-key authentication; issue remains open while interface control is negotiated for this connection. //RA Developer Status: Mitigated //RA Validator Status: Known Issue //RA Validator: leodis.f.scott.civ@mail.mil //RA Modified Severity: CAT III // #nosec G101 // GEXSFTPPasswordFlag is the ENV var for the GEX SFTP password GEXSFTPPasswordFlag string = "gex-sftp-password" // GEXXPrivateKeyFlag is the ENV var for the private key which is used in establishing an // ssh connection to the GEX server. The GEX server has the public key. GEXPrivateKeyFlag string = "gex-private-key" // GEXSFTPHostKeyFlag is the ENV var for the GEX SFTP host key GEXSFTPHostKeyFlag string = "gex-sftp-host-key" // GEXSFTP997PickupDirectory is the ENV var for the directory where GEX delivers responses GEXSFTP997PickupDirectory string = "gex-sftp-997-pickup-directory" // GEXSFTP824PickupDirectory is the ENV var for the directory where GEX delivers responses GEXSFTP824PickupDirectory string = "gex-sftp-824-pickup-directory" )
Set of flags used for GEXSFTP
const ( // HTTPMyServerNameFlag is the HTTP My Server Name Flag HTTPMyServerNameFlag string = "http-my-server-name" // HTTPOfficeServerNameFlag is the HTTP Office Server Name Flag HTTPOfficeServerNameFlag string = "http-office-server-name" // HTTPAdminServerNameFlag is the HTTP Admin Server Name Flag HTTPAdminServerNameFlag string = "http-admin-server-name" // HTTPOrdersServerNameFlag is the HTTP Orders Server Name Flag HTTPOrdersServerNameFlag string = "http-orders-server-name" // HTTPPrimeServerNameFlag is the HTTP GHC Prime Server Name Flag HTTPPrimeServerNameFlag string = "http-prime-server-name" // HTTPMyServerNameLocal is the HTTP My Server Name for Local HTTPMyServerNameLocal string = "milmovelocal" // HTTPOfficeServerNameLocal is the HTTP Office Server Name for Local HTTPOfficeServerNameLocal string = "officelocal" // HTTPAdminServerNameLocal is the HTTP Admin Server Name for Local HTTPAdminServerNameLocal string = "adminlocal" // HTTPOrdersServerNameLocal is the HTTP Orders Server Name for Local HTTPOrdersServerNameLocal string = "orderslocal" // HTTPPrimeServerNameLocal is the HTTP GHC Prime Server Name for Local HTTPPrimeServerNameLocal string = "primelocal" )
const ( // IWSRBSHostFlag is the IWS RBS Host Flag IWSRBSHostFlag string = "iws-rbs-host" // IWSRBSEnabledFlag is the IWS RBS Enabled Flag IWSRBSEnabledFlag string = "iws-rbs-enabled" )
const ( // MutualTLSListenerFlag is the Mutual TLS Listener Flag MutualTLSListenerFlag string = "mutual-tls-enabled" // TLSListenerFlag is the TLS Listener Flag TLSListenerFlag string = "tls-enabled" // NoTLSListenerFlag is the No TLS Listener Flag NoTLSListenerFlag string = "no-tls-enabled" // HealthListenerFlag is whether a special listener for health // checks should be enabled HealthListenerFlag string = "health-server-enabled" )
const ( // LoggingEnvFlag is the logging environment flag LoggingEnvFlag string = "logging-env" // LogTaskMetadataFlag is the Log Task Metadata Flag LogTaskMetadataFlag string = "log-task-metadata" // LoggingLevelFlag is the flag that defines the logging level // Possible values are: fatal, error, warn, info, debug // The env var value is not case-sensitive. This works: // export LOGGING_LEVEL=INFO LoggingLevelFlag string = "logging-level" // StacktraceLengthFlag is the flag that defines the number of lines to // print in a stack trace // Example: export STACKTRACE_LENGTH=10 StacktraceLengthFlag string = "stacktrace-length" // LoggingEnvProduction is the production logging environment LoggingEnvProduction string = "production" // LoggingEnvDevelopment is the development logging environment LoggingEnvDevelopment string = "development" // LoggingLevelFatal is the fatal logging level LoggingLevelFatal string = "fatal" // LoggingLevelError is the error logging level LoggingLevelError string = "error" // LoggingLevelWarn is the warn logging level LoggingLevelWarn string = "warn" // LoggingLevelInfo is the info logging level LoggingLevelInfo string = "info" // LoggingLevelDebug is the debug logging level LoggingLevelDebug string = "debug" )
const ( // MaxBodySizeFlag is the maximum body size for requests MaxBodySizeFlag string = "max-body-size" // MaxBodySizeDefault is 20 mb MaxBodySizeDefault int64 = 200 * 1000 * 1000 )
const ( // MigrationManifestFlag is the migration manifest flag MigrationManifestFlag string = "migration-manifest" // MigrationWaitFlag is the migration wait flag MigrationWaitFlag string = "migration-wait" )
const ( // MigrationVersionFlag is the migration version flag MigrationVersionFlag string = "version" // MigrationNameFlag is the migration name flag MigrationNameFlag string = "name" // MigrationTypeFlag is the migration manifest flag MigrationTypeFlag string = "type" // VersionTimeFormat is the Go time format for creating a version number. VersionTimeFormat string = "20060102150405" )
const ( // MutualTLSPortFlag is the Mutual TLS Port Flag MutualTLSPortFlag string = "mutual-tls-port" // TLSPortFlag is the TLS Port Flag TLSPortFlag string = "tls-port" // NoTLSPortFlag is the No TLS Port Flag NoTLSPortFlag string = "no-tls-port" // HealthPortFlag is the port that the health listener uses HealthPortFlag = "health-port" // MutualTLSPort is the default port for mTLS traffic MutualTLSPort int = 9443 // TLSPort is the default port for TLS traffic TLSPort int = 8443 // NoTLSPort is the default port in develompent for HTTP traffic NoTLSPort int = 8080 // HealthPort is the default port for the health listener HealthPort int = 8765 )
const ( // RedisPasswordFlag is the ENV var for the Redis password RedisPasswordFlag string = "redis-password" // RedisHostFlag is the ENV var for the Redis hostname RedisHostFlag string = "redis-host" // RedisPortFlag is the ENV var for the Redis port RedisPortFlag string = "redis-port" // RedisDBNameFlag is the ENV var for the Redis database name, which // is represented by a positive integer. Using multiple databases in // the same Redis instance allows separating concerns. RedisDBNameFlag string = "redis-db-name" // RedisConnectTimeoutFlag specifies how long to wait to establish a // connection to the Redis instance RedisConnectTimeoutFlag string = "redis-connect-timeout-in-seconds" // RedisEnabledFlag specifies whether or not we attempt to connect // to Redis. For example, apps that use mTLS don't need Redis. RedisEnabledFlag string = "redis-enabled" // RedisSSLEnabledFlag specifies if SSL mode is enabled for connections RedisSSLEnabledFlag string = "redis-ssl-enabled" // RedisMaxIdleFlag specifies the maximum number of idle connections in the pool RedisMaxIdleFlag string = "redis-max-idle" // RedisIdleTimeoutFlag Closes connections after this duration RedisIdleTimeoutFlag string = "redis-idle-timeout" )
const ( // HEREMapsGeocodeEndpointFlag is the HERE Maps Geocode Endpoint Flag HEREMapsGeocodeEndpointFlag string = "here-maps-geocode-endpoint" // HEREMapsRoutingEndpointFlag is the HERE Maps Routing Endpoint Flag HEREMapsRoutingEndpointFlag string = "here-maps-routing-endpoint" // HEREMapsAppIDFlag is the HERE Maps App ID Flag HEREMapsAppIDFlag string = "here-maps-app-id" // HEREMapsAppCodeFlag is the HERE Maps App Code Flag HEREMapsAppCodeFlag string = "here-maps-app-code" // DTODApiUsernameFlag is the DTOD API Username Flag DTODApiUsernameFlag string = "dtod-api-username" // DTODApiPasswordFlag is the DTOD API Password Flag DTODApiPasswordFlag string = "dtod-api-password" // DTODApiURLFlag is the DTOD API URL Flag DTODApiURLFlag string = "dtod-api-url" // DTODApiWSDLFlag is the DTOD API WSDL Flag DTODApiWSDLFlag string = "dtod-api-wsdl" // DTODUseMockFlag is the DTOD Use Mock Flag DTODUseMockFlag string = "dtod-use-mock" )
const ( // ServeAdminFlag is the admin service flag ServeAdminFlag string = "serve-admin" // ServeOrdersFlag is the orders service flag ServeOrdersFlag string = "serve-orders" // ServeAPIInternalFlag is the internal api service flag ServeAPIInternalFlag string = "serve-api-internal" // ServeGHCFlag is the ghc api service flag ServeGHCFlag string = "serve-api-ghc" // ServePrimeFlag is the prime api flag ServePrimeFlag string = "serve-api-prime" // ServeSupportFlag is the support api flag ServeSupportFlag string = "serve-api-support" // ServePrimeSimulatorFlag is the prime simulator api flag ServePrimeSimulatorFlag string = "serve-prime-simulator" // ServeClientCollectorFlag enables the endpoints to collect client // telemetry and logs ServeClientCollectorFlag string = "serve-client-collector" )
const ( // SessionIdleTimeoutInMinutesFlag sets the session's Idle Timeout in minutes SessionIdleTimeoutInMinutesFlag string = "session-idle-timeout-in-minutes" // SessionLifetimeInHoursFlag sets the session's absolute expiry in hours SessionLifetimeInHoursFlag string = "session-lifetime-in-hours" )
const ( // StorageBackendFlag is the Storage Backend Flag StorageBackendFlag string = "storage-backend" // LocalStorageRootFlag is the Local Storage Root Flag LocalStorageRootFlag string = "local-storage-root" // LocalStorageWebRootFlag is the Local Storage WebRoot Flag LocalStorageWebRootFlag string = "local-storage-web-root" // AWSS3BucketNameFlag is the AWS S3 Bucket Name Flag AWSS3BucketNameFlag string = "aws-s3-bucket-name" // AWSS3RegionFlag is the AWS S3 Region Flag AWSS3RegionFlag string = "aws-s3-region" // AWSS3KeyNamespaceFlag is the AWS S3 Key Namespace Flag AWSS3KeyNamespaceFlag string = "aws-s3-key-namespace" )
const ( // SwaggerFlag is the Public Swagger Flag SwaggerFlag string = "swagger" // InternalSwaggerFlag is the Internal Swagger Flag InternalSwaggerFlag string = "internal-swagger" // OrdersSwaggerFlag is the Orders Swagger Flag OrdersSwaggerFlag string = "orders-swagger" // AdminSwaggerFlag is the Admin Swagger Flag AdminSwaggerFlag string = "admin-swagger" // GHCSwaggerFlag is the GHC Swagger Flag GHCSwaggerFlag string = "ghc-swagger" // PrimeSwaggerFlag is the Prime Swagger Flag PrimeSwaggerFlag string = "prime-swagger" // PrimeV2SwaggerFlag is the Prime V2 Swagger Flag PrimeV2SwaggerFlag string = "prime-v2-swagger" // ServeSwaggerUIFlag is the Serve Swagger UI Flag ServeSwaggerUIFlag string = "serve-swagger-ui" // SupportSwaggerFlag is the Support Swagger Flag SupportSwaggerFlag string = "support-swagger" )
const ( // TelemetryEnabledFlag is the Trace Enable Flag TelemetryEnabledFlag string = "telemetry-enabled" // TelemetryEndpointFlag configures the endpoint used for open // telemetry tracing TelemetryEndpointFlag string = "telemetry-endpoint" // TelemetryUseXrayIDFlag enables using AWS Xray Trace IDs for open telemetry TelemetryUseXrayIDFlag string = "telemetry-use-xray-id" // TelemetrySamplingFractionFlag configures the percent of traces to sample TelemetrySamplingFractionFlag string = "telemetry-sampling-fraction" // TelemetryCollectSecondsFlag configures the metric collection // period in seconds TelemetryCollectSecondsFlag string = "telemetry-collect-seconds" // TelemetryReadEventsEnabledFlag enables read events TelemetryReadEventsEnabledFlag string = "telemetry-read-events-enabled" // TelemetryWriteEventsEnabledFlag enables write events TelemetryWriteEventsEnabledFlag string = "telemetry-write-events-enabled" )
const ( // InterfaceFlag is the Interface Flag InterfaceFlag string = "interface" // GracefulShutdownTimeoutFlag is the Graceful Shutdown Timeout Flag GracefulShutdownTimeoutFlag string = "graceful-shutdown-timeout" // DefaultGracefulShutdownDuration The default graceful shutdown duration DefaultGracefulShutdownDuration = time.Second * 25 // MinimumGracefulShutdownDuration The minimum graceful shutdown duration MinimumGracefulShutdownDuration = time.Second * 5 )
const ( // CSRFAuthKeyFlag is the CSRF Auth Key Flag CSRFAuthKeyFlag string = "csrf-auth-key" )
const ( //DebugPProfFlag enables the pprof debugging endpoints DebugPProfFlag string = "debug-pprof" )
const ( // DevlocalAuthFlag is the Devlocal Auth Flag DevlocalAuthFlag string = "devlocal-auth" )
const ( // MigrationGenPathFlag is the migration path flag used for generating new migrations MigrationGenPathFlag string = "migration-gen-path" )
const ( // MigrationPathFlag is the migration path flag used for finding files to migrate the DB MigrationPathFlag string = "migration-path" )
Variables ¶
This section is empty.
Functions ¶
func CACStoreLogin ¶
CACStoreLogin login to existing CAC store Call 'defer store.Close()' after retrieving the store
func CheckAWSRegion ¶
CheckAWSRegion validates the AWS Region command line flags
func CheckBuild ¶
CheckBuild validates the build command line flags
func CheckDatabase ¶
CheckDatabase validates DB command line flags
func CheckDatabaseRetry ¶
CheckDatabaseRetry validates Database Retry command line flags
func CheckDebugFlags ¶
CheckDebugFlags validates command line flags
func CheckDevlocal ¶
CheckDevlocal validates the Devlocal command line flags
func CheckEmail ¶
CheckEmail validates Email command line flags
func CheckEntrustCert ¶
CheckEntrustCert validates Cert command line flags
func CheckEnvironment ¶
CheckEnvironment validates the Environment command line flags
func CheckFeatureFlag ¶
CheckFeatureFlag validates the URL
func CheckGEXSFTP ¶
CheckGEXSFTP validates GEX SFTP command line flags
func CheckHosts ¶
CheckHosts validates the Hosts command line flags
func CheckListeners ¶
CheckListeners validates the Listener command line flags
func CheckLogging ¶
CheckLogging validates logging command line flags
func CheckMiddleWare ¶
CheckMiddleWare validates middleware command line flags
func CheckMigration ¶
CheckMigration validates migration command line flags
func CheckMigrationFile ¶
CheckMigrationFile validates migration command line flags
func CheckMigrationGenPath ¶
CheckMigrationGenPath validates migration command line flags
func CheckMigrationPath ¶
CheckMigrationPath validates migration command line flags
func CheckOutboundIP ¶
CheckOutboundIP checks outbound IP for logging purposes
func CheckPorts ¶
CheckPorts validates the Port command line flags
func CheckRedis ¶
CheckRedis validates Redis command line flags
func CheckRoute ¶
CheckRoute validates Route command line flags
func CheckServices ¶
CheckServices validates these lovely service flags
func CheckSession ¶
CheckSession validates session command line flags
func CheckStorage ¶
CheckStorage validates Storage command line flags
func CheckSwagger ¶
CheckSwagger validates Swagger command line flags
func CheckTelemetry ¶
CheckTelemetry validates the telemetry config
func CheckWebserver ¶
CheckWebserver validates the webserver command line flags
func GetCACStore ¶
GetCACStore retrieves the CAC store Call 'defer store.Close()' after retrieving the store
func InitAWSFlags ¶
InitAWSFlags initializes AWS command line flags
func InitAuthFlags ¶
InitAuthFlags initializes Auth command line flags
func InitBuildFlags ¶
InitBuildFlags initializes the build command line flags
func InitCSRFFlags ¶
InitCSRFFlags initializes CSRF command line flags
func InitCertFlags ¶
InitCertFlags initializes the Certificate Flags
func InitDatabase ¶
InitDatabase initializes a Pop connection from command line flags. v is the viper Configuration. creds must relate to an assumed role and can't point to a user or task role directly. logger is the application logger.
func InitDatabaseFlags ¶
InitDatabaseFlags initializes DB command line flags
func InitDatabaseRetryFlags ¶
InitDatabaseRetryFlags initializes Database Retry command line flags
func InitDebugFlags ¶
InitDebugFlags initializes the Debug command line flags
func InitDevlocalFlags ¶
InitDevlocalFlags initializes the Devlocal command line flags
func InitEIAFlags ¶
InitEIAFlags initializes EIA command line flags
func InitEmailFlags ¶
InitEmailFlags initializes Email command line flags
func InitEntrustCertFlags ¶
InitEntrustCertFlags initializes the Certificate Flags
func InitEnvironmentFlags ¶
InitEnvironmentFlags initializes the Environment command line flags
func InitGEXFlags ¶
InitGEXFlags initializes GEX command line flags
func InitGEXSFTP ¶
InitGEXSFTP initializes a GEX SFTP client from command line flags.
func InitGEXSFTPFlags ¶
InitGEXSFTPFlags initializes GEX SFTP command line flags
func InitGEXSSH ¶
InitGEXSSH initializes a GEX SSH client from command line flags.
func InitHostFlags ¶
InitHostFlags initializes the Hosts command line flags
func InitIWSFlags ¶
InitIWSFlags initializes CSRF command line flags
func InitListenerFlags ¶
InitListenerFlags initializes Listener command line flags
func InitLoggingFlags ¶
InitLoggingFlags initializes the logging command line flags
func InitMiddlewareFlags ¶
InitMiddlewareFlags initializes the Middleware command line flags
func InitMigrationFileFlags ¶
InitMigrationFileFlags initializes the Migration command line flags
func InitMigrationFlags ¶
InitMigrationFlags initializes the Migration command line flags
func InitMigrationGenPathFlags ¶
InitMigrationGenPathFlags initializes the Migration command line flags
func InitMigrationPathFlags ¶
InitMigrationPathFlags initializes the Migration command line flags
func InitPortFlags ¶
InitPortFlags initializes Port command line flags
func InitRedis ¶
func InitRedis(appCtx appcontext.AppContext, v *viper.Viper) (*redis.Pool, error)
InitRedis initializes a Redis pool from command line flags. v is the viper Configuration. logger is the application logger.
func InitRedisFlags ¶
InitRedisFlags initializes RedisFlags command line flags
func InitRouteFlags ¶
InitRouteFlags initializes Route command line flags
func InitServiceFlags ¶
InitServiceFlags initializes the service command line flags
func InitSessionFlags ¶
InitSessionFlags initializes SessionFlags command line flags
func InitStorageFlags ¶
InitStorageFlags initializes Storage command line flags
func InitSwaggerFlags ¶
InitSwaggerFlags initializes the Swagger command line flags
func InitTelemetryFlags ¶
InitTelemetryFlags initializes the open telemetry flags
func InitWebserverFlags ¶
InitWebserverFlags initializes the webserver command line flags
func LogLevelIsDebug ¶
LogLevelIsDebug is a helper for functions that require a boolean to determine log verbosity
func ParseCertificates ¶
ParseCertificates takes a certificate and parses it into an slice of individual certificates
func ParsePrivateKey ¶
ParsePrivateKey takes a private key and parses it into an slice of individual keys
func PingPopConnection ¶
func PingPopConnection(c *pop.Connection, logger *zap.Logger) error
PingPopConnection pings the database and returns an error if it is not reachable
func ValidateHost ¶
ValidateHost validates a Hostname passed in from the command line
func ValidatePort ¶
ValidatePort validates a Port passed in from the command line
func ValidateProtocol ¶
ValidateProtocol validates a Protocol passed in from the command line
func ValidateSessionLifetime ¶
ValidateSessionLifetime validates session lifetime
func ValidateSessionTimeout ¶
ValidateSessionTimeout validates session idle timeout
func ValidateStacktraceLength ¶
ValidateStacktraceLength validates STACKTRACE_LENGTH is an integer between 1 and 50
Types ¶
type ErrInvalidLabel ¶
ErrInvalidLabel is an invalid label error
type ErrInvalidPKCS7 ¶
type ErrInvalidPKCS7 struct {
Path string
}
ErrInvalidPKCS7 is an Invalid PKCS7 error
type ErrInvalidPath ¶
type ErrInvalidPath struct {
Path string
}
ErrInvalidPath is an invalid path error
type FeatureFlagConfig ¶
func GetFliptFetcherConfig ¶
func GetFliptFetcherConfig(v *viper.Viper) FeatureFlagConfig
Source Files ¶
- auth.go
- aws.go
- build.go
- cac.go
- certs.go
- certs_entrust.go
- cli.go
- csrf.go
- dbconn.go
- dbconn_retry.go
- debug.go
- devlocal.go
- eia.go
- email.go
- environment.go
- feature_flag.go
- gex.go
- gex_sftp.go
- hosts.go
- iws.go
- listeners.go
- logging.go
- middleware.go
- migration.go
- migration_file.go
- migration_gen_path.go
- migration_path.go
- ports.go
- redis.go
- route.go
- services.go
- session.go
- storage.go
- swagger.go
- telemetry.go
- webserver.go