notification

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelData

type ChannelData struct{}

Part of the `Data` struct. Based on real world data and not on any documentation.

type Data

type Data struct {
	General         GeneralData     `json:"general"`
	ChannelData     ChannelData     `json:"channeldata"`
	ImageData       ImageData       `json:"imagedata"`
	InteractionData InteractionData `json:"interactiondata"`
	PublishingData  PublishingData  `json:"publishingdata"`
}

Data about the item of the notification. The data should be more or less analog to the editable fields type and should be implemented by the `omnia` package instead. This only implements a subset of all available fields.

type GeneralData

type GeneralData struct {
	ID          int          `json:"ID"`
	GID         int          `json:"GID"`
	Hash        string       `json:"hash"`
	Title       string       `json:"title"`
	SubTitle    string       `json:"subtitle"`
	GenreRaw    string       `json:"genre_raw"`
	Uploaded    types.UnixTS `json:"uploaded"`
	Created     types.UnixTS `json:"created"`
	Description string       `json:"description"`
	RefNr       string       `json:"refnr"`
}

Part of the `Data` struct. Based on real world data and not on any documentation.

type ImageData

type ImageData struct {
	Thumbnail string `json:"thumb"`
	Banner    string `json:"thumb_banner"`
	Waveform  string `json:"waveform"`
}

Part of the `Data` struct. Based on real world data and not on any documentation.

type InteractionData

type InteractionData struct{}

Part of the `Data` struct. Based on real world data and not on any documentation.

type Item

type Item struct {
	// The ID of the Media Item.
	ID string `json:"ID"`
	// The GlobalID of the Media Item.
	GID int `json:"GID"`
	// The external Reference of the Media Item.
	RefNr string `json:"refnr"`
	// The Domain of the Media Item.
	Domain int `json:"domain"`
	// The stream-type of the Media Item.
	StreamType string `json:"streamtype"`
}

Information about the item which has triggered by the event.

type Notification

type Notification struct {
	Trigger Trigger `json:"trigger"`
	Item    Item    `json:"item"`
	Data    Data    `json:"data"`
}

A notification based on an event within omnia.

func NotificationFromJson

func NotificationFromJson(raw []byte) (*Notification, error)

Returns a Notification instance based on JSON data.

type PublishingData

type PublishingData struct {
	Origin string `json:"origin"`
}

Part of the `Data` struct. Based on real world data and not on any documentation.

type Trigger

type Trigger struct {
	// The »reason« for this trigger.
	Event string `json:"event"`
	// The user ID, that changed the media item (or 0, if created by nexxOMNIA).
	User types.StringOrZero `json:"user"`
	// The Session ID, that changed the Media Item (or 0, if created by nexxOMNIA).
	Session types.StringOrZero `json:"session"`
	// The Timestamp of the Change.
	Created types.UnixTS `json:"created"`
	// The Timestamp of the Trigger Processing.
	Sent types.UnixTS `json:"sent"`
	// The computed Secret for Comparison (if enabled).
	Secret string `json:"secret,omitempty"`
}

Information about the trigger of the notification.

Jump to

Keyboard shortcuts

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