lib

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2025 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application added in v0.4.0

type Application struct {
	Token        string
	Name         string
	IconPath     string
	Format       string
	CustomFormat CFormat

	Target string
}

type CFormat added in v0.4.0

type CFormat struct {
	Attachment       string
	AttachmentBase64 string
	AttachmentType   string
	Device           string
	HTML             string
	Message          string
	Priority         string
	TTL              string
	Timestamp        string
	Title            string
	URL              string
	URLTitle         string
}

func (*CFormat) GetLocationAndPath added in v0.4.0

func (cf *CFormat) GetLocationAndPath(str string) (string, string)

func (*CFormat) GetValue added in v0.4.0

func (cf *CFormat) GetValue(
	locations map[string]*gabs.Container,
	fullpath string,
) (string, bool)

type Config

type Config struct {
	Debug   bool
	Testing bool

	Redis struct {
		Connection  string
		Connections []string
		Username    string
		Password    string
		Cluster     bool
		Failover    bool
		MasterName  string
		Concurrency int
	}

	Server struct {
		BindIP string
		Port   string
	}

	Users []struct {
		Key          string
		Applications []Application
	}

	Targets []struct {
		ID   string
		Type string
		Args map[string]string
	}
}

func Cfg

func Cfg() (Config, error)

func (*Config) GetApplication added in v0.4.0

func (cfg *Config) GetApplication(userKey string, token string) (Application, error)

func (*Config) GetUserKeyFromToken added in v0.4.0

func (cfg *Config) GetUserKeyFromToken(token string) (string, error)

Jump to

Keyboard shortcuts

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