Documentation
¶
Index ¶
- Variables
- func Serve(ctx context.Context, logger log.Logger, cfg Config, nrApp newrelic.Application, ...) error
- func ServeConnect(ctx context.Context, logger log.Logger, cfg Config, deps api.Deps, ...) error
- func ServeUI(ctx context.Context, logger log.Logger, uiConfig UIConfig, ...)
- type Config
- type ConnectConfig
- type GRPCConfig
- type UIConfig
- type UIConfigApiResponse
- type WebhooksConfig
- type WebhooksConfigApiResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotProto = fmt.Errorf("error not proto")
)
Functions ¶
func ServeConnect ¶ added in v0.66.0
Types ¶
type Config ¶
type Config struct {
// Connect server config
Connect ConnectConfig `yaml:"connect" mapstructure:"connect"`
// port to listen HTTP requests on
Port int `yaml:"port" mapstructure:"port" default:"8080"`
// GRPC Config
GRPC GRPCConfig `mapstructure:"grpc"`
// metrics port
MetricsPort int `yaml:"metrics_port" mapstructure:"metrics_port" default:"9000"`
// Profiler enables /debug/pprof under metrics port
Profiler bool `yaml:"profiler" mapstructure:"profiler" default:"false"`
// the network interface to listen on
Host string `yaml:"host" mapstructure:"host" default:"127.0.0.1"`
// TODO might not suitable here because it is also being used by proxy
// Headers which will have user's email id
IdentityProxyHeader string `yaml:"identity_proxy_header" mapstructure:"identity_proxy_header" default:""`
// ResourcesPath is a directory path where resources is defined
// that this service should implement
ResourcesConfigPath string `yaml:"resources_config_path" mapstructure:"resources_config_path"`
// ResourcesPathSecretSecret could be an env name, file path or actual value required
// to access ResourcesPathSecretPath files
ResourcesConfigPathSecret string `yaml:"resources_config_path_secret" mapstructure:"resources_config_path_secret"`
Authentication authenticate.Config `yaml:"authentication" mapstructure:"authentication"`
// Deprecated: use Cors instead
CorsOrigin []string `yaml:"cors_origin" mapstructure:"cors_origin"`
// Cors configuration setup origin value from where we want to allow cors
// headers and methods are the list of headers and methods we want to allow
Cors interceptors.CorsConfig `yaml:"cors" mapstructure:"cors"`
ConnectCors connectinterceptors.CorsConfig `yaml:"cors" mapstructure:"cors"`
Admin bootstrap.AdminConfig `yaml:"admin" mapstructure:"admin"`
Mailer mailer.Config `yaml:"mailer" mapstructure:"mailer"`
Webhook webhook.Config `yaml:"webhook" mapstructure:"webhook"`
}
type ConnectConfig ¶ added in v0.66.0
type ConnectConfig struct {
// port to listen buf connect requests on
Port int `yaml:"port" mapstructure:"port" default:"8002"`
}
type GRPCConfig ¶
type GRPCConfig struct {
Port int `mapstructure:"port" default:"8081"`
MaxRecvMsgSize int `mapstructure:"max_recv_msg_size" default:"33554432"`
MaxSendMsgSize int `mapstructure:"max_send_msg_size" default:"33554432"`
TLSCertFile string `mapstructure:"tls_cert_file" default:""`
TLSKeyFile string `mapstructure:"tls_key_file" default:""`
TLSClientCAFile string `mapstructure:"tls_client_ca_file" default:""`
}
type UIConfig ¶ added in v0.8.17
type UIConfig struct {
Port int `yaml:"port" mapstructure:"port"`
Title string `yaml:"title" mapstructure:"title"`
Logo string `yaml:"logo" mapstructure:"logo"`
AppURL string `yaml:"app_url" mapstructure:"app_url"`
TokenProductId string `yaml:"token_product_id" mapstructure:"token_product_id"`
OrganizationTypes []string `yaml:"organization_types" mapstructure:"organization_types"`
Webhooks WebhooksConfig `yaml:"webhooks" mapstructure:"webhooks"`
}
type UIConfigApiResponse ¶ added in v0.47.0
type WebhooksConfig ¶ added in v0.77.0
type WebhooksConfig struct {
EnableDelete bool `yaml:"enable_delete" mapstructure:"enable_delete" default:"false"`
}
type WebhooksConfigApiResponse ¶ added in v0.77.0
type WebhooksConfigApiResponse struct {
EnableDelete bool `json:"enable_delete"`
}
Click to show internal directories.
Click to hide internal directories.