configs

package
v3.2.12 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: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Database *gorm.DB

Functions

This section is empty.

Types

type Amqp

type Amqp 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"`
}

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 Elasticsearch

type Elasticsearch struct {
	Host  string `json:"host" yaml:"host"`
	Port  int    `json:"port" yaml:"port"`
	Index string `json:"index" yaml:"index"`
}

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"`
	Elasticsearch   Elasticsearch `json:"elasticsearch" yaml:"elasticsearch"`
	Amqp            Amqp          `json:"queue" yaml:"queue"`
	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