msg

package
v0.0.0-...-6b47566 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeMessage

func InitializeMessage()

Types

type Message

type Message struct {
	gorm.Model
	AppName string `path:"application" doc:"Application Name" Example:"MyApp"`
	Body    struct {
		Message   string                 `json:"message" doc:"Message to be Sent"`
		ShortMsg  string                 `json:"shortmessage,omitempty" doc:"Short Message to be Sent"`
		Topic     string                 `json:"topic,omitempty" doc:"Topic of Message"`
		Severity  string                 `json:"severity,omitempty" doc:"Severity of Message" default:"INFO"`
		Timestamp time.Time              `json:"timestamp,omitempty" doc:"Timestamp of Message"`
		Fields    map[string]interface{} `json:"fields,omitempty" doc:"Additional Fields" gorm:"-"`
	} `json:"body" doc:"Message Body" gorm:"embedded"`
	Result *MessageResult `json:"result,omitempty" doc:"Result of Message"`
}

func (*Message) ProcessMessage

func (msg *Message) ProcessMessage() (err error)

type MessageResult

type MessageResult struct {
	MessageID uint   `json:"message_id" doc:"Message ID"`
	Status    string `json:"status" doc:"Status of Message"`
}

Jump to

Keyboard shortcuts

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