Documentation ¶
Index ¶
- Variables
- func NewGreeterRepo(data *Data, logger log.Logger) biz.GreeterRepo
- func NewPodRepository(mysqlDb *gorm.DB) biz.IPodRepository
- type Data
- type PodRepository
- func (u *PodRepository) CreatePod(pod *model.Pod) (int64, error)
- func (u *PodRepository) DeletePodByID(podID int64) error
- func (u *PodRepository) FindAll() (podAll []model.Pod, err error)
- func (u *PodRepository) FindPodByID(podID int64) (pod *model.Pod, err error)
- func (u *PodRepository) InitTable() error
- func (u *PodRepository) UpdatePod(pod *model.Pod) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewData, NewGreeterRepo, NewPodRepository)
ProviderSet is data providers.
Functions ¶
func NewGreeterRepo ¶
func NewGreeterRepo(data *Data, logger log.Logger) biz.GreeterRepo
NewGreeterRepo .
func NewPodRepository ¶
func NewPodRepository(mysqlDb *gorm.DB) biz.IPodRepository
Types ¶
type PodRepository ¶
type PodRepository struct {
// contains filtered or unexported fields
}
func (*PodRepository) CreatePod ¶
func (u *PodRepository) CreatePod(pod *model.Pod) (int64, error)
创建 Pod
func (*PodRepository) DeletePodByID ¶
func (u *PodRepository) DeletePodByID(podID int64) error
根据 ID 删除 Pod 信息
func (*PodRepository) FindAll ¶
func (u *PodRepository) FindAll() (podAll []model.Pod, err error)
获取结果集合
func (*PodRepository) FindPodByID ¶
func (u *PodRepository) FindPodByID(podID int64) (pod *model.Pod, err error)
根据ID查找Pod信息
Click to show internal directories.
Click to hide internal directories.