topic

package
v0.0.0-...-977fba5 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batch

type Batch struct {
	// contains filtered or unexported fields
}

func NewBatch

func NewBatch() *Batch

func (*Batch) Run

func (o *Batch) Run(ctx context.Context, i iris.Context) (res interface{})

func (*Batch) Send

func (o *Batch) Send(ctx context.Context) error

type BatchRequest

type BatchRequest struct {
	TopicName     string        `json:"topic_name" label:"Topic name" validate:"required,min=2,max=30"`
	TopicTag      string        `json:"topic_tag" label:"Topic tag" validate:"required,min=2,max=60"`
	Messages      []interface{} `json:"messages" label:"Message list" desc:"Accept json string or json object in list"`
	MessageBodies []string      `json:"-" validate:"required,min=1,max=100" label:"Message list"`
}

func (*BatchRequest) Validate

func (o *BatchRequest) Validate() error

type BatchResponse

type BatchResponse struct {
	Count      int    `json:"count" label:"Message count" mock:"3"`
	Hash       string `json:"hash" label:"Message hash" mock:"C0837A1B5E264F19826F31457D51546D"`
	RegistryId int    `json:"registry_id" label:"Registry id" mock:"1"`
}

type Publish

type Publish struct {
	// contains filtered or unexported fields
}

func NewPublish

func NewPublish() *Publish

func (*Publish) Run

func (o *Publish) Run(ctx context.Context, i iris.Context) (res interface{})

func (*Publish) Send

func (o *Publish) Send(ctx context.Context) error

type PublishRequest

type PublishRequest struct {
	TopicName string      `json:"topic_name" label:"Topic name" validate:"required,min=2,max=30"`
	TopicTag  string      `json:"topic_tag" label:"Topic tag" validate:"required,min=2,max=60"`
	Message   interface{} `json:"message" label:"Message content" desc:"Accept json string or json object"`

	MessageBody string `json:"-" label:"Message content" validate:"required,min=2,max=65536"`
}

func (*PublishRequest) Validate

func (o *PublishRequest) Validate() error

type PublishResponse

type PublishResponse struct {
	Hash       string `json:"hash" label:"Message hash" mock:"C0837A1B5E264F19826F31457D51546D"`
	RegistryId int    `json:"registry_id" label:"Registry id" mock:"1"`
}

Jump to

Keyboard shortcuts

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