notification

package
v0.0.151 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MessageLevelError   = tensorleapapi.MESSAGELEVEL_ERROR
	MessageLevelWarning = tensorleapapi.MESSAGELEVEL_WARNING
	MessageLevelInfo    = tensorleapapi.MESSAGELEVEL_INFO
	MessageLevelVerbose = tensorleapapi.MESSAGELEVEL_VERBOSE
)

MessageLevel constants

Variables

This section is empty.

Functions

This section is empty.

Types

type JobFailureNotificationReport

type JobFailureNotificationReport struct {
	JobId         string
	Notifications []NotificationReport
}

func GetJobFailureNotifications

func GetJobFailureNotifications(ctx context.Context, jobId string, since time.Time) (*JobFailureNotificationReport, error)

GetJobFailureNotifications fetches and prints error and warning notifications for a specific job since the given start time

func (*JobFailureNotificationReport) View

type MessageLevel

type MessageLevel = tensorleapapi.MessageLevel

type Notification

type Notification = tensorleapapi.Notification

Type aliases for convenience

func FilterJobStatusNotifications

func FilterJobStatusNotifications(notifications []Notification) []Notification

func GetNotifications

func GetNotifications(ctx context.Context) ([]Notification, error)

GetNotifications fetches all notifications for the current user

func GetNotificationsByFilter

func GetNotificationsByFilter(ctx context.Context, filter NotificationFilter) ([]Notification, error)

GetNotificationsByFilter fetches notifications with optional filters

type NotificationFilter

type NotificationFilter struct {
	JobId             *string
	FromDate          *time.Time
	NotificationTypes []MessageLevel
}

NotificationFilter holds filter options for fetching notifications

type NotificationReport

type NotificationReport struct {
	Level        MessageLevel
	Title        string
	Message      string
	ExtraMessage string
}

func ToNotificationReport

func ToNotificationReport(notification Notification) NotificationReport

func (NotificationReport) View

func (report NotificationReport) View() string

type NotificationsPageContent

type NotificationsPageContent struct {
	Notifications *JobFailureNotificationReport
}

--------------------------- Notifications Page Content ---------------------------

func (*NotificationsPageContent) Init

func (n *NotificationsPageContent) Init() tea.Cmd

func (*NotificationsPageContent) Update

func (n *NotificationsPageContent) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*NotificationsPageContent) View

func (n *NotificationsPageContent) View() string

Jump to

Keyboard shortcuts

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