Documentation
¶
Overview ¶
Package localenv generates passwords and reads and writes .env.local, the file that holds the secrets of a workspace.
Index ¶
Constants ¶
View Source
const ( AdminUserKey = "OPENARCH_ADMIN_USER" AdminPasswordKey = "OPENARCH_ADMIN_PASSWORD" MongoRootPasswordKey = "MONGODB_ROOT_PASSWORD" MongoAppPasswordKey = "MONGODB_APP_PASSWORD" MongoAppURIKey = "MONGODB_APP_URI" OpenSearchAdminPasswordKey = "OPENSEARCH_ADMIN_PASSWORD" OpenSearchAppPasswordKey = "OPENSEARCH_APP_PASSWORD" DashboardsPasswordKey = "OPENSEARCH_DASHBOARDS_PASSWORD" )
Keys in .env.local. Docker Compose reads them as secret sources.
View Source
const ( MongoRootUser = "root" MongoAppUser = "openarch" MongoAppDB = "openarch" OpenSearchAdminUser = "admin" OpenSearchAppUser = "openarch" // The OpenSearch security plugin gives the Dashboards server rights only to // the user named in its server_username setting, which defaults to kibanaserver. DashboardsUser = "kibanaserver" )
Users that the CLI creates in MongoDB and OpenSearch.
View Source
const File = ".env.local"
File is the name of the secrets file in a workspace.
View Source
const PasswordLength = 24
PasswordLength is the length of generated passwords.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Env ¶
type Env struct {
AdminUser string
AdminPassword string
MongoRootPassword string
MongoAppPassword string
OpenSearchAdminPassword string
OpenSearchAppPassword string
DashboardsPassword string
}
Env is the content of .env.local.
func (*Env) Fill ¶
Fill sets every empty value: the admin user to adminUser and the passwords to new random ones. It returns the keys it set.
func (Env) MongoAppURI ¶
MongoAppURI is the MongoDB connection string of OpenArch.
Click to show internal directories.
Click to hide internal directories.