Documentation ¶
Overview ¶
Package internal Time : 2023/9/3 16:36 Author : xushiyin contact : yuqingxushiyin@gmail.com desc: get aliyun refresh token ```javascript copy(JSON.parse(localStorage.token).refresh_token); console.log(JSON.parse(localStorage.token).refresh_token); ```
Package internal Time : 2022/9/5 20:51 Author : xushiyin contact : yuqingxushiyin@gmail.com
Package internal Time : 2023/1/14 14:24 Author : xushiyin contact : yuqingxushiyin@gmail.com
Package internal Time : 2023/9/18 09:28 Author : xushiyin contact : yuqingxushiyin@gmail.com
Package internal Time : 2023/1/15 10:58 Author : xushiyin contact : yuqingxushiyin@gmail.com
Package internal Time : 2023/1/15 17:43 Author : xushiyin contact : yuqingxushiyin@gmail.com
Package internal Time : 2022/11/7 21:53 Author : xushiyin contact : yuqingxushiyin@gmail.com
Package internal Time : 2022/9/7 22:01 Author : xushiyin contact : yuqingxushiyin@gmail.com
Package internal Time : 2022/9/11 16:24 Author : xushiyin contact : yuqingxushiyin@gmail.com
Package internal Time : 2023/2/13 22:10 Author : xushiyin contact : yuqingxushiyin@gmail.com
Package internal Time : 2023/8/31 13:35 Author : xushiyin contact : yuqingxushiyin@gmail.com
Package internal Time : 2023/3/20 22:11 Author : xushiyin contact : yuqingxushiyin@gmail.com
Package internal Time : 2023/4/6 13:55 Author : xushiyin contact : yuqingxushiyin@gmail.com
Package internal Time : 2023/8/30 15:15 Author : xushiyin contact : yuqingxushiyin@gmail.com
Index ¶
- Constants
- Variables
- func CheckDateFormat(date string) (*time.Time, error)
- func CopyFile(src, dst string, perm os.FileMode) error
- func GetClient(timeout time.Duration, isDebug bool) *req.Client
- func GetDateList(start string, r int) ([]string, error)
- func GetMonthList(dates []string) []string
- func GetNowMonthNumber() string
- func GetWebSocketClient(uri string, reqHeader http.Header) (*websocket.Conn, *http.Response, error)
- func IsFileDirExist(d string) error
- func Local2Utc(d time.Time) time.Time
- func MakeZip(srcPath, dstPath, zipName string) error
- func PrintQrCode2TTY(frontColor, backgroundColor, levelStr, content string) error
- func ReplaceSpecialChar(s string) string
- func SetHMS(d time.Time, h, m, s int) time.Time
- func SortVersion(vList []string) []string
- func StrSliceJoin(gbk bool, sep string, s ...string) string
- func SysType() string
- func UTC2Local(d time.Time) time.Time
- func WriteDefaultConfig() error
- type AccessToken
- type AccessTokenResp
- type AliYun
- func (a *AliYun) GetReward(auth AliYunCloudDriverAuth, signInLogs []SignInLog)
- func (a *AliYun) LogErr(err error, message string, args ...interface{}) error
- func (a *AliYun) PoolRefreshToken(auths []AliYunCloudDriverAuth) (refresh []*AliYunCloudDriverAuth)
- func (a *AliYun) PoolSignIn(auths []AliYunCloudDriverAuth)
- func (a *AliYun) RefreshToken(auth AliYunCloudDriverAuth) (*AccessTokenResp, error)
- func (a *AliYun) SignIn(auth AliYunCloudDriverAuth)
- type AliYunCloudDriverAuth
- type AreaCodeMode
- type AreaNameMode
- type AzureRestApi
- func (a *AzureRestApi) MakeAzureTtsSsml(vp *AzureTtsVoiceProp) ([]byte, error)
- func (a *AzureRestApi) ReqTrans(src string, dst []string, text string) error
- func (a *AzureRestApi) ReqTransSupportedLanguages() error
- func (a *AzureRestApi) ReqTts(vp *AzureTtsVoiceProp) error
- func (a *AzureRestApi) ReqTtsToken() (string, error)
- func (a *AzureRestApi) ReqTtsVoiceList(detail bool) error
- type AzureRestError
- type AzureTtsVoiceProp
- type Base
- type CategoryMode
- type ComRes
- type Conditions
- type CosClient
- func (c *CosClient) DelObjectTag(key string) error
- func (c *CosClient) DeleteObject(key string) error
- func (c *CosClient) DownloadObject(key, path string) error
- func (c *CosClient) GetObjectHeaders(key string) (*http.Header, error)
- func (c *CosClient) GetObjectTag(key string) (map[string]string, error)
- func (c *CosClient) IsObjectExist(key string) (bool, error)
- func (c *CosClient) ListObjects(prefix, delimiter string, maxKeys int) ([]string, error)
- func (c *CosClient) LogErr(err error, message string, args ...interface{}) error
- func (c *CosClient) NewClient() error
- func (c *CosClient) PutObjectTag(key string, tag map[string]string) error
- func (c *CosClient) UploadObject(key, path string, metaHeader *http.Header) error
- type DailyReport
- type DbClient
- func (d *DbClient) Close() error
- func (d *DbClient) LogErr(err error, message string, args ...interface{}) error
- func (d *DbClient) NamedExec(queryStr string, arg interface{}) error
- func (d *DbClient) OpenPing() error
- func (d *DbClient) PrepareSelect(queryStr string, dest interface{}, args ...interface{}) error
- type ESLogs
- type EdgeTtsClient
- func (t *EdgeTtsClient) CloseConn()
- func (t *EdgeTtsClient) GetAudioFile() error
- func (t *EdgeTtsClient) GetClearText(text string) (string, error)
- func (t *EdgeTtsClient) GetVoiceList(voiceResp interface{}) error
- func (t *EdgeTtsClient) LogErr(err error, message string, args ...interface{}) error
- func (t *EdgeTtsClient) NewConn() error
- func (t *EdgeTtsClient) RenderVoiceList(tvs []TtsVoiceListResp)
- type EnvMode
- type ErrorMessage
- type Files
- func (f *Files) DeleteDir(path string)
- func (f *Files) FileExistPwd(name string) (string, error)
- func (f *Files) GetPwd() (string, error)
- func (f *Files) IsExist(path string) (bool, error)
- func (f *Files) ListDir(path string) ([]os.DirEntry, error)
- func (f *Files) LogErr(err error, message string, args ...interface{}) error
- type FilterStr
- type GitClient
- type IsCompletedMode
- type LogData
- type Mover
- type NuoEmployee
- type NuoRespBody
- type OaCarbon
- type OaWeb
- func (o *OaWeb) ClickBtnX(selector string) error
- func (o *OaWeb) ClickWorkingReportBtn() error
- func (o *OaWeb) ElementAttribute(selector, name string) (value *string, err error)
- func (o *OaWeb) FindDefaultBrowserPath() error
- func (o *OaWeb) GetAttrUrl(selector, name, host string) (*url.URL, error)
- func (o *OaWeb) GetCaptchaStr(u *url.URL) (string, error)
- func (o *OaWeb) GetCarbonIds(oac *OaCarbon, names []string) []string
- func (o *OaWeb) GetCarbonList(isDebug bool, c map[string]string) (*OaCarbon, error)
- func (o *OaWeb) GetCommonReq(isDebug bool) *req.Request
- func (o *OaWeb) GetWorkReports(db *DbClient, tr *TimeRange) (string, error)
- func (o *OaWeb) GoLoginPage(ctx context.Context) error
- func (o *OaWeb) HasX(selector string) (*rod.Element, error)
- func (o *OaWeb) InputTextX(selector, input string) error
- func (o *OaWeb) LogErr(err error, message string, args ...interface{}) error
- func (o *OaWeb) LoginOa(ctx context.Context) error
- func (o *OaWeb) PostForm(isDebug bool, uri string, useMulti bool, cookies map[string]string, ...) error
- func (o *OaWeb) RenderReports(drs []DailyReport, stdOutFlag, onlyContent bool) (string, error)
- func (o *OaWeb) RetryLoginBtn(retryCnt int) error
- func (o *OaWeb) SelectCopyTo(rType ReportType, copyTo []string) error
- func (o *OaWeb) Start() error
- func (o *OaWeb) Stop() error
- func (o *OaWeb) StuffLoginInfo(ctx context.Context) error
- func (o *OaWeb) StuffReport(rType ReportType, report string, copyTo []string, autoSubmit bool) error
- func (o *OaWeb) SubmitWorkReports(isDebug bool, cookies map[string]string, form url.Values) error
- type ObjectStoreClient
- type OssClient
- func (o *OssClient) DelObjectTag(key string) error
- func (o *OssClient) DeleteObject(key string) error
- func (o *OssClient) DownloadObject(key, path string) error
- func (o *OssClient) GetBucket(bucketName string) error
- func (o *OssClient) GetObjectHeaders(key string) (*http.Header, error)
- func (o *OssClient) GetObjectTag(key string) (map[string]string, error)
- func (o *OssClient) IsObjectExist(key string) (bool, error)
- func (o *OssClient) ListBucket() error
- func (o *OssClient) ListObjects(prefix, delimiter string, maxKeys int) ([]string, error)
- func (o *OssClient) LogErr(err error, message string, args ...interface{}) error
- func (o *OssClient) NewClient() error
- func (o *OssClient) PutObjectTag(key string, tag map[string]string) error
- func (o *OssClient) UploadObject(key, path string, metaHeader *http.Header) error
- type PageRecords
- type ProgressMode
- type QueryCondition
- type Records
- type RedisClient
- func (r *RedisClient) Get(ctx context.Context, key string) (string, error)
- func (r *RedisClient) HGetAll(key string) (map[string]string, error)
- func (r *RedisClient) HMGet(key string, fields ...string) (map[string]interface{}, error)
- func (r *RedisClient) HSet(key string, values ...interface{}) error
- func (r *RedisClient) LogErr(err error, message string, args ...interface{}) error
- func (r *RedisClient) Ping() error
- func (r *RedisClient) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) (string, error)
- type ReportType
- type RewardBody
- type Sentry
- func (s *Sentry) GetCaptcha(b64str string) (string, error)
- func (s *Sentry) GetCookies() (*cookiejar.Jar, error)
- func (s *Sentry) GetDomainPathCookie(jar *cookiejar.Jar, uri string) *http.Cookie
- func (s *Sentry) GetLoginCookies() (*cookiejar.Jar, error)
- func (s *Sentry) GetLogs(jar *cookiejar.Jar, query QueryCondition) ([]Records, error)
- func (s *Sentry) GetSentryEsLog(query QueryCondition) error
- func (s *Sentry) InputUserInfo() error
- func (s *Sentry) LogErr(err error, message string, args ...interface{}) error
- func (s *Sentry) LoginSentry(retryCnt int) error
- func (s *Sentry) OpenSentryLoginPage() error
- func (s *Sentry) PoolReq(jar *cookiejar.Jar, cons []Conditions) ([]Records, error)
- func (s *Sentry) Records2File(fileName string, records []Records, asc bool, msg bool) error
- func (s *Sentry) ReqLogApi(c *cookiejar.Jar, cond Conditions) (*ESLogs, error)
- func (s *Sentry) RetryLoginBtn(retryCnt int) error
- func (s *Sentry) SendNuoMsg(iMid, msg string, isGroup bool) error
- type SignInBody
- type SignInLog
- type SignInResp
- type TimeRange
- type Trans
- type TransRes
- type TransText
- type TtsVoiceListResp
- type WorkReportRes
Constants ¶
const ( TrustedClientToken = "6A5AA1D4EAFF4E9FB37E23D68491D6F4" WssUrl = "wss://speech.platform.bing.com/consumer/speech/synthesize/readaloud/edge/v1?TrustedClientToken=" + TrustedClientToken + "&ConnectionId=" VoiceListUrl = "https://speech.platform.bing.com/consumer/speech/synthesize/readaloud/voices/list?trustedclienttoken=" + TrustedClientToken WebSocketMaxSize = 65536 )
const ( NormalBlack = "\033[38;5;0m \033[0m" NormalRed = "\033[38;5;1m \033[0m" NormalGreen = "\033[38;5;2m \033[0m" NormalYellow = "\033[38;5;3m \033[0m" NormalBlue = "\033[38;5;4m \033[0m" NormalMagenta = "\033[38;5;5m \033[0m" NormalCyan = "\033[38;5;6m \033[0m" NormalWhite = "\033[38;5;7m \033[0m" BrightBlack = "\033[48;5;0m \033[0m" BrightRed = "\033[48;5;1m \033[0m" BrightGreen = "\033[48;5;2m \033[0m" BrightYellow = "\033[48;5;3m \033[0m" BrightBlue = "\033[48;5;4m \033[0m" BrightMagenta = "\033[48;5;5m \033[0m" BrightCyan = "\033[48;5;6m \033[0m" BrightWhite = "\033[48;5;7m \033[0m" )
const TtsSsmlXmlTemplate = `` /* 187-byte string literal not displayed */
const UserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36"
Variables ¶
var ( CopyToClickXPath = map[ReportType]string{ Daily: `//*[@id="z-day-form"]//div[@_search_]`, DailyMember: `/html/body//a[contains(text(), "同事")]`, Weekly: `//*[@id="z-week-form"]//div[@_search_]`, } ReportTypeBtnXPath = map[ReportType]string{ Daily: `//a[@href="javascript:void(0);" and string()="日报"]`, Weekly: `//a[@href="javascript:void(0);" and string()="周报"]`, } ReportTextareaXPath = map[ReportType]string{ Daily: `//label[contains(text(),'今日完成工作')]/following-sibling::textarea`, Weekly: `//label[contains(text(),'本周完成工作')]/following-sibling::textarea`, } ReportSubmitBtnXPath = map[ReportType]string{ Daily: `//*[@id="z-day-form"]/a[string()="提 交"]`, Weekly: `//*[@id="z-week-form"]/a[string()="提 交"]`, } )
var ( BuiltAt string GoVersion = runtime.Version() GitAuthor = "Achillesxu <yuqingxushiyin@gmail.com>" GitCommit string Version = "dev" Branch string )
var AreaCodeImidMap = map[string]string{
"chongqing": "494096",
"zhejiang": "494098",
"yunnan": "494102",
"xinjiang": "494105",
"xizang": "494109",
"tianjin": "494116",
"sichuan": "494120",
"shenzhen": "494087",
"shanghai": "494124",
"shaanxi": "494130",
"shanxi": "494137",
"shandong": "494140",
"xiamen": "494158",
"ningxia": "494163",
"ningbo": "494165",
"neimeng": "494166",
"liaoning": "494169",
"jiangxi": "494173",
"jiangsu": "494177",
"jilin": "494178",
"hunan": "494179",
"hubei": "491423",
"heilongjiang": "541498",
"henan": "494182",
"hebei": "494184",
"hainan": "494190",
"guizhou": "494191",
"guangxi": "494195",
"guangdong": "494197",
"gansu": "494199",
"fujian": "494200",
"dalian": "494202",
"beijing": "494205",
"anhui": "494206",
"qingdao": "494208",
"qinghai": "494209",
}
var AreaNameCodeMap = map[string]string{
"chongqing": "500000",
"zhejiang": "330000",
"yunnan": "530000",
"xinjiang": "650000",
"xizang": "540000",
"tianjin": "120000",
"sichuan": "510000",
"shenzhen": "440300",
"shanghai": "310000",
"shaanxi": "610000",
"shanxi": "140000",
"shandong": "370000",
"xiamen": "350200",
"ningxia": "640000",
"ningbo": "330200",
"neimeng": "150000",
"liaoning": "210000",
"jiangxi": "360000",
"jiangsu": "320000",
"jilin": "220000",
"hunan": "430000",
"hubei": "420000",
"heilongjiang": "230000",
"henan": "410000",
"hebei": "130000",
"hainan": "460000",
"guizhou": "520000",
"guangxi": "450000",
"guangdong": "440000",
"gansu": "620000",
"fujian": "350000",
"dalian": "210200",
"beijing": "110000",
"anhui": "340000",
"qingdao": "370200",
"qinghai": "630000",
}
var AreaNameModeIds = map[AreaCodeMode][]string{ ChongQingA: {"chongqing"}, ZheJiangA: {"zhejiang"}, YunNanA: {"yunnan"}, XinJiangA: {"xinjiang"}, XiZangA: {"xizang"}, TianJinA: {"tianjin"}, SiChuanA: {"sichuan"}, ShenZhenA: {"shenzhen"}, ShangHaiA: {"shanghai"}, ShaanxiA: {"shaanxi"}, ShanDongA: {"shandong"}, XiaMenA: {"xiamen"}, NingXiaA: {"ningxia"}, NingBoA: {"ningbo"}, NeiMengA: {"neimeng"}, LiaoNingA: {"liaoning"}, JiangXiA: {"jiangxi"}, JiangSuA: {"jiangsu"}, JiLinA: {"jilin"}, HuNanA: {"hunan"}, HuBeiA: {"hubei"}, HeiLongJiangA: {"heilongjiang"}, HeNanA: {"henan"}, HeBeiA: {"hebei"}, HaiNanA: {"hainan"}, GuiZhouA: {"guizhou"}, GuangXiA: {"guangxi"}, GuangDongA: {"guangdong"}, GanSuA: {"gansu"}, FuJianA: {"fujian"}, DaLianA: {"dalian"}, BeiJingA: {"beijing"}, AnHuiA: {"anhui"}, QingDaoA: {"qingdao"}, QingHaiA: {"qinghai"}, // contains filtered or unexported fields }
var CategoryModeIds = map[CategoryMode][]string{ OtherC: {"其他"}, ChangeHolidayC: {"调休"}, LeaveAbsenceC: {"请假"}, BusinessTripC: {"出差"}, MeetingC: {"会议"}, LearningC: {"学习提升"}, TechnicalResearchC: {"技术调研"}, AssistingOthersC: {"协助他人"}, CodeOptimisationC: {"代码优化"}, MaintenanceIssuesC: {"运维问题"}, TaskRequirementC: {"任务需求"}, }
CategoryModeIds Defines the textual representations for the CategoryMode values.
var EnvModeIds = map[EnvMode][]string{ TestE: {"test"}, StopE: {"stop"}, ProdE: {"prod"}, }
var IsCompletedModeIds = map[IsCompletedMode][]string{ YeahI: {"是"}, NopeI: {"否"}, }
Functions ¶
func GetMonthList ¶
func GetNowMonthNumber ¶
func GetNowMonthNumber() string
func GetWebSocketClient ¶ added in v0.14.0
func IsFileDirExist ¶ added in v0.2.8
func PrintQrCode2TTY ¶ added in v0.3.0
PrintQrCode2TTY support as following: Supported background colors: [black, red, green, yellow, blue, magenta, cyan, white] Supported front colors: [black, red, green, yellow, blue, magenta, cyan, white] Supported error correction levels: [L, M, Q, H]
func ReplaceSpecialChar ¶ added in v0.14.0
ReplaceSpecialChar replace special chars
func SortVersion ¶ added in v0.2.9
func WriteDefaultConfig ¶ added in v0.4.0
func WriteDefaultConfig() error
Types ¶
type AccessToken ¶ added in v0.10.0
type AccessTokenResp ¶ added in v0.10.0
type AccessTokenResp struct { DefaultSboxDriveId string `json:"default_sbox_drive_id"` Role string `json:"role"` DeviceId string `json:"device_id"` UserName string `json:"user_name"` NeedLink bool `json:"need_link"` ExpireTime time.Time `json:"expire_time"` PinSetup bool `json:"pin_setup"` NeedRpVerify bool `json:"need_rp_verify"` Avatar string `json:"avatar"` UserData struct { DingDingRobotUrl string `json:"DingDingRobotUrl"` EncourageDesc string `json:"EncourageDesc"` FeedBackSwitch bool `json:"FeedBackSwitch"` FollowingDesc string `json:"FollowingDesc"` DingDingRobotUrl1 string `json:"ding_ding_robot_url"` EncourageDesc1 string `json:"encourage_desc"` FeedBackSwitch1 bool `json:"feed_back_switch"` FollowingDesc1 string `json:"following_desc"` } `json:"user_data"` TokenType string `json:"token_type"` AccessToken string `json:"access_token"` DefaultDriveId string `json:"default_drive_id"` DomainId string `json:"domain_id"` RefreshToken string `json:"refresh_token"` IsFirstLogin bool `json:"is_first_login"` UserId string `json:"user_id"` NickName string `json:"nick_name"` ExistLink []interface{} `json:"exist_link"` State string `json:"state"` ExpiresIn int `json:"expires_in"` Status string `json:"status"` }
type AliYun ¶ added in v0.10.0
func (*AliYun) GetReward ¶ added in v0.10.0
func (a *AliYun) GetReward(auth AliYunCloudDriverAuth, signInLogs []SignInLog)
func (*AliYun) PoolRefreshToken ¶ added in v0.11.0
func (a *AliYun) PoolRefreshToken(auths []AliYunCloudDriverAuth) (refresh []*AliYunCloudDriverAuth)
func (*AliYun) PoolSignIn ¶ added in v0.11.0
func (a *AliYun) PoolSignIn(auths []AliYunCloudDriverAuth)
func (*AliYun) RefreshToken ¶ added in v0.10.0
func (a *AliYun) RefreshToken(auth AliYunCloudDriverAuth) (*AccessTokenResp, error)
func (*AliYun) SignIn ¶ added in v0.10.0
func (a *AliYun) SignIn(auth AliYunCloudDriverAuth)
type AliYunCloudDriverAuth ¶ added in v0.11.0
type AreaCodeMode ¶ added in v0.2.8
type AreaCodeMode enumflag.Flag
const ( ChongQingA AreaCodeMode = iota ZheJiangA YunNanA XinJiangA XiZangA TianJinA SiChuanA ShenZhenA ShangHaiA ShaanxiA ShanDongA XiaMenA NingXiaA NingBoA NeiMengA LiaoNingA JiangXiA JiangSuA JiLinA HuNanA HuBeiA HeiLongJiangA HeNanA HeBeiA HaiNanA GuiZhouA GuangXiA GuangDongA GanSuA FuJianA DaLianA BeiJingA AnHuiA QingDaoA QingHaiA )
AreaCodeMode 36 areas code
type AreaNameMode ¶ added in v0.2.8
type AreaNameMode enumflag.Flag
type AzureRestApi ¶ added in v0.14.0
func NewAzureRestApi ¶ added in v0.14.0
func (*AzureRestApi) MakeAzureTtsSsml ¶ added in v0.14.0
func (a *AzureRestApi) MakeAzureTtsSsml(vp *AzureTtsVoiceProp) ([]byte, error)
func (*AzureRestApi) ReqTrans ¶ added in v0.14.0
func (a *AzureRestApi) ReqTrans(src string, dst []string, text string) error
func (*AzureRestApi) ReqTransSupportedLanguages ¶ added in v0.14.0
func (a *AzureRestApi) ReqTransSupportedLanguages() error
func (*AzureRestApi) ReqTts ¶ added in v0.14.0
func (a *AzureRestApi) ReqTts(vp *AzureTtsVoiceProp) error
func (*AzureRestApi) ReqTtsToken ¶ added in v0.14.0
func (a *AzureRestApi) ReqTtsToken() (string, error)
func (*AzureRestApi) ReqTtsVoiceList ¶ added in v0.14.0
func (a *AzureRestApi) ReqTtsVoiceList(detail bool) error
type AzureRestError ¶ added in v0.14.0
type AzureRestError struct { Err struct { Code int `json:"code"` Message string `json:"message"` } `json:"error"` }
func (*AzureRestError) Error ¶ added in v0.14.0
func (e *AzureRestError) Error() string
Error convert AzureRestError to a human readable error and return.
type AzureTtsVoiceProp ¶ added in v0.14.0
type CategoryMode ¶ added in v0.2.8
type CategoryMode enumflag.Flag
const ( OtherC CategoryMode = iota // always colorize ChangeHolidayC LeaveAbsenceC BusinessTripC MeetingC LearningC TechnicalResearchC AssistingOthersC CodeOptimisationC MaintenanceIssuesC TaskRequirementC )
CategoryMode 其他,调休,请假、出差,会议,学习提升,技术调研,协助他人,代码优化,运维问题,任务需求
type Conditions ¶ added in v0.4.0
type CosClient ¶ added in v0.7.0
type CosClient struct { KeyId string KeySecret string Region string BucketName string Logger *log.Entry Client *cos.Client }
func NewCosClient ¶ added in v0.7.0
func (*CosClient) DelObjectTag ¶ added in v0.7.0
func (*CosClient) DeleteObject ¶ added in v0.7.0
func (*CosClient) DownloadObject ¶ added in v0.7.0
func (*CosClient) GetObjectHeaders ¶ added in v0.7.0
func (*CosClient) GetObjectTag ¶ added in v0.7.0
func (*CosClient) IsObjectExist ¶ added in v0.7.0
func (*CosClient) ListObjects ¶ added in v0.7.0
func (*CosClient) PutObjectTag ¶ added in v0.7.0
type DailyReport ¶ added in v0.11.0
type DbClient ¶ added in v0.11.0
func (*DbClient) PrepareSelect ¶ added in v0.11.0
type EdgeTtsClient ¶ added in v0.14.0
type EdgeTtsClient struct { IsDebug bool Text string Voice string Format string OutName string Log *log.Entry Client *req.Client // contains filtered or unexported fields }
func NewEdgeTtsClient ¶ added in v0.14.0
func (*EdgeTtsClient) CloseConn ¶ added in v0.15.0
func (t *EdgeTtsClient) CloseConn()
func (*EdgeTtsClient) GetAudioFile ¶ added in v0.15.0
func (t *EdgeTtsClient) GetAudioFile() error
func (*EdgeTtsClient) GetClearText ¶ added in v0.15.0
func (t *EdgeTtsClient) GetClearText(text string) (string, error)
GetClearText make text with right len and replace special char
func (*EdgeTtsClient) GetVoiceList ¶ added in v0.14.0
func (t *EdgeTtsClient) GetVoiceList(voiceResp interface{}) error
func (*EdgeTtsClient) LogErr ¶ added in v0.14.0
func (t *EdgeTtsClient) LogErr(err error, message string, args ...interface{}) error
func (*EdgeTtsClient) NewConn ¶ added in v0.15.0
func (t *EdgeTtsClient) NewConn() error
NewConn connect ws or wss
func (*EdgeTtsClient) RenderVoiceList ¶ added in v0.14.0
func (t *EdgeTtsClient) RenderVoiceList(tvs []TtsVoiceListResp)
RenderVoiceList render voices to table
type ErrorMessage ¶ added in v0.4.0
type ErrorMessage struct {
Message string `json:"message"`
}
func (*ErrorMessage) Error ¶ added in v0.4.0
func (msg *ErrorMessage) Error() string
type Files ¶ added in v0.2.8
Files for files dealing with
func (*Files) FileExistPwd ¶ added in v0.7.0
type FilterStr ¶ added in v0.2.9
func EqualBranchName ¶ added in v0.5.0
func FilterBranchName ¶ added in v0.2.9
type GitClient ¶ added in v0.2.8
func (*GitClient) PushDelete ¶ added in v0.2.9
type IsCompletedMode ¶ added in v0.2.8
type IsCompletedMode enumflag.Flag
const ( YeahI IsCompletedMode = iota + 1 NopeI )
IsCompletedMode 是,否
type NuoEmployee ¶ added in v0.12.0
type NuoRespBody ¶ added in v0.6.0
type OaCarbon ¶ added in v0.12.0
type OaCarbon struct { DimissonEmpList []struct { Str string `json:"str"` List []struct { Post string `json:"post"` Name string `json:"name"` Photo string `json:"photo,omitempty"` Id string `json:"id"` Type string `json:"type"` } `json:"list"` } `json:"dimissonEmpList"` EmpList []struct { Str string `json:"str"` List []struct { Post string `json:"post"` Name string `json:"name"` Photo string `json:"photo"` Id string `json:"id"` Type string `json:"type"` } `json:"list"` } `json:"empList"` DeptList []struct { Str string `json:"str"` List []struct { Name string `json:"name"` Id string `json:"id"` Type string `json:"type"` } `json:"list"` } `json:"deptList"` }
type OaWeb ¶ added in v0.2.0
type OaWeb struct { IsHeadless bool IsRemote bool BrowserPath string Logger *log.Entry Browser *rod.Browser Launcher *launcher.Launcher Page *rod.Page Client *req.Client }
func NewOaWebLogin ¶ added in v0.2.0
func (*OaWeb) ClickWorkingReportBtn ¶ added in v0.2.0
func (*OaWeb) ElementAttribute ¶ added in v0.2.0
func (*OaWeb) FindDefaultBrowserPath ¶ added in v0.2.0
func (*OaWeb) GetAttrUrl ¶ added in v0.2.0
func (*OaWeb) GetCaptchaStr ¶ added in v0.2.0
func (*OaWeb) GetCarbonIds ¶ added in v0.12.0
func (*OaWeb) GetCarbonList ¶ added in v0.12.0
func (*OaWeb) GetCommonReq ¶ added in v0.12.0
func (*OaWeb) GetWorkReports ¶ added in v0.12.0
func (*OaWeb) InputTextX ¶ added in v0.2.0
func (*OaWeb) RenderReports ¶ added in v0.12.0
func (o *OaWeb) RenderReports(drs []DailyReport, stdOutFlag, onlyContent bool) (string, error)
func (*OaWeb) RetryLoginBtn ¶ added in v0.2.0
func (*OaWeb) SelectCopyTo ¶ added in v0.2.0
func (o *OaWeb) SelectCopyTo(rType ReportType, copyTo []string) error
func (*OaWeb) StuffLoginInfo ¶ added in v0.2.0
func (*OaWeb) StuffReport ¶ added in v0.2.0
type ObjectStoreClient ¶ added in v0.7.0
type ObjectStoreClient interface { NewClient() error ListObjects(prefix, delimiter string, maxKeys int) ([]string, error) UploadObject(key, path string, metaHeader *http.Header) error DownloadObject(key, path string) error DeleteObject(key string) error IsObjectExist(key string) (bool, error) GetObjectHeaders(key string) (*http.Header, error) PutObjectTag(key string, tag map[string]string) error GetObjectTag(key string) (map[string]string, error) DelObjectTag(key string) error }
type OssClient ¶ added in v0.5.0
type OssClient struct { KeyId string KeySecret string EndPoint string BucketName string Logger *log.Entry Client *oss.Client Bucket *oss.Bucket }
func NewOssClient ¶ added in v0.5.0
func (*OssClient) DelObjectTag ¶ added in v0.7.0
func (*OssClient) DeleteObject ¶ added in v0.5.0
func (*OssClient) DownloadObject ¶ added in v0.5.0
func (*OssClient) GetObjectHeaders ¶ added in v0.7.0
func (*OssClient) GetObjectTag ¶ added in v0.7.0
func (*OssClient) IsObjectExist ¶ added in v0.7.0
func (*OssClient) ListBucket ¶ added in v0.5.0
ListBucket You are forbidden to list buckets
func (*OssClient) ListObjects ¶ added in v0.7.0
func (*OssClient) PutObjectTag ¶ added in v0.7.0
type PageRecords ¶ added in v0.4.0
type ProgressMode ¶ added in v0.2.8
type ProgressMode enumflag.Flag
const ( HundredP ProgressMode = iota NinetyP EightyP SeventyP SixtyP FiftyP FortyP ThirtyP TwentyP TenP ZeroP )
ProgressMode 100%,,0%
type QueryCondition ¶ added in v0.4.0
type Records ¶ added in v0.4.0
type Records struct { AppId string `json:"app_id"` AppModel string `json:"app_model"` AppName string `json:"app_name"` AppTag string `json:"app_tag"` ClientIp string `json:"client_ip"` HostName string `json:"host_name,omitempty"` LogCreate string `json:"log_create"` LogNo string `json:"log_no"` Message string `json:"message"` UserId string `json:"user_id"` Action string `json:"action"` }
type RedisClient ¶ added in v0.9.0
type RedisClient struct { Addr string Password string Db int Logger *log.Entry Redis *redis.Client }
func NewRedisClient ¶ added in v0.9.0
func NewRedisClient(addr, password string, db int, logger *log.Entry) *RedisClient
func NewRedisUrlClient ¶ added in v0.10.0
func NewRedisUrlClient(rdsUrl string, logger *log.Entry) *RedisClient
func (*RedisClient) HGetAll ¶ added in v0.12.0
func (r *RedisClient) HGetAll(key string) (map[string]string, error)
func (*RedisClient) HMGet ¶ added in v0.9.0
func (r *RedisClient) HMGet(key string, fields ...string) (map[string]interface{}, error)
func (*RedisClient) HSet ¶ added in v0.9.0
func (r *RedisClient) HSet(key string, values ...interface{}) error
func (*RedisClient) LogErr ¶ added in v0.9.0
func (r *RedisClient) LogErr(err error, message string, args ...interface{}) error
func (*RedisClient) Ping ¶ added in v0.9.0
func (r *RedisClient) Ping() error
type ReportType ¶ added in v0.2.0
type ReportType uint
const ( Daily ReportType = iota DailyMember Weekly )
type RewardBody ¶ added in v0.10.0
type RewardBody struct {
SignInDay int `json:"signInDay"`
}
type Sentry ¶ added in v0.4.0
func (*Sentry) GetCaptcha ¶ added in v0.4.0
func (*Sentry) GetDomainPathCookie ¶ added in v0.9.0
func (*Sentry) GetLoginCookies ¶ added in v0.9.0
func (*Sentry) GetSentryEsLog ¶ added in v0.4.0
func (s *Sentry) GetSentryEsLog(query QueryCondition) error
func (*Sentry) InputUserInfo ¶ added in v0.4.0
func (*Sentry) LoginSentry ¶ added in v0.4.0
func (*Sentry) OpenSentryLoginPage ¶ added in v0.4.0
func (*Sentry) Records2File ¶ added in v0.4.0
func (*Sentry) RetryLoginBtn ¶ added in v0.4.0
type SignInBody ¶ added in v0.10.0
type SignInBody struct {
IsReward bool `json:"isReward"`
}
type SignInLog ¶ added in v0.10.0
type SignInLog struct { Day int `json:"day"` Status string `json:"status"` Icon string `json:"icon"` PcAndWebIcon string `json:"pcAndWebIcon"` Notice interface{} `json:"notice"` Type string `json:"type"` RewardAmount int `json:"rewardAmount"` Themes string `json:"themes"` CalendarChinese *string `json:"calendarChinese"` CalendarDay *string `json:"calendarDay"` CalendarMonth *string `json:"calendarMonth"` Poster interface{} `json:"poster"` Reward struct { GoodsId *int `json:"goodsId"` Name *string `json:"name"` Description *string `json:"description"` Background string `json:"background"` Color *string `json:"color"` Action *string `json:"action"` DetailAction *string `json:"detailAction"` Notice *string `json:"notice"` SubNotice *string `json:"subNotice"` BottleId *int64 `json:"bottleId"` BottleName *string `json:"bottleName"` BottleShareId *string `json:"bottleShareId"` } `json:"reward"` IsReward bool `json:"isReward"` }
type SignInResp ¶ added in v0.10.0
type SignInResp struct { Success bool `json:"success"` Code interface{} `json:"code"` Message interface{} `json:"message"` TotalCount interface{} `json:"totalCount"` NextToken interface{} `json:"nextToken"` MaxResults interface{} `json:"maxResults"` Result struct { Subject string `json:"subject"` Title string `json:"title"` Description string `json:"description"` IsReward bool `json:"isReward"` Blessing string `json:"blessing"` SignInCount int `json:"signInCount"` SignInCover string `json:"signInCover"` SignInRemindCover string `json:"signInRemindCover"` RewardCover string `json:"rewardCover"` PcAndWebRewardCover string `json:"pcAndWebRewardCover"` SignInLogs []SignInLog `json:"signInLogs"` } `json:"result"` Arguments interface{} `json:"arguments"` }
type TransRes ¶ added in v0.13.0
type TransRes struct { DetectedLanguage struct { Language string `json:"language"` Score float64 `json:"score"` } Translations []struct { Text string `json:"text"` To string `json:"to"` Transliteration struct { Script string `json:"script"` Text string `json:"text"` } `json:"transliteration"` Alignment struct { Proj string `json:"proj"` } `json:"alignment"` SentLen struct { SrcSentLen []int `json:"srcSentLen"` TransSentLen []int `json:"transSentLen"` } `json:"sentLen"` } `json:"translations"` }
type TtsVoiceListResp ¶ added in v0.14.0
type TtsVoiceListResp struct { Name string `json:"Name"` ShortName string `json:"ShortName"` Gender string `json:"Gender"` Locale string `json:"Locale"` SuggestedCodec string `json:"SuggestedCodec"` FriendlyName string `json:"FriendlyName"` Status string `json:"Status"` VoiceTag struct { ContentCategories []string `json:"ContentCategories"` VoicePersonalities []string `json:"VoicePersonalities"` } `json:"VoiceTag"` }
type WorkReportRes ¶ added in v0.12.0
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package commands Time : 2022/9/25 23:05 Author : xushiyin contact : yuqingxushiyin@gmail.com
|
Package commands Time : 2022/9/25 23:05 Author : xushiyin contact : yuqingxushiyin@gmail.com |
Package excels Package internal Time : 2022/9/3 15:26 Author : xushiyin contact : yuqingxushiyin@gmail.com
|
Package excels Package internal Time : 2022/9/3 15:26 Author : xushiyin contact : yuqingxushiyin@gmail.com |
Package files_watcher Time : 2022/11/2 20:18 Author : xushiyin contact : yuqingxushiyin@gmail.com
|
Package files_watcher Time : 2022/11/2 20:18 Author : xushiyin contact : yuqingxushiyin@gmail.com |
Package notify Time : 2023/9/3 17:15 Author : xushiyin contact : yuqingxushiyin@gmail.com
|
Package notify Time : 2023/9/3 17:15 Author : xushiyin contact : yuqingxushiyin@gmail.com |
telegram
Package telegram Time : 2023/9/3 17:16 Author : xushiyin contact : yuqingxushiyin@gmail.com
|
Package telegram Time : 2023/9/3 17:16 Author : xushiyin contact : yuqingxushiyin@gmail.com |