config

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GlobalServerConfig ServerConfig
	GlobalConsulConfig ConsulConfig

	GlobalUserClient    userservice.Client
	GlobalCarClient     carservice.Client
	GlobalProfileClient profileservice.Client
	GlobalTripClient    tripservice.Client
)

Functions

This section is empty.

Types

type ConsulConfig added in v0.2.0

type ConsulConfig struct {
	Host string `mapstructure:"host" json:"host"`
	Port int    `mapstructure:"port" json:"port"`
	Key  string `mapstructure:"key" json:"key"`
}

type OtelConfig

type OtelConfig struct {
	EndPoint string `mapstructure:"endpoint" json:"endpoint"`
}

type PasetoConfig added in v0.2.0

type PasetoConfig struct {
	PubKey   string `mapstructure:"pub_key" json:"pub_key"`
	Implicit string `mapstructure:"implicit" json:"implicit"`
}

type RPCSrvConfig

type RPCSrvConfig struct {
	Name string `mapstructure:"name" json:"name"`
}

type ServerConfig

type ServerConfig struct {
	Name           string       `mapstructure:"name" json:"name"`
	Host           string       `mapstructure:"host" json:"host"`
	Port           int          `mapstructure:"port" json:"port"`
	GPTKey         string       `mapstructure:"gpt" json:"gpt"`
	ProxyURL       string       `mapstructure:"proxy" json:"proxy"`
	PasetoInfo     PasetoConfig `mapstructure:"paseto" json:"paseto"`
	OtelInfo       OtelConfig   `mapstructure:"otel" json:"otel"`
	UserSrvInfo    RPCSrvConfig `mapstructure:"user_srv" json:"user_srv"`
	CarSrvInfo     RPCSrvConfig `mapstructure:"car_srv" json:"car_srv"`
	ProfileSrvInfo RPCSrvConfig `mapstructure:"profile_srv" json:"profile_srv"`
	TripSrvInfo    RPCSrvConfig `mapstructure:"trip_srv" json:"trip_srv"`
}

Jump to

Keyboard shortcuts

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