Documentation ¶
Index ¶
- Constants
- func GenConfig(path string) error
- func LoadPlugins()
- type FileTypeHandler
- type ServerConfigFile
- func (cf *ServerConfigFile) GetDBServerFunctions() ([]string, error)
- func (cf *ServerConfigFile) LZJDQueryAvailable() bool
- func (cf *ServerConfigFile) ListenString() string
- func (cf *ServerConfigFile) NumFiles() int
- func (cf *ServerConfigFile) QueryColumns(table string, columns []string) (*sql.Rows, error)
- func (cf *ServerConfigFile) SDHashQueryAvailable() bool
- func (cf *ServerConfigFile) SSDeepQueryAvailable() bool
- func (cf *ServerConfigFile) SetPassword(userid int, password []byte) error
- type ServerContext
Constants ¶
View Source
const ( CONFIG_NAME string = "malwaredb.json" CONFIG_PATH string = "/etc/" + CONFIG_NAME )
Variables ¶
This section is empty.
Functions ¶
func LoadPlugins ¶
func LoadPlugins()
Types ¶
type FileTypeHandler ¶
type ServerConfigFile ¶
type ServerConfigFile struct { FilePath string `json:"-"` Database struct { Host string `json:"host"` Port string `json:"port"` User string `json:"user"` Password string `json:"password"` DBName string `json:"dbname"` } `json:"database"` Listen struct { Host string `json:"host"` Port string `json:"port"` MaxThreads int `json:"maxThreads"` } `json:"listen"` SSL struct { CA string `json:"ca"` Cert string `json:"cert"` Key string `json:"key"` } StoredSamplesPath string `json:"samplesPath"` StoredSamplesDepth int `json:"samplesDepth"` DbDriver *sql.DB }
func LoadConfig ¶
func LoadConfig() (ServerConfigFile, error)
func ReadConfig ¶
func ReadConfig(path string) ServerConfigFile
func (*ServerConfigFile) GetDBServerFunctions ¶
func (cf *ServerConfigFile) GetDBServerFunctions() ([]string, error)
func (*ServerConfigFile) LZJDQueryAvailable ¶
func (cf *ServerConfigFile) LZJDQueryAvailable() bool
func (*ServerConfigFile) ListenString ¶
func (cf *ServerConfigFile) ListenString() string
func (*ServerConfigFile) NumFiles ¶
func (cf *ServerConfigFile) NumFiles() int
func (*ServerConfigFile) QueryColumns ¶
func (*ServerConfigFile) SDHashQueryAvailable ¶
func (cf *ServerConfigFile) SDHashQueryAvailable() bool
func (*ServerConfigFile) SSDeepQueryAvailable ¶
func (cf *ServerConfigFile) SSDeepQueryAvailable() bool
func (*ServerConfigFile) SetPassword ¶
func (cf *ServerConfigFile) SetPassword(userid int, password []byte) error
type ServerContext ¶
type ServerContext struct { ConfigFile *ServerConfigFile GlobalWaitGroup *sync.WaitGroup FileTypePlugins []FileTypeHandler StartTime time.Time }
func GetGlobalContext ¶
func GetGlobalContext() *ServerContext
func (*ServerContext) SetConfig ¶
func (cntx *ServerContext) SetConfig(cfg *ServerConfigFile)
func (*ServerContext) TimeRunning ¶
func (cntx *ServerContext) TimeRunning() time.Duration
Click to show internal directories.
Click to hide internal directories.