├── .dockerignore ├── .gitattributes ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── Makefile ├── README.md ├── README_EN.md ├── api └── v1 │ ├── admin │ ├── config.go │ ├── dict_data.go │ ├── dict_type.go │ ├── menu.go │ ├── notice.go │ ├── push_channel.go │ ├── role.go │ ├── user.go │ └── user_profile.go │ ├── common │ └── req.go │ ├── live │ ├── author_manage.go │ ├── file_manage.go │ ├── live_cookie.go │ ├── live_history.go │ ├── live_manage.go │ ├── media_download.go │ ├── media_parse.go │ └── stat_daily.go │ ├── monitor │ ├── job.go │ ├── oper_log.go │ └── server.go │ └── tool │ └── captcha.go ├── docker-compose.yaml.example ├── go.mod ├── go.sum ├── hack └── config.yaml.example ├── i18n ├── .gitkeep └── zh-CN │ ├── app.toml │ └── common.toml ├── internal ├── app │ ├── admin │ │ ├── consts │ │ │ ├── consts.go │ │ │ ├── consts_routes.go │ │ │ └── system_i18n.go │ │ ├── controller │ │ │ ├── dict_data.go │ │ │ ├── dict_type.go │ │ │ ├── menu.go │ │ │ ├── push_channel.go │ │ │ ├── role.go │ │ │ ├── sys_config.go │ │ │ ├── sys_notice.go │ │ │ └── user.go │ │ ├── dao │ │ │ ├── internal │ │ │ │ ├── push_channel.go │ │ │ │ ├── push_channel_email.go │ │ │ │ ├── push_channel_web.go │ │ │ │ ├── push_message_log.go │ │ │ │ ├── sys_config.go │ │ │ │ ├── sys_dict_data.go │ │ │ │ ├── sys_dict_type.go │ │ │ │ ├── sys_job.go │ │ │ │ ├── sys_job_log.go │ │ │ │ ├── sys_logininfor.go │ │ │ │ ├── sys_menu.go │ │ │ │ ├── sys_notice.go │ │ │ │ ├── sys_role.go │ │ │ │ ├── sys_role_menu.go │ │ │ │ ├── sys_user.go │ │ │ │ └── sys_user_role.go │ │ │ ├── push_channel.go │ │ │ ├── push_channel_email.go │ │ │ ├── push_channel_web.go │ │ │ ├── push_message_log.go │ │ │ ├── sys_config.go │ │ │ ├── sys_dict_data.go │ │ │ ├── sys_dict_type.go │ │ │ ├── sys_job.go │ │ │ ├── sys_job_log.go │ │ │ ├── sys_logininfor.go │ │ │ ├── sys_menu.go │ │ │ ├── sys_notice.go │ │ │ ├── sys_role.go │ │ │ ├── sys_role_menu.go │ │ │ ├── sys_user.go │ │ │ └── sys_user_role.go │ │ ├── logic │ │ │ ├── logic.go │ │ │ ├── sys_config │ │ │ │ └── sys_config.go │ │ │ ├── sys_dict_data │ │ │ │ └── sys_dict_data.go │ │ │ ├── sys_dict_type │ │ │ │ └── sys_dict_type.go │ │ │ ├── sys_menu │ │ │ │ └── sys_menu.go │ │ │ ├── sys_notice │ │ │ │ └── sys_notice.go │ │ │ ├── sys_push │ │ │ │ └── sys_push.go │ │ │ ├── sys_role │ │ │ │ └── sys_role.go │ │ │ ├── sys_role_menu │ │ │ │ └── sys_role_menu.go │ │ │ ├── sys_user │ │ │ │ ├── sys_user.go │ │ │ │ └── user_profile.go │ │ │ └── sys_user_role │ │ │ │ └── sys_user_role.go │ │ ├── model │ │ │ ├── do │ │ │ │ ├── gen_table.go │ │ │ │ ├── gen_table_column.go │ │ │ │ ├── push_channel.go │ │ │ │ ├── push_channel_email.go │ │ │ │ ├── push_channel_web.go │ │ │ │ ├── push_message_log.go │ │ │ │ ├── stat_daily.go │ │ │ │ ├── sys_config.go │ │ │ │ ├── sys_dict_data.go │ │ │ │ ├── sys_dict_type.go │ │ │ │ ├── sys_job.go │ │ │ │ ├── sys_job_log.go │ │ │ │ ├── sys_logininfor.go │ │ │ │ ├── sys_menu.go │ │ │ │ ├── sys_notice.go │ │ │ │ ├── sys_role.go │ │ │ │ ├── sys_role_menu.go │ │ │ │ ├── sys_user.go │ │ │ │ └── sys_user_role.go │ │ │ ├── entity │ │ │ │ ├── push_channel.go │ │ │ │ ├── push_channel_email.go │ │ │ │ ├── push_channel_web.go │ │ │ │ ├── push_message_log.go │ │ │ │ ├── stat_daily.go │ │ │ │ ├── sys_config.go │ │ │ │ ├── sys_dict_data.go │ │ │ │ ├── sys_dict_type.go │ │ │ │ ├── sys_job.go │ │ │ │ ├── sys_job_log.go │ │ │ │ ├── sys_logininfor.go │ │ │ │ ├── sys_menu.go │ │ │ │ ├── sys_notice.go │ │ │ │ ├── sys_role.go │ │ │ │ ├── sys_role_menu.go │ │ │ │ ├── sys_user.go │ │ │ │ └── sys_user_role.go │ │ │ ├── sys_menu.go │ │ │ ├── sys_push.go │ │ │ ├── sys_role.go │ │ │ └── sys_user.go │ │ └── service │ │ │ ├── sys_config.go │ │ │ ├── sys_dict_data.go │ │ │ ├── sys_dict_type.go │ │ │ ├── sys_menu.go │ │ │ ├── sys_notice.go │ │ │ ├── sys_push.go │ │ │ ├── sys_role.go │ │ │ ├── sys_role_menu.go │ │ │ ├── sys_user.go │ │ │ └── sys_user_role.go │ ├── common │ │ ├── consts │ │ │ ├── consts.go │ │ │ ├── consts_gtoken.go │ │ │ ├── consts_i18n.go │ │ │ ├── consts_openapi.go │ │ │ └── consts_system.go │ │ ├── controller │ │ │ └── captcha.go │ │ ├── logic │ │ │ ├── bizctx │ │ │ │ └── bizctx.go │ │ │ ├── captcha │ │ │ │ └── captcha.go │ │ │ ├── logic.go │ │ │ ├── middleware │ │ │ │ └── middleware.go │ │ │ └── session │ │ │ │ └── session.go │ │ ├── model │ │ │ ├── context.go │ │ │ └── redis.go │ │ └── service │ │ │ ├── bizctx.go │ │ │ ├── captcha.go │ │ │ ├── middleware.go │ │ │ └── session.go │ ├── live │ │ ├── consts │ │ │ └── live_i18n.go │ │ ├── controller │ │ │ ├── author_mange.go │ │ │ ├── file_manage.go │ │ │ ├── live_cookie.go │ │ │ ├── live_history.go │ │ │ ├── live_manage.go │ │ │ ├── media_download.go │ │ │ ├── media_parse.go │ │ │ └── stat_daily.go │ │ ├── dao │ │ │ ├── author_info.go │ │ │ ├── author_info_history.go │ │ │ ├── download_record.go │ │ │ ├── internal │ │ │ │ ├── author_info.go │ │ │ │ ├── author_info_history.go │ │ │ │ ├── download_record.go │ │ │ │ ├── live_cookie.go │ │ │ │ ├── live_history.go │ │ │ │ ├── live_manage.go │ │ │ │ ├── media_parse.go │ │ │ │ ├── push_channel.go │ │ │ │ ├── push_channel_email.go │ │ │ │ ├── room_info.go │ │ │ │ └── stat_daily.go │ │ │ ├── live_cookie.go │ │ │ ├── live_history.go │ │ │ ├── live_manage.go │ │ │ ├── media_parse.go │ │ │ ├── push_channel.go │ │ │ ├── push_channel_email.go │ │ │ ├── room_info.go │ │ │ └── stat_daily.go │ │ ├── logic │ │ │ ├── author_manage │ │ │ │ └── author_manage.go │ │ │ ├── file_manage │ │ │ │ └── file_manage.go │ │ │ ├── live_cookie │ │ │ │ └── live_cookie.go │ │ │ ├── live_history │ │ │ │ └── live_history.go │ │ │ ├── live_manage │ │ │ │ └── live_manage.go │ │ │ ├── logic.go │ │ │ ├── media_download │ │ │ │ └── media_download.go │ │ │ ├── media_parse │ │ │ │ └── media_parse.go │ │ │ └── stat_daily │ │ │ │ └── stat_daily.go │ │ ├── model │ │ │ ├── do │ │ │ │ ├── author_info.go │ │ │ │ ├── author_info_history.go │ │ │ │ ├── download_record.go │ │ │ │ ├── live_cookie.go │ │ │ │ ├── live_history.go │ │ │ │ ├── live_manage.go │ │ │ │ ├── media_parse.go │ │ │ │ ├── push_channel.go │ │ │ │ ├── push_channel_email.go │ │ │ │ ├── room_info.go │ │ │ │ └── stat_daily.go │ │ │ ├── entity │ │ │ │ ├── author_info.go │ │ │ │ ├── author_info_history.go │ │ │ │ ├── download_record.go │ │ │ │ ├── live_cookie.go │ │ │ │ ├── live_history.go │ │ │ │ ├── live_manage.go │ │ │ │ ├── media_parse.go │ │ │ │ ├── room_info.go │ │ │ │ └── stat_daily.go │ │ │ ├── file_info.go │ │ │ ├── live_history.go │ │ │ ├── room_info.go │ │ │ └── stat_daily.go │ │ └── service │ │ │ ├── author_manage.go │ │ │ ├── file_manage.go │ │ │ ├── live_cookie.go │ │ │ ├── live_history.go │ │ │ ├── live_manage.go │ │ │ ├── media_download.go │ │ │ ├── media_parse.go │ │ │ └── stat_daily.go │ └── monitor │ │ ├── controller │ │ ├── job.go │ │ ├── oper_log.go │ │ └── server.go │ │ ├── dao │ │ ├── internal │ │ │ ├── sys_job.go │ │ │ ├── sys_job_log.go │ │ │ └── sys_oper_log.go │ │ ├── sys_job.go │ │ ├── sys_job_log.go │ │ └── sys_oper_log.go │ │ ├── logic │ │ ├── logic.go │ │ ├── server │ │ │ └── server.go │ │ ├── sys_job │ │ │ └── sys_job.go │ │ └── sys_oper_log │ │ │ └── sys_oper_log.go │ │ ├── model │ │ ├── do │ │ │ ├── sys_job.go │ │ │ ├── sys_job_log.go │ │ │ └── sys_oper_log.go │ │ ├── entity │ │ │ ├── sys_job.go │ │ │ ├── sys_job_log.go │ │ │ └── sys_oper_log.go │ │ └── server_info.go │ │ └── service │ │ ├── server.go │ │ ├── sys_job.go │ │ └── sys_oper_log.go ├── cmd │ ├── cmd.go │ ├── cmd_init.go │ ├── cmd_job.go │ ├── cmd_live.go │ ├── cmd_migrate.go │ └── cmd_rod.go ├── drivers │ ├── drivers.go │ └── mysql.go └── pkg │ ├── crons │ ├── live_crons.go │ ├── system │ │ ├── follower_trend.go │ │ └── storage_warning.go │ └── system_crons.go │ ├── download │ ├── bilibili │ │ ├── bilibili.go │ │ └── bilibili_consts.go │ ├── douyin │ │ ├── douyin.go │ │ └── douyin_consts.go │ ├── download.go │ ├── download_model.go │ └── progress_manager.go │ ├── events │ ├── dispatcher.go │ └── events.go │ ├── interfaces │ └── interfaces.go │ ├── listeners │ ├── live_listener.go │ ├── live_manager.go │ └── live_status.go │ ├── lives │ ├── bilibili │ │ └── bilibili.go │ ├── douyin │ │ └── douyin.go │ ├── lives.go │ └── lives_model.go │ ├── media_parser │ ├── bilibili │ │ ├── bilibili.go │ │ ├── bilibili_consts.go │ │ └── bilibili_models.go │ ├── douyin │ │ ├── douyin.go │ │ └── douyin_consts.go │ ├── parser.go │ ├── parser_model.go │ └── parser_test.go │ ├── message_push │ ├── email │ │ └── email.go │ ├── gotify │ │ ├── gotify.go │ │ └── gotify_test.go │ └── message_push.go │ ├── params │ ├── bilibili_params.go │ ├── douyin_params.go │ ├── goja.go │ └── js │ │ └── douyin │ │ └── a_bogus.js │ ├── parser │ ├── ffmpeg │ │ └── ffmpeg.go │ └── parser.go │ ├── recorders │ ├── event_biz.go │ ├── live_manager.go │ └── live_recorder.go │ ├── sse │ └── sse.go │ └── utils │ ├── basic.go │ ├── browser.go │ ├── context.go │ ├── dict.go │ ├── encryt.go │ ├── env.go │ ├── err.go │ ├── ffmpeg.go │ ├── http.go │ ├── i18n.go │ ├── system.go │ ├── template.go │ └── utils_test.go ├── main.go ├── manifest ├── config │ ├── config.yaml.example │ └── config_docker.yaml ├── docker │ ├── Dockerfile │ ├── docker.sh │ └── entrypoint.sh └── migrate │ ├── 1_init.up.sql │ ├── 2_initData.up.sql │ ├── 3_pushChannel.up.sql │ ├── 4_job.up.sql │ ├── 5_mediaParse.up.sql │ ├── 6_parseImages.up.sql │ ├── 7_download.up.sql │ ├── 8_dict.up.sql │ └── 9_trend.up.sql ├── resource └── assets │ ├── profile │ └── profile.jpg │ └── screenshots │ ├── followerTrend.jpg │ ├── index.jpg │ ├── mediaParse.jpg │ └── roomAdd.jpg └── web ├── .env.development ├── .env.production ├── .env.staging ├── .gitignore ├── html └── ie.html ├── index.html ├── nginx.conf ├── package.json ├── public └── favicon.ico ├── src ├── App.vue ├── api │ ├── live │ │ ├── author.js │ │ ├── cookie.js │ │ ├── daily.js │ │ ├── download.js │ │ ├── file.js │ │ ├── history.js │ │ ├── manage.js │ │ └── parse.js │ ├── login.js │ ├── menu.js │ ├── monitor │ │ ├── cache.js │ │ ├── job.js │ │ ├── jobLog.js │ │ ├── logininfor.js │ │ ├── online.js │ │ ├── operlog.js │ │ └── server.js │ └── system │ │ ├── config.js │ │ ├── dict_data.js │ │ ├── dict_type.js │ │ ├── menu.js │ │ ├── notice.js │ │ ├── push.js │ │ ├── role.js │ │ ├── sys_config.js │ │ ├── sys_dict_type.js │ │ └── user.js ├── assets │ ├── 401_images │ │ └── 401.gif │ ├── 404_images │ │ ├── 404.png │ │ └── 404_cloud.png │ ├── icons │ │ └── svg │ │ │ ├── 404.svg │ │ │ ├── bug.svg │ │ │ ├── build.svg │ │ │ ├── button.svg │ │ │ ├── cascader.svg │ │ │ ├── chart.svg │ │ │ ├── checkbox.svg │ │ │ ├── clipboard.svg │ │ │ ├── clock-history.svg │ │ │ ├── code.svg │ │ │ ├── color.svg │ │ │ ├── component.svg │ │ │ ├── cookie.svg │ │ │ ├── dashboard.svg │ │ │ ├── date-range.svg │ │ │ ├── date.svg │ │ │ ├── dict.svg │ │ │ ├── documentation.svg │ │ │ ├── download.svg │ │ │ ├── drag.svg │ │ │ ├── druid.svg │ │ │ ├── edit.svg │ │ │ ├── education.svg │ │ │ ├── email.svg │ │ │ ├── example.svg │ │ │ ├── excel.svg │ │ │ ├── exit-fullscreen.svg │ │ │ ├── eye-open.svg │ │ │ ├── eye.svg │ │ │ ├── fonts.svg │ │ │ ├── form.svg │ │ │ ├── fullscreen.svg │ │ │ ├── github.svg │ │ │ ├── guide.svg │ │ │ ├── icon.svg │ │ │ ├── input.svg │ │ │ ├── international.svg │ │ │ ├── job.svg │ │ │ ├── language.svg │ │ │ ├── link.svg │ │ │ ├── list.svg │ │ │ ├── lock.svg │ │ │ ├── log.svg │ │ │ ├── logininfor.svg │ │ │ ├── message.svg │ │ │ ├── money.svg │ │ │ ├── monitor.svg │ │ │ ├── nested.svg │ │ │ ├── number.svg │ │ │ ├── online.svg │ │ │ ├── password.svg │ │ │ ├── pdf.svg │ │ │ ├── people.svg │ │ │ ├── peoples.svg │ │ │ ├── phone.svg │ │ │ ├── post.svg │ │ │ ├── qq.svg │ │ │ ├── question.svg │ │ │ ├── radio.svg │ │ │ ├── rate.svg │ │ │ ├── redis-list.svg │ │ │ ├── redis.svg │ │ │ ├── row.svg │ │ │ ├── search.svg │ │ │ ├── select.svg │ │ │ ├── server.svg │ │ │ ├── shopping.svg │ │ │ ├── size.svg │ │ │ ├── skill.svg │ │ │ ├── slider.svg │ │ │ ├── star.svg │ │ │ ├── swagger.svg │ │ │ ├── switch.svg │ │ │ ├── system.svg │ │ │ ├── tab.svg │ │ │ ├── table.svg │ │ │ ├── textarea.svg │ │ │ ├── theme.svg │ │ │ ├── time-range.svg │ │ │ ├── time.svg │ │ │ ├── tool.svg │ │ │ ├── tree-table.svg │ │ │ ├── tree.svg │ │ │ ├── upload.svg │ │ │ ├── user.svg │ │ │ ├── validCode.svg │ │ │ ├── wechat.svg │ │ │ └── zip.svg │ ├── images │ │ ├── dark.svg │ │ ├── light.svg │ │ ├── login-background.jpg │ │ └── profile.jpg │ ├── logo │ │ └── logo.png │ └── styles │ │ ├── btn.scss │ │ ├── element-ui.scss │ │ ├── index.scss │ │ ├── mixin.scss │ │ ├── ruoyi.scss │ │ ├── sidebar.scss │ │ ├── transition.scss │ │ └── variables.module.scss ├── components │ ├── AudioPlayer │ │ └── index.vue │ ├── Breadcrumb │ │ └── index.vue │ ├── Crontab │ │ ├── day.vue │ │ ├── hour.vue │ │ ├── index.vue │ │ ├── min.vue │ │ ├── month.vue │ │ ├── result.vue │ │ ├── second.vue │ │ ├── week.vue │ │ └── year.vue │ ├── DictTag │ │ └── index.vue │ ├── Editor │ │ └── index.vue │ ├── FileUpload │ │ └── index.vue │ ├── Git │ │ └── index.vue │ ├── Hamburger │ │ └── index.vue │ ├── HeaderSearch │ │ └── index.vue │ ├── IconSelect │ │ ├── index.vue │ │ └── requireIcons.js │ ├── ImagePreview │ │ └── index.vue │ ├── ImageUpload │ │ └── index.vue │ ├── Pagination │ │ └── index.vue │ ├── ParentView │ │ └── index.vue │ ├── RightToolbar │ │ └── index.vue │ ├── Screenfull │ │ └── index.vue │ ├── SizeSelect │ │ └── index.vue │ ├── SvgIcon │ │ ├── index.vue │ │ └── svgicon.js │ ├── TopNav │ │ └── index.vue │ ├── TreeSelect │ │ └── index.vue │ ├── VideoPlayer │ │ └── index.vue │ └── iFrame │ │ └── index.vue ├── directive │ ├── common │ │ └── copyText.js │ ├── index.js │ └── permission │ │ ├── hasPermi.js │ │ └── hasRole.js ├── layout │ ├── components │ │ ├── AppMain.vue │ │ ├── IframeToggle │ │ │ └── index.vue │ │ ├── InnerLink │ │ │ └── index.vue │ │ ├── Navbar.vue │ │ ├── Settings │ │ │ └── index.vue │ │ ├── Sidebar │ │ │ ├── Link.vue │ │ │ ├── Logo.vue │ │ │ ├── SidebarItem.vue │ │ │ └── index.vue │ │ ├── TagsView │ │ │ ├── ScrollPane.vue │ │ │ └── index.vue │ │ └── index.js │ └── index.vue ├── main.js ├── permission.js ├── plugins │ ├── auth.js │ ├── cache.js │ ├── download.js │ ├── index.js │ ├── modal.js │ └── tab.js ├── router │ └── index.js ├── settings.js ├── store │ ├── index.js │ └── modules │ │ ├── app.js │ │ ├── dict.js │ │ ├── permission.js │ │ ├── settings.js │ │ ├── tagsView.js │ │ └── user.js ├── utils │ ├── auth.js │ ├── dict.js │ ├── dynamicTitle.js │ ├── errorCode.js │ ├── index.js │ ├── jsencrypt.js │ ├── permission.js │ ├── request.js │ ├── ruoyi.js │ ├── scroll-to.js │ ├── theme.js │ └── validate.js └── views │ ├── docs │ ├── cookie.vue │ ├── job.vue │ ├── media.vue │ └── support.vue │ ├── error │ ├── 401.vue │ └── 404.vue │ ├── index.vue │ ├── live │ ├── author │ │ └── index.vue │ ├── cookie │ │ └── index.vue │ ├── daily │ │ └── index.vue │ ├── download │ │ └── index.vue │ ├── file │ │ └── index.vue │ ├── history │ │ └── index.vue │ ├── manage │ │ └── index.vue │ └── parse │ │ └── index.vue │ ├── login.vue │ ├── monitor │ ├── job │ │ ├── index.vue │ │ └── log.vue │ ├── logininfor │ │ └── index.vue │ ├── online │ │ └── index.vue │ ├── operlog │ │ └── index.vue │ └── server │ │ └── index.vue │ ├── redirect │ └── index.vue │ ├── register.vue │ └── system │ ├── config │ └── index.vue │ ├── dict │ ├── data.vue │ └── type.vue │ ├── menu │ └── index.vue │ ├── notice │ └── index.vue │ ├── push │ ├── components │ │ ├── EmailForm.vue │ │ └── GotifyForm.vue │ └── index.vue │ ├── role │ ├── authUser.vue │ ├── index.vue │ └── selectUser.vue │ └── user │ ├── authRole.vue │ ├── index.vue │ └── profile │ ├── index.vue │ ├── resetPwd.vue │ ├── userAvatar.vue │ └── userInfo.vue ├── vite.config.js ├── vite.config.js.bak └── vite └── plugins ├── auto-import.js ├── compression.js ├── index.js ├── setup-extend.js └── svg-icon.js /.dockerignore: -------------------------------------------------------------------------------- 1 | .buildpath 2 | .hgignore.swp 3 | .project 4 | .orig 5 | .swp 6 | .idea/ 7 | .settings/ 8 | .vscode/ 9 | bin/ 10 | **/.DS_Store 11 | resource/ 12 | Makefile 13 | README.md 14 | web/node_modules 15 | web/src 16 | manifest/config/config.yaml -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * linguist-language=GO -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .project 3 | .settings/ 4 | .swp 5 | .vscode/ 6 | **/.DS_Store 7 | bin/ 8 | hack/config.yaml 9 | manifest/output/ 10 | manifest/config/config.yaml 11 | main 12 | main.exe 13 | main.exe~ 14 | output/ 15 | resource/log/ 16 | **/*/resource/log/ 17 | resource/file/ 18 | temp/ 19 | docker-compose.yaml 20 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [0.0.9] - 2025-04-25 4 | ### 优化 5 | - 博主管理优化 6 | - 粉丝趋势优化 7 | 8 | ## [0.0.8] - 2025-04-12 9 | ### 功能更新 10 | - 博主管理(抖音、B站) 11 | - 定时任务-粉丝趋势 12 | - 定时任务文档 13 | 14 | ## [0.0.7] - 2025-04-03 15 | ### 功能更新 16 | - B 站录制 17 | - B 站视频解析 18 | - 媒体文件下载 19 | - 新增帮助文档 20 | 21 | ## [0.0.6] - 2025-03-18 22 | ### 功能更新 23 | - 抖音图集解析 24 | - 媒体解析增加平台列 25 | ### 优化 26 | - 首页优化 27 | - 媒体解析页面筛选 28 | 29 | ## [0.0.5] - 2025-03-16 30 | ### 功能更新 31 | - 站内开播提醒 32 | ### 优化 33 | - 房间管理延时刷新 34 | 35 | ## [0.0.4] - 2025-03-14 36 | ### 功能更新 37 | - 音视频播放 38 | - 媒体解析(单视频链接) 39 | - 数据库迁移补偿 40 | 41 | ## [0.0.3] - 2025-02-28 42 | ### 优化 43 | - 输出路径调整 44 | ### Bug修复 45 | - 定时监控补偿 46 | - 主播/房间名称同步 47 | 48 | ## [0.0.2] - 2025-02-14 49 | ### 功能更新 50 | - 空间预警 51 | - 推送渠道(Gotify) 52 | 53 | ## [0.0.1] - 2025-01-15 54 | ### 初始化 55 | - 初始化 56 | - 抖音录制(定时录制, 监控, Cookie, 文件列表, 直播历史) 57 | - 推送渠道(邮箱) 58 | - 系统管理(用户, 角色, 菜单, 配置) 59 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 shichen437 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Install/Update to the latest CLI tool. 2 | .PHONY: cli 3 | cli: 4 | @set -e; \ 5 | wget -O gf https://github.com/gogf/gf/releases/latest/download/gf_$(shell go env GOOS)_$(shell go env GOARCH) && \ 6 | chmod +x gf && \ 7 | ./gf install -y && \ 8 | rm ./gf 9 | 10 | 11 | # Check and install CLI tool. 12 | .PHONY: cli.install 13 | cli.install: 14 | @set -e; \ 15 | gf -v > /dev/null 2>&1 || if [[ "$?" -ne "0" ]]; then \ 16 | echo "GoFame CLI is not installed, start proceeding auto installation..."; \ 17 | make cli; \ 18 | fi; 19 | 20 | 21 | # Generate Go files for DAO/DO/Entity. 22 | .PHONY: dao 23 | dao: cli.install 24 | @gf gen dao 25 | 26 | # Generate Go files for Service. 27 | .PHONY: service 28 | service: cli.install 29 | @gf gen service 30 | 31 | # Build docker image. 32 | .PHONY: image 33 | image: cli.install 34 | @gf docker -b -tn 35 | 36 | # Build docker image and automatically push to docker repo. 37 | .PHONY: image.push 38 | image.push: 39 | @gf docker -b -t -p 40 | -------------------------------------------------------------------------------- /api/v1/common/req.go: -------------------------------------------------------------------------------- 1 | package common 2 | 3 | type PageReq struct { 4 | PageNum int `p:"pageNum"` 5 | PageSize int `p:"pageSize"` 6 | OrderBy string `p:"orderBy"` //排序方式 7 | Params map[string]string `p:"params"` //时间范围 8 | } 9 | -------------------------------------------------------------------------------- /api/v1/live/file_manage.go: -------------------------------------------------------------------------------- 1 | package v1 2 | 3 | import ( 4 | "github.com/shichen437/live-dog/internal/app/live/model" 5 | 6 | "github.com/gogf/gf/v2/frame/g" 7 | ) 8 | 9 | type GetFileInfoListReq struct { 10 | g.Meta `path:"/file/manage/list" method:"get" tags:"文件管理" summary:"文件列表"` 11 | Filename string `p:"filename"` 12 | Path string `p:"path"` 13 | } 14 | type GetFileInfoListRes struct { 15 | g.Meta `mime:"application/json"` 16 | Rows []*model.FileInfo `json:"rows"` 17 | } 18 | 19 | type DeleteFileInfoReq struct { 20 | g.Meta `path:"/file/manage" method:"delete" tags:"文件管理" summary:"删除文件"` 21 | Filenames []string `p:"filenames"` 22 | Path string `p:"path"` 23 | } 24 | type DeleteFileInfoRes struct { 25 | g.Meta `mime:"application/json"` 26 | } 27 | 28 | type GetFilePlayReq struct { 29 | g.Meta `path:"/file/manage/play" method:"get,post" tags:"媒体播放" summary:"媒体文件流式传输"` 30 | Path string `p:"path" v:"required#文件路径不能为空"` 31 | } 32 | 33 | type GetFilePlayRes struct { 34 | g.Meta `mime:"application/octet-stream"` 35 | } 36 | -------------------------------------------------------------------------------- /api/v1/live/media_download.go: -------------------------------------------------------------------------------- 1 | package v1 2 | 3 | import ( 4 | "github.com/gogf/gf/v2/frame/g" 5 | "github.com/shichen437/live-dog/api/v1/common" 6 | "github.com/shichen437/live-dog/internal/app/live/model/entity" 7 | ) 8 | 9 | type GetDownloadRecordReq struct { 10 | g.Meta `path:"/media/download/list" method:"get" tags:"下载中心" summary:"下载记录列表"` 11 | common.PageReq 12 | Status string `p:"status"` 13 | } 14 | 15 | type GetDownloadRecordRes struct { 16 | g.Meta `mime:"application/json"` 17 | Rows []*entity.DownloadRecord `json:"rows"` 18 | Total int `json:"total"` 19 | } 20 | 21 | type GetDownloadRecordCacheReq struct { 22 | g.Meta `path:"/media/download/listCache" method:"get" tags:"下载中心" summary:"下载记录列表(缓存)"` 23 | } 24 | 25 | type GetDownloadRecordCacheRes struct { 26 | g.Meta `mime:"application/json"` 27 | Rows []*entity.DownloadRecord `json:"rows"` 28 | } 29 | 30 | type DeleteDownloadRecordReq struct { 31 | g.Meta `path:"/media/download/{id}" method:"delete" tags:"下载中心" summary:"删除下载记录"` 32 | Id string `p:"id" v:"required"` 33 | } 34 | 35 | type DeleteDownloadRecordRes struct { 36 | g.Meta `mime:"application/json"` 37 | } 38 | -------------------------------------------------------------------------------- /api/v1/monitor/oper_log.go: -------------------------------------------------------------------------------- 1 | package v1 2 | 3 | import ( 4 | "github.com/shichen437/live-dog/api/v1/common" 5 | "github.com/shichen437/live-dog/internal/app/monitor/model/entity" 6 | 7 | "github.com/gogf/gf/v2/frame/g" 8 | ) 9 | 10 | type GetOperLogListReq struct { 11 | g.Meta `path:"/monitor/operlog/list" method:"get" tags:"操作日志" summary:"current data list"` 12 | common.PageReq 13 | Title string `p:"title"` 14 | OperName string `p:"operName"` 15 | BusinessType int `p:"businessType"` 16 | Status int `p:"status"` 17 | } 18 | type GetOperLogListRes struct { 19 | g.Meta `mime:"application/json"` 20 | Rows []*entity.SysOperLog `json:"rows"` 21 | Total int `json:"total"` 22 | } 23 | -------------------------------------------------------------------------------- /api/v1/monitor/server.go: -------------------------------------------------------------------------------- 1 | package v1 2 | 3 | import ( 4 | "github.com/shichen437/live-dog/internal/app/monitor/model" 5 | 6 | "github.com/gogf/gf/v2/frame/g" 7 | ) 8 | 9 | type GetServerInfoReq struct { 10 | g.Meta `path:"/monitor/server" method:"get" tags:"服务监控" summary:"服务器详情"` 11 | } 12 | type GetServerInfoRes struct { 13 | g.Meta `mime:"application/json"` 14 | CpuInfo *model.CpuInfo `json:"cpu"` 15 | MemoryInfo *model.MemoryInfo `json:"mem"` 16 | SystemInfo *model.SystemInfo `json:"sys"` 17 | DiskInfo *[]model.DiskInfo `json:"disks"` 18 | } 19 | -------------------------------------------------------------------------------- /api/v1/tool/captcha.go: -------------------------------------------------------------------------------- 1 | package v1 2 | 3 | import "github.com/gogf/gf/v2/frame/g" 4 | 5 | type CaptchaReq struct { 6 | g.Meta `path:"/captchaImage" tags:"验证码" method:"get" summary:"获取验证码"` 7 | } 8 | type CaptchaRes struct { 9 | g.Meta `mime:"application/json"` 10 | Key string `json:"key"` 11 | Img string `json:"img"` 12 | Uuid string `json:"uuid"` 13 | CaptchaEnabled bool `json:"captchaEnabled"` 14 | } 15 | type TestReq struct { 16 | g.Meta `path:"/test" tags:"验证码" method:"get" summary:"获取测试验证码"` 17 | } 18 | type TestRes struct { 19 | g.Meta `mime:"application/json"` 20 | } 21 | -------------------------------------------------------------------------------- /docker-compose.yaml.example: -------------------------------------------------------------------------------- 1 | services: 2 | live-dog: 3 | container_name: live-dog 4 | image: shichen437/live-dog:latest 5 | restart: always 6 | ports: 7 | - '9876:9876' 8 | volumes: 9 | - /your_home_folder/upload:/LiveDog/upload 10 | - /your_home_folder/output:/LiveDog/video 11 | environment: 12 | - DATABASE_DEFAULT_LINK=mysql:root:123456@tcp(127.0.0.1:3306)/db_name?charset=utf8mb4&parseTime=true&loc=Local 13 | - PROJECT_SM4KEY=abcdefghijklmnopqrstuvwxyz123456 # SM4加密密钥, 32位字符 14 | -------------------------------------------------------------------------------- /hack/config.yaml.example: -------------------------------------------------------------------------------- 1 | 2 | # CLI tool, only in development environment. 3 | # https://goframe.org/pages/viewpage.action?pageId=3673173 4 | gfcli: 5 | gen: 6 | dao: 7 | - link: "mysql:root:123456@tcp(127.0.0.1:3306)/db_name" 8 | tables: "push_channel" # table name or table name regex 9 | tablesEx: "" # table name or table name regex 10 | removePrefix: "" # table name or table name regex 11 | descriptionTag: true 12 | noModelComment: true 13 | path: "./internal/app/admin" 14 | service: 15 | srcFolder: "internal/app/common/logic" # logic folder 16 | dstFolder: "internal/app/common/service" # service folder 17 | build: 18 | name: "main" 19 | arch: "amd64" 20 | system: "linux" 21 | mod: "none" 22 | packSrc: "api,i18n,internal" 23 | packDst: "temp/pack.go" 24 | path: "./temp" 25 | docker: 26 | build: 27 | name: "main" 28 | arch: "amd64" 29 | system: "linux" 30 | extra: "--no-cache" 31 | tagName: "your_tag:your_version" 32 | TagPrefixes: "your_register_prefix" 33 | -------------------------------------------------------------------------------- /i18n/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shichen437/live-dog/07775308306dcd19c22890d825b0bddf2bb65f54/i18n/.gitkeep -------------------------------------------------------------------------------- /i18n/zh-CN/app.toml: -------------------------------------------------------------------------------- 1 | # system 2 | role-menu-set-failed = "设置角色菜单失败" 3 | user-avatar-failed = "修改用户头像失败" 4 | user-profile-failed = "获取用户信息失败" 5 | user-password-failed = "修改用户密码失败" 6 | user-password-reset-failed = "重置用户密码失败" 7 | user-role-set-failed = "设置用户角色失败" 8 | user-role-cancel-failed = "取消分配用户失败" 9 | user-role-cancel-batch-failed = "批量取消分配用户失败" 10 | 11 | # system-valid 12 | user-name-empty = "用户名不允许为空" 13 | user-name-exists = "用户名已经存在" 14 | user-nickname-empty = "用户昵称不允许为空" 15 | user-nickname-exists = "用户昵称已经存在" 16 | user-old-password-error = "旧密码错误" 17 | user-password-rules = "密码不能为空,且用户密码长度必须介于 5 和 20 之间" 18 | role-key-empty = "权限字符不允许为空" 19 | role-name-exists = "角色名称已经存在" 20 | 21 | 22 | # live-valid 23 | monitor-time-empty = "定时监控时间不可以为空" 24 | monitor-time-same = "定时监控时间不可以相同" 25 | monitor-time-short = "定时监控时间间隔不能小于2分钟" 26 | room-url-empty = "房间地址不允许为空" 27 | room-url-not-allowed = "房间地址非法" 28 | room-url-parse-failed = "房间地址解析失败" 29 | -------------------------------------------------------------------------------- /i18n/zh-CN/common.toml: -------------------------------------------------------------------------------- 1 | err-login-fail-msg = "用户名或密码错误" 2 | err-login-code-fail-msg = "验证码错误" 3 | err-auth-fail-msg = "没有授权或请求超时" 4 | success = "操作成功" 5 | 6 | add-failed = "数据添加失败" 7 | delete-failed = "数据删除失败" 8 | get-failed = "数据获取失败" 9 | list-failed = "数据列表获取失败" 10 | update-failed = "数据修改失败" 11 | 12 | data-code-empty = "数据编码不能为空" 13 | data-not-found = "数据不存在" 14 | id-empty = "数据ID不能为空" 15 | -------------------------------------------------------------------------------- /internal/app/admin/consts/consts.go: -------------------------------------------------------------------------------- 1 | package consts 2 | 3 | const ( 4 | SysConfigStatusOk = "0" 5 | SysConfigStatusNo = "1" 6 | 7 | SysDictTypeStatusOk = "0" 8 | SysDictTypeStatusNo = "1" 9 | ) 10 | 11 | var PushChannelType = []string{"email", "gotify", "webhook", "bark"} 12 | -------------------------------------------------------------------------------- /internal/app/admin/consts/consts_routes.go: -------------------------------------------------------------------------------- 1 | package consts 2 | 3 | // SpecialApiPath contains a list of API paths that have special handling requirements 4 | var SpecialApiPath = map[string]bool{ 5 | //user 6 | "get/getInfo": true, 7 | "get/getRouters": true, 8 | "get/system/user/authRole/{userId}": true, 9 | "get/system/user/profile": true, 10 | "post/logout": true, 11 | "post/system/user/profile/avatar": true, 12 | "post/user/sign-up": true, 13 | "put/system/user/profile": true, 14 | "put/system/user/profile/updatePwd": true, 15 | 16 | //系统工具 17 | "get/system/menu/roleMenuTreeselect/{roleId}": true, 18 | 19 | //菜单 20 | "get/system/menu/treeselect": true, 21 | 22 | //字典 23 | "get/system/dict/type": true, 24 | "get/system/dict/type/optionselect": true, 25 | 26 | "get/file/manage/play": true, 27 | } 28 | -------------------------------------------------------------------------------- /internal/app/admin/consts/system_i18n.go: -------------------------------------------------------------------------------- 1 | package consts 2 | 3 | const ( 4 | UserAvatarF = `{#user-avatar-failed}` 5 | UserPasswordF = `{#user-password-failed}` 6 | UserPasswordResetF = `{#user-password-reset-failed}` 7 | UserProfileF = `{#user-profile-failed}` 8 | UserRoleCancelBatchF = `{#user-role-cancel-batch-failed}` 9 | UserRoleCancelF = `{#user-role-cancel-failed}` 10 | UserRoleSetF = `{#user-role-set-failed}` 11 | RoleMenuSetF = `{#role-menu-set-failed}` 12 | 13 | UserNameEmpty = `{#user-name-empty}` 14 | UserNameExists = `{#user-name-exists}` 15 | UserNicknameEmpty = `{#user-nickname-empty}` 16 | UserNicknameExists = `{#user-nickname-exists}` 17 | UserOldPasswordError = `{#user-old-password-error}` 18 | UserPasswordRules = `{#user-password-rules}` 19 | RoleKeyEmpty = `{#role-key-empty}` 20 | RoleNameExists = `{#role-name-exists}` 21 | ) 22 | -------------------------------------------------------------------------------- /internal/app/admin/dao/push_channel.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/admin/dao/internal" 9 | ) 10 | 11 | // internalPushChannelDao is internal type for wrapping internal DAO implements. 12 | type internalPushChannelDao = *internal.PushChannelDao 13 | 14 | // pushChannelDao is the data access object for table push_channel. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type pushChannelDao struct { 17 | internalPushChannelDao 18 | } 19 | 20 | var ( 21 | // PushChannel is globally public accessible object for table push_channel operations. 22 | PushChannel = pushChannelDao{ 23 | internal.NewPushChannelDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/admin/dao/push_channel_email.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/admin/dao/internal" 9 | ) 10 | 11 | // internalPushChannelEmailDao is internal type for wrapping internal DAO implements. 12 | type internalPushChannelEmailDao = *internal.PushChannelEmailDao 13 | 14 | // pushChannelEmailDao is the data access object for table push_channel_email. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type pushChannelEmailDao struct { 17 | internalPushChannelEmailDao 18 | } 19 | 20 | var ( 21 | // PushChannelEmail is globally public accessible object for table push_channel_email operations. 22 | PushChannelEmail = pushChannelEmailDao{ 23 | internal.NewPushChannelEmailDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/admin/dao/push_channel_web.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/admin/dao/internal" 9 | ) 10 | 11 | // internalPushChannelWebDao is internal type for wrapping internal DAO implements. 12 | type internalPushChannelWebDao = *internal.PushChannelWebDao 13 | 14 | // pushChannelWebDao is the data access object for table push_channel_web. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type pushChannelWebDao struct { 17 | internalPushChannelWebDao 18 | } 19 | 20 | var ( 21 | // PushChannelWeb is globally public accessible object for table push_channel_web operations. 22 | PushChannelWeb = pushChannelWebDao{ 23 | internal.NewPushChannelWebDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/admin/dao/push_message_log.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/admin/dao/internal" 9 | ) 10 | 11 | // internalPushMessageLogDao is internal type for wrapping internal DAO implements. 12 | type internalPushMessageLogDao = *internal.PushMessageLogDao 13 | 14 | // pushMessageLogDao is the data access object for table push_message_log. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type pushMessageLogDao struct { 17 | internalPushMessageLogDao 18 | } 19 | 20 | var ( 21 | // PushMessageLog is globally public accessible object for table push_message_log operations. 22 | PushMessageLog = pushMessageLogDao{ 23 | internal.NewPushMessageLogDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/admin/dao/sys_config.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/admin/dao/internal" 9 | ) 10 | 11 | // internalSysConfigDao is internal type for wrapping internal DAO implements. 12 | type internalSysConfigDao = *internal.SysConfigDao 13 | 14 | // sysConfigDao is the data access object for table sys_config. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type sysConfigDao struct { 17 | internalSysConfigDao 18 | } 19 | 20 | var ( 21 | // SysConfig is globally public accessible object for table sys_config operations. 22 | SysConfig = sysConfigDao{ 23 | internal.NewSysConfigDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/admin/dao/sys_dict_data.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/admin/dao/internal" 9 | ) 10 | 11 | // internalSysDictDataDao is internal type for wrapping internal DAO implements. 12 | type internalSysDictDataDao = *internal.SysDictDataDao 13 | 14 | // sysDictDataDao is the data access object for table sys_dict_data. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type sysDictDataDao struct { 17 | internalSysDictDataDao 18 | } 19 | 20 | var ( 21 | // SysDictData is globally public accessible object for table sys_dict_data operations. 22 | SysDictData = sysDictDataDao{ 23 | internal.NewSysDictDataDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/admin/dao/sys_dict_type.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/admin/dao/internal" 9 | ) 10 | 11 | // internalSysDictTypeDao is internal type for wrapping internal DAO implements. 12 | type internalSysDictTypeDao = *internal.SysDictTypeDao 13 | 14 | // sysDictTypeDao is the data access object for table sys_dict_type. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type sysDictTypeDao struct { 17 | internalSysDictTypeDao 18 | } 19 | 20 | var ( 21 | // SysDictType is globally public accessible object for table sys_dict_type operations. 22 | SysDictType = sysDictTypeDao{ 23 | internal.NewSysDictTypeDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/admin/dao/sys_job.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/admin/dao/internal" 9 | ) 10 | 11 | // internalSysJobDao is internal type for wrapping internal DAO implements. 12 | type internalSysJobDao = *internal.SysJobDao 13 | 14 | // sysJobDao is the data access object for table sys_job. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type sysJobDao struct { 17 | internalSysJobDao 18 | } 19 | 20 | var ( 21 | // SysJob is globally public accessible object for table sys_job operations. 22 | SysJob = sysJobDao{ 23 | internal.NewSysJobDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/admin/dao/sys_job_log.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/admin/dao/internal" 9 | ) 10 | 11 | // internalSysJobLogDao is internal type for wrapping internal DAO implements. 12 | type internalSysJobLogDao = *internal.SysJobLogDao 13 | 14 | // sysJobLogDao is the data access object for table sys_job_log. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type sysJobLogDao struct { 17 | internalSysJobLogDao 18 | } 19 | 20 | var ( 21 | // SysJobLog is globally public accessible object for table sys_job_log operations. 22 | SysJobLog = sysJobLogDao{ 23 | internal.NewSysJobLogDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/admin/dao/sys_logininfor.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/admin/dao/internal" 9 | ) 10 | 11 | // internalSysLogininforDao is internal type for wrapping internal DAO implements. 12 | type internalSysLogininforDao = *internal.SysLogininforDao 13 | 14 | // sysLogininforDao is the data access object for table sys_logininfor. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type sysLogininforDao struct { 17 | internalSysLogininforDao 18 | } 19 | 20 | var ( 21 | // SysLogininfor is globally public accessible object for table sys_logininfor operations. 22 | SysLogininfor = sysLogininforDao{ 23 | internal.NewSysLogininforDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/admin/dao/sys_menu.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/admin/dao/internal" 9 | ) 10 | 11 | // internalSysMenuDao is internal type for wrapping internal DAO implements. 12 | type internalSysMenuDao = *internal.SysMenuDao 13 | 14 | // sysMenuDao is the data access object for table sys_menu. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type sysMenuDao struct { 17 | internalSysMenuDao 18 | } 19 | 20 | var ( 21 | // SysMenu is globally public accessible object for table sys_menu operations. 22 | SysMenu = sysMenuDao{ 23 | internal.NewSysMenuDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/admin/dao/sys_notice.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/admin/dao/internal" 9 | ) 10 | 11 | // internalSysNoticeDao is internal type for wrapping internal DAO implements. 12 | type internalSysNoticeDao = *internal.SysNoticeDao 13 | 14 | // sysNoticeDao is the data access object for table sys_notice. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type sysNoticeDao struct { 17 | internalSysNoticeDao 18 | } 19 | 20 | var ( 21 | // SysNotice is globally public accessible object for table sys_notice operations. 22 | SysNotice = sysNoticeDao{ 23 | internal.NewSysNoticeDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/admin/dao/sys_role.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/admin/dao/internal" 9 | ) 10 | 11 | // internalSysRoleDao is internal type for wrapping internal DAO implements. 12 | type internalSysRoleDao = *internal.SysRoleDao 13 | 14 | // sysRoleDao is the data access object for table sys_role. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type sysRoleDao struct { 17 | internalSysRoleDao 18 | } 19 | 20 | var ( 21 | // SysRole is globally public accessible object for table sys_role operations. 22 | SysRole = sysRoleDao{ 23 | internal.NewSysRoleDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/admin/dao/sys_role_menu.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/admin/dao/internal" 9 | ) 10 | 11 | // internalSysRoleMenuDao is internal type for wrapping internal DAO implements. 12 | type internalSysRoleMenuDao = *internal.SysRoleMenuDao 13 | 14 | // sysRoleMenuDao is the data access object for table sys_role_menu. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type sysRoleMenuDao struct { 17 | internalSysRoleMenuDao 18 | } 19 | 20 | var ( 21 | // SysRoleMenu is globally public accessible object for table sys_role_menu operations. 22 | SysRoleMenu = sysRoleMenuDao{ 23 | internal.NewSysRoleMenuDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/admin/dao/sys_user.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/admin/dao/internal" 9 | ) 10 | 11 | // internalSysUserDao is internal type for wrapping internal DAO implements. 12 | type internalSysUserDao = *internal.SysUserDao 13 | 14 | // sysUserDao is the data access object for table sys_user. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type sysUserDao struct { 17 | internalSysUserDao 18 | } 19 | 20 | var ( 21 | // SysUser is globally public accessible object for table sys_user operations. 22 | SysUser = sysUserDao{ 23 | internal.NewSysUserDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/admin/dao/sys_user_role.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/admin/dao/internal" 9 | ) 10 | 11 | // internalSysUserRoleDao is internal type for wrapping internal DAO implements. 12 | type internalSysUserRoleDao = *internal.SysUserRoleDao 13 | 14 | // sysUserRoleDao is the data access object for table sys_user_role. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type sysUserRoleDao struct { 17 | internalSysUserRoleDao 18 | } 19 | 20 | var ( 21 | // SysUserRole is globally public accessible object for table sys_user_role operations. 22 | SysUserRole = sysUserRoleDao{ 23 | internal.NewSysUserRoleDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/admin/logic/logic.go: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ========================================================================== 4 | 5 | package logic 6 | 7 | import ( 8 | _ "github.com/shichen437/live-dog/internal/app/admin/logic/sys_config" 9 | _ "github.com/shichen437/live-dog/internal/app/admin/logic/sys_dict_data" 10 | _ "github.com/shichen437/live-dog/internal/app/admin/logic/sys_dict_type" 11 | _ "github.com/shichen437/live-dog/internal/app/admin/logic/sys_menu" 12 | _ "github.com/shichen437/live-dog/internal/app/admin/logic/sys_notice" 13 | _ "github.com/shichen437/live-dog/internal/app/admin/logic/sys_push" 14 | _ "github.com/shichen437/live-dog/internal/app/admin/logic/sys_role" 15 | _ "github.com/shichen437/live-dog/internal/app/admin/logic/sys_role_menu" 16 | _ "github.com/shichen437/live-dog/internal/app/admin/logic/sys_user" 17 | _ "github.com/shichen437/live-dog/internal/app/admin/logic/sys_user_role" 18 | ) 19 | -------------------------------------------------------------------------------- /internal/app/admin/model/do/push_channel.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | "github.com/gogf/gf/v2/os/gtime" 10 | ) 11 | 12 | // PushChannel is the golang structure of table push_channel for DAO operations like Where/Data. 13 | type PushChannel struct { 14 | g.Meta `orm:"table:push_channel, do:true"` 15 | Id interface{} // 主键 ID 16 | Name interface{} // 渠道名称 17 | Type interface{} // 渠道类型 18 | Status interface{} // 状态:0 禁用 1 启用 19 | Remark interface{} // 备注 20 | CreateBy interface{} // 创建人 21 | CreateTime *gtime.Time // 创建时间 22 | ActionTime *gtime.Time // 修改时间 23 | } 24 | -------------------------------------------------------------------------------- /internal/app/admin/model/do/push_channel_email.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | "github.com/gogf/gf/v2/os/gtime" 10 | ) 11 | 12 | // PushChannelEmail is the golang structure of table push_channel_email for DAO operations like Where/Data. 13 | type PushChannelEmail struct { 14 | g.Meta `orm:"table:push_channel_email, do:true"` 15 | Id interface{} // 主键 ID 16 | ChannelId interface{} // 渠道 ID 17 | From interface{} // 发送人 18 | To interface{} // 接收人 19 | Server interface{} // 发送服务器地址 20 | Port interface{} // 发送端口 21 | AuthCode interface{} // 授权码 22 | CreateTime *gtime.Time // 创建时间 23 | ActionTime *gtime.Time // 修改时间 24 | } 25 | -------------------------------------------------------------------------------- /internal/app/admin/model/do/push_channel_web.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | "github.com/gogf/gf/v2/os/gtime" 10 | ) 11 | 12 | // PushChannelWeb is the golang structure of table push_channel_web for DAO operations like Where/Data. 13 | type PushChannelWeb struct { 14 | g.Meta `orm:"table:push_channel_web, do:true"` 15 | Id interface{} // 记录 ID 16 | ChannelId interface{} // 渠道 ID 17 | Url interface{} // 推送 URL 18 | HttpMethod interface{} // 请求方式 19 | Secret interface{} // 密钥/token/key 20 | AppId interface{} // 应用 ID 21 | CorpId interface{} // 企业 ID 22 | ReceiverId interface{} // 接收人 ID 23 | ReceiverType interface{} // 接收人类型 24 | ExtraParams interface{} // 额外参数 25 | CreateTime *gtime.Time // 创建时间 26 | ActionTime *gtime.Time // 修改时间 27 | } 28 | -------------------------------------------------------------------------------- /internal/app/admin/model/do/push_message_log.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | "github.com/gogf/gf/v2/os/gtime" 10 | ) 11 | 12 | // PushMessageLog is the golang structure of table push_message_log for DAO operations like Where/Data. 13 | type PushMessageLog struct { 14 | g.Meta `orm:"table:push_message_log, do:true"` 15 | Id interface{} // 主键 ID 16 | ChannelId interface{} // 渠道 ID 17 | Status interface{} // 0:失败 1 成功 18 | Message interface{} // 消息内容 19 | PushType interface{} // 推送类型 20 | CreateTime *gtime.Time // 推送时间 21 | } 22 | -------------------------------------------------------------------------------- /internal/app/admin/model/do/stat_daily.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | "github.com/gogf/gf/v2/os/gtime" 10 | ) 11 | 12 | // StatDaily is the golang structure of table stat_daily for DAO operations like Where/Data. 13 | type StatDaily struct { 14 | g.Meta `orm:"table:stat_daily, do:true"` 15 | Id interface{} // 记录ID 16 | Anchor interface{} // 主播 17 | DisplayName interface{} // 展示名称 18 | DisplayType interface{} // 展示类型(1 歌曲 2吉他) 19 | DisplayDate interface{} // 展示时间 20 | Count interface{} // 次数 21 | Remark interface{} // 备注 22 | CreateBy interface{} // 创建者 23 | CreateTime *gtime.Time // 创建时间 24 | UpdateBy interface{} // 更新者 25 | UpdateTime *gtime.Time // 更新时间 26 | Action interface{} // 标识:0 新增 1 修改 2 删除 27 | } 28 | -------------------------------------------------------------------------------- /internal/app/admin/model/do/sys_config.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | "github.com/gogf/gf/v2/os/gtime" 10 | ) 11 | 12 | // SysConfig is the golang structure of table sys_config for DAO operations like Where/Data. 13 | type SysConfig struct { 14 | g.Meta `orm:"table:sys_config, do:true"` 15 | ConfigId interface{} // 参数主键 16 | ConfigName interface{} // 参数名称 17 | ConfigKey interface{} // 参数键名 18 | ConfigValue interface{} // 参数键值 19 | ConfigType interface{} // 系统内置(Y是 N否) 20 | CreateBy interface{} // 创建者 21 | CreateTime *gtime.Time // 创建时间 22 | UpdateBy interface{} // 更新者 23 | UpdateTime *gtime.Time // 更新时间 24 | Remark interface{} // 备注 25 | } 26 | -------------------------------------------------------------------------------- /internal/app/admin/model/do/sys_dict_data.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | "github.com/gogf/gf/v2/os/gtime" 10 | ) 11 | 12 | // SysDictData is the golang structure of table sys_dict_data for DAO operations like Where/Data. 13 | type SysDictData struct { 14 | g.Meta `orm:"table:sys_dict_data, do:true"` 15 | DictCode interface{} // 字典编码 16 | DictSort interface{} // 字典排序 17 | DictLabel interface{} // 字典标签 18 | DictValue interface{} // 字典键值 19 | DictType interface{} // 字典类型 20 | CssClass interface{} // 样式属性(其他样式扩展) 21 | ListClass interface{} // 表格回显样式 22 | IsDefault interface{} // 是否默认(Y是 N否) 23 | Status interface{} // 状态(0正常 1停用) 24 | CreateBy interface{} // 创建者 25 | CreateTime *gtime.Time // 创建时间 26 | UpdateBy interface{} // 更新者 27 | UpdateTime *gtime.Time // 更新时间 28 | Remark interface{} // 备注 29 | } 30 | -------------------------------------------------------------------------------- /internal/app/admin/model/do/sys_dict_type.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | "github.com/gogf/gf/v2/os/gtime" 10 | ) 11 | 12 | // SysDictType is the golang structure of table sys_dict_type for DAO operations like Where/Data. 13 | type SysDictType struct { 14 | g.Meta `orm:"table:sys_dict_type, do:true"` 15 | DictId interface{} // 字典主键 16 | DictName interface{} // 字典名称 17 | DictType interface{} // 字典类型 18 | Status interface{} // 状态(0正常 1停用) 19 | CreateBy interface{} // 创建者 20 | CreateTime *gtime.Time // 创建时间 21 | UpdateBy interface{} // 更新者 22 | UpdateTime *gtime.Time // 更新时间 23 | Remark interface{} // 备注 24 | } 25 | -------------------------------------------------------------------------------- /internal/app/admin/model/do/sys_job.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | "github.com/gogf/gf/v2/os/gtime" 10 | ) 11 | 12 | // SysJob is the golang structure of table sys_job for DAO operations like Where/Data. 13 | type SysJob struct { 14 | g.Meta `orm:"table:sys_job, do:true"` 15 | JobId interface{} // 任务ID 16 | JobName interface{} // 任务名称 17 | JobGroup interface{} // 任务组名 18 | InvokeTarget interface{} // 调用目标字符串 19 | CronExpression interface{} // cron执行表达式 20 | MisfirePolicy interface{} // 计划执行错误策略(1立即执行 2执行一次 3放弃执行) 21 | Concurrent interface{} // 是否并发执行(0允许 1禁止) 22 | Status interface{} // 状态(0正常 1暂停) 23 | CreateBy interface{} // 创建者 24 | CreateTime *gtime.Time // 创建时间 25 | UpdateBy interface{} // 更新者 26 | UpdateTime *gtime.Time // 更新时间 27 | Remark interface{} // 备注信息 28 | } 29 | -------------------------------------------------------------------------------- /internal/app/admin/model/do/sys_job_log.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | "github.com/gogf/gf/v2/os/gtime" 10 | ) 11 | 12 | // SysJobLog is the golang structure of table sys_job_log for DAO operations like Where/Data. 13 | type SysJobLog struct { 14 | g.Meta `orm:"table:sys_job_log, do:true"` 15 | JobLogId interface{} // 任务日志ID 16 | JobName interface{} // 任务名称 17 | JobGroup interface{} // 任务组名 18 | InvokeTarget interface{} // 调用目标字符串 19 | JobMessage interface{} // 日志信息 20 | Status interface{} // 执行状态(0正常 1失败) 21 | ExceptionInfo interface{} // 异常信息 22 | CreateTime *gtime.Time // 创建时间 23 | } 24 | -------------------------------------------------------------------------------- /internal/app/admin/model/do/sys_logininfor.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | "github.com/gogf/gf/v2/os/gtime" 10 | ) 11 | 12 | // SysLogininfor is the golang structure of table sys_logininfor for DAO operations like Where/Data. 13 | type SysLogininfor struct { 14 | g.Meta `orm:"table:sys_logininfor, do:true"` 15 | InfoId interface{} // 访问ID 16 | UserName interface{} // 用户账号 17 | Ipaddr interface{} // 登录IP地址 18 | LoginLocation interface{} // 登录地点 19 | Browser interface{} // 浏览器类型 20 | Os interface{} // 操作系统 21 | Status interface{} // 登录状态(0成功 1失败) 22 | Msg interface{} // 提示消息 23 | LoginTime *gtime.Time // 访问时间 24 | } 25 | -------------------------------------------------------------------------------- /internal/app/admin/model/do/sys_notice.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | "github.com/gogf/gf/v2/os/gtime" 10 | ) 11 | 12 | // SysNotice is the golang structure of table sys_notice for DAO operations like Where/Data. 13 | type SysNotice struct { 14 | g.Meta `orm:"table:sys_notice, do:true"` 15 | NoticeId interface{} // 公告ID 16 | NoticeTitle interface{} // 公告标题 17 | NoticeType interface{} // 公告类型(1通知 2公告) 18 | NoticeContent []byte // 公告内容 19 | Status interface{} // 公告状态(0正常 1关闭) 20 | CreateBy interface{} // 创建者 21 | CreateTime *gtime.Time // 创建时间 22 | UpdateBy interface{} // 更新者 23 | UpdateTime *gtime.Time // 更新时间 24 | Remark interface{} // 备注 25 | } 26 | -------------------------------------------------------------------------------- /internal/app/admin/model/do/sys_role.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | "github.com/gogf/gf/v2/os/gtime" 10 | ) 11 | 12 | // SysRole is the golang structure of table sys_role for DAO operations like Where/Data. 13 | type SysRole struct { 14 | g.Meta `orm:"table:sys_role, do:true"` 15 | RoleId interface{} // 角色ID 16 | RoleName interface{} // 角色名称 17 | RoleKey interface{} // 角色权限字符串 18 | RoleSort interface{} // 显示顺序 19 | DataScope interface{} // 数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限) 20 | MenuCheckStrictly interface{} // 菜单树选择项是否关联显示 21 | Status interface{} // 角色状态(0正常 1停用) 22 | DelFlag interface{} // 删除标志(0代表存在 2代表删除) 23 | CreateBy interface{} // 创建者 24 | CreateTime *gtime.Time // 创建时间 25 | UpdateBy interface{} // 更新者 26 | UpdateTime *gtime.Time // 更新时间 27 | Remark interface{} // 备注 28 | } 29 | -------------------------------------------------------------------------------- /internal/app/admin/model/do/sys_role_menu.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | ) 10 | 11 | // SysRoleMenu is the golang structure of table sys_role_menu for DAO operations like Where/Data. 12 | type SysRoleMenu struct { 13 | g.Meta `orm:"table:sys_role_menu, do:true"` 14 | RoleId interface{} // 角色ID 15 | MenuId interface{} // 菜单ID 16 | } 17 | -------------------------------------------------------------------------------- /internal/app/admin/model/do/sys_user_role.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | ) 10 | 11 | // SysUserRole is the golang structure of table sys_user_role for DAO operations like Where/Data. 12 | type SysUserRole struct { 13 | g.Meta `orm:"table:sys_user_role, do:true"` 14 | UserId interface{} // 用户ID 15 | RoleId interface{} // 角色ID 16 | } 17 | -------------------------------------------------------------------------------- /internal/app/admin/model/entity/push_channel.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package entity 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/os/gtime" 9 | ) 10 | 11 | // PushChannel is the golang structure for table push_channel. 12 | type PushChannel struct { 13 | Id int `json:"id" orm:"id" description:"主键 ID"` 14 | Name string `json:"name" orm:"name" description:"渠道名称"` 15 | Type string `json:"type" orm:"type" description:"渠道类型"` 16 | Status int `json:"status" orm:"status" description:"状态:0 禁用 1 启用"` 17 | Remark string `json:"remark" orm:"remark" description:"备注"` 18 | CreateBy string `json:"createBy" orm:"create_by" description:"创建人"` 19 | CreateTime *gtime.Time `json:"createTime" orm:"create_time" description:"创建时间"` 20 | ActionTime *gtime.Time `json:"actionTime" orm:"action_time" description:"修改时间"` 21 | } 22 | -------------------------------------------------------------------------------- /internal/app/admin/model/entity/push_message_log.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package entity 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/os/gtime" 9 | ) 10 | 11 | // PushMessageLog is the golang structure for table push_message_log. 12 | type PushMessageLog struct { 13 | Id int `json:"id" orm:"id" description:"主键 ID"` 14 | ChannelId int `json:"channelId" orm:"channel_id" description:"渠道 ID"` 15 | Status int `json:"status" orm:"status" description:"0:失败 1 成功"` 16 | Message string `json:"message" orm:"message" description:"消息内容"` 17 | PushType string `json:"pushType" orm:"push_type" description:"推送类型"` 18 | CreateTime *gtime.Time `json:"createTime" orm:"create_time" description:"推送时间"` 19 | } 20 | -------------------------------------------------------------------------------- /internal/app/admin/model/entity/sys_dict_type.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package entity 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/os/gtime" 9 | ) 10 | 11 | // SysDictType is the golang structure for table sys_dict_type. 12 | type SysDictType struct { 13 | DictId int64 `json:"dictId" orm:"dict_id" description:"字典主键"` 14 | DictName string `json:"dictName" orm:"dict_name" description:"字典名称"` 15 | DictType string `json:"dictType" orm:"dict_type" description:"字典类型"` 16 | Status string `json:"status" orm:"status" description:"状态(0正常 1停用)"` 17 | CreateBy string `json:"createBy" orm:"create_by" description:"创建者"` 18 | CreateTime *gtime.Time `json:"createTime" orm:"create_time" description:"创建时间"` 19 | UpdateBy string `json:"updateBy" orm:"update_by" description:"更新者"` 20 | UpdateTime *gtime.Time `json:"updateTime" orm:"update_time" description:"更新时间"` 21 | Remark string `json:"remark" orm:"remark" description:"备注"` 22 | } 23 | -------------------------------------------------------------------------------- /internal/app/admin/model/entity/sys_job_log.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package entity 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/os/gtime" 9 | ) 10 | 11 | // SysJobLog is the golang structure for table sys_job_log. 12 | type SysJobLog struct { 13 | JobLogId int64 `json:"jobLogId" orm:"job_log_id" description:"任务日志ID"` 14 | JobName string `json:"jobName" orm:"job_name" description:"任务名称"` 15 | JobGroup string `json:"jobGroup" orm:"job_group" description:"任务组名"` 16 | InvokeTarget string `json:"invokeTarget" orm:"invoke_target" description:"调用目标字符串"` 17 | JobMessage string `json:"jobMessage" orm:"job_message" description:"日志信息"` 18 | Status string `json:"status" orm:"status" description:"执行状态(0正常 1失败)"` 19 | ExceptionInfo string `json:"exceptionInfo" orm:"exception_info" description:"异常信息"` 20 | CreateTime *gtime.Time `json:"createTime" orm:"create_time" description:"创建时间"` 21 | } 22 | -------------------------------------------------------------------------------- /internal/app/admin/model/entity/sys_role_menu.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package entity 6 | 7 | // SysRoleMenu is the golang structure for table sys_role_menu. 8 | type SysRoleMenu struct { 9 | RoleId int64 `json:"roleId" orm:"role_id" description:"角色ID"` 10 | MenuId int64 `json:"menuId" orm:"menu_id" description:"菜单ID"` 11 | } 12 | -------------------------------------------------------------------------------- /internal/app/admin/model/entity/sys_user_role.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package entity 6 | 7 | // SysUserRole is the golang structure for table sys_user_role. 8 | type SysUserRole struct { 9 | UserId int64 `json:"userId" orm:"user_id" description:"用户ID"` 10 | RoleId int64 `json:"roleId" orm:"role_id" description:"角色ID"` 11 | } 12 | -------------------------------------------------------------------------------- /internal/app/admin/model/sys_push.go: -------------------------------------------------------------------------------- 1 | package model 2 | 3 | import ( 4 | "github.com/shichen437/live-dog/internal/app/admin/model/entity" 5 | 6 | "github.com/gogf/gf/v2/frame/g" 7 | ) 8 | 9 | type PushChannel struct { 10 | g.Meta `orm:"table:push_channel" desc:"消息推送渠道"` 11 | *entity.PushChannel 12 | Email *entity.PushChannelEmail `json:"email" desc:"邮箱信息"` 13 | Web *entity.PushChannelWeb `json:"web" desc:"web 信息"` 14 | } 15 | -------------------------------------------------------------------------------- /internal/app/admin/model/sys_role.go: -------------------------------------------------------------------------------- 1 | package model 2 | 3 | import "github.com/shichen437/live-dog/internal/app/admin/model/entity" 4 | 5 | type SysRoleRes struct { 6 | *entity.SysRole 7 | Flag bool `json:"flag" ` 8 | MenuIds string `json:"menuIds" ` 9 | Admin bool `json:"admin" description:"是否是admin"` 10 | Permissions []string `json:"permissions" description:"权限"` 11 | } 12 | type SysRolesRes struct { 13 | RoleIds []int64 `json:"roleIds" ` 14 | Roles []string `json:"roles" ` 15 | RoleNames []string `json:"roleNames" ` 16 | SysRole []*entity.SysRole `json:"SysRole" ` 17 | } 18 | 19 | type RoleList struct { 20 | *entity.SysRole 21 | Flag bool `json:"flag" ` 22 | MenuIds string `json:"menuIds" ` 23 | Admin bool `json:"admin" description:"是否是admin"` 24 | } 25 | -------------------------------------------------------------------------------- /internal/app/admin/service/sys_role_menu.go: -------------------------------------------------------------------------------- 1 | // ================================================================================ 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // You can delete these comments if you wish manually maintain this interface file. 4 | // ================================================================================ 5 | 6 | package service 7 | 8 | import ( 9 | "context" 10 | 11 | "github.com/gogf/gf/v2/database/gdb" 12 | ) 13 | 14 | type ( 15 | ISysRoleMenu interface { 16 | AddRoleMenus(ctx context.Context, tx gdb.TX, roleId int64, MenuIds []int64) (err error) 17 | GetMenuIdsByRoleId(ctx context.Context, roleId int64) (menuIds []int64, err error) 18 | } 19 | ) 20 | 21 | var ( 22 | localSysRoleMenu ISysRoleMenu 23 | ) 24 | 25 | func SysRoleMenu() ISysRoleMenu { 26 | if localSysRoleMenu == nil { 27 | panic("implement not found for interface ISysRoleMenu, forgot register?") 28 | } 29 | return localSysRoleMenu 30 | } 31 | 32 | func RegisterSysRoleMenu(i ISysRoleMenu) { 33 | localSysRoleMenu = i 34 | } 35 | -------------------------------------------------------------------------------- /internal/app/common/consts/consts.go: -------------------------------------------------------------------------------- 1 | package consts 2 | 3 | const ( 4 | ContextKey = "ContextKey" 5 | ProAdmin = "admin" 6 | ProAdminId int64 = 1 7 | ProAdminRoleId int64 = 1 8 | 9 | AvatarPrefix = "/avatar/" 10 | 11 | //ctx 12 | CtxAdminId = "CtxAdminId" 13 | CtxAdminName = "CtxAdminName" 14 | CacheKeyPermsUrl = "user:perms:url:" 15 | 16 | //page 17 | PageSize = 10 18 | 19 | //采用restfull 20 | ListMethod = "Get" 21 | AddMethod = "Post" 22 | UpdateMethod = "Put" 23 | DeleteMethod = "Delete" 24 | ) 25 | -------------------------------------------------------------------------------- /internal/app/common/consts/consts_gtoken.go: -------------------------------------------------------------------------------- 1 | package consts 2 | 3 | const ( 4 | LocalCache = 1 5 | // 是否支持多端登录 6 | MultiLogin = true 7 | TokenType = "Bearer" 8 | ServerName = "LiveDog Monitor Platform" 9 | //超时时间 10 * 24 * 60 * 60 10 | Timeout = 86400 11 | GTokenAdminPrefix = "SYS-USER-" 12 | ) 13 | -------------------------------------------------------------------------------- /internal/app/common/consts/consts_i18n.go: -------------------------------------------------------------------------------- 1 | package consts 2 | 3 | const ( 4 | ListF = `{#list-failed}` 5 | AddF = `{#add-failed}` 6 | UpdateF = `{#update-failed}` 7 | DeleteF = `{#delete-failed}` 8 | GetF = `{#get-failed}` 9 | 10 | IDEmpty = `{#id-empty}` 11 | DataCodeEmpty = `{#data-code-empty}` 12 | DataNotFound = `{#data-not-found}` 13 | 14 | ErrLoginFailMsg = `{#err-login-fail-msg}` 15 | ErrLoginCodeFailMsg = `{#err-login-code-fail-msg}` 16 | ErrAuthFailMsg = `{#err-auth-fail-msg}` 17 | Success = `{#success}` 18 | ) 19 | -------------------------------------------------------------------------------- /internal/app/common/consts/consts_openapi.go: -------------------------------------------------------------------------------- 1 | package consts 2 | 3 | const ( 4 | OpenAPITitle = `GoFrame Demos` 5 | OpenAPIDescription = `This is a simple demos HTTP server project that is using GoFrame. Enjoy 💖 ` 6 | 7 | MySwaggerUITemplate = ` 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | ` 20 | ) 21 | -------------------------------------------------------------------------------- /internal/app/common/consts/consts_system.go: -------------------------------------------------------------------------------- 1 | package consts 2 | 3 | const ( 4 | UserSessionKey = "UserSessionKey" 5 | 6 | //sys_menu 7 | SysMenuStatusOk = "0" 8 | SysMenuStatusNo = "1" 9 | 10 | //sys_role 11 | SysRoleStatusOk = "0" 12 | SysRoleStatusNo = "1" 13 | 14 | SysRoleDataScopeAll = "1" 15 | SysRoleDataScopeCustom = "2" 16 | SysRoleDataScopeCurrent = "3" 17 | SysRoleDataScopeCurrents = "4" 18 | SysRoleDataScopeCurrentUser = "5" 19 | 20 | //sys_user 21 | SysUserStatusOk = "0" 22 | SysUserStatusNo = "1" 23 | 24 | //gen_table 25 | GenTableStatusOk = "0" 26 | GenTableStatusNo = "1" 27 | ) 28 | -------------------------------------------------------------------------------- /internal/app/common/controller/captcha.go: -------------------------------------------------------------------------------- 1 | package common 2 | 3 | import ( 4 | "context" 5 | 6 | v1 "github.com/shichen437/live-dog/api/v1/tool" 7 | adminService "github.com/shichen437/live-dog/internal/app/admin/service" 8 | "github.com/shichen437/live-dog/internal/app/common/service" 9 | 10 | "github.com/google/uuid" 11 | ) 12 | 13 | var Captcha = captchaController{} 14 | 15 | type captchaController struct { 16 | } 17 | 18 | // CaptchaImage 获取验证码 19 | func (c *captchaController) CaptchaImage(ctx context.Context, req *v1.CaptchaReq) (res *v1.CaptchaRes, err error) { 20 | var ( 21 | idKeyC, base64stringC string 22 | ) 23 | idKeyC, base64stringC, err = service.Captcha().GetVerifyImgString(ctx) 24 | guid := uuid.New() 25 | res = &v1.CaptchaRes{ 26 | Key: idKeyC, 27 | Img: base64stringC, 28 | Uuid: guid.String(), 29 | CaptchaEnabled: true, 30 | } 31 | return 32 | } 33 | 34 | // CaptchaImage 获取验证码 35 | func (c *captchaController) Test(ctx context.Context, req *v1.TestReq) (res *v1.TestRes, err error) { 36 | err = adminService.SysMenu().InitApiPath(ctx) 37 | return 38 | } 39 | -------------------------------------------------------------------------------- /internal/app/common/logic/logic.go: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ========================================================================== 4 | 5 | package logic 6 | 7 | import ( 8 | _ "github.com/shichen437/live-dog/internal/app/common/logic/bizctx" 9 | _ "github.com/shichen437/live-dog/internal/app/common/logic/captcha" 10 | _ "github.com/shichen437/live-dog/internal/app/common/logic/middleware" 11 | _ "github.com/shichen437/live-dog/internal/app/common/logic/session" 12 | ) 13 | -------------------------------------------------------------------------------- /internal/app/common/model/context.go: -------------------------------------------------------------------------------- 1 | package model 2 | 3 | import ( 4 | "github.com/gogf/gf/v2/net/ghttp" 5 | ) 6 | 7 | type Context struct { 8 | Session *ghttp.Session // Session in context. 9 | User *ContextUser // User in context. 10 | } 11 | 12 | type ContextUser struct { 13 | Id int64 // User ID. 14 | UserName string // User UserName. 15 | Nickname string // User nickname. 16 | } 17 | -------------------------------------------------------------------------------- /internal/app/common/model/redis.go: -------------------------------------------------------------------------------- 1 | package model 2 | 3 | type RedisConfig struct { 4 | Address string `json:"address"` 5 | Db int `json:"db"` 6 | IdleTimeout string `json:"idleTimeout"` 7 | MaxConnLifetime string `json:"maxConnLifetime"` 8 | WaitTimeout string `json:"waitTimeout"` 9 | DialTimeout string `json:"dialTimeout"` 10 | ReadTimeout string `json:"readTimeout"` 11 | WriteTimeout string `json:"writeTimeout"` 12 | MaxActive int `json:"maxActive"` 13 | } 14 | -------------------------------------------------------------------------------- /internal/app/common/service/captcha.go: -------------------------------------------------------------------------------- 1 | // ================================================================================ 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // You can delete these comments if you wish manually maintain this interface file. 4 | // ================================================================================ 5 | 6 | package service 7 | 8 | import ( 9 | "context" 10 | ) 11 | 12 | type ( 13 | ICaptcha interface { 14 | // GetVerifyImgString 获取字母数字混合验证码 15 | GetVerifyImgString(ctx context.Context) (idKeyC string, base64stringC string, err error) 16 | // VerifyString 验证输入的验证码是否正确 17 | VerifyString(id string, answer string) bool 18 | } 19 | ) 20 | 21 | var ( 22 | localCaptcha ICaptcha 23 | ) 24 | 25 | func Captcha() ICaptcha { 26 | if localCaptcha == nil { 27 | panic("implement not found for interface ICaptcha, forgot register?") 28 | } 29 | return localCaptcha 30 | } 31 | 32 | func RegisterCaptcha(i ICaptcha) { 33 | localCaptcha = i 34 | } 35 | -------------------------------------------------------------------------------- /internal/app/common/service/middleware.go: -------------------------------------------------------------------------------- 1 | // ================================================================================ 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // You can delete these comments if you wish manually maintain this interface file. 4 | // ================================================================================ 5 | 6 | package service 7 | 8 | import ( 9 | "github.com/gogf/gf/v2/net/ghttp" 10 | ) 11 | 12 | type ( 13 | IMiddleware interface { 14 | // Ctx injects custom business context variable into context of current request. 15 | Ctx(r *ghttp.Request) 16 | // Auth validates the request to allow only signed-in users visit. 17 | Auth(r *ghttp.Request) 18 | // CORS allows Cross-origin resource sharing. 19 | CORS(r *ghttp.Request) 20 | HandlerResponse(r *ghttp.Request) 21 | } 22 | ) 23 | 24 | var ( 25 | localMiddleware IMiddleware 26 | ) 27 | 28 | func Middleware() IMiddleware { 29 | if localMiddleware == nil { 30 | panic("implement not found for interface IMiddleware, forgot register?") 31 | } 32 | return localMiddleware 33 | } 34 | 35 | func RegisterMiddleware(i IMiddleware) { 36 | localMiddleware = i 37 | } 38 | -------------------------------------------------------------------------------- /internal/app/common/service/session.go: -------------------------------------------------------------------------------- 1 | // ================================================================================ 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // You can delete these comments if you wish manually maintain this interface file. 4 | // ================================================================================ 5 | 6 | package service 7 | 8 | import ( 9 | "context" 10 | "github.com/shichen437/live-dog/internal/app/admin/model/entity" 11 | ) 12 | 13 | type ( 14 | ISession interface { 15 | // SetUser sets user into the session. 16 | SetUser(ctx context.Context, user *entity.SysUser) error 17 | // GetUser retrieves and returns the user from session. 18 | // It returns nil if the user did not sign in. 19 | GetUser(ctx context.Context) *entity.SysUser 20 | // RemoveUser removes user rom session. 21 | RemoveUser(ctx context.Context) error 22 | } 23 | ) 24 | 25 | var ( 26 | localSession ISession 27 | ) 28 | 29 | func Session() ISession { 30 | if localSession == nil { 31 | panic("implement not found for interface ISession, forgot register?") 32 | } 33 | return localSession 34 | } 35 | 36 | func RegisterSession(i ISession) { 37 | localSession = i 38 | } 39 | -------------------------------------------------------------------------------- /internal/app/live/consts/live_i18n.go: -------------------------------------------------------------------------------- 1 | package consts 2 | 3 | const ( 4 | MonitorTimeEmpty = `{#monitor-time-empty}` 5 | MonitorTimeSame = `{#monitor-time-same}` 6 | MonitorTimeShort = `{#monitor-time-short}` 7 | RoomUrlEmpty = `{#room-url-empty}` 8 | RoomUrlParseF = `{#room-url-parse-failed}` 9 | RoomUrlNotAllowed = `{#room-url-not-allowed}` 10 | ) 11 | -------------------------------------------------------------------------------- /internal/app/live/controller/file_manage.go: -------------------------------------------------------------------------------- 1 | package live 2 | 3 | import ( 4 | "context" 5 | 6 | v1 "github.com/shichen437/live-dog/api/v1/live" 7 | "github.com/shichen437/live-dog/internal/app/live/service" 8 | ) 9 | 10 | type fileManageController struct { 11 | } 12 | 13 | var FileManage = fileManageController{} 14 | 15 | func (f *fileManageController) List(ctx context.Context, req *v1.GetFileInfoListReq) (res *v1.GetFileInfoListRes, err error) { 16 | res, err = service.FileManage().List(ctx, req) 17 | return 18 | } 19 | 20 | func (f *fileManageController) Delete(ctx context.Context, req *v1.DeleteFileInfoReq) (res *v1.DeleteFileInfoRes, err error) { 21 | res, err = service.FileManage().Delete(ctx, req) 22 | return 23 | } 24 | 25 | func (f *fileManageController) Play(ctx context.Context, req *v1.GetFilePlayReq) (res *v1.GetFilePlayRes, err error) { 26 | res, err = service.FileManage().Play(ctx, req) 27 | return 28 | } 29 | -------------------------------------------------------------------------------- /internal/app/live/controller/media_download.go: -------------------------------------------------------------------------------- 1 | package live 2 | 3 | import ( 4 | "context" 5 | 6 | v1 "github.com/shichen437/live-dog/api/v1/live" 7 | "github.com/shichen437/live-dog/internal/app/live/service" 8 | ) 9 | 10 | type mediaDownloadController struct { 11 | } 12 | 13 | var MediaDownload = mediaDownloadController{} 14 | 15 | func (c *mediaDownloadController) List(ctx context.Context, req *v1.GetDownloadRecordReq) (res *v1.GetDownloadRecordRes, err error) { 16 | res, err = service.MediaDownload().List(ctx, req) 17 | return 18 | } 19 | 20 | func (c *mediaDownloadController) ListFromCache(ctx context.Context, req *v1.GetDownloadRecordCacheReq) (res *v1.GetDownloadRecordCacheRes, err error) { 21 | res, err = service.MediaDownload().ListFromCache(ctx, req) 22 | return 23 | } 24 | 25 | func (c *mediaDownloadController) Delete(ctx context.Context, req *v1.DeleteDownloadRecordReq) (res *v1.DeleteDownloadRecordRes, err error) { 26 | res, err = service.MediaDownload().Delete(ctx, req) 27 | return 28 | } 29 | -------------------------------------------------------------------------------- /internal/app/live/dao/author_info.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/live/dao/internal" 9 | ) 10 | 11 | // internalAuthorInfoDao is internal type for wrapping internal DAO implements. 12 | type internalAuthorInfoDao = *internal.AuthorInfoDao 13 | 14 | // authorInfoDao is the data access object for table author_info. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type authorInfoDao struct { 17 | internalAuthorInfoDao 18 | } 19 | 20 | var ( 21 | // AuthorInfo is globally public accessible object for table author_info operations. 22 | AuthorInfo = authorInfoDao{ 23 | internal.NewAuthorInfoDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/live/dao/author_info_history.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/live/dao/internal" 9 | ) 10 | 11 | // internalAuthorInfoHistoryDao is internal type for wrapping internal DAO implements. 12 | type internalAuthorInfoHistoryDao = *internal.AuthorInfoHistoryDao 13 | 14 | // authorInfoHistoryDao is the data access object for table author_info_history. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type authorInfoHistoryDao struct { 17 | internalAuthorInfoHistoryDao 18 | } 19 | 20 | var ( 21 | // AuthorInfoHistory is globally public accessible object for table author_info_history operations. 22 | AuthorInfoHistory = authorInfoHistoryDao{ 23 | internal.NewAuthorInfoHistoryDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/live/dao/download_record.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/live/dao/internal" 9 | ) 10 | 11 | // internalDownloadRecordDao is internal type for wrapping internal DAO implements. 12 | type internalDownloadRecordDao = *internal.DownloadRecordDao 13 | 14 | // downloadRecordDao is the data access object for table download_record. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type downloadRecordDao struct { 17 | internalDownloadRecordDao 18 | } 19 | 20 | var ( 21 | // DownloadRecord is globally public accessible object for table download_record operations. 22 | DownloadRecord = downloadRecordDao{ 23 | internal.NewDownloadRecordDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/live/dao/live_cookie.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/live/dao/internal" 9 | ) 10 | 11 | // internalLiveCookieDao is internal type for wrapping internal DAO implements. 12 | type internalLiveCookieDao = *internal.LiveCookieDao 13 | 14 | // liveCookieDao is the data access object for table live_cookie. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type liveCookieDao struct { 17 | internalLiveCookieDao 18 | } 19 | 20 | var ( 21 | // LiveCookie is globally public accessible object for table live_cookie operations. 22 | LiveCookie = liveCookieDao{ 23 | internal.NewLiveCookieDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/live/dao/live_history.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/live/dao/internal" 9 | ) 10 | 11 | // internalLiveHistoryDao is internal type for wrapping internal DAO implements. 12 | type internalLiveHistoryDao = *internal.LiveHistoryDao 13 | 14 | // liveHistoryDao is the data access object for table live_history. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type liveHistoryDao struct { 17 | internalLiveHistoryDao 18 | } 19 | 20 | var ( 21 | // LiveHistory is globally public accessible object for table live_history operations. 22 | LiveHistory = liveHistoryDao{ 23 | internal.NewLiveHistoryDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/live/dao/live_manage.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/live/dao/internal" 9 | ) 10 | 11 | // internalLiveManageDao is internal type for wrapping internal DAO implements. 12 | type internalLiveManageDao = *internal.LiveManageDao 13 | 14 | // liveManageDao is the data access object for table live_manage. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type liveManageDao struct { 17 | internalLiveManageDao 18 | } 19 | 20 | var ( 21 | // LiveManage is globally public accessible object for table live_manage operations. 22 | LiveManage = liveManageDao{ 23 | internal.NewLiveManageDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/live/dao/media_parse.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/live/dao/internal" 9 | ) 10 | 11 | // internalMediaParseDao is internal type for wrapping internal DAO implements. 12 | type internalMediaParseDao = *internal.MediaParseDao 13 | 14 | // mediaParseDao is the data access object for table media_parse. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type mediaParseDao struct { 17 | internalMediaParseDao 18 | } 19 | 20 | var ( 21 | // MediaParse is globally public accessible object for table media_parse operations. 22 | MediaParse = mediaParseDao{ 23 | internal.NewMediaParseDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/live/dao/push_channel.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/live/dao/internal" 9 | ) 10 | 11 | // internalPushChannelDao is internal type for wrapping internal DAO implements. 12 | type internalPushChannelDao = *internal.PushChannelDao 13 | 14 | // pushChannelDao is the data access object for table push_channel. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type pushChannelDao struct { 17 | internalPushChannelDao 18 | } 19 | 20 | var ( 21 | // PushChannel is globally public accessible object for table push_channel operations. 22 | PushChannel = pushChannelDao{ 23 | internal.NewPushChannelDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/live/dao/push_channel_email.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/live/dao/internal" 9 | ) 10 | 11 | // internalPushChannelEmailDao is internal type for wrapping internal DAO implements. 12 | type internalPushChannelEmailDao = *internal.PushChannelEmailDao 13 | 14 | // pushChannelEmailDao is the data access object for table push_channel_email. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type pushChannelEmailDao struct { 17 | internalPushChannelEmailDao 18 | } 19 | 20 | var ( 21 | // PushChannelEmail is globally public accessible object for table push_channel_email operations. 22 | PushChannelEmail = pushChannelEmailDao{ 23 | internal.NewPushChannelEmailDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/live/dao/room_info.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/live/dao/internal" 9 | ) 10 | 11 | // internalRoomInfoDao is internal type for wrapping internal DAO implements. 12 | type internalRoomInfoDao = *internal.RoomInfoDao 13 | 14 | // roomInfoDao is the data access object for table room_info. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type roomInfoDao struct { 17 | internalRoomInfoDao 18 | } 19 | 20 | var ( 21 | // RoomInfo is globally public accessible object for table room_info operations. 22 | RoomInfo = roomInfoDao{ 23 | internal.NewRoomInfoDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/live/dao/stat_daily.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/live/dao/internal" 9 | ) 10 | 11 | // internalStatDailyDao is internal type for wrapping internal DAO implements. 12 | type internalStatDailyDao = *internal.StatDailyDao 13 | 14 | // statDailyDao is the data access object for table stat_daily. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type statDailyDao struct { 17 | internalStatDailyDao 18 | } 19 | 20 | var ( 21 | // StatDaily is globally public accessible object for table stat_daily operations. 22 | StatDaily = statDailyDao{ 23 | internal.NewStatDailyDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/live/logic/logic.go: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ========================================================================== 4 | 5 | package logic 6 | 7 | import ( 8 | _ "github.com/shichen437/live-dog/internal/app/live/logic/author_manage" 9 | _ "github.com/shichen437/live-dog/internal/app/live/logic/file_manage" 10 | _ "github.com/shichen437/live-dog/internal/app/live/logic/live_cookie" 11 | _ "github.com/shichen437/live-dog/internal/app/live/logic/live_history" 12 | _ "github.com/shichen437/live-dog/internal/app/live/logic/live_manage" 13 | _ "github.com/shichen437/live-dog/internal/app/live/logic/media_download" 14 | _ "github.com/shichen437/live-dog/internal/app/live/logic/media_parse" 15 | _ "github.com/shichen437/live-dog/internal/app/live/logic/stat_daily" 16 | ) 17 | -------------------------------------------------------------------------------- /internal/app/live/model/do/author_info.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | "github.com/gogf/gf/v2/os/gtime" 10 | ) 11 | 12 | // AuthorInfo is the golang structure of table author_info for DAO operations like Where/Data. 13 | type AuthorInfo struct { 14 | g.Meta `orm:"table:author_info, do:true"` 15 | Id interface{} // 主键 ID 16 | UniqueId interface{} // 加密 UID 17 | Platform interface{} // 作者平台 18 | Nickname interface{} // 作者昵称 19 | Signature interface{} // 签名 20 | AvatarUrl interface{} // 头像url 21 | Ip interface{} // 作者 IP 22 | Refer interface{} // 来源 23 | FollowerCount interface{} // 粉丝数量 24 | FollowingCount interface{} // 关注数量 25 | CreateTime *gtime.Time // 创建时间 26 | UpdateTime *gtime.Time // 修改时间 27 | } 28 | -------------------------------------------------------------------------------- /internal/app/live/model/do/author_info_history.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | "github.com/gogf/gf/v2/os/gtime" 10 | ) 11 | 12 | // AuthorInfoHistory is the golang structure of table author_info_history for DAO operations like Where/Data. 13 | type AuthorInfoHistory struct { 14 | g.Meta `orm:"table:author_info_history, do:true"` 15 | Id interface{} // 主键 ID 16 | AuthorId interface{} // 作者 ID 17 | LastFollowerCount interface{} // 上次粉丝数量 18 | LastFollowingCount interface{} // 上次关注数量 19 | Num interface{} // 涨粉数量 20 | Day interface{} // 记录日期 21 | CreateTime *gtime.Time // 创建时间 22 | UpdateTime *gtime.Time // 修改时间 23 | } 24 | -------------------------------------------------------------------------------- /internal/app/live/model/do/download_record.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | "github.com/gogf/gf/v2/os/gtime" 10 | ) 11 | 12 | // DownloadRecord is the golang structure of table download_record for DAO operations like Where/Data. 13 | type DownloadRecord struct { 14 | g.Meta `orm:"table:download_record, do:true"` 15 | Id interface{} // 主键 ID 16 | Title interface{} // 任务名称 17 | TaskId interface{} // 任务 ID 18 | Status interface{} // 任务状态 19 | Output interface{} // 输出路径 20 | ErrorMsg interface{} // 错误信息 21 | StartTime *gtime.Time // 开始时间 22 | UpdateTime *gtime.Time // 结束时间 23 | } 24 | -------------------------------------------------------------------------------- /internal/app/live/model/do/live_cookie.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | "github.com/gogf/gf/v2/os/gtime" 10 | ) 11 | 12 | // LiveCookie is the golang structure of table live_cookie for DAO operations like Where/Data. 13 | type LiveCookie struct { 14 | g.Meta `orm:"table:live_cookie, do:true"` 15 | Id interface{} // ID 16 | Platform interface{} // 平台 17 | Cookie interface{} // cookie 18 | Remark interface{} // 备注 19 | CreateTime *gtime.Time // 创建时间 20 | ActionTime *gtime.Time // 更新时间 21 | } 22 | -------------------------------------------------------------------------------- /internal/app/live/model/do/live_history.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | "github.com/gogf/gf/v2/os/gtime" 10 | ) 11 | 12 | // LiveHistory is the golang structure of table live_history for DAO operations like Where/Data. 13 | type LiveHistory struct { 14 | g.Meta `orm:"table:live_history, do:true"` 15 | Id interface{} // 16 | LiveId interface{} // 直播ID 17 | StartTime *gtime.Time // 直播开始时间 18 | EndTime *gtime.Time // 直播结束时间 19 | Duration interface{} // 直播时长 20 | } 21 | -------------------------------------------------------------------------------- /internal/app/live/model/do/live_manage.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | "github.com/gogf/gf/v2/os/gtime" 10 | ) 11 | 12 | // LiveManage is the golang structure of table live_manage for DAO operations like Where/Data. 13 | type LiveManage struct { 14 | g.Meta `orm:"table:live_manage, do:true"` 15 | Id interface{} // 房间 id 16 | RoomUrl interface{} // 房间 url 17 | Interval interface{} // 轮询间隔 18 | Format interface{} // 导出视频格式 19 | EnableNotice interface{} // 启用通知 20 | MonitorType interface{} // 监控类型 21 | MonitorStart interface{} // 监控开始时间 22 | MonitorStop interface{} // 监控结束时间 23 | Remark interface{} // 房间备注 24 | CreateBy interface{} // 创建人 25 | CreateTime *gtime.Time // 创建时间 26 | ActionBy interface{} // 修改人 27 | ActionTime *gtime.Time // 修改时间 28 | } 29 | -------------------------------------------------------------------------------- /internal/app/live/model/do/media_parse.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | "github.com/gogf/gf/v2/os/gtime" 10 | ) 11 | 12 | // MediaParse is the golang structure of table media_parse for DAO operations like Where/Data. 13 | type MediaParse struct { 14 | g.Meta `orm:"table:media_parse, do:true"` 15 | Id interface{} // 媒体解析主键 ID 16 | Platform interface{} // 平台 17 | Referer interface{} // 来源 18 | Author interface{} // 作者名称 19 | AuthorUid interface{} // 作者 UID 20 | Desc interface{} // 媒体描述 21 | MediaId interface{} // 媒体 ID 22 | Type interface{} // 媒体类型 23 | VideoUrl interface{} // 视频 url 24 | VideoCoverUrl interface{} // 视频封面 url 25 | VideoData interface{} // 视频数据 26 | MusicUrl interface{} // 音乐 url 27 | MusicCoverUrl interface{} // 音乐封面 url 28 | ImagesUrl interface{} // 图集 url 29 | ImagesCoverUrl interface{} // 图集封面 url 30 | CreateTime *gtime.Time // 创建时间 31 | } 32 | -------------------------------------------------------------------------------- /internal/app/live/model/do/push_channel.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | "github.com/gogf/gf/v2/os/gtime" 10 | ) 11 | 12 | // PushChannel is the golang structure of table push_channel for DAO operations like Where/Data. 13 | type PushChannel struct { 14 | g.Meta `orm:"table:push_channel, do:true"` 15 | Id interface{} // 主键 ID 16 | Name interface{} // 渠道名称 17 | Type interface{} // 渠道类型 18 | Status interface{} // 状态:0 禁用 1 启用 19 | Url interface{} // webhook 20 | Remark interface{} // 备注 21 | CreateBy interface{} // 创建人 22 | CreateTime *gtime.Time // 创建时间 23 | ActionTime *gtime.Time // 修改时间 24 | } 25 | -------------------------------------------------------------------------------- /internal/app/live/model/do/push_channel_email.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | "github.com/gogf/gf/v2/os/gtime" 10 | ) 11 | 12 | // PushChannelEmail is the golang structure of table push_channel_email for DAO operations like Where/Data. 13 | type PushChannelEmail struct { 14 | g.Meta `orm:"table:push_channel_email, do:true"` 15 | Id interface{} // 主键 ID 16 | ChannelId interface{} // 渠道 ID 17 | From interface{} // 发送人 18 | To interface{} // 接收人 19 | Server interface{} // 发送服务器地址 20 | Port interface{} // 发送端口 21 | AuthCode interface{} // 授权码 22 | CreateTime *gtime.Time // 创建时间 23 | ActionTime *gtime.Time // 修改时间 24 | } 25 | -------------------------------------------------------------------------------- /internal/app/live/model/do/room_info.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | "github.com/gogf/gf/v2/os/gtime" 10 | ) 11 | 12 | // RoomInfo is the golang structure of table room_info for DAO operations like Where/Data. 13 | type RoomInfo struct { 14 | g.Meta `orm:"table:room_info, do:true"` 15 | Id interface{} // 房间信息 ID 16 | LiveId interface{} // 房间 ID 17 | RoomName interface{} // 房间名称 18 | Anchor interface{} // 主播 19 | Platform interface{} // 直播平台 20 | Status interface{} // 状态 21 | CreateBy interface{} // 创建者 22 | CreateTime *gtime.Time // 创建时间 23 | ActionTime *gtime.Time // 修改时间 24 | } 25 | -------------------------------------------------------------------------------- /internal/app/live/model/do/stat_daily.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | "github.com/gogf/gf/v2/os/gtime" 10 | ) 11 | 12 | // StatDaily is the golang structure of table stat_daily for DAO operations like Where/Data. 13 | type StatDaily struct { 14 | g.Meta `orm:"table:stat_daily, do:true"` 15 | Id interface{} // 记录ID 16 | Anchor interface{} // 主播 17 | DisplayName interface{} // 展示名称 18 | DisplayType interface{} // 展示类型(1 歌曲 2吉他) 19 | DisplayDate interface{} // 展示时间 20 | Count interface{} // 次数 21 | Remark interface{} // 备注 22 | CreateBy interface{} // 创建者 23 | CreateTime *gtime.Time // 创建时间 24 | UpdateBy interface{} // 更新者 25 | UpdateTime *gtime.Time // 更新时间 26 | Action interface{} // 标识:0 新增 1 修改 2 删除 27 | } 28 | -------------------------------------------------------------------------------- /internal/app/live/model/entity/download_record.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package entity 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/os/gtime" 9 | ) 10 | 11 | // DownloadRecord is the golang structure for table download_record. 12 | type DownloadRecord struct { 13 | Id int64 `json:"id" orm:"id" description:"主键 ID"` 14 | Title string `json:"title" orm:"title" description:"任务名称"` 15 | TaskId string `json:"taskId" orm:"task_id" description:"任务 ID"` 16 | Status string `json:"status" orm:"status" description:"任务状态"` 17 | Output string `json:"output" orm:"output" description:"输出路径"` 18 | ErrorMsg string `json:"errorMsg" orm:"error_msg" description:"错误信息"` 19 | StartTime *gtime.Time `json:"startTime" orm:"start_time" description:"开始时间"` 20 | UpdateTime *gtime.Time `json:"updateTime" orm:"update_time" description:"结束时间"` 21 | } 22 | -------------------------------------------------------------------------------- /internal/app/live/model/entity/live_cookie.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package entity 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/os/gtime" 9 | ) 10 | 11 | // LiveCookie is the golang structure for table live_cookie. 12 | type LiveCookie struct { 13 | Id int `json:"id" orm:"id" description:"ID"` 14 | Platform string `json:"platform" orm:"platform" description:"平台"` 15 | Cookie string `json:"cookie" orm:"cookie" description:"cookie"` 16 | Remark string `json:"remark" orm:"remark" description:"备注"` 17 | CreateTime *gtime.Time `json:"createTime" orm:"create_time" description:"创建时间"` 18 | ActionTime *gtime.Time `json:"actionTime" orm:"action_time" description:"更新时间"` 19 | } 20 | -------------------------------------------------------------------------------- /internal/app/live/model/entity/live_history.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package entity 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/os/gtime" 9 | ) 10 | 11 | // LiveHistory is the golang structure for table live_history. 12 | type LiveHistory struct { 13 | Id int `json:"id" orm:"id" description:""` 14 | LiveId int `json:"liveId" orm:"live_id" description:"直播ID"` 15 | StartTime *gtime.Time `json:"startTime" orm:"start_time" description:"直播开始时间"` 16 | EndTime *gtime.Time `json:"endTime" orm:"end_time" description:"直播结束时间"` 17 | Duration float64 `json:"duration" orm:"duration" description:"直播时长"` 18 | } 19 | -------------------------------------------------------------------------------- /internal/app/live/model/entity/room_info.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package entity 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/os/gtime" 9 | ) 10 | 11 | // RoomInfo is the golang structure for table room_info. 12 | type RoomInfo struct { 13 | Id int `json:"id" orm:"id" description:"房间信息 ID"` 14 | LiveId int `json:"liveId" orm:"live_id" description:"房间 ID"` 15 | RoomName string `json:"roomName" orm:"room_name" description:"房间名称"` 16 | Anchor string `json:"anchor" orm:"anchor" description:"主播"` 17 | Platform string `json:"platform" orm:"platform" description:"直播平台"` 18 | Status int `json:"status" orm:"status" description:"状态"` 19 | CreateBy string `json:"createBy" orm:"create_by" description:"创建者"` 20 | CreateTime *gtime.Time `json:"createTime" orm:"create_time" description:"创建时间"` 21 | ActionTime *gtime.Time `json:"actionTime" orm:"action_time" description:"修改时间"` 22 | } 23 | -------------------------------------------------------------------------------- /internal/app/live/model/file_info.go: -------------------------------------------------------------------------------- 1 | package model 2 | 3 | type FileInfo struct { 4 | Filename string `json:"filename"` 5 | Size int64 `json:"size"` 6 | IsFolder bool `json:"isFolder"` 7 | LastModified int64 `json:"lastModified"` 8 | } 9 | -------------------------------------------------------------------------------- /internal/app/live/model/live_history.go: -------------------------------------------------------------------------------- 1 | package model 2 | 3 | import "github.com/gogf/gf/os/gtime" 4 | 5 | type LiveHistory struct { 6 | Id int64 `json:"id"` 7 | LiveId int64 `json:"liveId" description:"直播ID"` 8 | Anchor string `json:"anchor" description:"主播名称"` 9 | StartTime *gtime.Time `json:"startTime" description:"开始时间"` 10 | EndTime *gtime.Time `json:"endTime" description:"结束时间"` 11 | Duration float64 `json:"duration" description:"时长"` 12 | } 13 | -------------------------------------------------------------------------------- /internal/app/live/model/room_info.go: -------------------------------------------------------------------------------- 1 | package model 2 | 3 | import "github.com/shichen437/live-dog/internal/app/live/model/entity" 4 | 5 | type RoomInfo struct { 6 | *entity.RoomInfo 7 | Recording bool `json:"recording" description:"录制状态"` 8 | } 9 | -------------------------------------------------------------------------------- /internal/app/live/model/stat_daily.go: -------------------------------------------------------------------------------- 1 | package model 2 | 3 | import "github.com/shichen437/live-dog/internal/app/live/model/entity" 4 | 5 | type StatDailyRes struct { 6 | *entity.StatDaily 7 | } 8 | 9 | type StatDailyList struct { 10 | *entity.StatDaily 11 | } 12 | -------------------------------------------------------------------------------- /internal/app/live/service/file_manage.go: -------------------------------------------------------------------------------- 1 | // ================================================================================ 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // You can delete these comments if you wish manually maintain this interface file. 4 | // ================================================================================ 5 | 6 | package service 7 | 8 | import ( 9 | "context" 10 | 11 | v1 "github.com/shichen437/live-dog/api/v1/live" 12 | ) 13 | 14 | type ( 15 | IFileManage interface { 16 | List(ctx context.Context, req *v1.GetFileInfoListReq) (res *v1.GetFileInfoListRes, err error) 17 | Delete(ctx context.Context, req *v1.DeleteFileInfoReq) (res *v1.DeleteFileInfoRes, err error) 18 | Play(ctx context.Context, req *v1.GetFilePlayReq) (res *v1.GetFilePlayRes, err error) 19 | } 20 | ) 21 | 22 | var ( 23 | localFileManage IFileManage 24 | ) 25 | 26 | func FileManage() IFileManage { 27 | if localFileManage == nil { 28 | panic("implement not found for interface IFileManage, forgot register?") 29 | } 30 | return localFileManage 31 | } 32 | 33 | func RegisterFileManage(i IFileManage) { 34 | localFileManage = i 35 | } 36 | -------------------------------------------------------------------------------- /internal/app/monitor/controller/oper_log.go: -------------------------------------------------------------------------------- 1 | package monitor 2 | 3 | import ( 4 | "context" 5 | 6 | v1 "github.com/shichen437/live-dog/api/v1/monitor" 7 | "github.com/shichen437/live-dog/internal/app/monitor/service" 8 | ) 9 | 10 | type operLogController struct { 11 | } 12 | 13 | var OperLog = operLogController{} 14 | 15 | func (o *operLogController) GetOperLogList(ctx context.Context, req *v1.GetOperLogListReq) (res *v1.GetOperLogListRes, err error) { 16 | res, err = service.SysOperLog().List(ctx, req) 17 | return 18 | } 19 | -------------------------------------------------------------------------------- /internal/app/monitor/controller/server.go: -------------------------------------------------------------------------------- 1 | package monitor 2 | 3 | import ( 4 | "context" 5 | 6 | v1 "github.com/shichen437/live-dog/api/v1/monitor" 7 | "github.com/shichen437/live-dog/internal/app/monitor/service" 8 | ) 9 | 10 | type serverController struct { 11 | } 12 | 13 | var ServerInfo = serverController{} 14 | 15 | func (o *serverController) GetServerInfo(ctx context.Context, req *v1.GetServerInfoReq) (res *v1.GetServerInfoRes, err error) { 16 | return service.ServerInfo().GetServerInfo(ctx, req) 17 | } 18 | -------------------------------------------------------------------------------- /internal/app/monitor/dao/sys_job.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/monitor/dao/internal" 9 | ) 10 | 11 | // internalSysJobDao is internal type for wrapping internal DAO implements. 12 | type internalSysJobDao = *internal.SysJobDao 13 | 14 | // sysJobDao is the data access object for table sys_job. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type sysJobDao struct { 17 | internalSysJobDao 18 | } 19 | 20 | var ( 21 | // SysJob is globally public accessible object for table sys_job operations. 22 | SysJob = sysJobDao{ 23 | internal.NewSysJobDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/monitor/dao/sys_job_log.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/monitor/dao/internal" 9 | ) 10 | 11 | // internalSysJobLogDao is internal type for wrapping internal DAO implements. 12 | type internalSysJobLogDao = *internal.SysJobLogDao 13 | 14 | // sysJobLogDao is the data access object for table sys_job_log. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type sysJobLogDao struct { 17 | internalSysJobLogDao 18 | } 19 | 20 | var ( 21 | // SysJobLog is globally public accessible object for table sys_job_log operations. 22 | SysJobLog = sysJobLogDao{ 23 | internal.NewSysJobLogDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/monitor/dao/sys_oper_log.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. 3 | // ================================================================================= 4 | 5 | package dao 6 | 7 | import ( 8 | "github.com/shichen437/live-dog/internal/app/monitor/dao/internal" 9 | ) 10 | 11 | // internalSysOperLogDao is internal type for wrapping internal DAO implements. 12 | type internalSysOperLogDao = *internal.SysOperLogDao 13 | 14 | // sysOperLogDao is the data access object for table sys_oper_log. 15 | // You can define custom methods on it to extend its functionality as you wish. 16 | type sysOperLogDao struct { 17 | internalSysOperLogDao 18 | } 19 | 20 | var ( 21 | // SysOperLog is globally public accessible object for table sys_oper_log operations. 22 | SysOperLog = sysOperLogDao{ 23 | internal.NewSysOperLogDao(), 24 | } 25 | ) 26 | 27 | // Fill with you ideas below. 28 | -------------------------------------------------------------------------------- /internal/app/monitor/logic/logic.go: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ========================================================================== 4 | 5 | package logic 6 | 7 | import ( 8 | _ "github.com/shichen437/live-dog/internal/app/monitor/logic/server" 9 | _ "github.com/shichen437/live-dog/internal/app/monitor/logic/sys_job" 10 | _ "github.com/shichen437/live-dog/internal/app/monitor/logic/sys_oper_log" 11 | ) 12 | -------------------------------------------------------------------------------- /internal/app/monitor/model/do/sys_job.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | "github.com/gogf/gf/v2/os/gtime" 10 | ) 11 | 12 | // SysJob is the golang structure of table sys_job for DAO operations like Where/Data. 13 | type SysJob struct { 14 | g.Meta `orm:"table:sys_job, do:true"` 15 | JobId interface{} // 任务ID 16 | JobName interface{} // 任务名称 17 | InvokeTarget interface{} // 调用目标字符串 18 | CronExpression interface{} // cron执行表达式 19 | MisfirePolicy interface{} // 计划执行错误策略(1立即执行 2执行一次 3放弃执行) 20 | Concurrent interface{} // 是否并发执行(0允许 1禁止) 21 | Status interface{} // 状态(0正常 1暂停) 22 | Type interface{} // 任务类型:0 系统 23 | JobParams interface{} // 自定义任务参数 24 | CreateBy interface{} // 创建者 25 | CreateTime *gtime.Time // 创建时间 26 | UpdateBy interface{} // 更新者 27 | UpdateTime *gtime.Time // 更新时间 28 | Remark interface{} // 备注信息 29 | } 30 | -------------------------------------------------------------------------------- /internal/app/monitor/model/do/sys_job_log.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package do 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/frame/g" 9 | "github.com/gogf/gf/v2/os/gtime" 10 | ) 11 | 12 | // SysJobLog is the golang structure of table sys_job_log for DAO operations like Where/Data. 13 | type SysJobLog struct { 14 | g.Meta `orm:"table:sys_job_log, do:true"` 15 | JobLogId interface{} // 任务日志ID 16 | JobId interface{} // 对应任务 ID 17 | JobName interface{} // 任务名称 18 | InvokeTarget interface{} // 调用目标字符串 19 | JobMessage interface{} // 日志信息 20 | Status interface{} // 执行状态(0正常 1失败) 21 | ExceptionInfo interface{} // 异常信息 22 | CreateTime *gtime.Time // 创建时间 23 | } 24 | -------------------------------------------------------------------------------- /internal/app/monitor/model/entity/sys_job_log.go: -------------------------------------------------------------------------------- 1 | // ================================================================================= 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // ================================================================================= 4 | 5 | package entity 6 | 7 | import ( 8 | "github.com/gogf/gf/v2/os/gtime" 9 | ) 10 | 11 | // SysJobLog is the golang structure for table sys_job_log. 12 | type SysJobLog struct { 13 | JobLogId int64 `json:"jobLogId" orm:"job_log_id" description:"任务日志ID"` 14 | JobId int64 `json:"jobId" orm:"job_id" description:"对应任务 ID"` 15 | JobName string `json:"jobName" orm:"job_name" description:"任务名称"` 16 | InvokeTarget string `json:"invokeTarget" orm:"invoke_target" description:"调用目标字符串"` 17 | JobMessage string `json:"jobMessage" orm:"job_message" description:"日志信息"` 18 | Status string `json:"status" orm:"status" description:"执行状态(0正常 1失败)"` 19 | ExceptionInfo string `json:"exceptionInfo" orm:"exception_info" description:"异常信息"` 20 | CreateTime *gtime.Time `json:"createTime" orm:"create_time" description:"创建时间"` 21 | } 22 | -------------------------------------------------------------------------------- /internal/app/monitor/model/server_info.go: -------------------------------------------------------------------------------- 1 | package model 2 | 3 | type CpuInfo struct { 4 | CPU int32 `json:"cpu"` 5 | Cores int32 `json:"cores"` 6 | ModelName string `json:"modelName"` 7 | Mhz float64 `json:"mhz"` 8 | Percent float64 `json:"percent"` 9 | } 10 | 11 | type MemoryInfo struct { 12 | Total uint64 `json:"total"` 13 | Used uint64 `json:"used"` 14 | Available uint64 `json:"available"` 15 | UsedPercent float64 `json:"usedPercent"` 16 | } 17 | 18 | type SystemInfo struct { 19 | Hostname string `json:"hostname"` 20 | BootTime uint64 `json:"bootTime"` 21 | OS string `json:"os"` 22 | KernelArch string `json:"kernelArch"` 23 | } 24 | 25 | type DiskInfo struct { 26 | Path string `json:"path"` 27 | Fstype string `json:"fstype"` 28 | Total uint64 `json:"total"` 29 | Free uint64 `json:"free"` 30 | Used uint64 `json:"used"` 31 | UsedPercent float64 `json:"usedPercent"` 32 | } 33 | -------------------------------------------------------------------------------- /internal/app/monitor/service/server.go: -------------------------------------------------------------------------------- 1 | // ================================================================================ 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // You can delete these comments if you wish manually maintain this interface file. 4 | // ================================================================================ 5 | 6 | package service 7 | 8 | import ( 9 | "context" 10 | 11 | v1 "github.com/shichen437/live-dog/api/v1/monitor" 12 | ) 13 | 14 | type ( 15 | IServerInfo interface { 16 | GetServerInfo(ctx context.Context, req *v1.GetServerInfoReq) (res *v1.GetServerInfoRes, err error) 17 | } 18 | ) 19 | 20 | var ( 21 | localServerInfo IServerInfo 22 | ) 23 | 24 | func ServerInfo() IServerInfo { 25 | if localServerInfo == nil { 26 | panic("implement not found for interface IServerInfo, forgot register?") 27 | } 28 | return localServerInfo 29 | } 30 | 31 | func RegisterServerInfo(i IServerInfo) { 32 | localServerInfo = i 33 | } 34 | -------------------------------------------------------------------------------- /internal/app/monitor/service/sys_oper_log.go: -------------------------------------------------------------------------------- 1 | // ================================================================================ 2 | // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 | // You can delete these comments if you wish manually maintain this interface file. 4 | // ================================================================================ 5 | 6 | package service 7 | 8 | import ( 9 | "context" 10 | 11 | v1 "github.com/shichen437/live-dog/api/v1/monitor" 12 | ) 13 | 14 | type ( 15 | ISysOperLog interface { 16 | List(ctx context.Context, req *v1.GetOperLogListReq) (result *v1.GetOperLogListRes, err error) 17 | } 18 | ) 19 | 20 | var ( 21 | localSysOperLog ISysOperLog 22 | ) 23 | 24 | func SysOperLog() ISysOperLog { 25 | if localSysOperLog == nil { 26 | panic("implement not found for interface ISysOperLog, forgot register?") 27 | } 28 | return localSysOperLog 29 | } 30 | 31 | func RegisterSysOperLog(i ISysOperLog) { 32 | localSysOperLog = i 33 | } 34 | -------------------------------------------------------------------------------- /internal/cmd/cmd_init.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | _ "github.com/shichen437/live-dog/internal/app/admin/logic" 5 | _ "github.com/shichen437/live-dog/internal/app/common/logic" 6 | _ "github.com/shichen437/live-dog/internal/app/live/logic" 7 | _ "github.com/shichen437/live-dog/internal/app/monitor/logic" 8 | 9 | _ "github.com/shichen437/live-dog/internal/pkg/lives/bilibili" 10 | _ "github.com/shichen437/live-dog/internal/pkg/lives/douyin" 11 | 12 | _ "github.com/shichen437/live-dog/internal/pkg/message_push/email" 13 | _ "github.com/shichen437/live-dog/internal/pkg/message_push/gotify" 14 | 15 | _ "github.com/shichen437/live-dog/internal/pkg/media_parser/bilibili" 16 | _ "github.com/shichen437/live-dog/internal/pkg/media_parser/douyin" 17 | 18 | _ "github.com/shichen437/live-dog/internal/pkg/download/bilibili" 19 | _ "github.com/shichen437/live-dog/internal/pkg/download/douyin" 20 | ) 21 | -------------------------------------------------------------------------------- /internal/cmd/cmd_job.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "github.com/gogf/gf/v2/frame/g" 5 | "github.com/gogf/gf/v2/os/gctx" 6 | "github.com/shichen437/live-dog/internal/app/monitor/service" 7 | "github.com/shichen437/live-dog/internal/pkg/crons" 8 | ) 9 | 10 | func JobInit() { 11 | g.Log().Info(gctx.GetInitCtx(), "job monitor start!") 12 | 13 | jobs, err := service.SysJob().ListAll4Init(gctx.New()) 14 | if err != nil { 15 | g.Log().Error(gctx.GetInitCtx(), "job monitor start error!", err) 16 | return 17 | } 18 | for _, job := range jobs { 19 | crons.AddSystemJob(job.JobId) 20 | } 21 | 22 | g.Log().Info(gctx.GetInitCtx(), "job monitor shutdown!") 23 | } 24 | -------------------------------------------------------------------------------- /internal/cmd/cmd_rod.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "github.com/gogf/gf/v2/frame/g" 5 | "github.com/gogf/gf/v2/os/gctx" 6 | "github.com/shichen437/live-dog/internal/pkg/utils" 7 | ) 8 | 9 | func InitBrowserPool() { 10 | g.Log().Info(gctx.New(), "初始化浏览器池") 11 | utils.InitBrowserPool(1) 12 | g.Log().Info(gctx.New(), "初始化浏览器池完成") 13 | } 14 | -------------------------------------------------------------------------------- /internal/drivers/drivers.go: -------------------------------------------------------------------------------- 1 | package drivers 2 | 3 | import ( 4 | "github.com/shichen437/live-dog/internal/pkg/utils" 5 | 6 | "github.com/gogf/gf/v2/frame/g" 7 | "github.com/gogf/gf/v2/os/gctx" 8 | ) 9 | 10 | func init() { 11 | if !utils.IsDocker() { 12 | return 13 | } 14 | g.Log().Info(gctx.GetInitCtx(), "init docker environment") 15 | InitDockerDatabaseConfig() 16 | g.Log().Info(gctx.GetInitCtx(), "init docker environment finished") 17 | } 18 | -------------------------------------------------------------------------------- /internal/drivers/mysql.go: -------------------------------------------------------------------------------- 1 | package drivers 2 | 3 | import ( 4 | "time" 5 | 6 | "github.com/shichen437/live-dog/internal/pkg/utils" 7 | 8 | "github.com/gogf/gf/v2/database/gdb" 9 | ) 10 | 11 | func InitDockerDatabaseConfig() { 12 | n := gdb.ConfigNode{} 13 | n.Link = utils.DbLink 14 | n.Debug = false 15 | n.DryRun = false 16 | n.MaxIdleConnCount = 10 17 | n.MaxOpenConnCount = 100 18 | n.MaxConnLifeTime = time.Duration(30) * time.Second 19 | gdb.AddConfigNode("default", n) 20 | } 21 | -------------------------------------------------------------------------------- /internal/pkg/download/bilibili/bilibili_consts.go: -------------------------------------------------------------------------------- 1 | package bilibili 2 | 3 | var ( 4 | platform = "bilibili" 5 | randomStr = "abcdefghijklmnopqrstuvwxyz0123456789" 6 | userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.51" 7 | ) 8 | -------------------------------------------------------------------------------- /internal/pkg/download/douyin/douyin_consts.go: -------------------------------------------------------------------------------- 1 | package douyin 2 | 3 | var ( 4 | platform = "douyin" 5 | randomStr = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" 6 | ) 7 | -------------------------------------------------------------------------------- /internal/pkg/events/events.go: -------------------------------------------------------------------------------- 1 | package events 2 | 3 | type Event struct { 4 | Type EventType 5 | Object interface{} 6 | } 7 | 8 | type EventType string 9 | 10 | func NewEvent(eventType EventType, object interface{}) *Event { 11 | return &Event{eventType, object} 12 | } 13 | 14 | type EventHandler func(event *Event) 15 | 16 | type EventListener struct { 17 | Handler EventHandler 18 | } 19 | 20 | func NewEventListener(handler EventHandler) *EventListener { 21 | return &EventListener{handler} 22 | } 23 | -------------------------------------------------------------------------------- /internal/pkg/interfaces/interfaces.go: -------------------------------------------------------------------------------- 1 | package interfaces 2 | 3 | import ( 4 | "context" 5 | ) 6 | 7 | type Module interface { 8 | Start(ctx context.Context) error 9 | Close(ctx context.Context) 10 | } 11 | -------------------------------------------------------------------------------- /internal/pkg/listeners/live_status.go: -------------------------------------------------------------------------------- 1 | package listeners 2 | 3 | const ( 4 | statusToTrueEvt uint8 = 1 << iota 5 | statusToFalseEvt 6 | nameChangedEvt 7 | ) 8 | 9 | type status struct { 10 | roomName string 11 | anchor string 12 | roomStatus bool 13 | } 14 | 15 | func (s status) Diff(that status) (res uint8) { 16 | if !s.roomStatus && that.roomStatus { 17 | res |= statusToTrueEvt 18 | } 19 | if s.roomStatus && !that.roomStatus { 20 | res |= statusToFalseEvt 21 | } 22 | return res 23 | } 24 | -------------------------------------------------------------------------------- /internal/pkg/lives/lives.go: -------------------------------------------------------------------------------- 1 | package lives 2 | 3 | import ( 4 | "net/url" 5 | "sync" 6 | 7 | "github.com/gogf/gf/v2/errors/gerror" 8 | ) 9 | 10 | var ( 11 | builders sync.Map 12 | ) 13 | 14 | type Live interface { 15 | GetInfo() (*RoomInfo, error) 16 | GetPlatform() string 17 | GetLiveId() int 18 | GetRefer() string 19 | } 20 | 21 | func Register(domain string, b Builder) { 22 | builders.Store(domain, b) 23 | } 24 | 25 | type Builder interface { 26 | Build(*url.URL, int) (Live, error) 27 | } 28 | 29 | func getBuilder(domain string) (Builder, error) { 30 | builder, ok := builders.Load(domain) 31 | if !ok { 32 | return nil, gerror.New("unknown domain") 33 | } 34 | return builder.(Builder), nil 35 | } 36 | 37 | func New(url *url.URL, liveId int) (live Live, err error) { 38 | builder, err := getBuilder(url.Hostname()) 39 | if err != nil { 40 | return nil, gerror.New("not support this domain" + url.Hostname()) 41 | } 42 | live, err = builder.Build(url, liveId) 43 | if err != nil { 44 | return nil, gerror.New("not support this domain" + url.Hostname()) 45 | } 46 | return 47 | } 48 | -------------------------------------------------------------------------------- /internal/pkg/media_parser/bilibili/bilibili_consts.go: -------------------------------------------------------------------------------- 1 | package bilibili 2 | 3 | import "github.com/gogf/gf/v2/frame/g" 4 | 5 | var ( 6 | platform = "bilibili" 7 | 8 | videoDetailPath = "https://api.bilibili.com/x/web-interface/view?" 9 | videoPlayUrl = "https://api.bilibili.com/x/player/playurl?" 10 | 11 | userProfileInfoUrl = "https://api.bilibili.com/x/space/wbi/acc/info?" 12 | userProfileStatUrl = "https://api.bilibili.com/x/relation/stat?" 13 | 14 | bilibiliHeaders = g.MapStrStr{ 15 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36", 16 | "Referer": "https://space.bilibili.com/", 17 | "Origin": "https://www.bilibili.com", 18 | "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6", 19 | } 20 | 21 | bilibiliCodecMap = g.MapIntStr{ 22 | 7: "avc", 23 | 12: "hevc", 24 | 13: "av1", 25 | } 26 | ) 27 | -------------------------------------------------------------------------------- /internal/pkg/media_parser/bilibili/bilibili_models.go: -------------------------------------------------------------------------------- 1 | package bilibili 2 | 3 | type BilibiliVideoDetail struct { 4 | Aid string 5 | Author string 6 | AuthorUid string 7 | Cid string 8 | Desc string 9 | VideoCover string 10 | } 11 | 12 | type BilibiliMediaData struct { 13 | Audios []*BilibiliMediaDetail `json:"audios"` 14 | Videos []*BilibiliMediaDetail `json:"videos"` 15 | } 16 | 17 | type BilibiliMediaDetail struct { 18 | Codec string `json:"codec"` 19 | Height int `json:"height"` 20 | Mirrors []string `json:"mirrors"` 21 | Quality int `json:"quality"` 22 | QualityDesc string `json:"quality_desc"` 23 | Url string `json:"url"` 24 | Width int `json:"width"` 25 | } 26 | -------------------------------------------------------------------------------- /internal/pkg/media_parser/douyin/douyin_consts.go: -------------------------------------------------------------------------------- 1 | package douyin 2 | 3 | var ( 4 | platform = "douyin" 5 | domain = "https://www.douyin.com" 6 | 7 | randomCookieChars = "1234567890abcdef" 8 | 9 | videoDetailPath = "https://www.iesdouyin.com/share/video/" 10 | 11 | douyinHeaders = map[string]string{ 12 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36", 13 | "Referer": "https://www.douyin.com", 14 | "Accept-Language": "zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2", 15 | } 16 | ) 17 | -------------------------------------------------------------------------------- /internal/pkg/media_parser/parser_test.go: -------------------------------------------------------------------------------- 1 | package media_parser_test 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/gogf/gf/v2/os/gctx" 7 | "github.com/shichen437/live-dog/internal/pkg/media_parser" 8 | _ "github.com/shichen437/live-dog/internal/pkg/media_parser/douyin" 9 | ) 10 | 11 | func TestDownload(t *testing.T) { 12 | loader, err := media_parser.NewParser("0.28 01/02 baa:/ B@t.eO 新年新气象。2025一切顺利!# 诸事顺利 # 一切都在慢慢变好 https://v.douyin.com/i5Wk7anF/ 复制此链接,打开Dou音搜索,直接观看视频!") 13 | if err != nil { 14 | t.Error(err) 15 | } 16 | loader.ParseURL(gctx.New()) 17 | } 18 | -------------------------------------------------------------------------------- /internal/pkg/message_push/gotify/gotify_test.go: -------------------------------------------------------------------------------- 1 | package gotify_test 2 | 3 | import ( 4 | "context" 5 | "testing" 6 | 7 | "github.com/gogf/gf/v2/frame/g" 8 | ) 9 | 10 | func TestPush(t *testing.T) { 11 | url := "http://192.168.3.16:36073/message?token=AqgRo24hjfzUqtp" 12 | c := g.Client() 13 | data := g.Map{ 14 | "title": "开播通知", 15 | "message": "你关注的主播已开播", 16 | } 17 | c.Post(context.Background(), url, data) 18 | } 19 | -------------------------------------------------------------------------------- /internal/pkg/params/goja.go: -------------------------------------------------------------------------------- 1 | package params 2 | 3 | import ( 4 | "sync" 5 | 6 | "github.com/dop251/goja" 7 | ) 8 | 9 | var vmPool = sync.Pool{ 10 | New: func() interface{} { 11 | return goja.New() 12 | }, 13 | } 14 | -------------------------------------------------------------------------------- /internal/pkg/parser/parser.go: -------------------------------------------------------------------------------- 1 | package parser 2 | 3 | import ( 4 | "context" 5 | "errors" 6 | 7 | "github.com/shichen437/live-dog/internal/pkg/lives" 8 | ) 9 | 10 | type Builder interface { 11 | Build(pm map[string]string) (Parser, error) 12 | } 13 | 14 | type Parser interface { 15 | ParseLiveStream(ctx context.Context, streamInfo *lives.StreamUrlInfo, file, refer string) error 16 | Stop() error 17 | } 18 | 19 | type StatusParser interface { 20 | Parser 21 | Status() (map[string]string, error) 22 | } 23 | 24 | var m = make(map[string]Builder) 25 | 26 | func Register(name string, b Builder) { 27 | m[name] = b 28 | } 29 | 30 | func New(name string, pm map[string]string) (Parser, error) { 31 | builder, ok := m[name] 32 | if !ok { 33 | return nil, errors.New("unknown parser") 34 | } 35 | return builder.Build(pm) 36 | } 37 | -------------------------------------------------------------------------------- /internal/pkg/utils/context.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/shichen437/live-dog/internal/pkg/lives" 7 | 8 | "github.com/gogf/gf/v2/os/gctx" 9 | ) 10 | 11 | type key int 12 | 13 | const ( 14 | Key key = 102723 15 | ) 16 | 17 | func GetGlobal(context context.Context) *lives.GLiveModel { 18 | if glm, ok := context.Value(Key).(*lives.GLiveModel); ok { 19 | return glm 20 | } 21 | return nil 22 | } 23 | 24 | func GetGlobalDefault() *lives.GLiveModel { 25 | return GetGlobal(gctx.GetInitCtx()) 26 | } 27 | -------------------------------------------------------------------------------- /internal/pkg/utils/env.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "strings" 5 | 6 | "github.com/gogf/gf/v2/frame/g" 7 | "github.com/gogf/gf/v2/os/gctx" 8 | "github.com/gogf/gf/v2/os/genv" 9 | ) 10 | 11 | const ( 12 | E_DB_LINK = "DATABASE_DEFAULT_LINK" 13 | E_PROJECT_OUTPUT = "PROJECT_OUTPUT" 14 | E_PROJECT_UPLOAD = "PROJECT_UPLOAD" 15 | E_PROJECT_SM4KEY = "PROJECT_SM4KEY" 16 | ) 17 | 18 | var ( 19 | DbLink = getEnvWithDefault(E_DB_LINK) 20 | Output = getEnvWithDefault(E_PROJECT_OUTPUT) 21 | Upload = getEnvWithDefault(E_PROJECT_UPLOAD) 22 | Sm4Key = getEnvWithDefault(E_PROJECT_SM4KEY) 23 | ) 24 | 25 | func getEnvWithDefault(envKey string) string { 26 | if envStr := genv.Get(envKey); envStr != nil { 27 | return envStr.String() 28 | } 29 | if IsDocker() { 30 | return "" 31 | } 32 | r, _ := g.Cfg().Get(gctx.GetInitCtx(), convertEnvToConfig(envKey)) 33 | return r.String() 34 | } 35 | 36 | func convertEnvToConfig(env string) string { 37 | return strings.ToLower(strings.ReplaceAll(env, "_", ".")) 38 | } 39 | -------------------------------------------------------------------------------- /internal/pkg/utils/err.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/gogf/gf/v2/frame/g" 7 | ) 8 | 9 | func WriteErrLog(ctx context.Context, err error, msg ...string) { 10 | if !g.IsNil(err) { 11 | g.Log().Error(ctx, err.Error()) 12 | if len(msg) > 0 { 13 | panic(msg[0]) 14 | } else { 15 | panic(err.Error()) 16 | } 17 | } 18 | } 19 | 20 | func WriteErrLogT(ctx context.Context, err error, msg ...string) { 21 | if !g.IsNil(err) { 22 | g.Log().Error(ctx, err.Error()) 23 | if len(msg) > 0 { 24 | panic(T(ctx, msg[0])) 25 | } else { 26 | panic(err.Error()) 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /internal/pkg/utils/utils_test.go: -------------------------------------------------------------------------------- 1 | package utils_test 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/gogf/gf/os/gctx" 7 | "github.com/gogf/gf/v2/frame/g" 8 | "github.com/shichen437/live-dog/internal/pkg/utils" 9 | ) 10 | 11 | func TestPush(t *testing.T) { 12 | ok := utils.IsTimeRange("21:00", "00:00") 13 | g.Log().Info(gctx.New(), ok) 14 | } 15 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | _ "github.com/shichen437/live-dog/internal/drivers" 5 | 6 | _ "github.com/gogf/gf/contrib/drivers/mysql/v2" 7 | "github.com/gogf/gf/v2/frame/g" 8 | "github.com/gogf/gf/v2/os/gctx" 9 | 10 | "github.com/shichen437/live-dog/internal/cmd" 11 | ) 12 | 13 | func main() { 14 | if err := cmd.Migrate(); err != nil { 15 | g.Log().Fatalf(gctx.GetInitCtx(), "Start Failed: %+v", err) 16 | } 17 | cmd.Main.Run(gctx.GetInitCtx()) 18 | } 19 | -------------------------------------------------------------------------------- /manifest/config/config.yaml.example: -------------------------------------------------------------------------------- 1 | gf: 2 | mode: develop 3 | 4 | server: 5 | address: ":3290" 6 | openapiPath: "/api.json" 7 | swaggerPath: "/swagger" 8 | dumpRouterMap: true 9 | routeOverWrite: true 10 | accessLogEnabled: true 11 | 12 | project: 13 | sm4key: "abcdefghijklmnopqrstuvwxyz123456" #sm4 加密key, 需要保证 32 位 14 | language: "zh-CN" 15 | output: "./resource/file" 16 | upload: "./resource/file/upload" 17 | 18 | logger: 19 | path: "resource/log/system/" 20 | prefix: "" 21 | file: "{Y-m-d}.log" 22 | level: "all" 23 | stdout: true 24 | 25 | # Database. 26 | database: 27 | logger: 28 | level: "all" 29 | stdout: true 30 | Path: "resource/log/sql" 31 | default: 32 | link: "mysql:root:123456@tcp(127.0.0.1:3306)/database?charset=utf8mb4&parseTime=true&loc=Local" 33 | debug: true 34 | charset: "utf8mb4" #数据库编码 35 | dryRun: false #空跑 36 | maxIdle: 10 #连接池最大闲置的连接数 37 | maxOpen: 10 #连接池最大打开的连接数 38 | maxLifetime: "30s" #(单位秒)连接对象可重复使用的时间长度 39 | -------------------------------------------------------------------------------- /manifest/config/config_docker.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | address: ":3290" 3 | openapiPath: "/api.json" 4 | swaggerPath: "/swagger" 5 | dumpRouterMap: true 6 | routeOverWrite: true 7 | accessLogEnabled: true 8 | 9 | project: 10 | platform: "docker" 11 | language: "zh-CN" 12 | 13 | logger: 14 | path: "resource/log/system/" 15 | prefix: "" 16 | file: "{Y-m-d}.log" 17 | level: "all" 18 | stdout: true 19 | 20 | # Database. 21 | database: 22 | logger: 23 | level: "all" 24 | stdout: true 25 | Path: "resource/log/sql" 26 | 27 | -------------------------------------------------------------------------------- /manifest/docker/docker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This shell is executed before docker build. 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /manifest/docker/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec sh -c /LiveDog/main & nginx -g 'daemon off;' 4 | -------------------------------------------------------------------------------- /manifest/migrate/6_parseImages.up.sql: -------------------------------------------------------------------------------- 1 | SET FOREIGN_KEY_CHECKS = 0; 2 | 3 | ALTER TABLE `media_parse` 4 | ADD COLUMN `images_url` text NULL COMMENT '图集 url' AFTER `music_cover_url`, 5 | ADD COLUMN `images_cover_url` varchar(1000) NULL COMMENT '图集封面 url' AFTER `images_url`; 6 | 7 | SET FOREIGN_KEY_CHECKS = 1; -------------------------------------------------------------------------------- /resource/assets/profile/profile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shichen437/live-dog/07775308306dcd19c22890d825b0bddf2bb65f54/resource/assets/profile/profile.jpg -------------------------------------------------------------------------------- /resource/assets/screenshots/followerTrend.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shichen437/live-dog/07775308306dcd19c22890d825b0bddf2bb65f54/resource/assets/screenshots/followerTrend.jpg -------------------------------------------------------------------------------- /resource/assets/screenshots/index.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shichen437/live-dog/07775308306dcd19c22890d825b0bddf2bb65f54/resource/assets/screenshots/index.jpg -------------------------------------------------------------------------------- /resource/assets/screenshots/mediaParse.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shichen437/live-dog/07775308306dcd19c22890d825b0bddf2bb65f54/resource/assets/screenshots/mediaParse.jpg -------------------------------------------------------------------------------- /resource/assets/screenshots/roomAdd.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shichen437/live-dog/07775308306dcd19c22890d825b0bddf2bb65f54/resource/assets/screenshots/roomAdd.jpg -------------------------------------------------------------------------------- /web/.env.development: -------------------------------------------------------------------------------- 1 | # 页面标题 2 | VITE_APP_TITLE = LiveDog 监控平台 3 | 4 | # 开发环境配置 5 | VITE_APP_ENV = 'development' 6 | 7 | # LiveDog管理系统/开发环境 8 | VITE_APP_BASE_API = '/dev-api' 9 | 10 | VITE_APP_VERSION = '0.0.9' -------------------------------------------------------------------------------- /web/.env.production: -------------------------------------------------------------------------------- 1 | # 页面标题 2 | VITE_APP_TITLE = LiveDog 监控平台 3 | 4 | # 生产环境配置 5 | VITE_APP_ENV = 'production' 6 | 7 | # LiveDog管理系统/生产环境 8 | VITE_APP_BASE_API = '/prod-api' 9 | 10 | # 是否在打包时开启压缩,支持 gzip 和 brotli 11 | VITE_BUILD_COMPRESS = gzip 12 | 13 | VITE_APP_VERSION = '0.0.9' -------------------------------------------------------------------------------- /web/.env.staging: -------------------------------------------------------------------------------- 1 | # 页面标题 2 | VITE_APP_TITLE = LiveDog 监控平台 3 | 4 | # 生产环境配置 5 | VITE_APP_ENV = 'staging' 6 | 7 | # LiveDog管理系统/生产环境 8 | VITE_APP_BASE_API = '/stage-api' 9 | 10 | # 是否在打包时开启压缩,支持 gzip 和 brotli 11 | VITE_BUILD_COMPRESS = gzip 12 | 13 | VITE_APP_VERSION = '0.0.9' -------------------------------------------------------------------------------- /web/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | **/*.log 8 | 9 | tests/**/coverage/ 10 | tests/e2e/reports 11 | selenium-debug.log 12 | 13 | # Editor directories and files 14 | .idea 15 | .vscode 16 | *.suo 17 | *.ntvs* 18 | *.njsproj 19 | *.sln 20 | *.local 21 | 22 | package-lock.json 23 | yarn.lock 24 | -------------------------------------------------------------------------------- /web/nginx.conf: -------------------------------------------------------------------------------- 1 | user nginx; 2 | worker_processes auto; 3 | 4 | error_log /var/log/nginx/error.log warn; 5 | pid /var/run/nginx.pid; 6 | 7 | http { 8 | include /etc/nginx/mime.types; 9 | default_type application/octet-stream; 10 | 11 | server { 12 | listen 9876; 13 | # 前端应用的反向代理 14 | location / { 15 | root /usr/share/nginx/html; 16 | try_files $uri $uri/ /index.html; 17 | index index.html index.htm; 18 | } 19 | 20 | location /prod-api/{ 21 | proxy_pass http://localhost:3290/; 22 | proxy_set_header Host $host; 23 | proxy_set_header X-Real-IP $remote_addr; 24 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 25 | proxy_set_header X-Forwarded-Proto $scheme; 26 | } 27 | } 28 | } 29 | 30 | events { 31 | worker_connections 1024; 32 | } -------------------------------------------------------------------------------- /web/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shichen437/live-dog/07775308306dcd19c22890d825b0bddf2bb65f54/web/public/favicon.ico -------------------------------------------------------------------------------- /web/src/App.vue: -------------------------------------------------------------------------------- 1 | 2 |各平台解析的链接有不同的过期时间,解析后请尽快下载。
16 |