umak

package
v0.0.0-...-26795f0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	APPLICATION_PREFIX []byte = []byte("APPLICATION")
	DEFAULT_LOGGER            = log.New(os.Stdout, "umak ", log.LstdFlags)
)

Functions

This section is empty.

Types

type Application

type Application struct {
	Number   string    `json:"number"`
	Queue    string    `json:"queue,omitempty"`
	LastSync time.Time `json:"last_sync,omitempty"`
	Crons    []string  `json:"crons,omitempty"`
	ErrMsg   string    `json:"err_msg,omitempty"`
	JobIds   []int     `json:"job_ids"`

	LastSyncDurable time.Duration `json:"last_sync_durable,omitempty"`
}

type Umak

type Umak interface {
	AddNewDiaryNumber(txn db.Txn, diaryNumber string, crons []string) (*Application, error)
	GetApplication(txn db.Txn, diaryNumber string) (*Application, error)
	GetApplications(txn db.Txn) ([]Application, error)
	SyncQueue(txn db.Txn, app *Application) error
	InitCronJobs(txn db.Txn) error
	DeleteApplication(txn db.Txn, app *Application) error
}

func New

func New(db db.DBClient, k kamu.Kamu, c *cron.Cron) Umak

Jump to

Keyboard shortcuts

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