models

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

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

Go to latest
Published: Aug 10, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Approval is one of expected MsgTask.EventType values
	// means we have to use approval message template
	Approval = "approval"

	// Decline is one of expected MsgTask.EventType values
	// means service will use decline message template
	Decline = "decine"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MsgAnalytics

type MsgAnalytics struct {
	EventType  string    `json:"eventtype"`
	TaskID     uint64    `json:"taskid"`
	Approver   string    `json:"approver"`
	RecievedAt time.Time `json:"recievedat"`
}

MsgAnalytics represents outgoing message to Analytics service

type MsgSMTP

type MsgSMTP struct {
	Sender   string `json:"sender"`
	Receiver string `json:"receiver"`
	Body     []byte `json:"body"`

	EventType string `json:"eventtype"`
	TaskID    uint64 `json:"taskid"`
}

MsgSMTP ...

type MsgTask

type MsgTask struct {
	TaskID      uint64 // task ID
	TaskName    string // task name
	TaskDescr   string // task description
	EventType   string // event type (send approve message / decline)
	Approver    string // recipient's smtp-address
	AcceptLink  string // a link to accept the task for specified approver
	DeclineLink string // a link to decline given task
}

MsgTask represents a message from Tasks service It is expected to recieve two types of messages:

  • ask for approve message
  • message on declined task

Type of message is defined by kafka.Key

Jump to

Keyboard shortcuts

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