Merged in docs/config-docs (pull request #45)
Update docs for config * update docs Approved-by: Michael McGuinness
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
# Config structures
|
||||
|
||||
Package ServiceConfig contains all of the shared config structures that are used (and extended) by all of the services in the project.
|
||||
|
||||
To view this diagram live in vscode use the https://marketplace.visualstudio.com/items?itemName=bierner.markdown-mermaid extension.
|
||||
|
||||
You can also edit live with https://mermaid.live
|
||||
|
||||
This diagram should be updated manually when there are changes to the database schema.
|
||||
|
||||
To generate the diagram directly use the following command:
|
||||
|
||||
```bash
|
||||
docker run --rm -v $(pwd):/data minlag/mermaid-cli -i /data/diagram.mmd -o /data/output.png -w 1024 -H 768
|
||||
```
|
||||
|
||||
## Diagram of config objects
|
||||
|
||||
```mermaid
|
||||
classDiagram
|
||||
class BaseConfig["serviceconfig.BaseConfig"] {
|
||||
+LoggerConfig
|
||||
+ObservabilityConfig
|
||||
+database.BaseConfig
|
||||
+Pwd string
|
||||
+BasePath string
|
||||
+GetBasePath()
|
||||
+GetLogger()
|
||||
+LogConfig()
|
||||
}
|
||||
class ConfigProvider["serviceconfig.ConfigProvider"] {
|
||||
<<interface>>
|
||||
+database.ConfigProvider
|
||||
+ObservabilityConfigProvider
|
||||
+GetBasePath()
|
||||
+GetLogger()
|
||||
+LogConfig()
|
||||
}
|
||||
|
||||
class DBBaseConfig["database.BaseConfig"] {
|
||||
+DBUser string
|
||||
+DBSecret string
|
||||
+DBHost string
|
||||
+DBPort int
|
||||
+DBName string
|
||||
+DBNoSSL bool
|
||||
+GetDBBaseURI()
|
||||
+GetDBURI()
|
||||
}
|
||||
class DBConfigProvider["database.ConfigProvider"] {
|
||||
<<interface>>
|
||||
+GetDBBaseURI()
|
||||
+GetDBURI()
|
||||
+GetDBOpts()
|
||||
}
|
||||
|
||||
class ServerConfig["server.BaseConfig"] {
|
||||
+serviceconfig.BaseConfig
|
||||
+Validator
|
||||
+SetValidator()
|
||||
+GetValidator()
|
||||
}
|
||||
|
||||
class ServiceConfig["service.BaseConfig"] {
|
||||
+server.BaseConfig
|
||||
+RegisterHandlersFunc
|
||||
+OpenAPI
|
||||
+Router
|
||||
}
|
||||
|
||||
class RunnerConfig["runner.BaseConfig"] {
|
||||
+server.BaseConfig
|
||||
+aws.AWSConfig
|
||||
+ControllerFunc
|
||||
+QueueURL
|
||||
}
|
||||
|
||||
class AWSConfig["aws.AWSConfig"] {
|
||||
+AWSClientID string
|
||||
+AWSSecretKey string
|
||||
}
|
||||
|
||||
ConfigProvider <|.. BaseConfig
|
||||
DBConfigProvider <|.. DBBaseConfig
|
||||
BaseConfig *-- DBBaseConfig
|
||||
ServerConfig --|> BaseConfig
|
||||
ServiceConfig --|> ServerConfig
|
||||
RunnerConfig --|> ServerConfig
|
||||
RunnerConfig *-- AWSConfig
|
||||
```
|
||||
Reference in New Issue
Block a user