Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Env ¶
type Env string
Env represents the environment.
const ( // EnvPre represents the pre environment. EnvPre Env = "pre" // EnvGray represents the gray environment. EnvGray Env = "gray" // EnvProd represents the production environment. EnvProd Env = "prod" // EnvDev represents the DEV environment. EnvDev Env = "dev" // EnvTest represents the TEST environment. EnvTest Env = "test" // EnvStable represents the STABLE environment. EnvStable Env = "stable" )
These constants represent the possible environment.
func MustParseEnv ¶
MustParseEnv parses a string into a Env. If the string is not a valid Env, it panics.
type SystemConfig ¶
type SystemConfig struct { // Unique ID of the system ID uint `yaml:"id" json:"id"` // Tenant or organization that the system belongs to Tenant string `yaml:"tenant" json:"tenant"` // Environment where the system is deployed (e.g. prod, gray) Env Env `yaml:"env" json:"env"` // Type or category of the system (e.g. cache, message queue) Type string `yaml:"type" json:"type"` // Configuration data in JSON or YAML format Config string `yaml:"config,omitempty" json:"config,omitempty"` // Description or purpose of the system Description string `yaml:"description,omitempty" json:"description,omitempty"` // Username or ID of the user who created the system Creator string `yaml:"creator,omitempty" json:"creator,omitempty"` // Username or ID of the user who last modified the system Modifier string `yaml:"modifier,omitempty" json:"modifier,omitempty"` // Timestamp when the system was created CreatedAt time.Time `yaml:"createdAt,omitempty" json:"createdAt,omitempty"` // Timestamp when the system was last updated UpdatedAt time.Time `yaml:"updatedAt,omitempty" json:"updatedAt,omitempty"` }
SystemConfig represents the configuration of a system.
func (*SystemConfig) Validate ¶
func (s *SystemConfig) Validate() error
Validate checks if the system config is valid. It returns an error if the system config is not valid.
Click to show internal directories.
Click to hide internal directories.