Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AllHttpStatuses = []int{ http.StatusContinue, http.StatusSwitchingProtocols, http.StatusProcessing, http.StatusEarlyHints, http.StatusOK, http.StatusCreated, http.StatusAccepted, http.StatusNonAuthoritativeInfo, http.StatusNoContent, http.StatusResetContent, http.StatusPartialContent, http.StatusMultiStatus, http.StatusAlreadyReported, http.StatusIMUsed, http.StatusMultipleChoices, http.StatusMovedPermanently, http.StatusFound, http.StatusSeeOther, http.StatusNotModified, http.StatusUseProxy, http.StatusTemporaryRedirect, http.StatusPermanentRedirect, http.StatusBadRequest, http.StatusUnauthorized, http.StatusPaymentRequired, http.StatusForbidden, http.StatusNotFound, http.StatusMethodNotAllowed, http.StatusNotAcceptable, http.StatusProxyAuthRequired, http.StatusRequestTimeout, http.StatusConflict, http.StatusGone, http.StatusLengthRequired, http.StatusPreconditionFailed, http.StatusRequestEntityTooLarge, http.StatusRequestURITooLong, http.StatusUnsupportedMediaType, http.StatusRequestedRangeNotSatisfiable, http.StatusExpectationFailed, http.StatusTeapot, http.StatusMisdirectedRequest, http.StatusUnprocessableEntity, http.StatusLocked, http.StatusFailedDependency, http.StatusTooEarly, http.StatusUpgradeRequired, http.StatusPreconditionRequired, http.StatusTooManyRequests, http.StatusRequestHeaderFieldsTooLarge, http.StatusUnavailableForLegalReasons, http.StatusInternalServerError, http.StatusNotImplemented, http.StatusBadGateway, http.StatusServiceUnavailable, http.StatusGatewayTimeout, http.StatusHTTPVersionNotSupported, http.StatusVariantAlsoNegotiates, http.StatusInsufficientStorage, http.StatusLoopDetected, http.StatusNotExtended, http.StatusNetworkAuthenticationRequired, } )
Functions ¶
func ValidateStatusList ¶
func ValidateStatusList(fl validator.FieldLevel) bool
Types ¶
type APIFWMode ¶ added in v0.6.12
type APIFWMode struct {
Mode string `conf:"default:PROXY" validate:"oneof=PROXY API GRAPHQL"`
}
type APIMode ¶ added in v0.6.13
type APIMode struct { conf.Version APIFWMode TLS TLS SpecificationUpdatePeriod time.Duration `conf:"default:1m,env:API_MODE_SPECIFICATION_UPDATE_PERIOD"` PathToSpecDB string `conf:"env:API_MODE_DEBUG_PATH_DB"` UnknownParametersDetection bool `conf:"default:true,env:API_MODE_UNKNOWN_PARAMETERS_DETECTION"` APIHost string `conf:"default:http://0.0.0.0:8282,env:URL" validate:"required,url"` HealthAPIHost string `conf:"default:0.0.0.0:9667,env:HEALTH_HOST" validate:"required"` ReadTimeout time.Duration `conf:"default:5s"` WriteTimeout time.Duration `conf:"default:5s"` LogLevel string `conf:"default:INFO" validate:"oneof=TRACE DEBUG INFO ERROR WARNING"` LogFormat string `conf:"default:TEXT" validate:"oneof=TEXT JSON"` PassOptionsRequests bool `conf:"default:false,env:PASS_OPTIONS"` }
type Backend ¶ added in v0.6.13
type Backend struct { URL string `conf:"default:http://localhost:3000/v1/" validate:"required,url"` ClientPoolCapacity int `conf:"default:1000" validate:"gt=0"` InsecureConnection bool `conf:"default:false"` RootCA string `conf:""` MaxConnsPerHost int `conf:"default:512"` ReadTimeout time.Duration `conf:"default:5s"` WriteTimeout time.Duration `conf:"default:5s"` DialTimeout time.Duration `conf:"default:200ms"` DeleteAcceptEncoding bool `conf:"default:false"` }
type GraphQL ¶ added in v0.6.13
type GraphQL struct { MaxQueryComplexity int `conf:"required" validate:"required"` MaxQueryDepth int `conf:"required" validate:"required"` NodeCountLimit int `conf:"required" validate:"required"` Playground bool `conf:"default:false"` PlaygroundPath string `conf:"default:/" validate:"path"` Introspection bool `conf:"required" validate:"required"` Schema string `conf:"required" validate:"required"` WSCheckOrigin bool `conf:"default:false"` WSOrigin []string `conf:"" validate:"url"` RequestValidation string `conf:"required" validate:"required,oneof=DISABLE BLOCK LOG_ONLY"` }
type GraphQLMode ¶ added in v0.6.13
type GraphQLMode struct { conf.Version APIFWMode Graphql GraphQL TLS TLS Server Backend Denylist Denylist APIHost string `conf:"default:http://0.0.0.0:8282,env:URL" validate:"required,url"` HealthAPIHost string `conf:"default:0.0.0.0:9667,env:HEALTH_HOST" validate:"required"` ReadTimeout time.Duration `conf:"default:5s"` WriteTimeout time.Duration `conf:"default:5s"` LogLevel string `conf:"default:INFO" validate:"oneof=TRACE DEBUG INFO ERROR WARNING"` LogFormat string `conf:"default:TEXT" validate:"oneof=TEXT JSON"` }
type HTTPStatusCodeList ¶
type HTTPStatusCodeList struct {
StatusCodes []int
}
type Introspection ¶
type Oauth ¶
type Oauth struct { ValidationType string `conf:"default:JWT"` JWT JWT Introspection Introspection }
type ProxyMode ¶ added in v0.6.13
type ProxyMode struct { conf.Version APIFWMode TLS TLS ShadowAPI ShadowAPI Denylist Denylist Server Server APIHost string `conf:"default:http://0.0.0.0:8282,env:URL" validate:"required,url"` HealthAPIHost string `conf:"default:0.0.0.0:9667,env:HEALTH_HOST" validate:"required"` ReadTimeout time.Duration `conf:"default:5s"` WriteTimeout time.Duration `conf:"default:5s"` LogLevel string `conf:"default:INFO" validate:"oneof=TRACE DEBUG INFO ERROR WARNING"` LogFormat string `conf:"default:TEXT" validate:"oneof=TEXT JSON"` RequestValidation string `conf:"required" validate:"required,oneof=DISABLE BLOCK LOG_ONLY"` ResponseValidation string `conf:"required" validate:"required,oneof=DISABLE BLOCK LOG_ONLY"` CustomBlockStatusCode int `conf:"default:403" validate:"HttpStatusCodes"` AddValidationStatusHeader bool `conf:"default:false"` APISpecs string `conf:"required,env:API_SPECS" validate:"required"` PassOptionsRequests bool `conf:"default:false,env:PASS_OPTIONS"` }
Click to show internal directories.
Click to hide internal directories.