structure

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2020 License: GPL-3.0 Imports: 7 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressConfiguration

type AddressConfiguration struct {
	Port string `json:"port" schema:"Порт"`
	IP   string `json:"ip" schema:"Хост"`
}

func (*AddressConfiguration) GetAddress

func (addressConfiguration *AddressConfiguration) GetAddress() string

type BackendDeclaration

type BackendDeclaration struct {
	ModuleName string               `json:"moduleName"`
	Version    string               `json:"version"`
	LibVersion string               `json:"libVersion"`
	Endpoints  []EndpointDescriptor `json:"endpoints"`
	Address    AddressConfiguration `json:"address"`
}

func (*BackendDeclaration) IsAddressEquals

func (backedConfig *BackendDeclaration) IsAddressEquals(address AddressConfiguration) bool

func (*BackendDeclaration) IsIPAndPortEqual

func (backedConfig *BackendDeclaration) IsIPAndPortEqual(ip string, port string) bool

func (*BackendDeclaration) IsPathsEqual

func (backedConfig *BackendDeclaration) IsPathsEqual(paths []EndpointDescriptor) bool

type DBConfiguration

type DBConfiguration struct {
	Address      string `valid:"required~Required" schema:"Адрес"`
	Schema       string `valid:"required~Required" schema:"Схема"`
	Database     string `valid:"required~Required" schema:"Название базы данных"`
	Port         string `valid:"required~Required" schema:"Порт"`
	Username     string `schema:"Логин"`
	Password     string `schema:"Пароль"`
	PoolSize     int    `` /* 137-byte string literal not displayed */
	CreateSchema bool   `` /* 130-byte string literal not displayed */
}

type ElasticConfiguration

type ElasticConfiguration struct {
	URL         string `schema:"Адрес"`
	Username    string `schema:"Логин"`
	Password    string `schema:"Пароль"`
	Sniff       *bool  `` /* 175-byte string literal not displayed */
	Healthcheck *bool  `schema:"Проверка работоспособности нод,если включено, пингует ноды"`
}

func (*ElasticConfiguration) ConvertTo

func (ec *ElasticConfiguration) ConvertTo(elasticConfigPtr interface{}) error

type EndpointConfig deprecated

type EndpointConfig struct {
	Path           string `valid:"required~Required" json:"path"`
	Inner          bool   `json:"inner"`
	IgnoreOnRouter bool   `json:"ignoreOnRouter"`
}

Deprecated: use EndpointDescriptor instead

type EndpointDescriptor

type EndpointDescriptor struct {
	Path             string `valid:"required~Required" json:"path"`
	Inner            bool   `json:"inner"`
	UserAuthRequired bool
	Extra            map[string]interface{}
	Handler          interface{} `json:"-"`
}

func DescriptorsWithPrefix

func DescriptorsWithPrefix(prefix string, descriptors []EndpointDescriptor) []EndpointDescriptor

type GrpcError

type GrpcError struct {
	ErrorMessage string        `json:"errorMessage"`
	ErrorCode    string        `json:"errorCode"`
	Details      []interface{} `json:"details"`
}

type Isolation

type Isolation metadata.MD

func (Isolation) GetApplicationId

func (i Isolation) GetApplicationId() (int32, error)

func (Isolation) GetDeviceId

func (i Isolation) GetDeviceId() (int64, error)

func (Isolation) GetDomainId

func (i Isolation) GetDomainId() (int32, error)

func (Isolation) GetInstanceId

func (i Isolation) GetInstanceId() (string, error)

func (Isolation) GetServiceId

func (i Isolation) GetServiceId() (int32, error)

func (Isolation) GetSystemId

func (i Isolation) GetSystemId() (int32, error)

func (Isolation) GetUserId

func (i Isolation) GetUserId() (int64, error)

func (Isolation) GetUserToken

func (i Isolation) GetUserToken() (string, error)

type MetricAddress

type MetricAddress struct {
	AddressConfiguration
	Path string `json:"path" schema:"Путь,путь, по которому доступны метрики"`
}

type MetricConfiguration

type MetricConfiguration struct {
	Address                MetricAddress `json:"address" schema:"Адрес HTTP сервера для публикации метрик"`
	Gc                     bool          `` /* 159-byte string literal not displayed */
	CollectingGCPeriod     int32         `` /* 292-byte string literal not displayed */
	Memory                 bool          `` /* 129-byte string literal not displayed */
	CollectingMemoryPeriod int32         `` /* 268-byte string literal not displayed */
}

type ModuleInfo

type ModuleInfo struct {
	ModuleName  string   `json:"moduleName"`
	Version     string   `json:"version"`
	LibVersion  string   `json:"libVersion"`
	AwaitEvents []string `json:"awaitEvents"`
}

type NatsConfig

type NatsConfig struct {
	ClusterId       string               `valid:"required~Required" schema:"Идентификатор кластера"`
	Address         AddressConfiguration `valid:"required~Required" schema:"Адрес Nats"`
	PingAttempts    int                  `` /* 256-byte string literal not displayed */
	PintIntervalSec int                  `` /* 186-byte string literal not displayed */
	ClientId        string               `json:"-"`
}

type RabbitConfig

type RabbitConfig struct {
	Address  AddressConfiguration `valid:"required~Required" schema:"Адрес RabbitMQ"`
	Vhost    string               `schema:"Виртуальный хост,для изоляции очередей"`
	User     string               `schema:"Логин"`
	Password string               `schema:"Пароль"`
}

func (RabbitConfig) GetUri

func (rc RabbitConfig) GetUri() string

func (RabbitConfig) ReconnectionTimeout

func (rc RabbitConfig) ReconnectionTimeout() time.Duration

type RedisConfiguration

type RedisConfiguration struct {
	Address   AddressConfiguration `schema:"Адрес Redis"`
	Password  string               `schema:"Пароль"`
	DefaultDB int                  `schema:"База данных по умолчанию"`
}

type RoutingConfig

type RoutingConfig []BackendDeclaration

func (*RoutingConfig) AddAddressOrUpdate

func (cfg *RoutingConfig) AddAddressOrUpdate(backendConfig BackendDeclaration) bool

func (RoutingConfig) ToJSON

func (cfg RoutingConfig) ToJSON() ([]byte, error)

type SocketConfiguration

type SocketConfiguration struct {
	Host                  string            `schema:"Хост"`
	Port                  string            `schema:"Порт"`
	Path                  string            `schema:"Путь"`
	Secure                bool              `schema:"Защищенное соединение,если включено используется https"`
	UrlParams             map[string]string `schema:"Параметры,"`
	ConnectionString      string            `schema:"Строка соединения"`
	ConnectionReadLimitKB int64             `` /* 179-byte string literal not displayed */
}

Jump to

Keyboard shortcuts

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