Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DatabaseStore ¶
type DatabaseStore interface { Init(cfg models_config.DatabaseConfig) error UserRepository LoginRepository HistoryRepository RoleRepository NetworkElementRepository MmeCommandRepository }
func GetSingleton ¶
func GetSingleton() DatabaseStore
type HistoryRepository ¶
type HistoryRepository interface { SaveHistory(*models_api.History) error GetHistoryById(uint64) (*models_api.History, error) DeleteHistoryById(uint64) error GetHistoryListByMode(string) ([]models_api.History, error) GetRecordHistoryByCommand(string) (*models_api.History, error) GetHistoryCommandByModeLimit(string, int) ([]models_api.History, error) GetHistorySavingLog(neSiteName string) ([]models_api.History, error) }
type LoginRepository ¶
type LoginRepository interface { }
type MmeCommandRepository ¶
type MmeCommandRepository interface { }
type NetworkElementRepository ¶
type NetworkElementRepository interface { CreateNetworkElement(*models_api.NeData) error DeleteNetworkElementByName(string, string) error GetNetworkElementByName(string, string) (*models_api.NeData, error) GetListNetworkElement() ([]models_api.NeData, error) GetNetworkElementByUserName(string) ([]models_api.NeData, error) }
type RoleRepository ¶
type RoleRepository interface { GetRoleByUserId(uint) ([]models_db.Role, error) GetRoleByName(string) (*models_api.Role, error) GetListRole() ([]models_api.Role, error) CreateRole(*models_api.Role) error DeleteRole(*models_api.Role) error UpdateRole(*models_api.Role) error }
type UserRepository ¶
type UserRepository interface { CreateUser(*models_api.User) error GetUserByID(uint) (*models_api.User, error) ListUsers() ([]models_api.User, error) GetUserByUsername(string) (*models_api.User, error) DeleteUser(string) error UpdateUser(*models_api.User) error UpdatePasswordUser(*models_api.User) UserNeAdd(*models_api.UserNe) error UserNeDelete(uint, uint) error UserNeGet(uint, uint) (*models_api.UserNe, error) UserRoleAdd(*models_api.UserRole) error UserRoleGet(userId, roleId uint) (*models_api.UserRole, error) UserRoleDelete(userId, roleId uint) }
Click to show internal directories.
Click to hide internal directories.