Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigPath = "config.json"
Functions ¶
func InitDefaultCronJobConf ¶
func InitDefaultCronJobConf()
Types ¶
type CronJobConfig ¶
type CronJobConfig struct {
Cron []*CronMessage `json:"cron_config"`
}
func LoadCron ¶
func LoadCron() *CronJobConfig
func (CronJobConfig) Save ¶
func (c CronJobConfig) Save(p string) error
type CronMessage ¶
type JsonConfig ¶
type JsonConfig struct { Phone string `json:"phone_number"` Password string `json:"password"` AppID string `json:"appid"` AppHash string `json:"app_hash"` UseMessageDatabase bool `json:"use_message_database"` UseFileDatabase bool `json:"use_file_database"` UseChatInfoDatabase bool `json:"use_chat_info_database"` UseTestDataCenter bool `json:"use_test_data_center"` DatabaseDirectory string `json:"database_directory"` FileDirectory string `json:"file_directory"` IgnoreFileNames bool `json:"ignore_file_name"` Proxy *Proxy `json:"proxy"` WebHook []*WebHook `json:"webhook"` WebApi *WebApi `json:"webapi"` }
func DefaultConfig ¶
func DefaultConfig() *JsonConfig
func Load ¶
func Load(p string) *JsonConfig
func (*JsonConfig) Save ¶
func (c *JsonConfig) Save(p string) error
type LocalHook ¶
type LocalHook struct {
// contains filtered or unexported fields
}
LocalHook logrus本地钩子
func NewLocalHook ¶
NewLocalHook 初始化本地日志钩子实现
func (*LocalHook) SetFormatter ¶
SetFormatter 设置日志格式
type WebApi ¶
type WebApi struct { WebApiStatus bool `json:"status"` //开关 WebApiHost string `json:"bind_addr"` //绑定地址 WebApiPort string `json:"port"` //api端口地址 WebApiToken string `json:"token"` //简易的api鉴权参数 }
api
type WebHook ¶
type WebHook struct { WebHookStatus bool `json:"status"` //开关 WebHookUrl string `json:"http_post_url"` //post推送地址 WebHookSecret string `json:"secret"` //推送签名校验用的secret WebHookFilter *WebHookFilter `json:"filter"` //过滤仅这些用户推送 }
webhook
type WebHookFilter ¶
Click to show internal directories.
Click to hide internal directories.