configs

package
v4.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Database *gorm.DB

Functions

This section is empty.

Types

type Db

type Db struct {
	Host     string `json:"host" yaml:"host"`
	Port     int    `json:"port" yaml:"port"`
	User     string `json:"user" yaml:"user"`
	Password string `json:"password" yaml:"password"`
	Name     string `json:"name" yaml:"name"`
	Driver   string `json:"driver" yaml:"driver"`
}

type Env

type Env struct {
	Debug           bool    `json:"debug" yaml:"debug"`
	Secret          string  `json:"secret" yaml:"secret"`
	HttpPort        int     `json:"http_port" yaml:"http_port"`
	RpcPort         int     `json:"rpc_port" yaml:"rpc_port"`
	ApiVersion      string  `json:"api_version" yaml:"api_version"`
	Service         Service `json:"service" yaml:"service"`
	Db              Db      `json:"database" yaml:"database"`
	RequestIDHeader string  `json:"request_id_header" yaml:"request_id_header"`
	CacheLifetime   int     `json:"cache_lifetime" yaml:"cache_lifetime"`
	User            string
}

type Server

type Server interface {
	Register(server *grpc.Server)
	Handle(context context.Context, server *runtime.ServeMux, client *grpc.ClientConn) error
	Migrate(db *gorm.DB)
	Consume(messenger *messengers.Messenger)
	Sync(client *elastic.Client)
}

type Service

type Service struct {
	Name           string `json:"name" yaml:"name"`
	ConnonicalName string
}

Jump to

Keyboard shortcuts

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