model

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NotifFmtHTML indicates notification has HTML format.
	NotifFmtHTML = iota
	// NotifFmtText indicates notification has Text format.
	NotifFmtText

	// LiveReportType identifies the live report type.
	LiveReportType = "livereport"

	// StatusGenerating indicates that report is being generated.
	StatusGenerating = "GENERATING"
	// StatusFinished indicates that report has been generated.
	StatusFinished = "FINISHED"
	// StatusFailed indicates that report generation failed.
	StatusFailed = "FAILED"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseReport

type BaseReport struct {
	ID           string
	Notification Notification
	DeliveredTo  []string
	Status       string
	CreatedAt    time.Time
	UpdatedAt    time.Time
}

BaseReport represents the common fields for all types of reports.

type FileInfo

type FileInfo struct {
	FilePath   string
	DestBucket string
	DestPath   string
}

FileInfo contains report file and its upload destination.

type LiveReport

type LiveReport struct {
	BaseReport
	TeamID   string
	DateFrom string
	DateTo   string
}

LiveReport represents a report for vulcan team.

func (*LiveReport) GetCreatedAt

func (r *LiveReport) GetCreatedAt() time.Time

func (*LiveReport) GetDateFrom

func (r *LiveReport) GetDateFrom() string

func (*LiveReport) GetDateTo

func (r *LiveReport) GetDateTo() string

func (*LiveReport) GetDeliveredTo

func (r *LiveReport) GetDeliveredTo() []string

func (*LiveReport) GetID

func (r *LiveReport) GetID() string

func (*LiveReport) GetNotification

func (r *LiveReport) GetNotification() Notification

func (*LiveReport) GetStatus

func (r *LiveReport) GetStatus() string

func (*LiveReport) GetTeamID

func (r *LiveReport) GetTeamID() string

func (*LiveReport) GetUpdatedAt

func (r *LiveReport) GetUpdatedAt() time.Time

type NotifFmt

type NotifFmt uint8

NotifFmt represents the report notification format.

type Notification

type Notification struct {
	Subject string
	Body    string
	Fmt     NotifFmt
}

Notification represents a report notification.

type Report

type Report interface {
	GetID() string
	GetNotification() Notification
	GetDeliveredTo() []string
	GetStatus() string
	GetCreatedAt() time.Time
	GetUpdatedAt() time.Time
}

Report represents the interface which all report types must comply with.

type ReportType

type ReportType string

ReportType specifies a report type.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL