mysql

package
v0.0.0-...-2cb57f2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Db *gorm.DB
	// contains filtered or unexported fields
}

func GetInstance

func GetInstance() *Client

func (*Client) CreateNetworkElement

func (c *Client) CreateNetworkElement(data *models_api.NeData) error

func (*Client) CreateRole

func (c *Client) CreateRole(role *models_api.Role) error

func (*Client) CreateUser

func (c *Client) CreateUser(user *models_api.User) error

func (*Client) DeleteHistoryById

func (c *Client) DeleteHistoryById(u uint64) error

func (*Client) DeleteNetworkElementByName

func (c *Client) DeleteNetworkElementByName(s string, s2 string) error

func (*Client) DeleteRole

func (c *Client) DeleteRole(role *models_api.Role) error

func (*Client) DeleteUser

func (c *Client) DeleteUser(s string) error

func (*Client) GetHistoryById

func (c *Client) GetHistoryById(u uint64) (*models_api.History, error)

func (*Client) GetHistoryCommandByModeLimit

func (c *Client) GetHistoryCommandByModeLimit(s string, i int) ([]models_api.History, error)

func (*Client) GetHistoryListByMode

func (c *Client) GetHistoryListByMode(s string) ([]models_api.History, error)

func (*Client) GetHistorySavingLog

func (c *Client) GetHistorySavingLog(neSiteName string) ([]models_api.History, error)

func (*Client) GetListNetworkElement

func (c *Client) GetListNetworkElement() ([]models_api.NeData, error)

func (*Client) GetListRole

func (c *Client) GetListRole() ([]models_api.Role, error)

func (*Client) GetNetworkElementByName

func (c *Client) GetNetworkElementByName(s string, s2 string) (*models_api.NeData, error)

func (*Client) GetNetworkElementByUserName

func (c *Client) GetNetworkElementByUserName(s string) ([]models_api.NeData, error)

func (*Client) GetRecordHistoryByCommand

func (c *Client) GetRecordHistoryByCommand(s string) (*models_api.History, error)

func (*Client) GetRoleByName

func (c *Client) GetRoleByName(s string) (*models_api.Role, error)

func (*Client) GetRoleByUserId

func (c *Client) GetRoleByUserId(u uint) ([]models_db.Role, error)

func (*Client) GetUserByID

func (c *Client) GetUserByID(u uint) (*models_api.User, error)

func (*Client) GetUserByUsername

func (c *Client) GetUserByUsername(s string) (*models_api.User, error)

func (*Client) Init

func (*Client) ListUsers

func (c *Client) ListUsers() ([]models_api.User, error)

func (*Client) Ping

func (c *Client) Ping() error

func (*Client) SaveHistory

func (c *Client) SaveHistory(history *models_api.History) error

func (*Client) UpdatePasswordUser

func (c *Client) UpdatePasswordUser(user *models_api.User)

func (*Client) UpdateRole

func (c *Client) UpdateRole(role *models_api.Role) error

func (*Client) UpdateUser

func (c *Client) UpdateUser(user *models_api.User) error

func (*Client) UserNeAdd

func (c *Client) UserNeAdd(ne *models_api.UserNe) error

func (*Client) UserNeDelete

func (c *Client) UserNeDelete(u uint, u2 uint) error

func (*Client) UserNeGet

func (c *Client) UserNeGet(u uint, u2 uint) (*models_api.UserNe, error)

func (*Client) UserRoleAdd

func (c *Client) UserRoleAdd(role *models_api.UserRole) error

func (*Client) UserRoleDelete

func (c *Client) UserRoleDelete(userId, roleId uint)

func (*Client) UserRoleGet

func (c *Client) UserRoleGet(userId, roleId uint) (*models_api.UserRole, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL