Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertUsecases ¶
type Clients ¶
type Clients struct {
// contains filtered or unexported fields
}
func NewClients ¶
func (*Clients) Repository ¶
func (c *Clients) Repository() Repository
func (*Clients) Storage ¶
func (c *Clients) Storage() StorageClient
type EmbeddingClient ¶
type LLMSession ¶
type Option ¶
type Option func(*Clients)
func WithLLMClient ¶
func WithRepository ¶
func WithRepository(repo Repository) Option
func WithStorageClient ¶
func WithStorageClient(storage StorageClient) Option
type PolicyClient ¶
type Repository ¶
type Repository interface {
GetTicket(ctx context.Context, ticketID types.TicketID) (*ticket.Ticket, error)
BatchGetTickets(ctx context.Context, ticketIDs []types.TicketID) ([]*ticket.Ticket, error)
PutTicket(ctx context.Context, ticket ticket.Ticket) error
BatchUpdateTicketsStatus(ctx context.Context, ticketIDs []types.TicketID, status types.TicketStatus) error
GetTicketByThread(ctx context.Context, thread slack.Thread) (*ticket.Ticket, error)
FindNearestTickets(ctx context.Context, embedding []float32, limit int) ([]*ticket.Ticket, error)
FindNearestTicketsWithSpan(ctx context.Context, embedding []float32, begin, end time.Time, limit int) ([]*ticket.Ticket, error)
GetTicketsByStatus(ctx context.Context, statuses []types.TicketStatus, offset, limit int) ([]*ticket.Ticket, error)
CountTicketsByStatus(ctx context.Context, statuses []types.TicketStatus) (int, error)
GetTicketsBySpan(ctx context.Context, begin, end time.Time) ([]*ticket.Ticket, error)
GetTicketsByStatusAndSpan(ctx context.Context, status types.TicketStatus, begin, end time.Time) ([]*ticket.Ticket, error)
// For comment management
PutTicketComment(ctx context.Context, comment ticket.Comment) error
GetTicketComments(ctx context.Context, ticketID types.TicketID) ([]ticket.Comment, error)
GetTicketCommentsPaginated(ctx context.Context, ticketID types.TicketID, offset, limit int) ([]ticket.Comment, error)
CountTicketComments(ctx context.Context, ticketID types.TicketID) (int, error)
GetTicketUnpromptedComments(ctx context.Context, ticketID types.TicketID) ([]ticket.Comment, error)
PutTicketCommentsPrompted(ctx context.Context, ticketID types.TicketID, commentIDs []types.CommentID) error
BatchBindAlertsToTicket(ctx context.Context, alertIDs []types.AlertID, ticketID types.TicketID) error
BindAlertToTicket(ctx context.Context, alertID types.AlertID, ticketID types.TicketID) error
UnbindAlertFromTicket(ctx context.Context, alertID types.AlertID) error
PutAlert(ctx context.Context, alert alert.Alert) error
BatchPutAlerts(ctx context.Context, alerts alert.Alerts) error
GetAlert(ctx context.Context, alertID types.AlertID) (*alert.Alert, error)
GetLatestAlertByThread(ctx context.Context, thread slack.Thread) (*alert.Alert, error)
SearchAlerts(ctx context.Context, path, op string, value any, limit int) (alert.Alerts, error)
GetAlertWithoutTicket(ctx context.Context, offset, limit int) (alert.Alerts, error)
GetAlertsBySpan(ctx context.Context, begin, end time.Time) (alert.Alerts, error)
BatchGetAlerts(ctx context.Context, alertIDs []types.AlertID) (alert.Alerts, error)
FindNearestAlerts(ctx context.Context, embedding []float32, limit int) (alert.Alerts, error)
GetLatestHistory(ctx context.Context, ticketID types.TicketID) (*ticket.History, error)
PutHistory(ctx context.Context, ticketID types.TicketID, history *ticket.History) error
// For list management
GetAlertList(ctx context.Context, listID types.AlertListID) (*alert.List, error)
PutAlertList(ctx context.Context, list *alert.List) error
GetAlertListByThread(ctx context.Context, thread slack.Thread) (*alert.List, error)
GetLatestAlertListInThread(ctx context.Context, thread slack.Thread) (*alert.List, error)
GetAlertListsInThread(ctx context.Context, thread slack.Thread) ([]*alert.List, error)
GetAlertWithoutEmbedding(ctx context.Context) (alert.Alerts, error)
// For authentication management
PutToken(ctx context.Context, token *auth.Token) error
GetToken(ctx context.Context, tokenID auth.TokenID) (*auth.Token, error)
DeleteToken(ctx context.Context, tokenID auth.TokenID) error
// For activity management
PutActivity(ctx context.Context, activity *activity.Activity) error
GetActivities(ctx context.Context, offset, limit int) ([]*activity.Activity, error)
CountActivities(ctx context.Context) (int, error)
}
type SlackClient ¶
type SlackClient interface {
PostMessageContext(ctx context.Context, channelID string, options ...slack.MsgOption) (string, string, error)
UpdateMessageContext(ctx context.Context, channelID, timestamp string, options ...slack.MsgOption) (string, string, string, error)
AuthTest() (*slack.AuthTestResponse, error)
GetTeamInfo() (*slack.TeamInfo, error)
OpenView(triggerID string, view slack.ModalViewRequest) (*slack.ViewResponse, error)
UpdateView(view slack.ModalViewRequest, externalID, hash, viewID string) (*slack.ViewResponse, error)
UploadFileV2Context(ctx context.Context, params slack.UploadFileV2Parameters) (*slack.FileSummary, error)
GetUserInfo(userID string) (*slack.User, error)
GetUsersInfo(users ...string) (*[]slack.User, error)
GetConversationInfo(input *slack.GetConversationInfoInput) (*slack.Channel, error)
GetUserGroups(options ...slack.GetUserGroupsOption) ([]slack.UserGroup, error)
GetBotInfoContext(ctx context.Context, parameters slack.GetBotInfoParameters) (*slack.Bot, error)
}
type SlackEventUsecases ¶
type SlackInteractionUsecases ¶
type SlackInteractionUsecases interface {
// Slack interaction handlers
HandleSlackInteractionViewSubmission(ctx context.Context, user slack.User, callbackID slack.CallbackID, metadata string, values slack.StateValue) error
HandleSlackInteractionBlockActions(ctx context.Context, user slack.User, slackThread slack.Thread, actionID slack.ActionID, value, triggerID string) error
HandleSalvageRefresh(ctx context.Context, user slack.User, metadata string, values slack.StateValue, viewID string) error
}
type SlackThreadService ¶
type StorageClient ¶
Click to show internal directories.
Click to hide internal directories.