Documentation ¶
Index ¶
- Constants
- Variables
- func FetchConfig(query string, buf *bytes.Buffer, args map[string]string, ...) error
- func FetchGatewayHost(reh *contour.ResourceEventHandler, et *contour.EndpointsTranslator, ...)
- func RunDBQuery(url string, query string, buf *bytes.Buffer, args map[string]string, ...) error
- func RunDBQueryGenericVals(url string, query string, buf *bytes.Buffer, args map[string]interface{}, ...) error
- func Saaras_ir__to__v1b1_ir2(sir *SaarasGatewayHostService) *v1.GatewayHost
- func Saaras_secret__to__v1_secret(secrets *[]Secret) *[]v1.Secret
- func WatchCloudGatewayHost(g *workgroup.Group, log logrus.FieldLogger, reh *contour.ResourceEventHandler, ...)
- type Client
- type ClientOption
- type CloudEventHandler
- type ConfiguredUpstreams
- type DataPayloadProxyGroup
- type DataPayloadSaarasApp2
- type DataPayloadSecrets
- type DataUpstreams
- type File
- type Filter
- type GraphErr
- type ProxyGroupConfig
- type Request
- type RouteFilters
- type SaarasApp2
- type SaarasArtifact
- type SaarasCloudCache
- type SaarasDbSecret
- type SaarasGatewayHost2
- type SaarasGatewayHostService
- type SaarasRoute2
- type SaarasSecret
- type SaarasSecrets
- type Secret
- type SecretArtifact
- type SecretsBySId
- type Service
- type ServiceFilters
Constants ¶
const QGatewayHost string = `` /* 3329-byte string literal not displayed */
const QProxyGroupCfg string = `` /* 247-byte string literal not displayed */
const QUpstreams string = `` /* 463-byte string literal not displayed */
Variables ¶
var ENROUTE_CP_PROTO string
var ENROUTE_CP_SERVER_IP string
var ENROUTE_CP_SERVER_PORT string
var ENROUTE_NAME string
Functions ¶
func FetchConfig ¶
func FetchConfig(query string, buf *bytes.Buffer, args map[string]string, log logrus.FieldLogger) error
Used by enroute-dp
func FetchGatewayHost ¶
func FetchGatewayHost(reh *contour.ResourceEventHandler, et *contour.EndpointsTranslator, pct *contour.GlobalConfigTranslator, scc *SaarasCloudCache, log logrus.FieldLogger)
func RunDBQuery ¶
func RunDBQuery(url string, query string, buf *bytes.Buffer, args map[string]string, log logrus.FieldLogger) error
Used by webapp
func RunDBQueryGenericVals ¶
func Saaras_ir__to__v1b1_ir2 ¶
func Saaras_ir__to__v1b1_ir2(sir *SaarasGatewayHostService) *v1.GatewayHost
func WatchCloudGatewayHost ¶
func WatchCloudGatewayHost(g *workgroup.Group, log logrus.FieldLogger, reh *contour.ResourceEventHandler, et *contour.EndpointsTranslator, pct *contour.GlobalConfigTranslator, scc *SaarasCloudCache)
Types ¶
type Client ¶
type Client struct { // Log is called with various debug information. // To log to standard out, use: // client.Log = func(s string) { log.Println(s) } Log func(s string) // contains filtered or unexported fields }
Client is a client for interacting with a GraphQL API.
func NewClient ¶
func NewClient(endpoint string, opts ...ClientOption) *Client
NewClient makes a new Client capable of making GraphQL requests.
type ClientOption ¶
type ClientOption func(*Client)
ClientOption are functions that are passed into NewClient to modify the behaviour of the Client.
func ImmediatelyCloseReqBody ¶
func ImmediatelyCloseReqBody() ClientOption
ImmediatelyCloseReqBody will close the req body immediately after each request body is ready
func UseMultipartForm ¶
func UseMultipartForm() ClientOption
UseMultipartForm uses multipart/form-data and activates support for files.
func WithHTTPClient ¶
func WithHTTPClient(httpclient *http.Client) ClientOption
WithHTTPClient specifies the underlying http.Client to use when making requests.
NewClient(endpoint, WithHTTPClient(specificHTTPClient))
type CloudEventHandler ¶
type CloudEventHandler interface {
OnFetch(obj interface{})
}
CloudEventHandler fetches state from the cloud and generates events that can be consumed by ResourceEventHandler
type ConfiguredUpstreams ¶
type ConfiguredUpstreams struct {
Data DataUpstreams `json:"data"`
}
type DataPayloadProxyGroup ¶
type DataPayloadProxyGroup struct { Data ProxyGroupConfig Errors []GraphErr }
type DataPayloadSaarasApp2 ¶
type DataPayloadSaarasApp2 struct { Data SaarasApp2 Errors []GraphErr }
type DataPayloadSecrets ¶
type DataPayloadSecrets struct { Data SaarasDbSecret Errors []GraphErr }
type DataUpstreams ¶
type DataUpstreams struct {
SaarasUpstreams []cfg.SaarasUpstream `json:"saaras_db_upstream"`
}
type ProxyGroupConfig ¶
type ProxyGroupConfig struct {
Saaras_db_proxygroup_config []cfg.SaarasProxyGroupConfig
}
type Request ¶
type Request struct { // Header represent any request headers that will be set // when the request is made. Header http.Header // contains filtered or unexported fields }
Request is a GraphQL request.
func NewRequest ¶
NewRequest makes a new Request with the specified string.
func (*Request) File ¶
File sets a file to upload. Files are only supported with a Client that was created with the UseMultipartForm option.
type RouteFilters ¶
type RouteFilters struct {
Filter Filter `json:"filter"`
}
type SaarasApp2 ¶
type SaarasApp2 struct {
Saaras_db_proxy_service []SaarasGatewayHostService
}
type SaarasArtifact ¶
type SaarasCloudCache ¶
type SaarasCloudCache struct {
// contains filtered or unexported fields
}
func (*SaarasCloudCache) OnFetch ¶
func (sac *SaarasCloudCache) OnFetch(obj interface{}, SaarasUpstreams *[]saarasconfig.SaarasUpstream, reh *contour.ResourceEventHandler, et *contour.EndpointsTranslator, pct *contour.GlobalConfigTranslator, log logrus.FieldLogger)
type SaarasDbSecret ¶
type SaarasDbSecret struct {
Saaras_db_application_secret []Secret
}
type SaarasGatewayHost2 ¶
type SaarasGatewayHost2 struct { Service_id int64 `json:"service_id"` Service_name string `json:"service_name"` Fqdn string `json:"fqdn"` Create_ts string `json:"create_ts"` Update_ts string `json:"update_ts"` Routes []SaarasRoute2 `json:"routes"` Service_secrets []SaarasSecrets `json:"service_secrets"` Service_filters []ServiceFilters `json:"service_filters"` }
type SaarasGatewayHostService ¶
type SaarasGatewayHostService struct { Service SaarasGatewayHost2 `json:"service"` Proxy struct { ProxyGlobalconfigs []struct { Globalconfig struct { GlobalconfigType string `json:"globalconfig_type"` GlobalconfigName string `json:"globalconfig_name"` Config string `json:"config"` } `json:"globalconfig"` } `json:"proxy_globalconfigs"` } `json:"proxy"` }
type SaarasRoute2 ¶
type SaarasRoute2 struct { Route_name string `json:"route_name"` Route_prefix string `json:"route_prefix"` Route_config string `json:"route_config"` Create_ts string `json:"create_ts"` Update_ts string `json:"update_ts"` Route_upstreams []cfg.SaarasMicroService2 `json:"route_upstreams"` Route_filters []RouteFilters `json:"route_filters"` }
type SaarasSecret ¶
type SaarasSecrets ¶
type SaarasSecrets struct {
Secret SaarasSecret
}
type Secret ¶
type Secret struct { SecretsBySecretId SecretsBySId Secret_id string }
type SecretArtifact ¶
type SecretArtifact struct { Secret_artifact_id string Secret_artifact_name string Type string Key string Value string }
////////////////////////// Secret //////////////////////////
type SecretsBySId ¶
type SecretsBySId struct { Secret_id string Secret_name string Secret_artifactsBySecret_id []SecretArtifact }
type Service ¶
type Service struct {
logrus.FieldLogger
}
type ServiceFilters ¶
type ServiceFilters struct {
Filter Filter `json:"filter"`
}