Documentation ¶
Index ¶
- Constants
- type CategoryService
- func (m *CategoryService) Add(ctx context.Context, category *api.Category) error
- func (m *CategoryService) All(ctx context.Context) ([]api.Category, error)
- func (m *CategoryService) Find(ctx context.Context, id string) (*api.Category, error)
- func (m *CategoryService) Update(ctx context.Context, category *api.Category) error
- type Collection
- func (m *Collection) Distinct(ctx context.Context, fieldName string, filter interface{}, ...) ([]interface{}, error)
- func (m *Collection) Find(ctx context.Context, filter interface{}, opts ...*options.FindOptions) (datastore.Cursor, error)
- func (m *Collection) FindOne(ctx context.Context, filter interface{}, opts ...*options.FindOneOptions) datastore.Decodable
- func (m *Collection) FindOneAndUpdate(ctx context.Context, filter interface{}, update interface{}, ...) datastore.Decodable
- func (m *Collection) InsertOne(ctx context.Context, document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)
- type Cursor
- type Decodable
- type Mock
- type RecordService
- func (mock *RecordService) All(ctx context.Context) ([]api.Record, error)
- func (mock *RecordService) Create(ctx context.Context, data api.CreateRecord, images []storage.Image, ...) (*api.Record, error)
- func (mock *RecordService) Delete(ctx context.Context, id string) error
- func (mock *RecordService) Find(ctx context.Context, id string) (*api.Record, error)
- func (mock *RecordService) Query(ctx context.Context, query datastore.RecordQuery, ...) ([]api.Record, error)
- func (mock *RecordService) Update(ctx context.Context, id string, record api.Record, ...) (*api.Record, error)
- func (mock *RecordService) UpdatePages(ctx context.Context, id string, updates []api.PageUpdate) (*api.Record, error)
Constants ¶
View Source
const (
Anything = mock.Anything
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CategoryService ¶
type Collection ¶
func NewCollection ¶
func NewCollection() *Collection
func (*Collection) Distinct ¶
func (m *Collection) Distinct(ctx context.Context, fieldName string, filter interface{}, opts ...*options.DistinctOptions) ([]interface{}, error)
func (*Collection) Find ¶
func (m *Collection) Find(ctx context.Context, filter interface{}, opts ...*options.FindOptions) (datastore.Cursor, error)
func (*Collection) FindOne ¶
func (m *Collection) FindOne(ctx context.Context, filter interface{}, opts ...*options.FindOneOptions) datastore.Decodable
func (*Collection) FindOneAndUpdate ¶
func (m *Collection) FindOneAndUpdate(ctx context.Context, filter interface{}, update interface{}, opts ...*options.FindOneAndUpdateOptions) datastore.Decodable
func (*Collection) InsertOne ¶
func (m *Collection) InsertOne(ctx context.Context, document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)
type Decodable ¶
func NewDecodable ¶
func NewDecodable() *Decodable
type RecordService ¶
func NewRecordService ¶
func NewRecordService() *RecordService
func (*RecordService) Delete ¶
func (mock *RecordService) Delete(ctx context.Context, id string) error
func (*RecordService) Query ¶
func (mock *RecordService) Query(ctx context.Context, query datastore.RecordQuery, options ...*datastore.QueryOptions) ([]api.Record, error)
func (*RecordService) UpdatePages ¶
func (mock *RecordService) UpdatePages(ctx context.Context, id string, updates []api.PageUpdate) (*api.Record, error)
Click to show internal directories.
Click to hide internal directories.