Documentation ¶
Index ¶
- Constants
- func GetCategoryByDescription(txn *gorp.Transaction, desc string) (*models.Category, error)
- func GetDeviceBySerial(txn *gorp.Transaction, serial string) (*models.Device, error)
- func GetFileByDate(txn *gorp.Transaction, begin time.Time) (*models.File, error)
- func GetHostByName(txn *gorp.Transaction, name string) (*models.Host, error)
- func GetLoglevelByName(txn *gorp.Transaction, name string) (*models.LogLevel, error)
- func GetLogtypeByNames(txn *gorp.Transaction, level1, level2 string) (*models.LogType, error)
- func GetOrInsertByUnique(txn *gorp.Transaction, query string, qrows interface{}, ...) (interface{}, error)
- func GetOrInsertCategoryByDescription(txn *gorp.Transaction, desc string) (*models.Category, error)
- func GetOrInsertDeviceBySerial(txn *gorp.Transaction, serial, device string) (*models.Device, error)
- func GetOrInsertHostByName(txn *gorp.Transaction, name string, category *models.Category) (*models.Host, error)
- func GetOrInsertLogtypeByNames(txn *gorp.Transaction, level1, level2 string) (*models.LogType, error)
- func GetOrInsertProfileByName(txn *gorp.Transaction, name string) (*models.Profile, error)
- func GetOrInsertServiceByName(txn *gorp.Transaction, name string) (*models.Service, error)
- func GetOrInsertUserByName(txn *gorp.Transaction, name string) (*models.User, error)
- func GetProfileByName(txn *gorp.Transaction, name string) (*models.Profile, error)
- func GetRowByUnique(txn *gorp.Transaction, query string, qrows interface{}, ...) (interface{}, error)
- func GetServiceByName(txn *gorp.Transaction, name string) (*models.Service, error)
- func GetUserByName(txn *gorp.Transaction, name string) (*models.User, error)
- func GetUtmstatusByName(txn *gorp.Transaction, name string) (*models.UtmStatus, error)
- func MakeGenericSlice(slice interface{}) []interface{}
Constants ¶
View Source
const (
SQL_CATEGORY_BYNAME = `SELECT id, description
FROM category
WHERE description = :desc`
)
View Source
const (
SQL_DEVICE_BYSERIAL = `SELECT id, name, serial
FROM device
WHERE serial = :serial`
)
View Source
const (
SQL_FILE_BYDATE = `SELECT id, begin_dt, end_dt, count_lines
FROM file
WHERE begin_dt = :begin`
)
View Source
const (
SQL_HOST_BYNAME = `SELECT id, name, category
FROM host
WHERE name = :name`
)
View Source
const (
SQL_LOGLEVEL_BYDESC = `SELECT id, name
FROM loglevel
WHERE name = :name`
)
View Source
const (
SQL_LOGTYPE_BYNAME = `SELECT id, level1, level2
FROM logtype
WHERE level1 = :level1 AND level2 = :level2`
)
View Source
const (
SQL_PROFILE_BYNAME = `SELECT id, name
FROM profile
WHERE name = :name`
)
View Source
const (
SQL_SERVICE_BYNAME = `SELECT id, name
FROM service
WHERE name = :name`
)
View Source
const (
SQL_USER_BYNAME = `SELECT id, name
FROM user
WHERE name = :name`
)
View Source
const (
SQL_UTMSTATUS_BYNAME = `SELECT id, name
FROM utmstatus
WHERE name = :name`
)
Variables ¶
This section is empty.
Functions ¶
func GetDeviceBySerial ¶
func GetFileByDate ¶
func GetHostByName ¶
func GetLoglevelByName ¶
func GetLogtypeByNames ¶
func GetOrInsertByUnique ¶
func GetOrInsertByUnique( txn *gorp.Transaction, query string, qrows interface{}, unique map[string]interface{}, insert func() interface{}) (interface{}, error)
func GetOrInsertHostByName ¶
func GetOrInsertUserByName ¶
func GetProfileByName ¶
func GetRowByUnique ¶
func GetRowByUnique( txn *gorp.Transaction, query string, qrows interface{}, unique map[string]interface{}) (interface{}, error)
func GetServiceByName ¶
func GetUserByName ¶
func GetUtmstatusByName ¶
func MakeGenericSlice ¶
func MakeGenericSlice(slice interface{}) []interface{}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.