colonycore

package
v0.3.14 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	/*FILE_TYPE = map[string]string{
		"-": "FILE",
		"d": "DIRECTORY",
		"l": "SYMLINK",
	}*/
	DELIMITER = "/"
)

Variables

View Source
var ConfigPath string

Functions

func Delete

func Delete(o orm.IModel) error

func Find

func Find(o orm.IModel, filter *dbox.Filter) (dbox.ICursor, error)

func Get

func Get(o orm.IModel, id interface{}) error

func Save

func Save(o orm.IModel) error

Types

type Application

type Application struct {
	orm.ModelBase
	ID         string `json:"_id",bson:"_id"`
	AppsName   string
	Port       string
	Type       string
	ZipName    string
	Enable     bool
	DeployedTo []string
	Command    interface{}
	Variable   interface{}
}

func (*Application) RecordID

func (a *Application) RecordID() interface{}

func (*Application) TableName

func (a *Application) TableName() string

type ColumnSettings

type ColumnSettings struct {
	Index     int    `json:"index",bson:"index"`
	Alias     string `json:"alias",bson:"alias"`
	Selector  string `json:"selector",bson:"selector"`
	ValueType string `json:"valuetype",bson:"valuetype"`
	AttrName  string `json:"attrname",bson:"attrname"`
}

type Connection

type Connection struct {
	orm.ModelBase
	ID                               string `json:"_id",bson:"_id"`
	Database                         string
	Driver, Host, UserName, Password string
	FileLocation                     string // for JSON/CSV
	Settings                         toolkit.M
}

func (*Connection) RecordID

func (c *Connection) RecordID() interface{}

func (*Connection) TableName

func (c *Connection) TableName() string

type ConnectionInfo

type ConnectionInfo struct {
	ConnectionID string    `json:"connectionid",bson:"connectionid"`
	Host         string    `json:"host",bson:"host"`
	UserName     string    `json:"username",bson:"username"`
	Password     string    `json:"password",bson:"password"`
	Database     string    `json:"database",bson:"database"`
	Collection   string    `json:"collection",bson:"collection"`
	Settings     toolkit.M `json:"settings",bson:"settings"`
}

type DataBrowser

type DataBrowser struct {
	orm.ModelBase
	ID           string `json:"_id",bson:"_id"`
	BrowserName  string
	Description  string
	ConnectionID string
	TableNames   string
	QueryType    string
	QueryText    string
	MetaData     []*StructInfo
}

func (*DataBrowser) RecordID

func (b *DataBrowser) RecordID() interface{}

func (*DataBrowser) TableName

func (b *DataBrowser) TableName() string

type DataGrabber

type DataGrabber struct {
	orm.ModelBase
	ID string `json:"_id",bson:"_id"`

	DataSourceOrigin      string
	DataSourceDestination string
	IsFromWizard          bool
	UseInterval           bool
	InsertMode            string
	IntervalType          string
	GrabInterval          int32
	TimeoutInterval       int32
	Maps                  []*Map
	RunAt                 []string
	PreTransferCommand    string
	PostTransferCommand   string
}

func (*DataGrabber) RecordID

func (c *DataGrabber) RecordID() interface{}

func (*DataGrabber) TableName

func (c *DataGrabber) TableName() string

type DataGrabberWizardPayload

type DataGrabberWizardPayload struct {
	ConnectionSource      string
	ConnectionDestination string
	Prefix                string
	Transformations       []*DataGrabberWizardPayloadTransformation
}

type DataGrabberWizardPayloadTransformation

type DataGrabberWizardPayloadTransformation struct {
	TableSource      string
	TableDestination string
}

type DataSettings

type DataSettings struct {
	Nameid         string            `json:"nameid",bson:"nameid"`
	RowSelector    string            `json:"rowselector",bson:"rowselector"`
	ColumnSettings []*ColumnSettings `json:"columnsettings",bson:"columnsettings"`
	FilterCond     toolkit.M         `json:"filtercond",bson:"filtercond"`
	DestOutputType string            `json:"destoutputtype",bson:"destoutputtype"`
	DestType       string            `json:"desttype",bson:"desttype"`
	ConnectionInfo *ConnectionInfo   `json:"connectioninfo",bson:"connectioninfo"`
}

type DataSource

type DataSource struct {
	orm.ModelBase
	ID           string `json:"_id",bson:"_id"`
	ConnectionID string
	QueryInfo    toolkit.M
	MetaData     []*FieldInfo
}

func (*DataSource) RecordID

func (ds *DataSource) RecordID() interface{}

func (*DataSource) TableName

func (ds *DataSource) TableName() string

type FieldInfo

type FieldInfo struct {
	ID     string `json:"_id",bson:"_id"`
	Label  string
	Type   string
	Format string
	Sub    []*FieldInfo
	Lookup *Lookup
}

type FileBrowserPayload

type FileBrowserPayload struct {
	ServerId   string         `json:"serverId"`
	Path       string         `json:"path"`
	Search     string         `json:"search"`
	Contents   string         `json:"contents"`
	Permission string         `json:"permission"`
	FileName   string         `json:"filename"`
	FileSizes  int64          `json:"filesizes"`
	NewName    string         `json:"newname"`
	File       multipart.File `json:"file"`
}

type FileInfo

type FileInfo struct {
	Name         string      `json:"name", bson:"name"`
	Size         float64     `json:"size", bson:"size"`
	User         string      `json:"user", bson:"user"`
	Group        string      `json:"group", bson:"group"`
	Permissions  string      `json:"permissions", bson:"permissions"`
	CreatedDate  time.Time   `json:"createddate", bson:"createddate"`
	LastModified time.Time   `json:"lastmodified", bson:"lastmodified"`
	Type         string      `json:"type", bson:"type"`
	Sub          []*FileInfo `json:"sub", bson:"sub"`
	SubCount     int64       `json:"subcount", bson:"subcount"`
	IsDir        bool        `json:"isdir", bson:"isdir"`
	Path         string      `json:"path", bson:"path"`
	IsEditable   bool        `json:"iseditable", bson:"iseditable"`
}

func ConstructFileInfo

func ConstructFileInfo(lines string, path string) ([]FileInfo, error)

func ConstructSearchResult

func ConstructSearchResult(list []FileInfo, path string) []FileInfo

type HistConf

type HistConf struct {
	Histpath    string `json:"histpath",bson:"histpath"`
	RecPath     string `json:"recpath",bson:"recpath"`
	FileName    string `json:"filename",bson:"filename"`
	FilePattern string `json:"filepattern",bson:"filepattern"`
}

type HostAlias

type HostAlias struct {
	IP       string `json:"ip", bson:"ip"`
	HostName string `json:"hostName", bson:"hostName"`
}

type IntervalConf

type IntervalConf struct {
	StartTime       string    `json:"starttime",bson:"starttime"`
	ExpiredTime     string    `json:"expiredtime",bson:"expiredtime"`
	IntervalType    string    `json:"intervaltype",bson:"intervaltype"`
	GrabInterval    int       `json:"grabinterval",bson:"grabinterval"`
	TimeoutInterval int       `json:"timeoutinterval",bson:"timeoutinterval"`
	CronConf        toolkit.M `json:"cronconf",bson:"cronconf"`
}

type LogConf

type LogConf struct {
	LogPath     string `json:"logpath",bson:"logpath"`
	FileName    string `json:"filename",bson:"filename"`
	FilePattern string `json:"filepattern",bson:"filepattern"`
}

type Lookup

type Lookup struct {
	orm.ModelBase
	ID                    string `json:"_id",bson:"_id"`
	DataSourceID          string
	IDField, DisplayField string
	LookupFields          []string
}

func (*Lookup) RecordID

func (l *Lookup) RecordID() interface{}

func (*Lookup) TableName

func (l *Lookup) TableName() string

type Map

type Map struct {
	Destination     string
	DestinationType string
	Source          string
	SourceType      string
}

type Server

type Server struct {
	orm.ModelBase
	ID         string       `json:"_id", bson:"_id"`
	OS         string       `json:"os", bson:"os"`
	AppPath    string       `json:"appPath",bson:"appPath"`
	DataPath   string       `json:"dataPath",bson:"dataPath"`
	Host       string       `json:"host", bson:"host"`
	ServerType string       `json:"serverType", bson:"serverType"`
	SSHType    string       `json:"sshtype", bson:"sshtype"`
	SSHFile    string       `json:"sshfile", bson:"sshfile"`
	SSHUser    string       `json:"sshuser", bson:"sshuser"`
	SSHPass    string       `json:"sshpass", bson:"sshpass"`
	CmdExtract string       `json:"cmdextract", bson:"cmdextract"`
	CmdNewFile string       `json:"cmdnewfile", bson:"cmdnewfile"`
	CmdCopy    string       `json:"cmdcopy", bson:"cmdcopy"`
	CmdMkDir   string       `json:"cmdmkdir", bson:"cmdmkdir"`
	HostAlias  []*HostAlias `json:"hostAlias", bson:"hostAlias"`
}

func (*Server) RecordID

func (s *Server) RecordID() interface{}

func (*Server) TableName

func (s *Server) TableName() string

type StructInfo

type StructInfo struct {
	Field         string
	Label         string
	DataType      string
	Format        string
	Align         string
	ShowIndex     int
	HiddenField   bool
	Lookup        bool
	Sortable      bool
	SimpleFilter  bool
	AdvanceFilter bool
	Aggregate     string
}

type TreeSource

type TreeSource struct {
	ID             int           `json:"_id",bson:"_id"`
	Text           string        `json:"text",bson:"text"`
	Expanded       bool          `json:"expanded",bson:"expanded"`
	SpriteCssClass string        `json:"spriteCssClass",bson:"spriteCssClass"`
	Items          []*TreeSource `json:"items",bson:"items"`
}

type TreeSourceModel

type TreeSourceModel struct {
	Text      string             `json:"text"`
	Type      string             `json:"type"`
	Expanded  bool               `json:"expanded"`
	Iconclass string             `json:"iconclass"`
	Ext       string             `json:"ext"`
	Path      string             `json:"path"`
	Items     []*TreeSourceModel `json:"items"`
}

type WebGrabber

type WebGrabber struct {
	orm.ModelBase
	ID           string          `json:"_id",bson:"_id"`
	SourceType   string          `json:"sourcetype",bson:"sourcetype"`
	GrabConf     toolkit.M       `json:"grabconf",bson:"grabconf"`
	IntervalConf *IntervalConf   `json:"intervalconf",bson:"intervalconf"`
	LogConf      *LogConf        `json:"logconf",bson:"logconf"`
	HistConf     *HistConf       `json:"histconf",bson:"histconf"`
	DataSettings []*DataSettings `json:"datasettings",bson:"datasettings"`
	Running      bool            `json:"running",bson:"running"`
}

func (*WebGrabber) RecordID

func (ds *WebGrabber) RecordID() interface{}

func (*WebGrabber) TableName

func (ds *WebGrabber) TableName() string

Jump to

Keyboard shortcuts

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