models

package
v0.0.0-...-4a2620c 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 (
	Created     string = "CREATED"
	MessageSent string = "MESSAGE_SENT"
	Approved    string = "APPROVED"
	Declined    string = "DECLINED"
	Finished    string = "FINISHED"
	Deleted     string = "DELETED"
)

all possible event Statuses

Variables

This section is empty.

Functions

This section is empty.

Types

type Delay

type Delay struct {
	ID  uint64        `json:"id"`
	Lag time.Duration `json:"lag"`
}

Delay is a time lag on particular task ID

type Event

type Event struct {
	ID         uint64
	EventType  string
	TaskID     uint64
	Approver   string
	RecievedAt time.Time
	Delay      time.Duration
}

Event represents a struct to store in database

type Message

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

Message represents incoming message from Task and Mail services

type TokenPair

type TokenPair struct {
	Access    string
	Refresh   string
	Login     string
	Refreshed bool
}

TokenPair represents JWT token

type Totals

type Totals struct {
	Finished uint64 `json:"finished"`
	Declined uint64 `json:"declined"`
}

Totals represents cumulative statistics on tasks

Jump to

Keyboard shortcuts

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