structure

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2019 License: GPL-3.0 Imports: 5 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"`
	IP   string `json:"ip"`
}

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 DeleteResponse

type DeleteResponse struct {
	Deleted int
}

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 RoutingConfig

type RoutingConfig []BackendDeclaration

func (*RoutingConfig) AddAddressOrUpdate

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

func (RoutingConfig) ToJSON

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

Jump to

Keyboard shortcuts

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