chats

package
v0.0.0-...-e3ef002 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatsServer

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

func NewChatsServer

func NewChatsServer(logger *zap.Logger, ctrl *graph.ChatsController, users_ctrl *graph.UsersController, msgsCtrl *graph.MessagesController,
	ps *pubsub.PubSub, whmcsTickets bool, settingsClient settingspb.SettingsServiceClient, conn *amqp091.Connection) *ChatsServer

func (*ChatsServer) ChangeDepartment

func (s *ChatsServer) ChangeDepartment(ctx context.Context, req *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error)

func (*ChatsServer) ChangeGateway

func (s *ChatsServer) ChangeGateway(ctx context.Context, req *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error)

func (*ChatsServer) ChangeStatus

func (s *ChatsServer) ChangeStatus(ctx context.Context, req *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error)

func (*ChatsServer) CloseInactiveChats

func (s *ChatsServer) CloseInactiveChats(ctx context.Context, log *zap.Logger, conf TicketsSettingsConf, eventPublisher func(ctx context.Context, event *events.Event)) error

func (*ChatsServer) CloseInactiveChatsRoutine

func (s *ChatsServer) CloseInactiveChatsRoutine(_ctx context.Context, wg *sync.WaitGroup)

func (*ChatsServer) Create

func (*ChatsServer) Delete

func (*ChatsServer) Get

func (*ChatsServer) GetBotState

func (s *ChatsServer) GetBotState(ctx context.Context, req *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error)

func (*ChatsServer) MergeChats

func (s *ChatsServer) MergeChats(ctx context.Context, req *connect.Request[cc.Merge]) (*connect.Response[cc.Chat], error)

func (*ChatsServer) SetBotState

func (s *ChatsServer) SetBotState(ctx context.Context, req *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error)

func (*ChatsServer) SyncChats

func (s *ChatsServer) SyncChats(ctx context.Context, req *connect.Request[cc.Empty]) (*connect.Response[cc.Empty], error)

func (*ChatsServer) Update

type TicketsSettingsConf

type TicketsSettingsConf struct {
	RoutineFrequency             int    `json:"routine-frequency"`                // In seconds
	CloseInactiveChatsAfterHours int    `json:"close-inactive-chats-after-hours"` // In hours
	CloseMessageContent          string `json:"close-message-content"`
}

func MakeTicketsConf

func MakeTicketsConf(ctx context.Context, log *zap.Logger, settingsClient *settingspb.SettingsServiceClient) (conf TicketsSettingsConf)

Jump to

Keyboard shortcuts

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