Documentation ¶
Index ¶
- type IMiddleTypeRepository
- type IMiddlewareRepository
- type MiddleTypeRepository
- func (u *MiddleTypeRepository) CreateMiddleType(middleType *model.MiddleType) (int64, error)
- func (u *MiddleTypeRepository) DeleteMiddleTypeByID(middleTypeID int64) error
- func (u *MiddleTypeRepository) FindAll() (middleTypeAll []model.MiddleType, err error)
- func (u *MiddleTypeRepository) FindAllVersionByTypeID(middleTypeID int64) (middleVersionAll []model.MiddleVersion, err error)
- func (u *MiddleTypeRepository) FindTypeByID(middleTypeID int64) (middleType *model.MiddleType, err error)
- func (u *MiddleTypeRepository) FindVersionByID(middleVersionID int64) (middleVersion *model.MiddleVersion, err error)
- func (u *MiddleTypeRepository) InitTable() error
- func (u *MiddleTypeRepository) UpdateMiddleType(middleType *model.MiddleType) error
- type MiddlewareRepository
- func (u *MiddlewareRepository) CreateMiddleware(middleware *model.Middleware) (int64, error)
- func (u *MiddlewareRepository) DeleteMiddlewareByID(middlewareID int64) error
- func (u *MiddlewareRepository) FindAll() (middlewareAll []model.Middleware, err error)
- func (u *MiddlewareRepository) FindAllByTypeID(typeID int64) (middlewareAll []model.Middleware, err error)
- func (u *MiddlewareRepository) FindMiddlewareByID(middlewareID int64) (middleware *model.Middleware, err error)
- func (u *MiddlewareRepository) InitTable() error
- func (u *MiddlewareRepository) UpdateMiddleware(middleware *model.Middleware) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IMiddleTypeRepository ¶
type IMiddleTypeRepository interface { //初始化表 InitTable() error //根据ID查处找数据 FindTypeByID(int64) (*model.MiddleType, error) //创建一条 middleware 数据 CreateMiddleType(*model.MiddleType) (int64, error) //根据ID删除一条 middleware 数据 DeleteMiddleTypeByID(int64) error //修改更新数据 UpdateMiddleType(*model.MiddleType) error //查找middleware所有数据 FindAll() ([]model.MiddleType, error) FindVersionByID(int64) (*model.MiddleVersion, error) FindAllVersionByTypeID(int64) ([]model.MiddleVersion, error) }
创建需要实现的接口
func NewMiddleTypeRepository ¶
func NewMiddleTypeRepository(db *gorm.DB) IMiddleTypeRepository
创建MiddleTypeRepository
type IMiddlewareRepository ¶
type IMiddlewareRepository interface { //初始化表 InitTable() error //根据ID查处找数据 FindMiddlewareByID(int64) (*model.Middleware, error) //创建一条 middleware 数据 CreateMiddleware(*model.Middleware) (int64, error) //根据ID删除一条 middleware 数据 DeleteMiddlewareByID(int64) error //修改更新数据 UpdateMiddleware(*model.Middleware) error //查找middleware所有数据 FindAll() ([]model.Middleware, error) //根据类型查找所有中间件 FindAllByTypeID(int64) ([]model.Middleware, error) }
创建需要实现的接口
func NewMiddlewareRepository ¶
func NewMiddlewareRepository(db *gorm.DB) IMiddlewareRepository
创建middlewareRepository
type MiddleTypeRepository ¶
type MiddleTypeRepository struct {
// contains filtered or unexported fields
}
func (*MiddleTypeRepository) CreateMiddleType ¶
func (u *MiddleTypeRepository) CreateMiddleType(middleType *model.MiddleType) (int64, error)
创建中间件
func (*MiddleTypeRepository) DeleteMiddleTypeByID ¶
func (u *MiddleTypeRepository) DeleteMiddleTypeByID(middleTypeID int64) error
删除中间件
func (*MiddleTypeRepository) FindAll ¶
func (u *MiddleTypeRepository) FindAll() (middleTypeAll []model.MiddleType, err error)
获取类型的结果集
func (*MiddleTypeRepository) FindAllVersionByTypeID ¶
func (u *MiddleTypeRepository) FindAllVersionByTypeID(middleTypeID int64) (middleVersionAll []model.MiddleVersion, err error)
根据中间件类型查找所有版本
func (*MiddleTypeRepository) FindTypeByID ¶
func (u *MiddleTypeRepository) FindTypeByID(middleTypeID int64) (middleType *model.MiddleType, err error)
按照 ID 查找中间件类型
func (*MiddleTypeRepository) FindVersionByID ¶
func (u *MiddleTypeRepository) FindVersionByID(middleVersionID int64) (middleVersion *model.MiddleVersion, err error)
根据ID查找单个版本
func (*MiddleTypeRepository) UpdateMiddleType ¶
func (u *MiddleTypeRepository) UpdateMiddleType(middleType *model.MiddleType) error
更新middleware 信息
type MiddlewareRepository ¶
type MiddlewareRepository struct {
// contains filtered or unexported fields
}
func (*MiddlewareRepository) CreateMiddleware ¶
func (u *MiddlewareRepository) CreateMiddleware(middleware *model.Middleware) (int64, error)
创建Middleware信息
func (*MiddlewareRepository) DeleteMiddlewareByID ¶
func (u *MiddlewareRepository) DeleteMiddlewareByID(middlewareID int64) error
根据ID删除Middleware信息
func (*MiddlewareRepository) FindAll ¶
func (u *MiddlewareRepository) FindAll() (middlewareAll []model.Middleware, err error)
获取结果集
func (*MiddlewareRepository) FindAllByTypeID ¶
func (u *MiddlewareRepository) FindAllByTypeID(typeID int64) (middlewareAll []model.Middleware, err error)
func (*MiddlewareRepository) FindMiddlewareByID ¶
func (u *MiddlewareRepository) FindMiddlewareByID(middlewareID int64) (middleware *model.Middleware, err error)
根据ID查找Middleware信息
func (*MiddlewareRepository) UpdateMiddleware ¶
func (u *MiddlewareRepository) UpdateMiddleware(middleware *model.Middleware) error
更新Middleware信息
Click to show internal directories.
Click to hide internal directories.