Package opensearch provides a Go client for OpenSearch. Create the client with the NewDefaultClient function: The OPENSEARCH_URL/ELASTICSEARCH_URL environment variable is used instead of the default URL, when set. Use a comma to separate multiple URLs. It is an error to set both environment variable. To configure the client, pass a Config object to the NewClient function: See the opensearch_integration_test.go file for more information. Call the OpenSearch APIs by invoking the corresponding methods on the client: See the github.com/opensearch-project/opensearch-go/opensearchapi package for more information about using the API. See the github.com/opensearch-project/opensearch-go/opensearchtransport package for more information about configuring the transport.
Package envdeb provides a simple way to load environment variables from .env files into the application.
Package tl provides a unified API for opening a command in a new terminal window, tab, or pane across multiple terminal emulators and multiplexers. Quick start: The terminal is auto-detected from environment variables. If the requested target type (e.g. a pane split) is not supported, the library falls back gracefully to the next best option.
Package xenv provides functionality to load environment variables into struct fields.
Package goconfy provides a strongly typed, strict, and secure YAML configuration loader for Go. It is designed to be a complete configuration pipeline, handling everything from parsing to validation and secret redaction. The Load function executes the following pipeline: goConfy supports two types of macros that are expanded within YAML scalar values: Macros must match the pattern exactly. If a key or file is missing and no default is provided, the expansion will result in an error. Use WithEnvPrefix to automatically prefix environment keys. When [.env] loading is enabled via WithDotEnvEnabled or WithDotEnvFile, goConfy builds a lookup chain for environment macros. By default, the OS environment takes precedence over [.env] file values. This can be reversed using WithDotEnvOSPrecedence. Profiles allow you to define environment-specific overrides within the same YAML file. If enabled, the loader looks for a top-level "profiles" key. The active profile is selected via environment variable (default: APP_PROFILE) or WithProfile. In this case, if the "prod" profile is active, the final port value will be 80. Failures in the pipeline return a FieldError, which contains information about the phase ([Layer]), the dot-path to the field ([Path]), and the line/column numbers in the YAML source. Multiple errors may be returned as a MultiError.
Package envdbar provides a simple way to load environment variables from .env files into the application.
envdoc is a tool to generate documentation for environment variables from a Go source file.
Package envconf loads configuration structs from environment variables.
Package envconf loads configuration structs from environment variables.
Package genv is a library for Go (golang) that makes it easy to read and use environment variables in your projects.
Package envvalidator provides declarative environment variable validation, type coercion, default value assignment, and machine-readable schema documentation for Go applications.
Package envvalidator provides a powerful, type-safe way to load and validate environment variables into Go structs.
Package setfromenv is a library which sets unset flags from environment variables.
Package mapstructenv provides a decode hook function that replaces the raw value with an environment variable value under the same key.
Package envx provides a simple way to load environment variables into a struct.
Package b2 provides an idiomatic, efficient interface to Backblaze B2 Cloud Storage. Uploads to B2 require a SHA1 header, so the hash of the file must be known before the upload starts. The (*Bucket).Upload API tries its best not to buffer the entire file in memory, and it will avoid it if passed either a bytes.Buffer or a io.ReadSeeker. If you know the SHA1 and the length of the file in advance, you can use (*Bucket).UploadWithSHA1 but you are responsible for retrying on transient errors. Downloads from B2 are simple GETs, so if you want more control than the standard functions you can build your own URL according to the API docs. All the information you need is returned by Client.LoginInfo(). There is no first-class support for versions in this library, but most behaviors are transparently exposed. Upload can be used multiple times with the same name, ListFiles will only return the latest version of non-hidden files, and ListFilesVersions will return all files and versions. Large files (b2_*_large_file, b2_*_part), b2_get_download_authorization, b2_hide_file, b2_update_bucket. If the B2_DEBUG environment variable is set to 1, all API calls will be logged. On Go 1.7 and later, it will also log when new (non-reused) connections are established.
Package vipercommand provides a Command type that, like simplecommand.Command, satisfies the simplecobra.Commander interface but also allows command line flags to be set from environment variables and a configuration file via viper.
Package envcfg provides helpers for reading values from environment variables (or a map[string]string), converting them to Go types, and setting their values to fields on a user-defined struct.
Package dotenv provides simple utilities to load environment variables from local files.
Package reader provides a Go client library for the Readwise Reader API. This package allows you to interact with Readwise Reader's API to manage your saved documents, articles, and reading list. Basic usage: Authentication: You need a Readwise Reader API token to use this package. You can get one from https://readwise.io/reader_api Set your token as an environment variable:
Package envconfig implements decoding of environment variables based on a user defined specification.
Package envload provides a lightweight, zero-dependency solution for loading environment variables from .env files into Go structs with type-safe parsing.
Package gotenv provides functionality to dynamically load the environment variables
Package gotenv provides functionality to dynamically load the environment variables
Package gotenv provides functionality to dynamically load the environment variables
Package gotenv provides functionality to dynamically load the environment variables
Package env is a simple, zero-dependencies library to parse environment variables into structs.
Package envconfig provides generic environment variable handling and configuration loading utilities that can be used across different Go projects.
Package env is a lightweight library for loading OS environment variables into structs.
Package goconfig loads configuration values into Go structs from three sources: JSON config files, environment variables and command-line flags.
Package conflata loads configuration structs by reading environment variables first and falling back to external secret providers such as AWS Secrets Manager, AWS Systems Manager Parameter Store, HashiCorp Vault, or Google Secret Manager.
Package env is a simple, zero-dependencies library to parse environment variables into structs.
Package datastore provides a client for Google Cloud Datastore. See https://godoc.org/cloud.google.com/go for authentication, timeouts, connection pooling and similar aspects of this package. Entities are the unit of storage and are associated with a key. A key consists of an optional parent key, a string application ID, a string kind (also known as an entity type), and either a StringID or an IntID. A StringID is also known as an entity name or key name. It is valid to create a key with a zero StringID and a zero IntID; this is called an incomplete key, and does not refer to any saved entity. Putting an entity into the datastore under an incomplete key will cause a unique key to be generated for that entity, with a non-zero IntID. An entity's contents are a mapping from case-sensitive field names to values. Valid value types are: Slices of structs are valid, as are structs that contain slices. The Get and Put functions load and save an entity's contents. An entity's contents are typically represented by a struct pointer. Example code: GetMulti, PutMulti and DeleteMulti are batch versions of the Get, Put and Delete functions. They take a []*Key instead of a *Key, and may return a datastore.MultiError when encountering partial failure. Mutate generalizes PutMulti and DeleteMulti to a sequence of any Datastore mutations. It takes a series of mutations created with NewInsert, NewUpdate, NewUpsert and NewDelete and applies them atomically. An entity's contents can be represented by a variety of types. These are typically struct pointers, but can also be any type that implements the PropertyLoadSaver interface. If using a struct pointer, you do not have to explicitly implement the PropertyLoadSaver interface; the datastore will automatically convert via reflection. If a struct pointer does implement PropertyLoadSaver then those methods will be used in preference to the default behavior for struct pointers. Struct pointers are more strongly typed and are easier to use; PropertyLoadSavers are more flexible. The actual types passed do not have to match between Get and Put calls or even across different calls to datastore. It is valid to put a *PropertyList and get that same entity as a *myStruct, or put a *myStruct0 and get a *myStruct1. Conceptually, any entity is saved as a sequence of properties, and is loaded into the destination value on a property-by-property basis. When loading into a struct pointer, an entity that cannot be completely represented (such as a missing field) will result in an ErrFieldMismatch error but it is up to the caller whether this error is fatal, recoverable or ignorable. By default, for struct pointers, all properties are potentially indexed, and the property name is the same as the field name (and hence must start with an upper case letter). Fields may have a `datastore:"name,options"` tag. The tag name is the property name, which must be one or more valid Go identifiers joined by ".", but may start with a lower case letter. An empty tag name means to just use the field name. A "-" tag name means that the datastore will ignore that field. The only valid options are "omitempty", "noindex" and "flatten". If the options include "omitempty" and the value of the field is a zero value, then the field will be omitted on Save. Zero values are best defined in the golang spec (https://golang.org/ref/spec#The_zero_value). Struct field values will never be empty, except for nil pointers. If options include "noindex" then the field will not be indexed. All fields are indexed by default. Strings or byte slices longer than 1500 bytes cannot be indexed; fields used to store long strings and byte slices must be tagged with "noindex" or they will cause Put operations to fail. For a nested struct field, the options may also include "flatten". This indicates that the immediate fields and any nested substruct fields of the nested struct should be flattened. See below for examples. To use multiple options together, separate them by a comma. The order does not matter. If the options is "" then the comma may be omitted. Example code: A field of slice type corresponds to a Datastore array property, except for []byte, which corresponds to a Datastore blob. Zero-length slice fields are not saved. Slice fields of length 1 or greater are saved as Datastore arrays. When a zero-length Datastore array is loaded into a slice field, the slice field remains unchanged. If a non-array value is loaded into a slice field, the result will be a slice with one element, containing the value. Loading a Datastore Null into a basic type (int, float, etc.) results in a zero value. Loading a Null into a slice of basic type results in a slice of size 1 containing the zero value. Loading a Null into a pointer field results in nil. Loading a Null into a field of struct type is an error. A struct field can be a pointer to a signed integer, floating-point number, string or bool. Putting a non-nil pointer will store its dereferenced value. Putting a nil pointer will store a Datastore Null property, unless the field is marked omitempty, in which case no property will be stored. Loading a Null into a pointer field sets the pointer to nil. Loading any other value allocates new storage with the value, and sets the field to point to it. If the struct contains a *datastore.Key field tagged with the name "__key__", its value will be ignored on Put. When reading the Entity back into the Go struct, the field will be populated with the *datastore.Key value used to query for the Entity. Example code: If the struct pointed to contains other structs, then the nested or embedded structs are themselves saved as Entity values. For example, given these definitions: then an Outer would have one property, Inner, encoded as an Entity value. If an outer struct is tagged "noindex" then all of its implicit flattened fields are effectively "noindex". If the Inner struct contains a *Key field with the name "__key__", like so: then the value of K will be used as the Key for Inner, represented as an Entity value in datastore. If any nested struct fields should be flattened, instead of encoded as Entity values, the nested struct field should be tagged with the "flatten" option. For example, given the following: an Outer's properties would be equivalent to those of: Note that the "flatten" option cannot be used for Entity value fields. The server will reject any dotted field names for an Entity value. An entity's contents can also be represented by any type that implements the PropertyLoadSaver interface. This type may be a struct pointer, but it does not have to be. The datastore package will call Load when getting the entity's contents, and Save when putting the entity's contents. Possible uses include deriving non-stored fields, verifying fields, or indexing a field only if its value is positive. Example code: The *PropertyList type implements PropertyLoadSaver, and can therefore hold an arbitrary entity's contents. If a type implements the PropertyLoadSaver interface, it may also want to implement the KeyLoader interface. The KeyLoader interface exists to allow implementations of PropertyLoadSaver to also load an Entity's Key into the Go type. This type may be a struct pointer, but it does not have to be. The datastore package will call LoadKey when getting the entity's contents, after calling Load. Example code: To load a Key into a struct which does not implement the PropertyLoadSaver interface, see the "Key Field" section above. Queries retrieve entities based on their properties or key's ancestry. Running a query yields an iterator of results: either keys or (key, entity) pairs. Queries are re-usable and it is safe to call Query.Run from concurrent goroutines. Iterators are not safe for concurrent use. Queries are immutable, and are either created by calling NewQuery, or derived from an existing query by calling a method like Filter or Order that returns a new query value. A query is typically constructed by calling NewQuery followed by a chain of zero or more such methods. These methods are: Example code: Client.RunInTransaction runs a function in a transaction. Example code: Pass the ReadOnly option to RunInTransaction if your transaction is used only for Get, GetMulti or queries. Read-only transactions are more efficient. This package supports the Cloud Datastore emulator, which is useful for testing and development. Environment variables are used to indicate that datastore traffic should be directed to the emulator instead of the production Datastore service. To install and set up the emulator and its environment variables, see the documentation at https://cloud.google.com/datastore/docs/tools/datastore-emulator.
Package client is a Go client for the Docker Engine API. For more information about the Engine API, see the documentation: https://docs.docker.com/reference/api/engine/ You use the library by constructing a client object using NewClientWithOpts and calling methods on it. The client can be configured from environment variables by passing the FromEnv option, or configured manually by passing any of the other available [Opts]. For example, to list running containers (the equivalent of "docker ps"):
Package flagenv provides the ability to populate flags from environment variables.
Package config provides flexible access to config variables by priority: flags - HI, environment variables - MID, default values defined with a struct field tags - LOW
Package envconfig implements decoding of environment variables based on a user defined specification.
Package cfg provides configuration loading with environment variable override.
Package envcfg provides a production-grade Go library for type-safe environment variable resolution with context-aware loading, parallel provider support, and comprehensive validation.
Package dotenv provides functionality to load environment variables from .env files.
Package envh provides convenient helpers to manage easily your environment variables.
Package ocep creates a common.ConfigurationProvider which reads the configuration specified by [oci-cli environment variables].