Documentation
¶
Index ¶
- Constants
- type AuthValidatorConfig
- type Backend
- type BotDetectorConfig
- type CORSConfig
- type Endpoint
- type ExtraConfig
- type GenerateKrakenConfigOpts
- type Generator
- func (g *Generator) Description() string
- func (g *Generator) Generate(opts openapigenerator.GenerateOpts) error
- func (g *Generator) Id() string
- func (g *Generator) IsPrimitiveType(input string) bool
- func (g *Generator) PostProcessType(codeType openapigenerator.CodeType) openapigenerator.CodeType
- func (g *Generator) PostProcessing(files map[string]templateapi.RenderedFile) error
- func (g *Generator) TemplateData(opts openapigenerator.TemplateDataOpts) (openapigenerator.DocumentModel, error)
- func (g *Generator) ToClassName(name string) string
- func (g *Generator) ToCodeType(schema *base.Schema, schemaType openapigenerator.CodeTypeSchemaType, ...) (openapigenerator.CodeType, error)
- func (g *Generator) ToConstantName(name string) string
- func (g *Generator) ToFunctionName(name string) string
- func (g *Generator) ToParameterName(name string) string
- func (g *Generator) ToPropertyName(name string) string
- func (g *Generator) TypeToImport(iType openapigenerator.CodeType) string
- type KrakenDConfig
- type LoggingConfig
- type LogstashConfig
- type OTExporters
- type OTLPExporter
- type OTLayerBackend
- type OTLayerGlobal
- type OTLayerProxy
- type OTLayers
- type OTStageDetails
- type OpenTelemetryConfig
- type PrometheusExporter
- type ResolvedEndpoint
- type RouterConfig
Constants ¶
View Source
const ( EnvironmentDev = "dev" EnvironmentStage = "stage" EnvironmentProd = "prod" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthValidatorConfig ¶
type AuthValidatorConfig struct {
}
type Backend ¶
type Backend struct {
SD string `json:"sd"`
Host []string `json:"host"`
URLPattern string `json:"url_pattern"`
Encoding string `json:"encoding"`
Method string `json:"method"`
DisableHostSanitize bool `json:"disable_host_sanitize"`
IsCollection bool `json:"is_collection,omitempty"`
Target string `json:"target,omitempty"`
ExtraConfig map[string]interface{} `json:"extra_config,omitempty"`
}
type BotDetectorConfig ¶
type CORSConfig ¶
type Endpoint ¶
type Endpoint struct {
Endpoint string `json:"endpoint"`
Method string `json:"method"`
OutputEncoding string `json:"output_encoding"`
Backend []Backend `json:"backend"`
InputQueryStrings []string `json:"input_query_strings,omitempty"`
InputHeaders []string `json:"input_headers,omitempty"`
ExtraConfig map[string]interface{} `json:"extra_config,omitempty"`
}
type ExtraConfig ¶
type ExtraConfig struct {
Router *RouterConfig `json:"router,omitempty"`
CORS *CORSConfig `json:"security/cors,omitempty"`
BotDetector *BotDetectorConfig `json:"security/bot-detector,omitempty"`
AuthValidator *AuthValidatorConfig `json:"auth/validator,omitempty"`
Logging *LoggingConfig `json:"telemetry/logging,omitempty"`
Logstash *LogstashConfig `json:"telemetry/logstash,omitempty"`
OpenTelemetry *OpenTelemetryConfig `json:"telemetry/opentelemetry,omitempty"`
}
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶
func NewGenerator() *Generator
func (*Generator) Description ¶
func (*Generator) Generate ¶
func (g *Generator) Generate(opts openapigenerator.GenerateOpts) error
func (*Generator) IsPrimitiveType ¶
func (*Generator) PostProcessType ¶
func (g *Generator) PostProcessType(codeType openapigenerator.CodeType) openapigenerator.CodeType
func (*Generator) PostProcessing ¶
func (g *Generator) PostProcessing(files map[string]templateapi.RenderedFile) error
func (*Generator) TemplateData ¶
func (g *Generator) TemplateData(opts openapigenerator.TemplateDataOpts) (openapigenerator.DocumentModel, error)
func (*Generator) ToClassName ¶
func (*Generator) ToCodeType ¶
func (g *Generator) ToCodeType(schema *base.Schema, schemaType openapigenerator.CodeTypeSchemaType, required bool) (openapigenerator.CodeType, error)
func (*Generator) ToConstantName ¶
func (*Generator) ToFunctionName ¶
func (*Generator) ToParameterName ¶
func (*Generator) ToPropertyName ¶
func (*Generator) TypeToImport ¶
func (g *Generator) TypeToImport(iType openapigenerator.CodeType) string
type KrakenDConfig ¶
type KrakenDConfig struct {
Schema string `json:"$schema"`
Version int `json:"version"`
Name string `json:"name"`
ExtraConfig ExtraConfig `json:"extra_config"`
Timeout string `json:"timeout"`
ReadTimeout string `json:"read_timeout,omitempty"`
WriteTimeout string `json:"write_timeout,omitempty"`
IdleTimeout string `json:"idle_timeout,omitempty"`
ReadHeaderTimeout string `json:"read_header_timeout,omitempty"`
Port int `json:"port,omitempty"`
CacheTTL string `json:"cache_ttl"`
DisableKeepAlives bool `json:"disable_keep_alives,omitempty"`
DisableCompression bool `json:"disable_compression,omitempty"`
MaxIdleConns int `json:"max_idle_connections,omitempty"`
MaxIdleConnsPerHost int `json:"max_idle_connections_per_host,omitempty"`
OutputEncoding string `json:"output_encoding"`
DebugEndpoint bool `json:"debug_endpoint"`
EchoEndpoint bool `json:"echo_endpoint"`
DisableRest bool `json:"disable_rest"`
Endpoints []Endpoint `json:"endpoints"`
}
type LoggingConfig ¶
type LogstashConfig ¶
type LogstashConfig struct {
Enabled bool `json:"enabled"`
}
type OTExporters ¶
type OTExporters struct {
Prometheus []PrometheusExporter `json:"prometheus"`
OTLP []OTLPExporter `json:"otlp"`
}
type OTLPExporter ¶
type OTLayerBackend ¶
type OTLayerBackend struct {
Metrics OTStageDetails `json:"metrics"`
Traces OTStageDetails `json:"traces"`
}
type OTLayerGlobal ¶
type OTLayerProxy ¶
type OTLayers ¶
type OTLayers struct {
Global OTLayerGlobal `json:"global"`
Proxy OTLayerProxy `json:"proxy"`
Backend OTLayerBackend `json:"backend"`
}
type OTStageDetails ¶
type OpenTelemetryConfig ¶
type OpenTelemetryConfig struct {
TraceSampleRate float64 `json:"trace_sample_rate"`
MetricReportingPeriod int `json:"metric_reporting_period"`
Exporters OTExporters `json:"exporters"`
Layers OTLayers `json:"layers"`
}
type PrometheusExporter ¶
type ResolvedEndpoint ¶
type RouterConfig ¶
type RouterConfig struct {
HideVersionHeader bool `json:"hide_version_header,omitempty"`
LoggerSkipPaths []string `json:"logger_skip_paths,omitempty"`
ForwardedByClientIP bool `json:"forwarded_by_client_ip,omitempty"`
RemoteIPHeaders []string `json:"remote_ip_headers,omitempty"`
TrustedProxies []string `json:"trusted_proxies,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.