structure

package
v2.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: GPL-3.0 Imports: 6 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 {
	IP   string `json:"ip" schema:"Хост"`
	Port string `json:"port" 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"`
	RequiredModules []ModuleDependency   `json:"requiredModules"`
	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 ModuleDependency added in v2.5.0

type ModuleDependency struct {
	Name     string
	Required bool
}

type ModuleInfo

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

type RedisConfiguration

type RedisConfiguration struct {
	Address   AddressConfiguration `schema:"Адрес Redis"`
	Username  string               `schema:"Логин"`
	Password  string               `schema:"Пароль"`
	DefaultDB int                  `schema:"База данных по умолчанию"`
	Sentinel  *RedisSentinel       `schema:"Настройки Sentinel"`
}

type RedisSentinel added in v2.5.0

type RedisSentinel struct {
	MasterName        string   `schema:"Наименование мастера"`
	SentinelAddresses []string `schema:"Список адресов,host:port"`
	// Deprecated: для sentinel не нужен отдельный username
	SentinelUsername string `schema:"Логин Sentinel,deprecated: поле больше не используется"`
	SentinelPassword string `schema:"Пароль Sentinel"`
}

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:"Параметры"`
	// Deprecated: unused
	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