config

package
v0.0.0-...-9b02830 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GAPI_API_LOGS_INDEX = "gapi-api-logs"
	GAPI_SERVICE_NAME   = "GAPI_SERVICES"
)

Variables

View Source
var ANALYTICS_GROUP = "/analytics"
View Source
var APPLICATION_JSON = "application/json"
View Source
var AUTHENTICATION_CONFIG_FILE = "oauth.json"
View Source
var CONFIGS_LOCATION = "./configs/"
View Source
var DELETE = "DELETE"
View Source
var ELASTICSEARCH_LOGS_INDEX = "gapi-logs"
View Source
var ELASTICSEARCH_URL = "http://localhost:9200"
View Source
var GAPI_CONFIG_FILE = "gAPI.json"
View Source
var GET = "GET"
View Source
var MATCHING_URI_REGEX = "((/([\\w?\\-=:.&+#])*)*$)"
View Source
var OAUTH_CLIENTS_GROUP = "/oauth_clients"
View Source
var PATCH = "PATCH"
View Source
var POST = "POST"
View Source
var PUT = "PUT"
View Source
var SERVICE_DISCOVERY_CONFIG_FILE = "services.json"
View Source
var SERVICE_DISCOVERY_GROUP = "/service-discovery"
View Source
var SERVICE_DISCOVERY_URL = "http://localhost:8080"
View Source
var SOCKET_PORT_DEFAULT = "5000"
View Source
var USERS_GROUP = "/users"
View Source
var USER_PERMISSIONS_GROUP = "/user-permissions"

Functions

func LoadConfigs

func LoadConfigs()

func LoadGApiConfig

func LoadGApiConfig()

func LoadURLConstants

func LoadURLConstants()

Types

type GApiAuthenticationConfig

type GApiAuthenticationConfig struct {
	Username            string
	Password            string
	TokenExpirationTime int
	TokenSigningKey     string
	LDAP                LDAPConfig
}

type GApiCacheConfig

type GApiCacheConfig struct {
	Enabled bool
}

type GApiConfig

type GApiConfig struct {
	Authentication   GApiAuthenticationConfig
	Logs             GApiLogsConfig
	Cors             GApiCorsConfig
	ServiceDiscovery GApiServiceDiscoveryConfig
	Urls             UrlsConstants
	Healthcheck      GApiHealthCheckConfig
	Notifications    GApiNotificationsConfig
	ManagementTypes  map[string]map[string]string
	RateLimiting     GApiRateLimitingConfig
	Cache            GApiCacheConfig
	Protocol         ProtocolConfig
	Plugins          GApiPluginsConfig
	ThirdPartyOAuth  thirdpartyauthentication.OAuthServer
	MatchingUriRegex string
}
var GApiConfiguration GApiConfig

type GApiCorsConfig

type GApiCorsConfig struct {
	AllowedOrigins   []string
	AllowCredentials bool
}

type GApiHealthCheckConfig

type GApiHealthCheckConfig struct {
	Active       bool
	Frequency    int
	Notification bool
}

type GApiLogsConfig

type GApiLogsConfig struct {
	Active bool
	Type   string
	Queue  string
}

type GApiNotificationsConfig

type GApiNotificationsConfig struct {
	Type  string
	Slack GApiSlackNotificationsConfig
}

type GApiPluginsConfig

type GApiPluginsConfig struct {
	Location      string
	BeforeRequest []string
}

type GApiRateLimitingConfig

type GApiRateLimitingConfig struct {
	Active  bool
	Limit   int
	Period  int64
	Metrics []string
}

type GApiServiceDiscoveryConfig

type GApiServiceDiscoveryConfig struct {
	Type string
}

type GApiSlackNotificationsConfig

type GApiSlackNotificationsConfig struct {
	WebhookUrl string
}

type LDAPConfig

type LDAPConfig struct {
	Active bool
	Domain string
	Port   string
}

type ProtocolConfig

type ProtocolConfig struct {
	Https           bool
	CertificateFile string
	CertificateKey  string
}

type UrlsConstants

type UrlsConstants struct {
	SERVICE_DISCOVERY_GROUP string `json:SERVICE_DISCOVERY_GROUP`
	ANALYTICS_GROUP         string `json:ANALYTICS_GROUP`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL