mirror of
https://github.com/lukaszraczylo/graphql-monitoring-proxy.git
synced 2026-06-05 23:03:48 +00:00
ac44056a00
* Add ratelimit configuration. * Add rate limiting :party:
40 lines
852 B
Go
40 lines
852 B
Go
package main
|
|
|
|
import (
|
|
"github.com/akyoto/cache"
|
|
graphql "github.com/lukaszraczylo/go-simple-graphql"
|
|
libpack_logging "github.com/telegram-bot-app/libpack/logging"
|
|
libpack_monitoring "github.com/telegram-bot-app/libpack/monitoring"
|
|
)
|
|
|
|
// config is a struct that holds the configuration of the application.
|
|
type config struct {
|
|
Logger *libpack_logging.LogConfig
|
|
Monitoring *libpack_monitoring.MetricsSetup
|
|
|
|
// Server holds the configuration of the server _ONLY_.
|
|
Server struct {
|
|
PortGraphQL int
|
|
PortMonitoring int
|
|
HostGraphQL string
|
|
AccessLog bool
|
|
}
|
|
|
|
Client struct {
|
|
JWTUserClaimPath string
|
|
JWTRoleClaimPath string
|
|
JWTRoleRateLimit bool
|
|
GQLClient *graphql.BaseClient
|
|
}
|
|
|
|
Cache struct {
|
|
CacheEnable bool
|
|
CacheTTL int
|
|
CacheClient *cache.Cache
|
|
}
|
|
|
|
Security struct {
|
|
BlockIntrospection bool
|
|
}
|
|
}
|