# Functions
AddContext adds the context to the sqlconfig file, and returns the context name, which maybe uniquified, if the passed in name already exists.
AddContextWithContainer adds a new context to the application's configuration with the given parameters.
AddEndpoint adds a new endpoint to the application's configuration with the given parameters.
AddUser adds a new user to the configuration.
Clean resets the application's configuration by setting the Users, Contexts, and Endpoints fields to nil, the CurrentContext field to an empty string, and saving the updated configuration.
This function gets the container ID of the current context's endpoint.
ContextExists returns whether a context with the given name exists in the configuration.
CurrentContext returns the current context's endpoint and user from the configuration.
CurrentContextEndpointHasContainer() checks if the current context endpoint has a container.
CurrentContextName returns the name of the current context in the configuration.
DefaultFileName returns the default filename for the file that the application reads from and writes to.
DeleteContext removes the context with the given name from the application's configuration.
DeleteEndpoint removes the endpoint with the given name from the application's configuration.
DeleteUser removes a user from the configuration by their name.
EndpointExists returns whether an endpoint with the given name exists in the configuration.
EndpointNameExists returns whether an endpoint with the given name exists in the configuration.
EndpointsExists returns whether there are any endpoints in the configuration.
FindFreePortForTds is used to find a free port number to use for the TDS protocol.
FindUniqueContextName finds a unique context name, that is both a unique context name, but also a unique sa@context name.
FindUniqueEndpointName returns a unique name for an endpoint with the given name.
FindUniqueUserName generates a unique user name based on the given name.
GetConfigFileUsed returns the path to the configuration file used by the Viper library.
GetContext retrieves a context from the configuration by its name.
GetCurrentContextInfo returns endpoint and basic auth info associated with current context.
GetCurrentContextOrFatal returns the name of the current context in the configuration or panics if it is not set.
GetEndpoint returns the endpoint with the given name from the configuration.
GetUser retrieves a user from the configuration by their name.
Initialize sets the callback functions used by the config package.
IsEmpty returns a boolean indicating whether the application's configuration is empty.
Load loads the configuration from the file specified by the SetFileName() function.
OutputContexts outputs the list of contexts in the configuration.
OutputEndpoints outputs the list of endpoints in the configuration in a specified format.
OutputUsers outputs the list of users in the configuration.
RedactedConfig function returns a Sqlconfig struct with the Users field having their BasicAuth password field either replaced with the decrypted password or the string "REDACTED", depending on the value of the raw parameter.
RemoveCurrentContext removes the current context from the configuration.
Save marshals the current configuration object and saves it to the configuration file previously specified by the SetFileName variable.
SetCurrentContextName sets the current context in the configuration to the given name.
SetFileName sets the filename for the file that the application reads from and writes to.
No description provided by the author
UserExists checks if the current context has a 'user', e.g.
UserNameExists checks if a user with the given name exists in the configuration.