Update all Go modules in backend/ and backend/_example/memory_store/ to their latest versions (chroma 2.27, go-redis 9.21, bbolt 1.5, slack 0.27, golang.org/x/* and others); re-tidy and re-vendor, keep the example module in sync. Hold github.com/go-chi/chi/v5 at v5.2.5: v5.3.0 deprecates middleware.RealIP (IP-spoofing advisories). Switching off RealIP changes how the client IP is derived for rate limiting and votes, which is a security decision better made on its own rather than inside a dependency bump. go test -race, go vet, golangci-lint and govulncheck all clean on both modules.
39 lines
1.3 KiB
Go
39 lines
1.3 KiB
Go
package slack
|
|
|
|
// SlackMetadata https://api.slack.com/reference/metadata
|
|
type SlackMetadata struct {
|
|
EventType string `json:"event_type"`
|
|
EventPayload map[string]any `json:"event_payload"`
|
|
}
|
|
|
|
// Work Object entity type constants.
|
|
// See https://docs.slack.dev/messaging/work-objects/
|
|
const (
|
|
EntityTypeTask = "slack#/entities/task"
|
|
EntityTypeFile = "slack#/entities/file"
|
|
EntityTypeItem = "slack#/entities/item"
|
|
EntityTypeIncident = "slack#/entities/incident"
|
|
EntityTypeContentItem = "slack#/entities/content_item"
|
|
)
|
|
|
|
// WorkObjectExternalRef represents an external reference for a Work Object
|
|
type WorkObjectExternalRef struct {
|
|
ID string `json:"id"`
|
|
Type string `json:"type,omitempty"`
|
|
}
|
|
|
|
// WorkObjectEntity represents a single Work Object entity
|
|
type WorkObjectEntity struct {
|
|
AppUnfurlURL string `json:"app_unfurl_url,omitempty"`
|
|
URL string `json:"url"`
|
|
ExternalRef WorkObjectExternalRef `json:"external_ref"`
|
|
EntityType string `json:"entity_type"`
|
|
EntityPayload map[string]any `json:"entity_payload"`
|
|
}
|
|
|
|
// WorkObjectMetadata represents the metadata for Work Objects
|
|
// Used in chat.unfurl and chat.postMessage for Work Objects support
|
|
type WorkObjectMetadata struct {
|
|
Entities []WorkObjectEntity `json:"entities"`
|
|
}
|