config

package
v0.0.0-...-64a9ce5 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CliReq               = "ClientRequest"
	SvcReq               = "ServiceRequest"
	SvcRsp               = "ServiceResponse"
	CliRsp               = "ClientResponse"
	GraphiqlExplorerPath = "/explorer"
	GraphqlPath          = "/graphql"
	ConfigFileName       = "metamate"
	ConfigFileExtension  = "yaml"
	ConfigFile           = ConfigFileName + "." + ConfigFileExtension
)

Variables

View Source
var DefaultConfig = types.Config{
	Host: types.HostConfig{
		AllowedOrigins:      []string{"*"},
		ReadTimeoutSeconds:  30,
		WriteTimeoutSeconds: 30,
		BasicAuth: types.BasicAuthConfig{
			User:     "user",
			Password: "password",
		},
	},
	Log: types.LogConfig{
		Http: true,
	},
	Internal: types.InternalConfig{
		Get: types.GetConfig{
			MaxResults: 2000,
			ResolveById: types.ResolveByIdConfig{
				Concurrency: 100,
			},
		},
	},
	DiscoverySvc: mql.Service{
		Id: &mql.ServiceId{
			Value:       mql.String("embedded"),
			ServiceName: mql.String("metamate"),
		},
		IsEmbedded: mql.Bool(true),
		Url: &mql.Url{
			Value: mql.String("http://discovery"),
		},
		Endpoints: &mql.ServiceEndpoints{
			LookupService: &mql.LookupServiceEndpoint{},
			GetServices:   &mql.GetServicesEndpoint{},
		},
	},
	Endpoints: types.EndpointsConfig{
		Config: types.ConfigEndpointConfig{
			On: true,
		},
		Prometheus: types.PrometheusEndpointConfig{
			On: true,
		},
		Debug: types.DebugEndpointConfig{
			On: true,
		},
		Graphql: types.GraphqlEndpointConfig{
			On: true,
		},
		GraphiqlExplorer: types.GraphiqlExplorerEndpointConfig{
			On: true,
		},
		HttpJson: types.HttpJsonEndpoint{
			On: true,
		},
	},
	Embedded: types.EmbeddedConfig{
		Services: []types.EmbeddedSvc{
			{
				Id:   "mastodon",
				Name: embedded.Mastodon,
			},
			{
				Id:   "hackernews",
				Name: embedded.Hackernews,
			},
			{
				Id:   "reddit",
				Name: embedded.Reddit,
			},
		},
	},
	ServiceAccounts: []types.ServiceAccountAssignment{
		{
			ServiceId: mql.ServiceId{
				ServiceName: mql.String("embedded"),
				Value:       mql.String("reddit"),
			},
			ServiceAccount: mql.ServiceAccount{
				ClientId:     mql.String("w46bvIsqpm1ZrA"),
				ClientSecret: mql.String("k68l2YepSu-eJA3IjVVJivycbaU"),
				Username:     mql.String("metamatex"),
				Password:     mql.String("p3VhubNQEbc9A7P"),
			},
		},
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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