support

package
v0.0.0-...-2ad5e84 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Broadcast = make(chan WebSocketResult)
View Source
var Clients = make(map[*WebSocket]bool)

channel定義(websocketで使用)

Functions

This section is empty.

Types

type FirstInput

type FirstInput struct {
	gorm.Model
	IsGroup  bool   `json:"is_group"`
	TicketID uint   `json:"ticket_id"`
	Title    string `json:"title"`
	Data     string `json:"data"`
	UserID   uint   `json:"user_id"`
	GroupID  uint   `json:"group_id"`
}

type Result

type Result struct {
	Ticket []core.Ticket `json:"ticket"`
	Chat   []core.Chat   `json:"chat"`
}

type WebSocket

type WebSocket struct {
	TicketID uint
	GroupID  uint
	UserID   uint
	UserName string
	Admin    bool
	Socket   *websocket.Conn
}

type WebSocketChatResponse

type WebSocketChatResponse struct {
	Time     string `json:"time"`
	UserID   uint   `json:"user_id"`
	UserName string `json:"username"`
	GroupID  uint   `json:"group_id"`
	Admin    bool   `json:"admin"`
	Message  string `json:"message"`
}

type WebSocketResult

type WebSocketResult struct {
	ID          uint      `json:"id"`
	Err         string    `json:"error"`
	CreatedAt   time.Time `json:"created_at"`
	TicketID    uint      `json:"ticket_id"`
	UserToken   string    `json:"user_token"`
	AccessToken string    `json:"access_token"`
	UserID      uint      `json:"user_id"`
	UserName    string    `json:"user_name"`
	GroupID     uint      `json:"group_id"`
	Admin       bool      `json:"admin"`
	Message     string    `json:"message"`
}

websocket用

Directories

Path Synopsis
v0

Jump to

Keyboard shortcuts

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