Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Serve ¶
func Serve( ctx context.Context, config Config, logger *log.Logrus, pgClient *postgres.Client, nrApp *newrelic.Application, assetService handlersv1beta1.AssetService, starService handlersv1beta1.StarService, discussionService handlersv1beta1.DiscussionService, tagService handlersv1beta1.TagService, tagTemplateService handlersv1beta1.TagTemplateService, userService handlersv1beta1.UserService, ) error
Types ¶
type Config ¶
type Config struct {
Host string `mapstructure:"host" default:"0.0.0.0"`
Port int `mapstructure:"port" default:"8080"`
BaseUrl string `mapstructure:"baseurl" default:"localhost:8080"`
// User Identity
Identity IdentityConfig `mapstructure:"identity"`
RequestTimeout time.Duration `mapstructure:"request_timeout" default:"10s"`
// GRPC Config
GRPC GRPCConfig `mapstructure:"grpc"`
}
type GRPCConfig ¶
type GRPCConfig struct {
Port int `yaml:"port" mapstructure:"port" default:"8081"`
RequestTimeout time.Duration `yaml:"request_timeout" mapstructure:"request_timeout" default:"5s"`
MaxRecvMsgSize int `yaml:"max_recv_msg_size" mapstructure:"max_recv_msg_size" default:"33554432"`
MaxSendMsgSize int `yaml:"max_send_msg_size" mapstructure:"max_send_msg_size" default:"33554432"`
}
type IdentityConfig ¶
type IdentityConfig struct {
// User Identity
HeaderKeyEmail string `yaml:"headerkey_email" mapstructure:"headerkey_email" default:"Compass-User-Email"`
HeaderValueEmail string `yaml:"headervalue_email" mapstructure:"headervalue_email" default:"gotocompany@email.com"`
ProviderDefaultName string `yaml:"provider_default_name" mapstructure:"provider_default_name" default:""`
}
Click to show internal directories.
Click to hide internal directories.