Documentation ¶
Index ¶
- type ISvcRepository
- type SvcRepository
- func (u *SvcRepository) CreateSvc(svc *model.Svc) (int64, error)
- func (u *SvcRepository) DeleteSvcByID(svcID int64) error
- func (u *SvcRepository) FindAll() (svcAll []model.Svc, err error)
- func (u *SvcRepository) FindSvcByID(svcID int64) (svc *model.Svc, err error)
- func (u *SvcRepository) InitTable() error
- func (u *SvcRepository) UpdateSvc(svc *model.Svc) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ISvcRepository ¶
type ISvcRepository interface { //初始化表 InitTable() error //根据ID查处找数据 FindSvcByID(int64) (*model.Svc, error) //创建一条 svc 数据 CreateSvc(*model.Svc) (int64, error) //根据ID删除一条 svc 数据 DeleteSvcByID(int64) error //修改更新数据 UpdateSvc(*model.Svc) error //查找svc所有数据 FindAll() ([]model.Svc, error) }
创建需要实现的接口
type SvcRepository ¶
type SvcRepository struct {
// contains filtered or unexported fields
}
func (*SvcRepository) CreateSvc ¶
func (u *SvcRepository) CreateSvc(svc *model.Svc) (int64, error)
创建Svc信息
func (*SvcRepository) DeleteSvcByID ¶
func (u *SvcRepository) DeleteSvcByID(svcID int64) error
根据ID删除Svc信息
func (*SvcRepository) FindAll ¶
func (u *SvcRepository) FindAll() (svcAll []model.Svc, err error)
获取结果集
func (*SvcRepository) FindSvcByID ¶
func (u *SvcRepository) FindSvcByID(svcID int64) (svc *model.Svc, err error)
根据ID查找Svc信息
Click to show internal directories.
Click to hide internal directories.