Documentation ¶
Index ¶
Constants ¶
View Source
const ( MONGO = "mongo" FILE = "file" )
Variables ¶
This section is empty.
Functions ¶
func GetMongoDriver ¶ added in v1.4.0
GetMongoDriver returns a valid mongo driver to use, it receives the driver set in config, and check its validity otherwise default to mongo-go
func LoadConfig ¶
func LoadConfig(filePath string, conf *Configuration)
LoadConfig will load the config from a file
Types ¶
type Backend ¶
type Backend struct { ProfileBackendSettings interface{} IdentityBackendSettings IdentityBackendSettings }
type Configuration ¶
type Configuration struct { Secret string Port int ProfileDir string BackEnd Backend TykAPISettings tyk.TykAPI HttpServerOptions struct { UseSSL bool CertFile string KeyFile string SSLInsecureSkipVerify bool } SSLInsecureSkipVerify bool Storage *Storage }
Configuration holds all configuration settings for TAP
type FileLoaderConf ¶
FileLoaderConf is the configuration struct for a FileLoader, takes a filename as main init
type IdentityBackendSettings ¶
type IdentityBackendSettings struct { Database int Username string Password string Host string Port int Timeout int MaxIdle int MaxActive int UseSSL bool SSLInsecureSkipVerify bool CAFile string CertFile string KeyFile string MaxVersion string MinVersion string EnableCluster bool Addrs []string Hosts map[string]string // Deprecated: Use Addrs instead. MasterName string SentinelPassword string }
type MongoConf ¶
type MongoConf struct { DbName string `json:"db_name" mapstructure:"db_name"` MongoURL string `json:"mongo_url" mapstructure:"mongo_url"` MongoUseSSL bool `json:"mongo_use_ssl" mapstructure:"mongo_use_ssl"` MongoSSLInsecureSkipVerify bool `json:"mongo_ssl_insecure_skip_verify" mapstructure:"mongo_ssl_insecure_skip_verify"` MaxInsertBatchSizeBytes int `json:"max_insert_batch_size_bytes" mapstructure:"max_insert_batch_size_bytes"` MaxDocumentSizeBytes int `json:"max_document_size_bytes" mapstructure:"max_document_size_bytes"` CollectionCapMaxSizeBytes int `json:"collection_cap_max_size_bytes" mapstructure:"collection_cap_max_size_bytes"` CollectionCapEnable bool `json:"collection_cap_enable" mapstructure:"collection_cap_enable"` SessionConsistency string `json:"session_consistency" mapstructure:"session_consistency"` Driver string `json:"driver" mapstructure:"driver"` DirectConnection bool `json:"direct_connection" mapstructure:"direct_connection"` }
type Storage ¶
type Storage struct { StorageType string `json:"storage_type" mapstructure:"storage_type"` MongoConf *MongoConf `json:"mongo" mapstructure:"mongo"` }
Storage object to configure the storage where the profiles lives in it can be extended to work with other loaders. As file Loader is the default then we dont read the file path from here
Click to show internal directories.
Click to hide internal directories.