Documentation
¶
Index ¶
- Constants
- func BuildCloudEvent(eventType string, payload any) ([]byte, error)
- type AssessmentData
- type AssessmentEventPayload
- type ComplexityActionData
- type KafkaProducer
- type NoOpWriter
- type OVADownloadActionData
- type PartnerCustomerData
- type PartnerCustomerEventPayload
- type ShareAssessmentActionData
- type SizingActionData
- type TimeEstimationActionData
- type UnshareAssessmentActionData
- type UserActionData
- type UserActionEventPayload
- func NewComplexityPayload(username, assessmentID string) UserActionEventPayload
- func NewOVADownloadPayload(username, sourceID string) UserActionEventPayload
- func NewShareAssessmentPayload(username, assessmentID, partnerID string) UserActionEventPayload
- func NewSizingPayload(username, assessmentID string) UserActionEventPayload
- func NewTimeEstimationPayload(username, assessmentID string) UserActionEventPayload
- func NewUnshareAssessmentPayload(username, assessmentID string) UserActionEventPayload
- func NewVisitorPayload(username, orgID string) UserActionEventPayload
- type VisitorActionData
- type Writer
Constants ¶
View Source
const ( // GenericTopic is the Kafka topic where all events are produced GenericTopic = "assisted.migration.events" // DefaultEventSource is the CloudEvent source field DefaultEventSource = "migration-planner" AssessmentCreatedEventType = "assisted.migration.assessment.created" AssessmentDeletedEventType = "assisted.migration.assessment.deleted" // PartnerCustomerEventType covers partner-customer relationship changes (request, accept, cancel, etc.) PartnerCustomerEventType = "assisted.migration.partner_customer.updated" // User action event types track discrete user actions (share, unshare, sizing, OVA download, etc.) SizingEventType = "assisted.migration.user_action.sizing_requested" MigrationComplexityEventType = "assisted.migration.user_action.complexity_estimated" MigrationTimeEstimationEventType = "assisted.migration.user_action.time_estimated" DownloadOVAEventType = "assisted.migration.user_action.ova_downloaded" VisitorEventType = "assisted.migration.user_action.visited" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AssessmentData ¶
type AssessmentData struct {
ID string `json:"id"`
SnapshotID uint `json:"snapshot_id,omitempty"`
Name string `json:"name,omitempty"`
OrgID string `json:"org_id,omitempty"`
Username string `json:"username,omitempty"`
SourceType string `json:"source_type,omitempty"`
PartnerID *string `json:"partner_id,omitempty"`
Location *string `json:"location,omitempty"`
Inventory json.RawMessage `json:"inventory,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
DeletedAt *time.Time `json:"deleted_at,omitempty"`
}
type AssessmentEventPayload ¶
type AssessmentEventPayload struct {
Assessment AssessmentData `json:"assessment"`
}
func NewAssessmentCreatedPayload ¶
func NewAssessmentCreatedPayload(data AssessmentData) AssessmentEventPayload
func NewAssessmentDeletedPayload ¶
func NewAssessmentDeletedPayload(assessmentID string, deletedAt time.Time) AssessmentEventPayload
type ComplexityActionData ¶
type ComplexityActionData struct {
AssessmentID string `json:"assessment_id"`
}
type KafkaProducer ¶
type KafkaProducer struct {
// contains filtered or unexported fields
}
func NewKafkaProducer ¶
func NewKafkaProducer(brokers []string, opts ...kgo.Opt) (*KafkaProducer, error)
func (*KafkaProducer) Close ¶
func (p *KafkaProducer) Close()
type OVADownloadActionData ¶
type OVADownloadActionData struct {
SourceID string `json:"source_id"`
}
type PartnerCustomerData ¶
type PartnerCustomerData struct {
ID string `json:"id"`
CustomerUsername string `json:"customer_username"`
PartnerID string `json:"partner_id"`
RequestStatus string `json:"request_status"`
Location string `json:"location"`
AcceptedAt *time.Time `json:"accepted_at,omitempty"`
TerminatedAt *time.Time `json:"terminated_at,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
type PartnerCustomerEventPayload ¶
type PartnerCustomerEventPayload struct {
PartnerCustomer PartnerCustomerData `json:"partner_customer"`
}
func NewPartnerCustomerPayload ¶
func NewPartnerCustomerPayload(data PartnerCustomerData) PartnerCustomerEventPayload
type ShareAssessmentActionData ¶
type ShareAssessmentActionData struct {
}
type SizingActionData ¶
type SizingActionData struct {
AssessmentID string `json:"assessment_id"`
}
type TimeEstimationActionData ¶ added in v0.16.0
type TimeEstimationActionData struct {
AssessmentID string `json:"assessment_id"`
}
type UnshareAssessmentActionData ¶
type UnshareAssessmentActionData struct {
}
type UserActionData ¶
type UserActionEventPayload ¶
type UserActionEventPayload struct {
UserAction UserActionData `json:"user_action"`
}
func NewComplexityPayload ¶
func NewComplexityPayload(username, assessmentID string) UserActionEventPayload
func NewOVADownloadPayload ¶
func NewOVADownloadPayload(username, sourceID string) UserActionEventPayload
func NewShareAssessmentPayload ¶
func NewShareAssessmentPayload(username, assessmentID, partnerID string) UserActionEventPayload
func NewSizingPayload ¶
func NewSizingPayload(username, assessmentID string) UserActionEventPayload
func NewTimeEstimationPayload ¶ added in v0.16.0
func NewTimeEstimationPayload(username, assessmentID string) UserActionEventPayload
func NewUnshareAssessmentPayload ¶
func NewUnshareAssessmentPayload(username, assessmentID string) UserActionEventPayload
func NewVisitorPayload ¶
func NewVisitorPayload(username, orgID string) UserActionEventPayload
type VisitorActionData ¶ added in v0.16.0
type VisitorActionData struct {
OrgID string `json:"org_id"`
}
Click to show internal directories.
Click to hide internal directories.