Documentation
¶
Overview ¶
Package helper provides utility functions for loading and managing environment variables required for Appwrite client configuration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // AppwriteEndpointURL is the Appwrite server endpoint URL AppwriteEndpointURL string // AppwriteProjectID is the Appwrite project identifier AppwriteProjectID string // AppwriteRESDEFAPIKey is the API key used for resource definition operations AppwriteRESDEFAPIKey string )
Global variables that store Appwrite configuration loaded from environment variables. These are populated by calling Envvars() and should not be modified directly.
Functions ¶
func Envvars ¶
func Envvars()
Envvars loads environment variables from the .env.local file and populates the global configuration variables required for Appwrite client initialisation.
This function reads the following environment variables:
- NEXT_PUBLIC_APPWRITE_ENDPOINT: The Appwrite server endpoint URL
- NEXT_PUBLIC_APPWRITE_PROJECT: The Appwrite project ID
- APPWRITE_API_KEY_RESDEF: The API key with appropriate permissions
The function will terminate the program with log.Fatalf if the .env.local file cannot be loaded. Ensure the file exists in the current working directory and contains all required environment variables.
This function is typically called automatically by appres.Utils() and should not need to be called directly by users of the appres package.
Types ¶
This section is empty.