Documentation ¶
Index ¶
- Constants
- type AddressConfiguration
- type AdminToken
- type AdminUser
- type BackendDeclaration
- type DBConfiguration
- type DeleteResponse
- type ElasticConfiguration
- type EndpointConfig
- type Identity32
- type Identity64
- type Isolation
- func (i Isolation) GetApplicationId() (int32, error)
- func (i Isolation) GetDeviceId() (int64, error)
- func (i Isolation) GetDomainId() (int32, error)
- func (i Isolation) GetInstanceId() (string, error)
- func (i Isolation) GetServiceId() (int32, error)
- func (i Isolation) GetSystemId() (int32, error)
- func (i Isolation) GetUserId() (int64, error)
- func (i Isolation) GetUserToken() (string, error)
- type MetricAddress
- type MetricConfiguration
- type ModuleInfo
- type NatsConfig
- type RabbitConfig
- type RedisConfiguration
- type RoutingConfig
- type SocketConfiguration
- type SyncLoggerConfig
Constants ¶
View Source
const NotificationVersionFieldName = "mdm_version"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressConfiguration ¶
type AddressConfiguration struct { Port string `json:"port" schema:"Port"` IP string `json:"ip" schema:"Host"` }
func (*AddressConfiguration) GetAddress ¶
func (addressConfiguration *AddressConfiguration) GetAddress() string
type AdminToken ¶
type AdminUser ¶
type AdminUser struct { TableName string `sql:"admin_service.users" json:"-"` Id int64 `json:"id"` Image string `json:"image"` FirstName string `json:"firstName"` LastName string `json:"lastName"` Email string `json:"email" valid:"required~Required"` Password string `json:"password,omitempty"` Phone string `json:"phone"` UpdatedAt time.Time `json:"updatedAt" sql:",null"` CreatedAt time.Time `json:"createdAt" sql:",null"` }
type BackendDeclaration ¶
type BackendDeclaration struct { ModuleName string `json:"moduleName"` Version string `json:"version"` LibVersion string `json:"libVersion"` Endpoints []EndpointConfig `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 []EndpointConfig) bool
type DBConfiguration ¶ added in v1.0.0
type DBConfiguration struct { Address string `valid:"required~Required" schema:"Host"` Schema string `valid:"required~Required" schema:"Schema"` Database string `valid:"required~Required" schema:"Database"` Port string `valid:"required~Required" schema:"Port"` Username string `schema:"Username"` Password string `schema:"Password"` PoolSize int `schema:"Connection pool size,Default is 10 connections per every CPU"` CreateSchema bool `schema:"Enable schema ensuring,Create schema if not exists"` }
type DeleteResponse ¶
type DeleteResponse struct {
Deleted int
}
type ElasticConfiguration ¶ added in v1.0.0
type ElasticConfiguration struct { URL string Username string Password string Sniff *bool Healthcheck *bool Infolog string Errorlog string Tracelog string }
func (*ElasticConfiguration) ConvertTo ¶ added in v1.0.0
func (ec *ElasticConfiguration) ConvertTo(elasticConfigPtr interface{}) error
type EndpointConfig ¶
type Identity32 ¶
type Identity32 struct {
Id int32 `json:"id" valid:"required~Required"`
}
type Identity64 ¶
type Identity64 struct {
Id int64 `json:"id" valid:"required~Required"`
}
type Isolation ¶
func (Isolation) GetApplicationId ¶
func (Isolation) GetDeviceId ¶
func (Isolation) GetDomainId ¶
func (Isolation) GetInstanceId ¶
func (Isolation) GetServiceId ¶
func (Isolation) GetSystemId ¶
func (Isolation) GetUserToken ¶
type MetricAddress ¶
type MetricAddress struct { AddressConfiguration Path string `json:"path"` }
type MetricConfiguration ¶
type MetricConfiguration struct { Address MetricAddress `json:"address" schema:"Metric HTTP server"` Gc bool `json:"gc" schema:"Collect garbage collecting statistic"` CollectingGCPeriod int32 `json:"collectingGCPeriod" schema:"GC stat collecting interval,In seconds, default: 10"` Memory bool `json:"memory" schema:"Collect memory statistic"` CollectingMemoryPeriod int32 `json:"collectingMemoryPeriod" schema:"Memory stat collecting interval,In seconds, default: 10"` }
type ModuleInfo ¶
type NatsConfig ¶ added in v1.0.0
type NatsConfig struct { ClusterId string `valid:"required~Required" schema:"Cluster ID"` Address AddressConfiguration `valid:"required~Required" schema:"Address"` PingAttempts int `schema:"Max ping attempts,When max attempts is reached connection is closed"` PintIntervalSec int `schema:"Ping interval,In seconds"` ClientId string `json:"-"` }
type RabbitConfig ¶ added in v1.0.0
type RabbitConfig struct { Address AddressConfiguration `valid:"required~Required" schema:"Address"` Vhost string `schema:"Vhost"` User string `schema:"Username"` Password string `schema:"Password"` }
func (RabbitConfig) GetUri ¶ added in v1.0.0
func (rc RabbitConfig) GetUri() string
func (RabbitConfig) ReconnectionTimeout ¶ added in v1.0.0
func (rc RabbitConfig) ReconnectionTimeout() time.Duration
type RedisConfiguration ¶ added in v1.0.0
type RedisConfiguration struct { Address AddressConfiguration `schema:"Address"` Password string `schema:"Password"` DefaultDB int `schema:"Default database"` }
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 ¶ added in v1.0.0
type SyncLoggerConfig ¶ added in v1.0.0
type SyncLoggerConfig struct { Enable bool `schema:"Enable file logging"` Filename string `json:"filename" yaml:"filename" schema:"File name"` MaxSize int `json:"-" yaml:"maxsize"` MaxAge int `json:"-" yaml:"maxage"` MaxBackups int `json:"-" yaml:"maxbackups"` LocalTime bool `json:"-" yaml:"localtime"` Compress bool `json:"compress" yaml:"compress"` ImmediateFlush bool `json:"immediateFlush" yaml:"immediateFlush"` }
Click to show internal directories.
Click to hide internal directories.