Documentation
¶
Index ¶
- Variables
- func Err(err error) *amqp.Message
- func GenerateToken(claims *Claims) (string, error)
- func ListenAndServe(srv amqp.Server) error
- func OK(body interface{}) *amqp.Message
- func UnmarshalJSON(r *http.Request, item interface{}) error
- func Upgrade(w http.ResponseWriter, r *http.Request) (*websocket.Conn, error)
- func WebSocketMDW(conn *websocket.Conn, ticker time.Duration, cmd interface{}, ...)
- type AMQPResponse
- type Claims
- type Handler
- type HttpError
- type MiddleHttpError
- type Response
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GenerateToken ¶
func ListenAndServe ¶
func UnmarshalJSON ¶
Types ¶
type AMQPResponse ¶
type AMQPResponse struct {
Message string `json:"msg,omitempty"`
Error error `json:"err,omitempty"`
Body interface{} `json:"body,omitempty"`
}
func (*AMQPResponse) AMQP ¶
func (amqpResp *AMQPResponse) AMQP() *amqp.Message
type Claims ¶
type Claims struct {
PhoneNumber string `json:"phone"`
IsManager bool `json:"mng"`
jwt.StandardClaims
}
type MiddleHttpError ¶
func (MiddleHttpError) Error ¶
func (se MiddleHttpError) Error() string
func (MiddleHttpError) Status ¶
func (se MiddleHttpError) Status() int
Click to show internal directories.
Click to hide internal directories.