domain

package
v0.0.0-...-27964f3 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProgressProcessing = "processing"
	ProgressCompleted  = "completed"
)

Variables

This section is empty.

Functions

func NotifyForEmail

func NotifyForEmail(templateName string, title string, data map[string]string) error

func NotifyForNtfy

func NotifyForNtfy(templateName string, title string, data map[string]string) error

func RegisterPlan

func RegisterPlan(name string, f func() *Plan)

Types

type CallInfo

type CallInfo struct {
	ServiceName string
	FuncName    string
}

type Plan

type Plan struct {
	Precondition func() (StatusCode, error)
	Todo         func(string) error
	WriteToDB    func(string, error) error

	Alias  string
	Name   string
	Status StatusCode

	NotifyWithError func(error) error
	// contains filtered or unexported fields
}

func GetPlan

func GetPlan(name string) (*Plan, bool)

func (*Plan) Check

func (p *Plan) Check() error

func (*Plan) GetAlias

func (p *Plan) GetAlias() string

func (*Plan) GetName

func (p *Plan) GetName() string

func (*Plan) IsCompleted

func (p *Plan) IsCompleted() bool

func (*Plan) Reset

func (p *Plan) Reset()

func (*Plan) SetStatus

func (p *Plan) SetStatus(status StatusCode)

type StatusCode

type StatusCode int
const (
	Pending StatusCode = iota
	Ready
	Completed
)

func (StatusCode) String

func (s StatusCode) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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