Documentation ¶
Index ¶
- Constants
- Variables
- func CloseAll()
- func Publish(ctx context.Context, r *Report)
- func Register(r event.Publisher[*Report])
- type Builder
- type BulkMetadataTransformReportContent
- type FileCopyContent
- type MetaDataVerifyContent
- type MetadataTransformContent
- type Report
- func (r *Report) Identifier() string
- func (r *Report) IncrementRetryCount()
- func (r *Report) OrigMessage() *azservicebus.ReceivedMessage
- func (r *Report) RetryCount() int
- func (r *Report) SetIdentifier(id string)
- func (r *Report) SetOrigMessage(_ *azservicebus.ReceivedMessage)
- func (r *Report) SetType(t string)
- func (r *Report) Type() string
- type ReportBuilder
- func (b *ReportBuilder[T]) AppendIssue(i ReportIssue) Builder[T]
- func (b *ReportBuilder[T]) Build() *Report
- func (b *ReportBuilder[T]) SetAction(s string) Builder[T]
- func (b *ReportBuilder[T]) SetContent(c T) Builder[T]
- func (b *ReportBuilder[T]) SetDispositionType(d string) Builder[T]
- func (b *ReportBuilder[T]) SetEndTime(t time.Time) Builder[T]
- func (b *ReportBuilder[T]) SetManifest(m map[string]string) Builder[T]
- func (b *ReportBuilder[T]) SetStartTime(t time.Time) Builder[T]
- func (b *ReportBuilder[T]) SetStatus(s string) Builder[T]
- func (b *ReportBuilder[T]) SetUploadId(id string) Builder[T]
- type ReportContent
- type ReportIssue
- type ReportStageInfo
- type UploadLifecycleContent
- type UploadStatusContent
Constants ¶
View Source
const DispositionTypeAdd = "add"
View Source
const DispositionTypeReplace = "replace"
View Source
const IssueLevelError = "ERROR"
View Source
const IssueLevelWarning = "WARNING"
View Source
const StageFileCopy = "blob-file-copy"
View Source
const StageMetadataTransform = "metadata-transform"
View Source
const StageMetadataVerify = "metadata-verify"
View Source
const StageUploadCompleted = "upload-completed"
View Source
const StageUploadStarted = "upload-started"
View Source
const StageUploadStatus = "upload-status"
View Source
const StatusFailed = "FAILURE"
View Source
const StatusSuccess = "SUCCESS"
Variables ¶
View Source
var Reporters event.Publishers[*Report]
Functions ¶
Types ¶
type Builder ¶
type Builder[T any] interface { SetAction(string) Builder[T] SetUploadId(string) Builder[T] SetManifest(map[string]string) Builder[T] AppendIssue(ReportIssue) Builder[T] SetStatus(string) Builder[T] SetStartTime(time.Time) Builder[T] SetEndTime(time.Time) Builder[T] SetDispositionType(string) Builder[T] SetContent(T) Builder[T] Build() *Report }
func NewBuilder ¶
type BulkMetadataTransformReportContent ¶
type BulkMetadataTransformReportContent struct { ReportContent Transforms []MetadataTransformContent `json:"transforms"` }
type FileCopyContent ¶
type FileCopyContent struct { ReportContent FileSourceBlobUrl string `json:"file_source_blob_url"` FileDestinationBlobUrl string `json:"file_destination_blob_url"` DestinationName string `json:"destination_name"` }
type MetaDataVerifyContent ¶
type MetaDataVerifyContent struct { ReportContent Filename string `json:"filename"` Metadata any `json:"metadata"` }
type Report ¶
type Report struct { Event event.Event `json:"-"` ReportSchemaVersion string `json:"report_schema_version"` UploadID string `json:"upload_id"` SenderID string `json:"sender_id"` DataStreamID string `json:"data_stream_id"` DataStreamRoute string `json:"data_stream_route"` Jurisdiction string `json:"jurisdiction"` DexIngestDatetime string `json:"dex_ingest_datetime"` ContentType string `json:"content_type"` DispositionType string `json:"disposition_type"` StageInfo ReportStageInfo `json:"stage_info"` Content any `json:"content"` // TODO: Can we limit this to a specific type (i.e. ReportContent or UploadStatusTYpe type? }
func (*Report) Identifier ¶
func (*Report) IncrementRetryCount ¶
func (r *Report) IncrementRetryCount()
func (*Report) OrigMessage ¶
func (r *Report) OrigMessage() *azservicebus.ReceivedMessage
func (*Report) RetryCount ¶
func (*Report) SetIdentifier ¶
func (*Report) SetOrigMessage ¶
func (r *Report) SetOrigMessage(_ *azservicebus.ReceivedMessage)
type ReportBuilder ¶
type ReportBuilder[T any] struct { Action string Version string UploadId string Manifest map[string]string Issues []ReportIssue Status string StartTime time.Time EndTime time.Time DispositionType string Content T }
func (*ReportBuilder[T]) AppendIssue ¶
func (b *ReportBuilder[T]) AppendIssue(i ReportIssue) Builder[T]
func (*ReportBuilder[T]) Build ¶
func (b *ReportBuilder[T]) Build() *Report
func (*ReportBuilder[T]) SetAction ¶
func (b *ReportBuilder[T]) SetAction(s string) Builder[T]
func (*ReportBuilder[T]) SetContent ¶
func (b *ReportBuilder[T]) SetContent(c T) Builder[T]
func (*ReportBuilder[T]) SetDispositionType ¶
func (b *ReportBuilder[T]) SetDispositionType(d string) Builder[T]
func (*ReportBuilder[T]) SetEndTime ¶
func (b *ReportBuilder[T]) SetEndTime(t time.Time) Builder[T]
func (*ReportBuilder[T]) SetManifest ¶
func (b *ReportBuilder[T]) SetManifest(m map[string]string) Builder[T]
func (*ReportBuilder[T]) SetStartTime ¶
func (b *ReportBuilder[T]) SetStartTime(t time.Time) Builder[T]
func (*ReportBuilder[T]) SetStatus ¶
func (b *ReportBuilder[T]) SetStatus(s string) Builder[T]
func (*ReportBuilder[T]) SetUploadId ¶
func (b *ReportBuilder[T]) SetUploadId(id string) Builder[T]
type ReportContent ¶
type ReportIssue ¶
func (*ReportIssue) String ¶
func (r *ReportIssue) String() string
type ReportStageInfo ¶
type UploadLifecycleContent ¶
type UploadLifecycleContent struct { ReportContent Status string `json:"status"` }
type UploadStatusContent ¶
type UploadStatusContent struct { ReportContent Filename string `json:"filename"` Tguid string `json:"tguid"` Offset int64 `json:"offset"` Size int64 `json:"size"` }
Click to show internal directories.
Click to hide internal directories.