Documentation ¶
Index ¶
- type MagicService
- func (s *MagicService) CleaUp()
- func (s *MagicService) CreateUser(user dbmodels.LinuxUser) (*dbmodels.LinuxUser, error)
- func (s *MagicService) DeleteUser(id int64) error
- func (s *MagicService) GetUser(id int64) (*dbmodels.LinuxUser, error)
- func (s *MagicService) LinuxDistroCount() ([]dbmodels.GetLinuxDistroCountRow, error)
- func (s *MagicService) ListDistributions() ([]string, error)
- func (s *MagicService) ListUsers() ([]dbmodels.LinuxUser, error)
- func (s *MagicService) UpdateUser(user dbmodels.LinuxUser) (*dbmodels.LinuxUser, error)
- type ServiceContract
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MagicService ¶
type MagicService struct {
// contains filtered or unexported fields
}
func (*MagicService) CreateUser ¶
func (*MagicService) DeleteUser ¶
func (s *MagicService) DeleteUser(id int64) error
func (*MagicService) GetUser ¶
func (s *MagicService) GetUser(id int64) (*dbmodels.LinuxUser, error)
func (*MagicService) LinuxDistroCount ¶
func (s *MagicService) LinuxDistroCount() ([]dbmodels.GetLinuxDistroCountRow, error)
LinuxDistroCount demonstrates a few more raw queries patterns
func (*MagicService) ListDistributions ¶
func (s *MagicService) ListDistributions() ([]string, error)
ListDistributions return list of linux distributions supported
func (*MagicService) UpdateUser ¶
type ServiceContract ¶
type ServiceContract interface { ListDistributions() ([]string, error) ListUsers() ([]dbmodels.LinuxUser, error) GetUser(id int64) (*dbmodels.LinuxUser, error) UpdateUser(user dbmodels.LinuxUser) (*dbmodels.LinuxUser, error) DeleteUser(id int64) error CreateUser(user dbmodels.LinuxUser) (*dbmodels.LinuxUser, error) LinuxDistroCount() ([]dbmodels.GetLinuxDistroCountRow, error) }
func GetServices ¶
func GetServices() ServiceContract
func InitializeServices ¶
func InitializeServices(dbURI string) ServiceContract
InitializeServices: initialize service and setups connection pool
Click to show internal directories.
Click to hide internal directories.