app

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: MIT Imports: 13 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeConfig

func MergeConfig(cfg *config.ConfYaml, opts *Options) error

MergeConfig merges CLI options into the configuration. CLI options take precedence over config file values.

func NewQueuePool

func NewQueuePool(cfg *config.ConfYaml, w qcore.Worker) *queue.Queue

NewQueuePool creates a queue pool with the configured number of workers.

func NewQueueWorker

func NewQueueWorker(cfg *config.ConfYaml) (qcore.Worker, error)

NewQueueWorker creates a queue worker based on the configured queue engine. Supported engines: local, nsq, nats, redis.

func SendAndroidNotification

func SendAndroidNotification(ctx context.Context, cfg *config.ConfYaml, opts CLISendOptions) error

SendAndroidNotification sends an Android notification via CLI.

func SendHuaweiNotification

func SendHuaweiNotification(ctx context.Context, cfg *config.ConfYaml, opts CLISendOptions) error

SendHuaweiNotification sends a Huawei notification via CLI.

func SendIOSNotification

func SendIOSNotification(ctx context.Context, cfg *config.ConfYaml, opts CLISendOptions) error

SendIOSNotification sends an iOS notification via CLI.

func SendNotification

func SendNotification(
	ctx context.Context,
	platform int,
	cfg *config.ConfYaml,
	opts CLISendOptions,
) error

SendNotification sends a notification based on platform type.

func ValidateAndMerge

func ValidateAndMerge(opts *Options) (*config.ConfYaml, error)

ValidateAndMerge loads config, merges CLI options, and validates.

Types

type CLISendOptions

type CLISendOptions struct {
	Token   string
	Message string
	Title   string
	Topic   string
}

CLISendOptions contains options for sending notifications via CLI.

type Options

type Options struct {
	ShowVersion bool
	Ping        bool
	ConfigFile  string

	// Notification options (for CLI mode)
	Token   string
	Message string
	Title   string
	Topic   string

	// Config overrides
	Conf config.ConfYaml
}

Options holds all CLI flag values.

func NewOptions

func NewOptions() *Options

NewOptions creates a new Options instance with default values.

func (*Options) BindFlags

func (o *Options) BindFlags()

BindFlags binds CLI flags to the Options struct. Call this before flag.Parse().

func (*Options) CLISendOptions

func (o *Options) CLISendOptions() CLISendOptions

CLISendOptions returns CLI send options for notification sending.

func (*Options) IsCLIMode

func (o *Options) IsCLIMode() bool

IsCLIMode returns true if running in CLI notification mode.

Jump to

Keyboard shortcuts

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