lib

package
v0.0.0-...-611ee02 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRecoverFromPanic = errors.New("recover from panic")
)

Functions

func SafeGo

func SafeGo(fn func())

SafeGo spawns a go-routine to run {#fn} with panic handler.

func Try

func Try(fn func()) (err error)

Try invokes #{fn} with panic handler. If #{fn} causes a panic, #{ErrRecoverFromPanic} will be returned. Otherwise, nil will be returned.

Types

type IPHelper

type IPHelper struct {
	// contains filtered or unexported fields
}

func GetIPHelperInstance

func GetIPHelperInstance(conf *settings.Settings) *IPHelper

func (*IPHelper) GetCurrentIP

func (helper *IPHelper) GetCurrentIP() string

func (*IPHelper) UpdateConfiguration

func (helper *IPHelper) UpdateConfiguration(conf *settings.Settings)

type Webhook

type Webhook struct {
	// contains filtered or unexported fields
}

func GetWebhook

func GetWebhook(conf *settings.Settings) *Webhook

func (*Webhook) Execute

func (w *Webhook) Execute(domain, currentIP string) error

Jump to

Keyboard shortcuts

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