Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( VTStructure ValidatorType = "structure" VTLookup ValidatorType = "lookup" LFJSON LogFormat = "json" LGText LogFormat = "text" )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Server struct { ListenOn string `toml:"listenOn"` ConnectionLimit uint `toml:"connectionLimit"` InstanceID string `toml:"-"` // Extra identifier used in logs and for instance identification MaxRequestSize uint64 `toml:"maxRequestSize" usage:"Maximum amount of bytes until a HTTP request is accepted"` NetTTL Duration `toml:"netTTL" usage:"Max time to spend on external communication"` PathStrip string `toml:"pathStrip"` Headers Headers `toml:"headers" env:"-" usage:"Only (repeatable) flag or config file supported"` CORS struct { AllowedOrigins []string `toml:"allowedOrigins"` AllowedHeaders []string `toml:"allowedHeaders"` } `toml:"CORS"` Profiler struct { Enable bool `toml:"enable" default:"false"` Prefix string `toml:"prefix"` } `toml:"profiler"` } `toml:"server" flag:",inline" env:",inline"` Log struct { Level string `toml:"level"` Format LogFormat `toml:"format" usage:"The log output format \"json\" or \"text\""` } `toml:"log"` Hash struct { Key string `toml:"key"` } `toml:"hash"` Finder struct { UseBuckets bool `toml:"useBuckets" usage:"Buckets speedup matching, but assumes no mistakes are made at the start"` LengthTolerance float64 `toml:"lengthTolerance" usage:"percentage, number 0.0-1.0, of length difference to consider"` } `toml:"finder"` Validator struct { Resolver string `toml:"resolver" usage:"The resolver to use for DNS lookups"` SuggestValidator ValidatorType `toml:"suggest"` } `toml:"validator" flag:",inline" env:",inline"` Services struct { Autocomplete struct { RecipientThreshold uint64 `toml:"recipientThreshold" usage:"Define the minimum amount of recipients a domain needs before allowed in the autocomplete"` MaxSuggestions uint64 `toml:"maxSuggestions" usage:"The maximum number of suggestions to return"` } `toml:"autocomplete"` Suggest struct { Prefer Preferred `toml:"prefer" env:"-" usage:"A repeatable flag to create a preference list for common alternatives, example.com=example.org"` } `toml:"suggest"` } `toml:"services"` Backend struct { Driver string `toml:"driver" usage:"List a driver to use, currently supporting: 'memory' or 'postgres'"` URL string `toml:"url"` MaxConnections uint `toml:"maxConnections"` MaxIdleConnections uint `toml:"maxIdleConnections"` } `toml:"backend"` GraphQL struct { PrettyOutput bool `toml:"prettyOutput" flag:"pretty" env:"PRETTY"` GraphiQL bool `toml:"graphiQL" flag:"graphiql" env:"GRAPHIQL"` Playground bool `toml:"playground"` } `toml:"graphql" flag:"graphql" env:"GRAPHQL"` RateLimiter struct { Rate int64 `toml:"rate"` Capacity int64 `toml:"capacity"` ParkedTTL Duration `toml:"parkedTTL" flag:"parked-ttl"` } `toml:"rateLimiter"` GCP struct { ProjectID string `toml:"projectId"` PubSubTopic string `toml:"pubSubTopic"` CredentialsFile string `toml:"credentialsFile" env:"APPLICATION_CREDENTIALS"` } `toml:"GCP" flag:"gcp" env:"GOOGLE"` }
Config holds central config parameters
func (Config) GetSensored ¶
GetSensored returns a copy of Config with all sensitive values masked
type Duration ¶
type Duration struct {
// contains filtered or unexported fields
}
func (Duration) AsDuration ¶
func (*Duration) UnmarshalText ¶
type ValidatorType ¶
type ValidatorType string
func (*ValidatorType) Set ¶
func (vt *ValidatorType) Set(v string) error
func (ValidatorType) String ¶
func (vt ValidatorType) String() string
func (*ValidatorType) UnmarshalText ¶
func (vt *ValidatorType) UnmarshalText(value []byte) error
type ValidatorTypes ¶
type ValidatorTypes []ValidatorType
func (ValidatorTypes) AsStringSlice ¶
func (v ValidatorTypes) AsStringSlice() []string
Click to show internal directories.
Click to hide internal directories.