configs

package
v3.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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 AuthHeader

type AuthHeader struct {
	Id        string `json:"id" yaml:"id"`
	Email     string `json:"email" yaml:"email"`
	Role      string `json:"role" yaml:"role"`
	Whitelist string `json:"whitelist" yaml:"whitelist"`
	MinRole   int    `json:"min_role" yaml:"min_role"`
}

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"`
	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"`
	AuthHeader      AuthHeader    `json:"auth_header" yaml:"auth_header"`
	RequestIDHeader string        `json:"request_id_header" yaml:"request_id_header"`
	CacheLifetime   int           `json:"cache_lifetime" yaml:"cache_lifetime"`
	User            *User
}

type Server

type Server interface {
	RegisterGRpc(server *grpc.Server)
	GRpcHandler(context context.Context, server *runtime.ServeMux, client *grpc.ClientConn) error
	RegisterAutoMigrate()
	RegisterQueueConsumer()
	RepopulateData()
}

type Service

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

type User

type User struct {
	Id    string
	Email string
	Role  int
}

Jump to

Keyboard shortcuts

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