controller

package
v0.0.0-...-ec63d53 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExchangeEntity

type ExchangeEntity struct {
	Name       string `json:"name"`
	Type       string `json:"type"`
	Durable    bool   `json:"durable"`
	AutoDelete bool   `json:"autodelete"`
	NoWait     bool   `json:"nowait"`
}

type IndexController

type IndexController struct{}

func (*IndexController) Handle404

func (i *IndexController) Handle404(c *gin.Context)

func (*IndexController) Welcome

func (i *IndexController) Welcome(c *gin.Context)

type MessageEntity

type MessageEntity struct {
	Exchange     string `json:"exchange"`
	Key          string `json:"key"`
	DeliveryMode uint8  `json:"deliverymode"`
	Priority     uint8  `json:"priority"`
	Body         string `json:"body"`
}

Entity for HTTP Request Body: Message/Exchange/Queue/QueueBind JSON Input

type MqController

type MqController struct{}

func (*MqController) ExchangeHandler

func (m *MqController) ExchangeHandler(w http.ResponseWriter, r *http.Request)

func (*MqController) PublishHandler

func (m *MqController) PublishHandler(w http.ResponseWriter, r *http.Request)

func (*MqController) QueueBindHandler

func (m *MqController) QueueBindHandler(w http.ResponseWriter, r *http.Request)

func (*MqController) QueueHandler

func (m *MqController) QueueHandler(w http.ResponseWriter, r *http.Request)

HTTP Handlers

type QueueBindEntity

type QueueBindEntity struct {
	Queue    string   `json:"queue"`
	Exchange string   `json:"exchange"`
	NoWait   bool     `json:"nowait"`
	Keys     []string `json:"keys"` // bind/routing keys
}

type QueueEntity

type QueueEntity struct {
	Name       string `json:"name"`
	Durable    bool   `json:"durable"`
	AutoDelete bool   `json:"autodelete"`
	Exclusive  bool   `json:"exclusive"`
	NoWait     bool   `json:"nowait"`
}

type RabbitMQ

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

RabbitMQ Operate Wrapper

func (*RabbitMQ) BindQueue

func (r *RabbitMQ) BindQueue(queue, exchange string, keys []string, nowait bool) (err error)

func (*RabbitMQ) Close

func (r *RabbitMQ) Close() (err error)

func (*RabbitMQ) Connect

func (r *RabbitMQ) Connect() (err error)

func (*RabbitMQ) ConsumeQueue

func (r *RabbitMQ) ConsumeQueue(queue string, message chan []byte) (err error)

func (*RabbitMQ) DeclareExchange

func (r *RabbitMQ) DeclareExchange(name, typ string, durable, autodelete, nowait bool) (err error)

func (*RabbitMQ) DeclareQueue

func (r *RabbitMQ) DeclareQueue(name string, durable, autodelete, exclusive, nowait bool) (err error)

func (*RabbitMQ) DeleteExchange

func (r *RabbitMQ) DeleteExchange(name string) (err error)

func (*RabbitMQ) DeleteQueue

func (r *RabbitMQ) DeleteQueue(name string) (err error)

func (*RabbitMQ) Publish

func (r *RabbitMQ) Publish(exchange, key string, deliverymode, priority uint8, body string) (err error)

func (*RabbitMQ) UnBindQueue

func (r *RabbitMQ) UnBindQueue(queue, exchange string, keys []string) (err error)

type TestController

type TestController struct{}

func (*TestController) AddUser

func (t *TestController) AddUser(c *gin.Context)

新增用户

func (*TestController) DelUser

func (t *TestController) DelUser(c *gin.Context)

删除用户 (硬删除)

func (*TestController) ES

func (t *TestController) ES(c *gin.Context)

es 测试

func (*TestController) GetNick

func (t *TestController) GetNick(c *gin.Context)

func (*TestController) GetToken

func (t *TestController) GetToken(c *gin.Context)

func (*TestController) GetUser

func (t *TestController) GetUser(c *gin.Context)

获取用户

func (*TestController) RedisTest

func (t *TestController) RedisTest(c *gin.Context)

Redis 测试

func (*TestController) UptUser

func (t *TestController) UptUser(c *gin.Context)

更新

func (*TestController) UserList

func (t *TestController) UserList(c *gin.Context)

获取用户

type WsController

type WsController struct{}

func (*WsController) WsHandler

func (w *WsController) WsHandler(resp http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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