Versions in this module Expand all Collapse all v0 v0.0.10 Mar 8, 2023 Changes in this version type Controller + Service *Service v0.0.9 Mar 1, 2023 v0.0.8 Feb 25, 2023 v0.0.7 Nov 16, 2022 Changes in this version + var Provides = wire.NewSet(wire.Struct(new(Controller), "*"), wire.Struct(new(Service), "*")) + type BulkCreateDto struct + Collection string + Data []M + Format M + type BulkDeleteDto struct + Collection string + Data M + Format M + type Controller struct + DSLService *Service + func (x *Controller) BulkCreate(ctx context.Context, c *app.RequestContext) + func (x *Controller) BulkDelete(ctx context.Context, c *app.RequestContext) + func (x *Controller) Create(ctx context.Context, c *app.RequestContext) + func (x *Controller) Delete(ctx context.Context, c *app.RequestContext) + func (x *Controller) Find(ctx context.Context, c *app.RequestContext) + func (x *Controller) FindById(ctx context.Context, c *app.RequestContext) + func (x *Controller) FindOne(ctx context.Context, c *app.RequestContext) + func (x *Controller) Replace(ctx context.Context, c *app.RequestContext) + func (x *Controller) Size(ctx context.Context, c *app.RequestContext) + func (x *Controller) Sort(ctx context.Context, c *app.RequestContext) + func (x *Controller) Update(ctx context.Context, c *app.RequestContext) + func (x *Controller) UpdateById(ctx context.Context, c *app.RequestContext) + type CreateDto struct + Collection string + Data M + Format M + type DSL struct + Db *mongo.Database + DynamicValues *kv.DynamicValues + Js nats.JetStreamContext + Namespace string + func New(options ...Option) (x *DSL, err error) + type DeleteDto struct + Collection string + Id string + type FindByIdDto struct + Collection string + Id string + Keys []string + type FindDto struct + Collection string + Filter M + Format M + Keys []string + Page int64 + Pagesize int64 + Sort []string + type FindOneDto struct + Collection string + Filter M + Format M + Keys []string + type M = map[string]interface + type Option func(x *DSL) + func SetDatabase(v *mongo.Database) Option + func SetDynamicValues(v *kv.DynamicValues) Option + func SetJetStream(v nats.JetStreamContext) Option + func SetNamespace(v string) Option + type PublishDto struct + Data interface{} + DataFormat M + Event string + Filter M + FilterFormat M + Id string + Result interface{} + type ReplaceDto struct + Collection string + Data M + Format M + Id string + type Service struct + func (x *Service) BulkCreate(ctx context.Context, name string, docs []interface{}) (_ interface{}, err error) + func (x *Service) BulkDelete(ctx context.Context, name string, filter M) (_ interface{}, err error) + func (x *Service) Create(ctx context.Context, name string, doc M) (_ interface{}, err error) + func (x *Service) Delete(ctx context.Context, name string, id primitive.ObjectID) (_ interface{}, err error) + func (x *Service) Find(ctx context.Context, name string, filter M, option *options.FindOptions) (data []M, err error) + func (x *Service) FindOne(ctx context.Context, name string, filter M, option *options.FindOneOptions) (data M, err error) + func (x *Service) Load(ctx context.Context) (err error) + func (x *Service) Projection(name string, keys []string) (result bson.M) + func (x *Service) Publish(ctx context.Context, name string, dto PublishDto) (err error) + func (x *Service) Replace(ctx context.Context, name string, id primitive.ObjectID, doc M) (_ interface{}, err error) + func (x *Service) Size(ctx context.Context, name string, filter M) (_ int64, err error) + func (x *Service) Sort(ctx context.Context, name string, ids []primitive.ObjectID) (_ interface{}, err error) + func (x *Service) Transform(data M, format M) (err error) + func (x *Service) Update(ctx context.Context, name string, filter M, update M) (_ interface{}, err error) + func (x *Service) UpdateById(ctx context.Context, name string, id primitive.ObjectID, update M) (_ interface{}, err error) + type SizeDto struct + Collection string + Filter M + Format M + type SortDto struct + Collection string + Data []primitive.ObjectID + type UpdateByIdDto struct + Collection string + Data M + Format M + Id string + type UpdateDto struct + Collection string + DFormat M + Data M + FFormat M + Filter M