Documentation
¶
Index ¶
- Constants
- type Service
- func (s *Service) CatStateValues() (types.StateValues, error)
- func (s *Service) DatastoreConfig() (types.DatastoreConfig, error)
- func (s *Service) EmailConfig() (types.EmailConfig, error)
- func (s *Service) ForwarderConfig(serviceName string) (types.ForwarderConfig, error)
- func (s *Service) ForwarderConfigs() ([]types.ForwarderConfig, error)
- func (s *Service) Initialize() error
- func (s *Service) LoggingConfig() (types.LoggingConfig, error)
- func (s *Service) LoggingStationConfigs() (types.LoggingStation, error)
- func (s *Service) LookupServiceConfig(serviceName string) (types.LookupConfig, error)
- func (s *Service) RequiredConfigs() (types.RequiredConfigs, error)
- func (s *Service) RigConfigByID(rigID int64) (types.RigConfig, error)
- func (s *Service) ServerConfig() (*types.ServerConfig, error)
Constants ¶
const ( ServiceName = types.ConfigServiceName // EnvSmDefaultDB selects the default datastore driver when generating a new config.json. // Accepts: "sqlite" (default), "postgres", and common aliases like "postgresql" or "pg". EnvSmDefaultDB = "SM_DEFAULT_DB" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
WorkingDir string `di.inject:"workingdir"`
AppConfig types.AppConfig
// contains filtered or unexported fields
}
func (*Service) CatStateValues ¶ added in v0.0.14
func (s *Service) CatStateValues() (types.StateValues, error)
CatStateValues retrieves the CAT state values for the default rig configuration in the service's application configuration. Returns a map of state values organized by tags or an error if the service is uninitialized or fails to retrieve the configuration.
func (*Service) DatastoreConfig ¶ added in v0.0.4
func (s *Service) DatastoreConfig() (types.DatastoreConfig, error)
DatastoreConfig returns the datastore configuration.
func (*Service) EmailConfig ¶ added in v0.0.27
func (s *Service) EmailConfig() (types.EmailConfig, error)
EmailConfig retrieves the email configuration from the application configuration. Returns an error if uninitialized.
func (*Service) ForwarderConfig ¶ added in v0.0.23
func (s *Service) ForwarderConfig(serviceName string) (types.ForwarderConfig, error)
ForwarderConfig retrieves the forwarder configuration for the specified service name. Returns a ForwarderConfig object and nil error if found, otherwise returns an empty object and an appropriate error.
func (*Service) ForwarderConfigs ¶ added in v0.0.31
func (s *Service) ForwarderConfigs() ([]types.ForwarderConfig, error)
func (*Service) Initialize ¶
Initialize initializes the config service.
func (*Service) LoggingConfig ¶
func (s *Service) LoggingConfig() (types.LoggingConfig, error)
LoggingConfig returns the logging configuration.
func (*Service) LoggingStationConfigs ¶ added in v0.0.17
func (s *Service) LoggingStationConfigs() (types.LoggingStation, error)
LoggingStationConfigs retrieves the logging station configuration from the service's application configuration.
func (*Service) LookupServiceConfig ¶ added in v0.0.17
func (s *Service) LookupServiceConfig(serviceName string) (types.LookupConfig, error)
LookupServiceConfig fetches the configuration for a given service by its name from the loaded application settings.
func (*Service) RequiredConfigs ¶ added in v0.0.9
func (s *Service) RequiredConfigs() (types.RequiredConfigs, error)
RequiredConfigs retrieves the required configurations for the application. Returns an error if the service is uninitialized.
func (*Service) RigConfigByID ¶ added in v0.0.9
RigConfigByID retrieves the RigConfig for the given rig ID from the service's AppConfig. Returns an error if unavailable.
func (*Service) ServerConfig ¶ added in v0.0.8
func (s *Service) ServerConfig() (*types.ServerConfig, error)
ServerConfig returns the server configuration from the application configuration. It requires the service to be initialized.