Skip to content

Commit

Permalink
config:generate
Browse files Browse the repository at this point in the history
Signed-off-by: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com>
  • Loading branch information
golanglemonade committed Aug 29, 2024
1 parent 66db983 commit ab8aad2
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 46 deletions.
31 changes: 14 additions & 17 deletions jsonschema/api-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Config contains the configuration for the core server
|[**authz**](#authz)|`object`||yes|
|[**db**](#db)|`object`||yes|
|[**dbx**](#dbx)|`object`|||
|[**redis**](#redis)|`object`|Config for the redis client used to store key-value pairs<br/>||
|[**redis**](#redis)|`object`|||
|[**tracer**](#tracer)|`object`|||
|[**email**](#email)|`object`|||
|[**sessions**](#sessions)|`object`|||
Expand Down Expand Up @@ -429,26 +429,23 @@ OauthProviderConfig represents the configuration for OAuth providers such as Git
<a name="redis"></a>
## redis: object

Config for the redis client used to store key-value pairs


**Properties**

|Name|Type|Description|Required|
|----|----|-----------|--------|
|**enabled**|`boolean`|Enabled to enable redis client in the server<br/>||
|**address**|`string`|Address is the host:port to connect to redis<br/>||
|**name**|`string`|Name of the connecting client<br/>||
|**username**|`string`|Username to connect to redis<br/>||
|**password**|`string`|Password, must match the password specified in the server configuration<br/>||
|**db**|`integer`|DB to be selected after connecting to the server, 0 uses the default<br/>||
|**dialTimeout**|`integer`|Dial timeout for establishing new connections, defaults to 5s<br/>||
|**readTimeout**|`integer`|Timeout for socket reads. If reached, commands will fail<br/>with a timeout instead of blocking. Supported values:<br/> - `0` - default timeout (3 seconds).<br/> - `-1` - no timeout (block indefinitely).<br/> - `-2` - disables SetReadDeadline calls completely.<br/>||
|**writeTimeout**|`integer`|Timeout for socket writes. If reached, commands will fail<br/>with a timeout instead of blocking. Supported values:<br/> - `0` - default timeout (3 seconds).<br/> - `-1` - no timeout (block indefinitely).<br/> - `-2` - disables SetWriteDeadline calls completely.<br/>||
|**maxRetries**|`integer`|MaxRetries before giving up.<br/>Default is 3 retries; -1 (not 0) disables retries.<br/>||
|**minIdleConns**|`integer`|MinIdleConns is useful when establishing new connection is slow.<br/>Default is 0. the idle connections are not closed by default.<br/>||
|**maxIdleConns**|`integer`|Maximum number of idle connections.<br/>Default is 0. the idle connections are not closed by default.<br/>||
|**maxActiveConns**|`integer`|Maximum number of connections allocated by the pool at a given time.<br/>When zero, there is no limit on the number of connections in the pool.<br/>||
|**enabled**|`boolean`|||
|**address**|`string`|||
|**name**|`string`|||
|**username**|`string`|||
|**password**|`string`|||
|**db**|`integer`|||
|**dialTimeout**|`integer`|||
|**readTimeout**|`integer`|||
|**writeTimeout**|`integer`|||
|**maxRetries**|`integer`|||
|**minIdleConns**|`integer`|||
|**maxIdleConns**|`integer`|||
|**maxActiveConns**|`integer`|||

**Additional Properties:** not allowed
<a name="tracer"></a>
Expand Down
42 changes: 14 additions & 28 deletions jsonschema/core.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,61 +11,47 @@
"cache.Config": {
"properties": {
"enabled": {
"type": "boolean",
"description": "Enabled to enable redis client in the server"
"type": "boolean"
},
"address": {
"type": "string",
"description": "Address is the host:port to connect to redis"
"type": "string"
},
"name": {
"type": "string",
"description": "Name of the connecting client"
"type": "string"
},
"username": {
"type": "string",
"description": "Username to connect to redis"
"type": "string"
},
"password": {
"type": "string",
"description": "Password, must match the password specified in the server configuration"
"type": "string"
},
"db": {
"type": "integer",
"description": "DB to be selected after connecting to the server, 0 uses the default"
"type": "integer"
},
"dialTimeout": {
"type": "integer",
"description": "Dial timeout for establishing new connections, defaults to 5s"
"type": "integer"
},
"readTimeout": {
"type": "integer",
"description": "Timeout for socket reads. If reached, commands will fail\nwith a timeout instead of blocking. Supported values:\n - `0` - default timeout (3 seconds).\n - `-1` - no timeout (block indefinitely).\n - `-2` - disables SetReadDeadline calls completely."
"type": "integer"
},
"writeTimeout": {
"type": "integer",
"description": "Timeout for socket writes. If reached, commands will fail\nwith a timeout instead of blocking. Supported values:\n - `0` - default timeout (3 seconds).\n - `-1` - no timeout (block indefinitely).\n - `-2` - disables SetWriteDeadline calls completely."
"type": "integer"
},
"maxRetries": {
"type": "integer",
"description": "MaxRetries before giving up.\nDefault is 3 retries; -1 (not 0) disables retries."
"type": "integer"
},
"minIdleConns": {
"type": "integer",
"description": "MinIdleConns is useful when establishing new connection is slow.\nDefault is 0. the idle connections are not closed by default."
"type": "integer"
},
"maxIdleConns": {
"type": "integer",
"description": "Maximum number of idle connections.\nDefault is 0. the idle connections are not closed by default."
"type": "integer"
},
"maxActiveConns": {
"type": "integer",
"description": "Maximum number of connections allocated by the pool at a given time.\nWhen zero, there is no limit on the number of connections in the pool."
"type": "integer"
}
},
"additionalProperties": false,
"type": "object",
"description": "Config for the redis client used to store key-value pairs"
"type": "object"
},
"cachecontrol.Config": {
"properties": {
Expand Down
1 change: 0 additions & 1 deletion jsonschema/schema_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const (
// any external packages must use the jsonschema description tags to add comments
var includedPackages = []string{
"./config",
"./pkg/cache",
"./internal/ent",
"./internal/entdb",
"./internal/httpserve/handlers",
Expand Down

0 comments on commit ab8aad2

Please sign in to comment.