Documentation ¶
Index ¶
- Constants
- func RandomString(length int) string
- type IMongoMapper
- type MongoMapper
- func (m *MongoMapper) Count(ctx context.Context, fopts *ShareCodeOptions) (int64, error)
- func (m *MongoMapper) Delete(ctx context.Context, id, userId string) (int64, error)
- func (m *MongoMapper) FindMany(ctx context.Context, fopts *ShareCodeOptions, ...) ([]*ShareFile, error)
- func (m *MongoMapper) FindManyAndCount(ctx context.Context, fopts *ShareCodeOptions, ...) ([]*ShareFile, int64, error)
- func (m *MongoMapper) FindOne(ctx context.Context, id string) (*ShareFile, error)
- func (m *MongoMapper) GetConn() *monc.Model
- func (m *MongoMapper) Insert(ctx context.Context, data *ShareFile) (string, string, error)
- func (m *MongoMapper) Update(ctx context.Context, data *ShareFile) (*mongo.UpdateResult, error)
- type MongoShareCodeFilter
- type ShareCodeOptions
- type ShareFile
Constants ¶
View Source
const CollectionName = "shareFile"
Variables ¶
This section is empty.
Functions ¶
func RandomString ¶
Types ¶
type IMongoMapper ¶
type IMongoMapper interface { Count(ctx context.Context, filter *ShareCodeOptions) (int64, error) Insert(ctx context.Context, data *ShareFile) (string, string, error) FindOne(ctx context.Context, id string) (*ShareFile, error) FindMany(ctx context.Context, fopts *ShareCodeOptions, popts *pagination.PaginationOptions, sorter mongop.MongoCursor) ([]*ShareFile, error) FindManyAndCount(ctx context.Context, fopts *ShareCodeOptions, popts *pagination.PaginationOptions, sorter mongop.MongoCursor) ([]*ShareFile, int64, error) Update(ctx context.Context, data *ShareFile) (*mongo.UpdateResult, error) Delete(ctx context.Context, id, userId string) (int64, error) GetConn() *monc.Model }
func NewMongoMapper ¶
func NewMongoMapper(config *config.Config) IMongoMapper
type MongoMapper ¶
type MongoMapper struct {
// contains filtered or unexported fields
}
func (*MongoMapper) Count ¶
func (m *MongoMapper) Count(ctx context.Context, fopts *ShareCodeOptions) (int64, error)
func (*MongoMapper) FindMany ¶
func (m *MongoMapper) FindMany(ctx context.Context, fopts *ShareCodeOptions, popts *pagination.PaginationOptions, sorter mongop.MongoCursor) ([]*ShareFile, error)
func (*MongoMapper) FindManyAndCount ¶
func (m *MongoMapper) FindManyAndCount(ctx context.Context, fopts *ShareCodeOptions, popts *pagination.PaginationOptions, sorter mongop.MongoCursor) ([]*ShareFile, int64, error)
func (*MongoMapper) GetConn ¶
func (m *MongoMapper) GetConn() *monc.Model
func (*MongoMapper) Update ¶
func (m *MongoMapper) Update(ctx context.Context, data *ShareFile) (*mongo.UpdateResult, error)
type MongoShareCodeFilter ¶
type MongoShareCodeFilter struct { // contains filtered or unexported fields }
func (*MongoShareCodeFilter) CheckOnlyCode ¶
func (f *MongoShareCodeFilter) CheckOnlyCode()
func (*MongoShareCodeFilter) CheckOnlyUserId ¶
func (f *MongoShareCodeFilter) CheckOnlyUserId()
type ShareCodeOptions ¶
type ShareCodeOptions struct {}
Click to show internal directories.
Click to hide internal directories.