queues

package
v0.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2023 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Provides = wire.NewSet(
	wire.Struct(new(Controller), "*"),
	wire.Struct(new(Service), "*"),
)

Functions

This section is empty.

Types

type Controller

type Controller struct {
	QueuesX *Service
}

func (*Controller) Info

func (x *Controller) Info(ctx context.Context, c *app.RequestContext)

func (*Controller) Publish

func (x *Controller) Publish(ctx context.Context, c *app.RequestContext)

func (*Controller) Sync

func (x *Controller) Sync(ctx context.Context, c *app.RequestContext)

type M

type M = map[string]interface{}

type PublishDto

type PublishDto struct {
	Project primitive.ObjectID `json:"project" vd:"required"`
	Subject string             `json:"subject" vd:"required"`
	Payload M                  `json:"payload" vd:"gt=0"`
}

type Service

type Service struct {
	*common.Inject
	ProjectsX *projects.Service
}

func (*Service) Destroy

func (x *Service) Destroy(ctx context.Context, js nats.JetStreamContext, name string) (err error)

func (*Service) Event

func (x *Service) Event() (err error)

func (*Service) GetClient added in v0.2.1

func (x *Service) GetClient(projectId primitive.ObjectID) (client *nats.Conn, err error)

func (*Service) GetJetStream added in v0.2.1

func (x *Service) GetJetStream(ctx context.Context, projectId primitive.ObjectID) (js nats.JetStreamContext, err error)

func (*Service) Info

func (x *Service) Info(ctx context.Context, id primitive.ObjectID) (r *nats.StreamInfo, err error)

func (*Service) Publish

func (x *Service) Publish(ctx context.Context, dto PublishDto) (r interface{}, err error)

func (*Service) Sync

func (x *Service) Sync(ctx context.Context, id primitive.ObjectID) (err error)

type StateDto

type StateDto struct {
	Id string `path:"id" vd:"mongodb"`
}

type SyncDto

type SyncDto struct {
	Id primitive.ObjectID `json:"id" vd:"mongodb"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL