-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmessaging.go
More file actions
82 lines (73 loc) · 3.29 KB
/
Copy pathmessaging.go
File metadata and controls
82 lines (73 loc) · 3.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// Copyright The Linux Foundation and each contributor to LFX.
// SPDX-License-Identifier: MIT
// Package constants provides shared constants used throughout the LFX indexer service.
package constants
import "time"
// NATS subject prefixes (preserved from existing)
// These constants define the protocol format for NATS message subjects
const (
IndexPrefix = "lfx.index." // V2 message prefix
FromV1Prefix = "lfx.v1.index." // V1 message prefix
)
// NATS subjects (professional expansion)
const (
ProjectSubject = IndexPrefix + "project" // V2 project messages
V1ProjectSubject = FromV1Prefix + "project" // V1 project messages
MeetingSubject = IndexPrefix + "meeting" // V2 meeting messages
SubjectIndexing = IndexPrefix + "index" // V2 indexing messages
SubjectV1Indexing = FromV1Prefix + "index" // V1 indexing messages
AllSubjects = IndexPrefix + ">" // All V2 subjects
AllV1Subjects = FromV1Prefix + ">" // All V1 subjects
)
// Transaction actions (centralized from scattered strings)
const (
ActionCreate = "create" // V1 format (present tense)
ActionCreated = "created" // V2 format (past tense)
ActionUpdate = "update" // V1 format (present tense)
ActionUpdated = "updated" // V2 format (past tense)
ActionDelete = "delete" // V1 format (present tense)
ActionDeleted = "deleted" // V2 format (past tense)
)
// Header constants (centralized)
const (
HeaderXUsername = "x-username" // V1 username header
HeaderXEmail = "x-email" // V1 email header
)
// Object types (centralized)
const (
ObjectTypeProject = "project"
ObjectTypeProjectSettings = "project_settings"
ObjectTypeCommittee = "committee"
ObjectTypeCommitteeSettings = "committee_settings"
ObjectTypeCommitteeMember = "committee_member"
ObjectTypeMeeting = "meeting"
ObjectTypeMeetingSettings = "meeting_settings"
ObjectTypeMeetingRegistrant = "meeting_registrant"
ObjectTypeMeetingRSVP = "meeting_rsvp"
ObjectTypeMeetingAttachment = "meeting_attachment"
ObjectTypePastMeeting = "past_meeting"
ObjectTypePastMeetingAttachment = "past_meeting_attachment"
ObjectTypePastMeetingParticipant = "past_meeting_participant"
ObjectTypePastMeetingRecording = "past_meeting_recording"
ObjectTypePastMeetingTranscript = "past_meeting_transcript"
ObjectTypePastMeetingSummary = "past_meeting_summary"
ObjectTypeGroupsIOService = "groupsio_service"
ObjectTypeGroupsIOMailingList = "groupsio_mailing_list"
ObjectTypeGroupsIOMember = "groupsio_member"
// V1 Meeting object types
ObjectTypeV1Meeting = "v1_meeting"
ObjectTypeV1PastMeeting = "v1_past_meeting"
ObjectTypeV1MeetingRegistrant = "v1_meeting_registrant"
ObjectTypeV1MeetingRSVP = "v1_meeting_rsvp"
ObjectTypeV1PastMeetingParticipant = "v1_past_meeting_participant"
ObjectTypeV1PastMeetingRecording = "v1_past_meeting_recording"
ObjectTypeV1PastMeetingTranscript = "v1_past_meeting_transcript"
ObjectTypeV1PastMeetingSummary = "v1_past_meeting_summary"
)
// Message processing constants
const (
DefaultQueue = "lfx.indexer.queue"
RefreshTrue = "true" // OpenSearch refresh parameter
RefreshFalse = "false" // OpenSearch refresh parameter
ReplyTimeout = 5 * time.Second
)