xpush

package
v0.0.0-...-63f9c8e Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Index

Constants

View Source
const (
	ErrPushTypeInvalid  = misc.ErrStr("push type invalid")
	ErrPushTypeExist    = misc.ErrStr("push type exist")
	ErrPushTypeNotExist = misc.ErrStr("push type not exist")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IPushMod

type IPushMod interface {
	Push(title string, content string) error
	PushMarkDown(title string, content string) error
	SetSetting(setting interface{}) error
}

type PushType

type PushType int8
const (
	PushTypeNull PushType = iota
	PushTypeEmail
	PushTypePushDeer
	PushTypeDing
	PushTypeMax
)

type XPush

type XPush struct {
	misc.InitTag
	// contains filtered or unexported fields
}

func NewXPush

func NewXPush(needLock bool) (*XPush, error)

func (*XPush) AddDingDing

func (m *XPush) AddDingDing(setting pushmod.DingSetting) error

func (*XPush) AddEmail

func (m *XPush) AddEmail(setting pushmod.EmailSetting) error

func (*XPush) AddPushDeer

func (m *XPush) AddPushDeer(setting pushmod.PushDeerSetting) error

func (*XPush) Init

func (m *XPush) Init(needLock bool) error

func (*XPush) IsTypeValid

func (m *XPush) IsTypeValid(pushType PushType) bool

func (*XPush) OnLock

func (m *XPush) OnLock()

func (*XPush) OnUnlock

func (m *XPush) OnUnlock()

func (*XPush) Push

func (m *XPush) Push(title string, content string, markDown bool) error

func (*XPush) RemovePushType

func (m *XPush) RemovePushType(pushType PushType)

func (*XPush) SetDing

func (m *XPush) SetDing(setting pushmod.DingSetting) error

func (*XPush) SetEmail

func (m *XPush) SetEmail(setting pushmod.EmailSetting) error

func (*XPush) SetPushDeer

func (m *XPush) SetPushDeer(setting pushmod.PushDeerSetting) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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