model

package
v0.0.0-...-7d4b0c2 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2015 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDataDtoJson

func GetDataDtoJson(d interface{}) string

func GetErrorDtoJson

func GetErrorDtoJson(message string) string

func GetErrorObjDtoJson

func GetErrorObjDtoJson(err error) string

Types

type APSServerAPSInfo

type APSServerAPSInfo struct {
	XMLName              xml.Name `xml:"aps"`
	Id                   string   `xml:"id"`
	Password             string   `xml:"password"`
	RegisterInterval     int      `xml:"registerinterval"`
	DefaultHeartInterval int      `xml:"defaultheartinterval"`
	AddressInfo          AddressInfo
	LogInfo              APSServerLogInfo
}

type APSServerLogInfo

type APSServerLogInfo struct {
	XMLName     xml.Name `xml:"loginfo"`
	Logcfgfile  string   `xml:"logcfgfile"`
	SaveCatalog string   `xml:"savecatalog"`
}

type APSServerSetupInfo

type APSServerSetupInfo struct {
	XMLName       xml.Name `xml:"sysware"`
	APSInfo       APSServerAPSInfo
	SipServerInfo APSServerSipServerInfo
	CMSServerInfo CMSServerInfo
}

type APSServerSipServerInfo

type APSServerSipServerInfo struct {
	XMLName     xml.Name `xml:"sipserver"`
	Id          string   `xml:"id"`
	Domain      string   `xml:"domain"`
	AddressInfo AddressInfo
}

type AddressInfo

type AddressInfo struct {
	XMLName xml.Name `xml:"addressinfo"`
	IP      string   `xml:"ip"`
	Port    int      `xml:"port"`
}

type CMSServerDbPropertyInfo

type CMSServerDbPropertyInfo struct {
	Value string `xml:",chardata"`
	Name  string `xml:"name,attr"`
}

type CMSServerInfo

type CMSServerInfo struct {
	XMLName xml.Name `xml:"cmsserver"`
	Address string   `xml:"address"`
}

type CMSServerSessionFactoryInfo

type CMSServerSessionFactoryInfo struct {
	XMLName    xml.Name                  `xml:"session-factory"`
	Properties []CMSServerDbPropertyInfo `xml:"property"`
}

type CMSServerSetupInfo

type CMSServerSetupInfo struct {
	XMLName            xml.Name `xml:"hibernate-configuration"`
	SessionFactoryInfo CMSServerSessionFactoryInfo
}

func (*CMSServerSetupInfo) GetProperty

func (cMSServerSetupInfo *CMSServerSetupInfo) GetProperty(propKey string) (string, error)

func (*CMSServerSetupInfo) SetProperty

func (cMSServerSetupInfo *CMSServerSetupInfo) SetProperty(propKey string, value string) error

type CpuInfo

type CpuInfo struct {
	User    uint64 // time spent in user mode
	Nice    uint64 // time spent in user mode with low priority (nice)
	System  uint64 // time spent in system mode
	Idle    uint64 // time spent in the idle task
	Iowait  uint64 // time spent waiting for I/O to complete (since Linux 2.5.41)
	Irq     uint64 // time spent servicing  interrupts  (since  2.6.0-test4)
	SoftIrq uint64 // time spent servicing softirqs (since 2.6.0-test4)
	Steal   uint64 // time spent in other OSes when running in a virtualized environment
	Guest   uint64 // time spent running a virtual CPU for guest operating systems under the control of the Linux kernel.
	Total   uint64 // total of all time fields
}

type DataDto

type DataDto struct {
	Succ bool
	Msg  string
	Data interface{}
}

type LoginHandle

type LoginHandle interface {
	Login(userName string, password string)
}

type MTSServerMTSInfo

type MTSServerMTSInfo struct {
	XMLName              xml.Name `xml:"mts"`
	Id                   string   `xml:"id"`
	Password             string   `xml:"password"`
	RegisterInterval     int      `xml:"registerinterval"`
	DefaultHeartInterval int      `xml:"defaultheartinterval"`
	AddressInfo          AddressInfo
}

type MTSServerSetupInfo

type MTSServerSetupInfo struct {
	XMLName       xml.Name `xml:"sysware"`
	MTSInfo       MTSServerMTSInfo
	SipServerInfo APSServerSipServerInfo
	CMSServerInfo CMSServerInfo
}

type MemInfo

type MemInfo struct {
	Buffers   uint64
	Cached    uint64
	MemTotal  uint64
	MemFree   uint64
	SwapTotal uint64
	SwapUsed  uint64
	SwapFree  uint64
}

type NetCardInfo

type NetCardInfo struct {
	Iface          string
	InBytes        int64
	InPackages     int64
	InErrors       int64
	InDropped      int64
	InFifoErrs     int64
	InFrameErrs    int64
	InCompressed   int64
	InMulticast    int64
	OutBytes       int64
	OutPackages    int64
	OutErrors      int64
	OutDropped     int64
	OutFifoErrs    int64
	OutCollisions  int64
	OutCarrierErrs int64
	OutCompressed  int64
	TotalBytes     int64
	TotalPackages  int64
	TotalErrors    int64
	TotalDropped   int64
}

type PageHandle

type PageHandle interface {
	GetPageInfo(pageNo int, perPageRecordSize int, recordCount int) PageInfo
}

func NewPageHandle

func NewPageHandle() PageHandle

type PageInfo

type PageInfo struct {
	PageNo            int
	RecordCount       int
	PerPageRecordSize int
	TotalPage         int
}

func (*PageInfo) GetPageInfo

func (pageInfo *PageInfo) GetPageInfo(pageNo int, perPageRecordSize int, recordCount int) PageInfo

type ProcessInfo

type ProcessInfo struct {
	Id          int
	Name        string
	Cmdline     string
	RealPath    string
	State       string
	MemRealSize int64
	MemVmSize   int64
	CPURate     float64
	MemRate     float64
}

type RouteHandle

type RouteHandle interface {
	Routes(m *martini.ClassicMartini)
}

type RouteHandles

type RouteHandles struct {
	Handles []RouteHandle
}

func (*RouteHandles) Routes

func (routeHandle *RouteHandles) Routes(m *martini.ClassicMartini)

type SIPServerActiveMQInfo

type SIPServerActiveMQInfo struct {
	XMLName     xml.Name `xml:"activeMQ"`
	AddressInfo AddressInfo
	Topic       string `xml:"topic"`
}

type SIPServerOptionInfo

type SIPServerOptionInfo struct {
	XMLName      xml.Name `xml:"option"`
	Daemon       int      `xml:"daemon"`
	Havesiptrace int      `xml:"havesiptrace"`
	Sipmode      int      `xml:"sipmode"`
}

type SIPServerSIPInfo

type SIPServerSIPInfo struct {
	XMLName              xml.Name `xml:"sipserver"`
	Id                   string   `xml:"id"`
	Password             string   `xml:"password"`
	Domain               string   `xml:"domain"`
	DefaultHeartInterval int      `xml:"defaultheartinterval"`
	AddressInfo          AddressInfo
}

type SIPServerSetupInfo

type SIPServerSetupInfo struct {
	XMLName       xml.Name `xml:"sysware"`
	SIPInfo       SIPServerSIPInfo
	CMSServerInfo CMSServerInfo
	OptionInfo    SIPServerOptionInfo
	ActiveMQInfo  SIPServerActiveMQInfo
}

type ServerInfo

type ServerInfo struct {
	XMLName    xml.Name `xml:"server"`
	ServerName string   `xml:"serverName"`
	Address    string   `xml:"address"`
	Type       int      `xml:"type"`
	Status     int      `xml:"-"`
}

type ServerPageHandle

type ServerPageHandle interface {
	GetServerPageInfo(pageNo int, perPageRecordSize int) ServerPageInfo
}

func NewServerPageHandle

func NewServerPageHandle() ServerPageHandle

type ServerPageInfo

type ServerPageInfo struct {
	Servers []ServerInfo
	Page    PageInfo
}

func (*ServerPageInfo) GetServerPageInfo

func (serverPageInfo *ServerPageInfo) GetServerPageInfo(pageNo int, perPageRecordSize int) ServerPageInfo

type ServerProcessInfo

type ServerProcessInfo struct {
	ServerInfo
	ProcessInfo
}

type ServerSaveInfo

type ServerSaveInfo struct {
	ServerInfo
	OServerName string
	AddFlag     bool
}

type ServerStatusInfo

type ServerStatusInfo struct {
	Type string
	Info string
}

type SetupHandle

type SetupHandle interface {
	GetSetupInfo(setupInfo *SetupInfo) bool
	SaveSetupInfo(setupInfo *SetupInfo) bool
}

func NewSetupHandle

func NewSetupHandle() SetupHandle

type SetupInfo

type SetupInfo struct {
	XMLName xml.Name     `xml:"swd"`
	Users   []UserInfo   `xml:"user"`
	Servers []ServerInfo `xml:"server"`
	Port    int          `xml:"port"`
}

func (*SetupInfo) AddServerInfo

func (setupInfo *SetupInfo) AddServerInfo(serverInfo ServerInfo)

func (*SetupInfo) AddUserInfo

func (setupInfo *SetupInfo) AddUserInfo(userInfo UserInfo)

func (*SetupInfo) DeleteServerByServerName

func (setupInfo *SetupInfo) DeleteServerByServerName(serverName string) bool

func (*SetupInfo) DeleteUserByUserName

func (setupInfo *SetupInfo) DeleteUserByUserName(userName string) bool

func (*SetupInfo) GetServerIndexByServerName

func (setupInfo *SetupInfo) GetServerIndexByServerName(serverName string) int

func (*SetupInfo) GetSetupInfo

func (setupInfo1 *SetupInfo) GetSetupInfo(setupInfo *SetupInfo) bool

func (*SetupInfo) GetUserIndexByUserName

func (setupInfo *SetupInfo) GetUserIndexByUserName(userName string) int

func (*SetupInfo) SaveSetupInfo

func (setupInfo1 *SetupInfo) SaveSetupInfo(setupInfo *SetupInfo) bool

type UserHandle

type UserHandle interface {
	LoginHandle
	Logout()
	IsLogin() bool
}

type UserInfo

type UserInfo struct {
	UserName    string    `xml:"userName"`
	Password    string    `xml:"password"`
	StatusDate  time.Time `xml:"-"`
	LoginStatus int       `xml:"-"`
}

func (*UserInfo) Equal

func (userInfo *UserInfo) Equal(userName string, password string) bool

func (*UserInfo) IsLogin

func (userInfo *UserInfo) IsLogin() bool

func (*UserInfo) Login

func (userInfo *UserInfo) Login(userName string, password string) bool

func (*UserInfo) Logout

func (userInfo *UserInfo) Logout()

func (*UserInfo) SetLoginState

func (userInfo *UserInfo) SetLoginState()

type UserSaveInfo

type UserSaveInfo struct {
	UserInfo
	OUserName string
	AddFlag   bool
}

Jump to

Keyboard shortcuts

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