timer

package module
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2021 License: GPL-3.0 Imports: 13 Imported by: 2 modules, 2 packages

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.

README

ZeroBot-Plugin-Timer

ZeroBot-Plugin的群管计时器

说明

该计时器必须配合ZeroBot-Plugin的manager插件使用,单独构建则无法使用。

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthTimer        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTimer          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTimer = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (

	// 定时器map
	Timers *(map[string]*Timer)
)

Functions

func GetTimerInfo

func GetTimerInfo(ts *TimeStamp) string

GetTimerInfo 获得标准化定时字符串

func ListTimers added in v1.3.1

func ListTimers(grpID uint64) []string

ListTimers 列出本群所有计时器

func RegisterTimer

func RegisterTimer(ts *TimeStamp, save bool)

RegisterTimer 注册计时器

func SaveTimers

func SaveTimers() error

SaveTimers 保存当前计时器

Types

type TimeStamp

type TimeStamp = Timer

func GetFilledTimeStamp

func GetFilledTimeStamp(dateStrs []string, matchDateOnly bool) *TimeStamp

GetFilledTimeStamp 获得填充好的ts

type Timer

type Timer struct {
	Enable               bool     `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"`
	Alert                string   `protobuf:"bytes,2,opt,name=alert,proto3" json:"alert,omitempty"`
	Url                  string   `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
	Month                int32    `protobuf:"zigzag32,4,opt,name=month,proto3" json:"month,omitempty"`
	Day                  int32    `protobuf:"zigzag32,5,opt,name=day,proto3" json:"day,omitempty"`
	Week                 int32    `protobuf:"zigzag32,6,opt,name=week,proto3" json:"week,omitempty"`
	Hour                 int32    `protobuf:"zigzag32,7,opt,name=hour,proto3" json:"hour,omitempty"`
	Minute               int32    `protobuf:"zigzag32,8,opt,name=minute,proto3" json:"minute,omitempty"`
	Grpid                uint64   `protobuf:"varint,9,opt,name=grpid,proto3" json:"grpid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Timer) Descriptor

func (*Timer) Descriptor() ([]byte, []int)

func (*Timer) GetAlert

func (m *Timer) GetAlert() string

func (*Timer) GetDay

func (m *Timer) GetDay() int32

func (*Timer) GetEnable

func (m *Timer) GetEnable() bool

func (*Timer) GetGrpid

func (m *Timer) GetGrpid() uint64

func (*Timer) GetHour

func (m *Timer) GetHour() int32

func (*Timer) GetMinute

func (m *Timer) GetMinute() int32

func (*Timer) GetMonth

func (m *Timer) GetMonth() int32

func (*Timer) GetUrl

func (m *Timer) GetUrl() string

func (*Timer) GetWeek

func (m *Timer) GetWeek() int32

func (*Timer) Marshal

func (m *Timer) Marshal() (dAtA []byte, err error)

func (*Timer) MarshalTo

func (m *Timer) MarshalTo(dAtA []byte) (int, error)

func (*Timer) MarshalToSizedBuffer

func (m *Timer) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Timer) ProtoMessage

func (*Timer) ProtoMessage()

func (*Timer) Reset

func (m *Timer) Reset()

func (*Timer) Size

func (m *Timer) Size() (n int)

func (*Timer) String

func (m *Timer) String() string

func (*Timer) Unmarshal

func (m *Timer) Unmarshal(dAtA []byte) error

func (*Timer) XXX_DiscardUnknown

func (m *Timer) XXX_DiscardUnknown()

func (*Timer) XXX_Marshal

func (m *Timer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Timer) XXX_Merge

func (m *Timer) XXX_Merge(src proto.Message)

func (*Timer) XXX_Size

func (m *Timer) XXX_Size() int

func (*Timer) XXX_Unmarshal

func (m *Timer) XXX_Unmarshal(b []byte) error

type TimersMap

type TimersMap struct {
	Timers               map[string]*Timer `` /* 153-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*TimersMap) Descriptor

func (*TimersMap) Descriptor() ([]byte, []int)

func (*TimersMap) GetTimers

func (m *TimersMap) GetTimers() map[string]*Timer

func (*TimersMap) Marshal

func (m *TimersMap) Marshal() (dAtA []byte, err error)

func (*TimersMap) MarshalTo

func (m *TimersMap) MarshalTo(dAtA []byte) (int, error)

func (*TimersMap) MarshalToSizedBuffer

func (m *TimersMap) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TimersMap) ProtoMessage

func (*TimersMap) ProtoMessage()

func (*TimersMap) Reset

func (m *TimersMap) Reset()

func (*TimersMap) Size

func (m *TimersMap) Size() (n int)

func (*TimersMap) String

func (m *TimersMap) String() string

func (*TimersMap) Unmarshal

func (m *TimersMap) Unmarshal(dAtA []byte) error

func (*TimersMap) XXX_DiscardUnknown

func (m *TimersMap) XXX_DiscardUnknown()

func (*TimersMap) XXX_Marshal

func (m *TimersMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TimersMap) XXX_Merge

func (m *TimersMap) XXX_Merge(src proto.Message)

func (*TimersMap) XXX_Size

func (m *TimersMap) XXX_Size() int

func (*TimersMap) XXX_Unmarshal

func (m *TimersMap) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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