Documentation ¶
Index ¶
- Constants
- Variables
- func GetInstanceId(db *sql.DB, uuid string) (uint, error)
- func GetSubsystemById(id uint) (proto.Subsystem, error)
- func GetSubsystemByName(name string) (proto.Subsystem, error)
- type DbHandler
- type MySQLHandler
- func (h *MySQLHandler) Create(in proto.Instance) (uint, error)
- func (h *MySQLHandler) Delete(uuid string) error
- func (h *MySQLHandler) Get(uuid string) (uint, *proto.Instance, error)
- func (h *MySQLHandler) GetAll() ([]proto.Instance, error)
- func (h *MySQLHandler) GetByName(subsystem, name, parentUUID string) (uint, *proto.Instance, error)
- func (h *MySQLHandler) Update(in proto.Instance) error
Constants ¶
View Source
const ( SubsystemOS = iota + 1 SubsystemAgent SubsystemMySQL SubsystemMongo )
View Source
const ( SubsystemNameOS = "os" SubsystemNameAgent = "agent" SubsystemNameMySQL = "mysql" SubsystemNameMongo = "mongo" )
Variables ¶
View Source
var ErrNotFound = errors.New("subsystem not found")
Functions ¶
Types ¶
type MySQLHandler ¶
type MySQLHandler struct {
// contains filtered or unexported fields
}
func NewMySQLHandler ¶
func NewMySQLHandler(dbm db.Manager) *MySQLHandler
func (*MySQLHandler) Delete ¶
func (h *MySQLHandler) Delete(uuid string) error
Click to show internal directories.
Click to hide internal directories.