config

package
v0.1.0-alpha.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAuthToken

func GetAuthToken() string

GetAuthToken returns the authentication token or an empty string if not set

Types

type Config

type Config struct {
	APIEndpoints map[Environment]string
}

Config holds all configuration values

func GetConfig

func GetConfig() *Config

GetConfig returns a singleton instance of Config

func (*Config) GetAPIEndpoint

func (c *Config) GetAPIEndpoint(env Environment) string

GetAPIEndpoint returns the appropriate API endpoint for the given environment

type Environment

type Environment string

Environment represents different deployment environments

const (
	Production Environment = "production"
	Staging    Environment = "staging"
)

func ValidateEnvironment

func ValidateEnvironment(env string) (Environment, bool)

ValidateEnvironment checks if the provided environment string is valid

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL