structure

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2019 License: GPL-3.0 Imports: 6 Imported by: 31

Documentation

Index

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 AdminToken struct {
	TableName string     `sql:"admin_service.tokens" json:"-"`
	Id        int64      `json:"id"`
	UserId    int64      `json:"userId"`
	Token     string     `json:"token"`
	ExpiredAt *time.Time `json:"expiredAt"`
	CreatedAt time.Time  `json:"createdAt" sql:",null"`
}

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 EndpointConfig struct {
	Path           string `valid:"required~Required" json:"path"`
	Inner          bool   `json:"inner"`
	IgnoreOnRouter bool   `json:"ignoreOnRouter"`
}

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

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"`
}

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 ModuleInfo struct {
	ModuleName  string   `json:"moduleName"`
	Version     string   `json:"version"`
	LibVersion  string   `json:"libVersion"`
	AwaitEvents []string `json:"awaitEvents"`
}

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 SocketConfiguration struct {
	Host             string
	Port             string
	Path             string
	Secure           bool
	UrlParams        map[string]string
	ConnectionString string
}

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"`
}

Jump to

Keyboard shortcuts

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