helper

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigDir  = "./source/configs/"
	ConfigFile = "configServer.json"
	Secret     = "qfdQjmVLiW"
)

Основные константы

View Source
const (
	AuthGuard = "authguard"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Collection

type Collection string
const (
	CollUsers Collection = "users"
)

type Config

type Config struct {
	Host      string                    `json:"host"`
	Port      int32                     `json:"port"`
	DBS       map[string]*DbConfig      `json:"dbs"`
	Handlers  map[string]*HandlerConfig `json:"handlers"`
	Observers []*HandlerConfig          `json:"observers"`
	Services  []*HandlerConfig          `json:"services"`
}

Config модель конфига

type CtxKey

type CtxKey int
const (
	CtxKeyValue CtxKey = iota
)

type DBType

type DBType string
const (
	Postgres DBType = "postgres"
	Mongodb  DBType = "mongodb"
)

type DbConfig

type DbConfig struct {
	Type     DBType `json:"type"`
	Host     string `json:"host"`
	Port     int32  `json:"port"`
	Name     string `json:"name"`
	User     string `json:"user"`
	Password string `json:"password"`
}

type HandlerConfig

type HandlerConfig struct {
	Type     HandlerType           `json:"type"`
	Host     string                `json:"host"`
	Port     int32                 `json:"port"`
	Key      string                `json:"key"`
	Group    coreHelper.GroupsType `json:"group"`
	User     string                `json:"user"`
	Password string                `json:"password"`
	IsTSL    bool                  `json:"is_tsl"`
}

type HandlerType

type HandlerType string
const (
	TCP  HandlerType = "tcp"
	MQTT HandlerType = "mqtt"
	WS   HandlerType = "ws"
	GRPC HandlerType = "grpc"
)

type Role

type Role byte
const (
	RoleUser Role = iota + 1
)

Jump to

Keyboard shortcuts

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