Documentation ¶
Index ¶
- type IVideoCollection
- type ServiceImpl
- func (s *ServiceImpl) Count(ctx context.Context, req *p.VideoCollectionCountReq) (*p.VideoCollectionCountRes, error)
- func (s *ServiceImpl) Create(ctx context.Context, req *p.VideoCollectionCreateReq) (*p.VideoCollectionCreateRes, error)
- func (s *ServiceImpl) Delete(ctx context.Context, req *p.VideoCollectionDeleteReq) (*p.VideoCollectionDeleteRes, error)
- func (s *ServiceImpl) DeleteMulti(ctx context.Context, req *p.VideoCollectionDeleteMultiReq) (*p.VideoCollectionDeleteMultiRes, error)
- func (s *ServiceImpl) Get(ctx context.Context, req *p.VideoCollectionGetReq) (*p.VideoCollectionGetRes, error)
- func (s *ServiceImpl) List(ctx context.Context, req *p.VideoCollectionListReq) (*p.VideoCollectionListRes, error)
- func (s *ServiceImpl) One(ctx context.Context, req *p.VideoCollectionOneReq) (*p.VideoCollectionOneRes, error)
- func (s *ServiceImpl) Update(ctx context.Context, req *p.VideoCollectionUpdateReq) (*p.VideoCollectionUpdateRes, error)
- func (s *ServiceImpl) Upsert(ctx context.Context, req *p.VideoCollectionUpsertReq) (*p.VideoCollectionUpsertRes, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IVideoCollection ¶
type IVideoCollection interface { Count(ctx context.Context, req *p.VideoCollectionCountReq) (*p.VideoCollectionCountRes, error) One(ctx context.Context, req *p.VideoCollectionOneReq) (*p.VideoCollectionOneRes, error) List(ctx context.Context, req *p.VideoCollectionListReq) (*p.VideoCollectionListRes, error) Get(ctx context.Context, req *p.VideoCollectionGetReq) (*p.VideoCollectionGetRes, error) Create(ctx context.Context, req *p.VideoCollectionCreateReq) (*p.VideoCollectionCreateRes, error) Update(ctx context.Context, req *p.VideoCollectionUpdateReq) (*p.VideoCollectionUpdateRes, error) Upsert(ctx context.Context, req *p.VideoCollectionUpsertReq) (*p.VideoCollectionUpsertRes, error) Delete(ctx context.Context, req *p.VideoCollectionDeleteReq) (*p.VideoCollectionDeleteRes, error) DeleteMulti(ctx context.Context, req *p.VideoCollectionDeleteMultiReq) (*p.VideoCollectionDeleteMultiRes, error) }
type ServiceImpl ¶
type ServiceImpl struct { p.UnimplementedVideoCollectionServer // contains filtered or unexported fields }
func NewVideoCollectionService ¶
func NewVideoCollectionService(metadata *appinfo.AppMetadata, helper *log.Helper, data *data.Data) *ServiceImpl
func (*ServiceImpl) Count ¶
func (s *ServiceImpl) Count(ctx context.Context, req *p.VideoCollectionCountReq) (*p.VideoCollectionCountRes, error)
Count 根据req指定的查询条件获取记录列表 支持翻页和排序参数,支持查询条件参数类型自动转换 未赋值或或赋值为nil的字段不参与条件查询
func (*ServiceImpl) Create ¶
func (s *ServiceImpl) Create(ctx context.Context, req *p.VideoCollectionCreateReq) (*p.VideoCollectionCreateRes, error)
Create 插入记录 包括表中所有字段,支持字段类型自动转换,支持对非主键且可为空字段不赋值 未赋值或赋值为nil的字段将被更新为 NULL 或数据库表指定的DEFAULT
func (*ServiceImpl) Delete ¶
func (s *ServiceImpl) Delete(ctx context.Context, req *p.VideoCollectionDeleteReq) (*p.VideoCollectionDeleteRes, error)
Delete 根据主键删除对应记录
func (*ServiceImpl) DeleteMulti ¶
func (s *ServiceImpl) DeleteMulti(ctx context.Context, req *p.VideoCollectionDeleteMultiReq) (*p.VideoCollectionDeleteMultiRes, error)
DeleteMulti 根据req指定的条件删除表中记录(可能多条) 未赋值或或赋值为nil的字段不参与条件查询
func (*ServiceImpl) Get ¶
func (s *ServiceImpl) Get(ctx context.Context, req *p.VideoCollectionGetReq) (*p.VideoCollectionGetRes, error)
Get 根据主键/ID查询特定记录
func (*ServiceImpl) List ¶
func (s *ServiceImpl) List(ctx context.Context, req *p.VideoCollectionListReq) (*p.VideoCollectionListRes, error)
List 根据req指定的查询条件获取记录列表 支持翻页和排序参数,支持查询条件参数类型自动转换 未赋值或或赋值为nil的字段不参与条件查询
func (*ServiceImpl) One ¶
func (s *ServiceImpl) One(ctx context.Context, req *p.VideoCollectionOneReq) (*p.VideoCollectionOneRes, error)
One 根据req指定的查询条件获取单条数据 支持排序参数,支持查询条件参数类型自动转换 未赋值或或赋值为nil的字段不参与条件查询
func (*ServiceImpl) Update ¶
func (s *ServiceImpl) Update(ctx context.Context, req *p.VideoCollectionUpdateReq) (*p.VideoCollectionUpdateRes, error)
Update 根据主键更新对应记录 支持字段类型自动转换,支持对非主键字段赋值/不赋值 未赋值或赋值为nil的字段不参与更新(即不会修改原记录的字段值)
func (*ServiceImpl) Upsert ¶
func (s *ServiceImpl) Upsert(ctx context.Context, req *p.VideoCollectionUpsertReq) (*p.VideoCollectionUpsertRes, error)
Upsert 根据主键(或唯一索引)是否存在且已在req中赋值,更新或插入对应记录。 支持字段类型自动转换,支持对非主键字段赋值/不赋值 未赋值或赋值为nil的字段不参与更新/插入(即更新时不会修改原记录的字段值)
Click to show internal directories.
Click to hide internal directories.