├── i18n
├── .gitkeep
└── zh-CN
│ ├── common.toml
│ └── app.toml
├── .gitattributes
├── web
├── src
│ ├── store
│ │ └── index.js
│ ├── components
│ │ ├── ParentView
│ │ │ └── index.vue
│ │ ├── IconSelect
│ │ │ └── requireIcons.js
│ │ ├── Git
│ │ │ └── index.vue
│ │ ├── SvgIcon
│ │ │ ├── svgicon.js
│ │ │ └── index.vue
│ │ ├── Screenfull
│ │ │ └── index.vue
│ │ └── iFrame
│ │ │ └── index.vue
│ ├── assets
│ │ ├── logo
│ │ │ └── logo.png
│ │ ├── 401_images
│ │ │ └── 401.gif
│ │ ├── 404_images
│ │ │ ├── 404.png
│ │ │ └── 404_cloud.png
│ │ ├── images
│ │ │ ├── profile.jpg
│ │ │ └── login-background.jpg
│ │ ├── icons
│ │ │ └── svg
│ │ │ │ ├── chart.svg
│ │ │ │ ├── size.svg
│ │ │ │ ├── link.svg
│ │ │ │ ├── guide.svg
│ │ │ │ ├── money.svg
│ │ │ │ ├── email.svg
│ │ │ │ ├── drag.svg
│ │ │ │ ├── documentation.svg
│ │ │ │ ├── fullscreen.svg
│ │ │ │ ├── download.svg
│ │ │ │ ├── user.svg
│ │ │ │ ├── lock.svg
│ │ │ │ ├── excel.svg
│ │ │ │ ├── example.svg
│ │ │ │ ├── fonts.svg
│ │ │ │ ├── exit-fullscreen.svg
│ │ │ │ ├── star.svg
│ │ │ │ ├── slider.svg
│ │ │ │ ├── table.svg
│ │ │ │ ├── search.svg
│ │ │ │ ├── education.svg
│ │ │ │ ├── tab.svg
│ │ │ │ ├── message.svg
│ │ │ │ ├── switch.svg
│ │ │ │ ├── theme.svg
│ │ │ │ ├── cookie.svg
│ │ │ │ ├── code.svg
│ │ │ │ ├── druid.svg
│ │ │ │ ├── peoples.svg
│ │ │ │ ├── input.svg
│ │ │ │ ├── server.svg
│ │ │ │ ├── textarea.svg
│ │ │ │ ├── time.svg
│ │ │ │ ├── edit.svg
│ │ │ │ ├── nested.svg
│ │ │ │ ├── row.svg
│ │ │ │ ├── monitor.svg
│ │ │ │ ├── tree-table.svg
│ │ │ │ ├── eye.svg
│ │ │ │ ├── build.svg
│ │ │ │ ├── clock-history.svg
│ │ │ │ ├── clipboard.svg
│ │ │ │ ├── list.svg
│ │ │ │ ├── icon.svg
│ │ │ │ ├── international.svg
│ │ │ │ ├── question.svg
│ │ │ │ ├── wechat.svg
│ │ │ │ ├── skill.svg
│ │ │ │ ├── people.svg
│ │ │ │ └── post.svg
│ │ └── styles
│ │ │ └── transition.scss
│ ├── utils
│ │ ├── errorCode.js
│ │ ├── auth.js
│ │ ├── dynamicTitle.js
│ │ └── dict.js
│ ├── api
│ │ ├── menu.js
│ │ ├── monitor
│ │ │ ├── server.js
│ │ │ ├── cache.js
│ │ │ ├── online.js
│ │ │ ├── jobLog.js
│ │ │ ├── operlog.js
│ │ │ └── logininfor.js
│ │ ├── live
│ │ │ ├── file.js
│ │ │ ├── download.js
│ │ │ ├── daily.js
│ │ │ ├── cookie.js
│ │ │ ├── manage.js
│ │ │ ├── author.js
│ │ │ ├── parse.js
│ │ │ └── history.js
│ │ ├── system
│ │ │ ├── notice.js
│ │ │ ├── push.js
│ │ │ ├── sys_config.js
│ │ │ ├── sys_dict_type.js
│ │ │ ├── dict_data.js
│ │ │ ├── config.js
│ │ │ └── menu.js
│ │ └── login.js
│ ├── layout
│ │ └── components
│ │ │ ├── index.js
│ │ │ ├── InnerLink
│ │ │ └── index.vue
│ │ │ ├── IframeToggle
│ │ │ └── index.vue
│ │ │ ├── Sidebar
│ │ │ └── Link.vue
│ │ │ └── AppMain.vue
│ ├── directive
│ │ ├── index.js
│ │ └── permission
│ │ │ ├── hasRole.js
│ │ │ └── hasPermi.js
│ ├── views
│ │ ├── redirect
│ │ │ └── index.vue
│ │ └── docs
│ │ │ ├── support.vue
│ │ │ └── media.vue
│ ├── App.vue
│ ├── plugins
│ │ └── index.js
│ └── settings.js
├── public
│ └── favicon.ico
├── vite
│ └── plugins
│ │ ├── setup-extend.js
│ │ ├── auto-import.js
│ │ ├── svg-icon.js
│ │ ├── index.js
│ │ └── compression.js
├── .env.development
├── .env.staging
├── .env.production
├── .gitignore
└── nginx.conf
├── manifest
├── docker
│ ├── entrypoint.sh
│ └── docker.sh
├── migrate
│ └── 6_parseImages.up.sql
└── config
│ ├── config_docker.yaml
│ └── config.yaml.example
├── resource
└── assets
│ ├── profile
│ └── profile.jpg
│ └── screenshots
│ ├── index.jpg
│ ├── roomAdd.jpg
│ ├── mediaParse.jpg
│ └── followerTrend.jpg
├── README.md
├── internal
├── pkg
│ ├── download
│ │ ├── douyin
│ │ │ └── douyin_consts.go
│ │ └── bilibili
│ │ │ └── bilibili_consts.go
│ ├── interfaces
│ │ └── interfaces.go
│ ├── params
│ │ └── goja.go
│ ├── utils
│ │ ├── utils_test.go
│ │ ├── context.go
│ │ ├── err.go
│ │ └── env.go
│ ├── message_push
│ │ └── gotify
│ │ │ └── gotify_test.go
│ ├── events
│ │ └── events.go
│ ├── listeners
│ │ └── live_status.go
│ ├── media_parser
│ │ ├── parser_test.go
│ │ ├── douyin
│ │ │ └── douyin_consts.go
│ │ └── bilibili
│ │ │ ├── bilibili_models.go
│ │ │ └── bilibili_consts.go
│ ├── parser
│ │ └── parser.go
│ └── lives
│ │ └── lives.go
├── app
│ ├── live
│ │ ├── model
│ │ │ ├── room_info.go
│ │ │ ├── file_info.go
│ │ │ ├── stat_daily.go
│ │ │ ├── live_history.go
│ │ │ ├── do
│ │ │ │ ├── live_history.go
│ │ │ │ ├── live_cookie.go
│ │ │ │ ├── download_record.go
│ │ │ │ ├── room_info.go
│ │ │ │ ├── push_channel.go
│ │ │ │ ├── push_channel_email.go
│ │ │ │ ├── author_info_history.go
│ │ │ │ ├── stat_daily.go
│ │ │ │ ├── author_info.go
│ │ │ │ ├── live_manage.go
│ │ │ │ └── media_parse.go
│ │ │ └── entity
│ │ │ │ ├── live_history.go
│ │ │ │ ├── live_cookie.go
│ │ │ │ ├── download_record.go
│ │ │ │ └── room_info.go
│ │ ├── consts
│ │ │ └── live_i18n.go
│ │ ├── logic
│ │ │ └── logic.go
│ │ ├── controller
│ │ │ ├── file_manage.go
│ │ │ └── media_download.go
│ │ ├── dao
│ │ │ ├── room_info.go
│ │ │ ├── stat_daily.go
│ │ │ ├── author_info.go
│ │ │ ├── live_cookie.go
│ │ │ ├── live_manage.go
│ │ │ ├── media_parse.go
│ │ │ ├── live_history.go
│ │ │ ├── push_channel.go
│ │ │ ├── download_record.go
│ │ │ ├── push_channel_email.go
│ │ │ └── author_info_history.go
│ │ └── service
│ │ │ └── file_manage.go
│ ├── admin
│ │ ├── consts
│ │ │ ├── consts.go
│ │ │ ├── consts_routes.go
│ │ │ └── system_i18n.go
│ │ ├── model
│ │ │ ├── sys_push.go
│ │ │ ├── entity
│ │ │ │ ├── sys_role_menu.go
│ │ │ │ ├── sys_user_role.go
│ │ │ │ ├── push_message_log.go
│ │ │ │ ├── push_channel.go
│ │ │ │ ├── sys_job_log.go
│ │ │ │ └── sys_dict_type.go
│ │ │ ├── do
│ │ │ │ ├── sys_role_menu.go
│ │ │ │ ├── sys_user_role.go
│ │ │ │ ├── push_message_log.go
│ │ │ │ ├── push_channel.go
│ │ │ │ ├── sys_job_log.go
│ │ │ │ ├── sys_dict_type.go
│ │ │ │ ├── push_channel_email.go
│ │ │ │ ├── sys_config.go
│ │ │ │ ├── sys_logininfor.go
│ │ │ │ ├── sys_notice.go
│ │ │ │ ├── stat_daily.go
│ │ │ │ ├── push_channel_web.go
│ │ │ │ ├── sys_dict_data.go
│ │ │ │ ├── sys_job.go
│ │ │ │ └── sys_role.go
│ │ │ └── sys_role.go
│ │ ├── dao
│ │ │ ├── sys_job.go
│ │ │ ├── sys_menu.go
│ │ │ ├── sys_role.go
│ │ │ ├── sys_user.go
│ │ │ ├── sys_config.go
│ │ │ ├── sys_job_log.go
│ │ │ ├── sys_notice.go
│ │ │ ├── push_channel.go
│ │ │ ├── sys_dict_data.go
│ │ │ ├── sys_dict_type.go
│ │ │ ├── sys_role_menu.go
│ │ │ ├── sys_user_role.go
│ │ │ ├── sys_logininfor.go
│ │ │ ├── push_channel_web.go
│ │ │ ├── push_message_log.go
│ │ │ └── push_channel_email.go
│ │ ├── logic
│ │ │ └── logic.go
│ │ └── service
│ │ │ └── sys_role_menu.go
│ ├── common
│ │ ├── consts
│ │ │ ├── consts_gtoken.go
│ │ │ ├── consts.go
│ │ │ ├── consts_i18n.go
│ │ │ ├── consts_system.go
│ │ │ └── consts_openapi.go
│ │ ├── model
│ │ │ ├── context.go
│ │ │ └── redis.go
│ │ ├── logic
│ │ │ └── logic.go
│ │ ├── service
│ │ │ ├── captcha.go
│ │ │ ├── middleware.go
│ │ │ └── session.go
│ │ └── controller
│ │ │ └── captcha.go
│ └── monitor
│ │ ├── controller
│ │ ├── server.go
│ │ └── oper_log.go
│ │ ├── logic
│ │ └── logic.go
│ │ ├── model
│ │ ├── do
│ │ │ ├── sys_job_log.go
│ │ │ └── sys_job.go
│ │ ├── server_info.go
│ │ └── entity
│ │ │ └── sys_job_log.go
│ │ ├── dao
│ │ ├── sys_job.go
│ │ ├── sys_job_log.go
│ │ └── sys_oper_log.go
│ │ └── service
│ │ ├── server.go
│ │ └── sys_oper_log.go
├── cmd
│ ├── cmd_rod.go
│ ├── cmd_job.go
│ └── cmd_init.go
└── drivers
│ ├── drivers.go
│ └── mysql.go
├── .dockerignore
├── api
└── v1
│ ├── common
│ └── req.go
│ ├── monitor
│ ├── server.go
│ └── oper_log.go
│ ├── tool
│ └── captcha.go
│ └── live
│ ├── file_manage.go
│ └── media_download.go
├── .gitignore
├── main.go
├── docker-compose.yaml.example
├── CHANGELOG.md
├── Makefile
├── LICENSE
└── hack
└── config.yaml.example
/i18n/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * linguist-language=GO
--------------------------------------------------------------------------------
/web/src/store/index.js:
--------------------------------------------------------------------------------
1 | const store = createPinia()
2 |
3 | export default store
--------------------------------------------------------------------------------
/web/src/components/ParentView/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/manifest/docker/entrypoint.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | exec sh -c /LiveDog/main & nginx -g 'daemon off;'
4 |
--------------------------------------------------------------------------------
/web/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichen437/live-dog/HEAD/web/public/favicon.ico
--------------------------------------------------------------------------------
/web/src/assets/logo/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichen437/live-dog/HEAD/web/src/assets/logo/logo.png
--------------------------------------------------------------------------------
/manifest/docker/docker.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # This shell is executed before docker build.
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/web/src/assets/401_images/401.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichen437/live-dog/HEAD/web/src/assets/401_images/401.gif
--------------------------------------------------------------------------------
/web/src/assets/404_images/404.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichen437/live-dog/HEAD/web/src/assets/404_images/404.png
--------------------------------------------------------------------------------
/web/src/assets/images/profile.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichen437/live-dog/HEAD/web/src/assets/images/profile.jpg
--------------------------------------------------------------------------------
/resource/assets/profile/profile.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichen437/live-dog/HEAD/resource/assets/profile/profile.jpg
--------------------------------------------------------------------------------
/resource/assets/screenshots/index.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichen437/live-dog/HEAD/resource/assets/screenshots/index.jpg
--------------------------------------------------------------------------------
/resource/assets/screenshots/roomAdd.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichen437/live-dog/HEAD/resource/assets/screenshots/roomAdd.jpg
--------------------------------------------------------------------------------
/web/src/assets/404_images/404_cloud.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichen437/live-dog/HEAD/web/src/assets/404_images/404_cloud.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
Live Dog
3 | 项目已迁移至新仓库: [Gowlive](https://github.com/shichen437/Gowlive)
4 |
--------------------------------------------------------------------------------
/resource/assets/screenshots/mediaParse.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichen437/live-dog/HEAD/resource/assets/screenshots/mediaParse.jpg
--------------------------------------------------------------------------------
/web/src/assets/images/login-background.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichen437/live-dog/HEAD/web/src/assets/images/login-background.jpg
--------------------------------------------------------------------------------
/resource/assets/screenshots/followerTrend.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichen437/live-dog/HEAD/resource/assets/screenshots/followerTrend.jpg
--------------------------------------------------------------------------------
/web/src/utils/errorCode.js:
--------------------------------------------------------------------------------
1 | export default {
2 | '401': '认证失败,无法访问系统资源',
3 | '403': '当前操作没有权限',
4 | '404': '访问资源不存在',
5 | 'default': '系统未知错误,请反馈给管理员'
6 | }
7 |
--------------------------------------------------------------------------------
/web/vite/plugins/setup-extend.js:
--------------------------------------------------------------------------------
1 | import setupExtend from 'vite-plugin-vue-setup-extend'
2 |
3 | export default function createSetupExtend() {
4 | return setupExtend()
5 | }
6 |
--------------------------------------------------------------------------------
/internal/pkg/download/douyin/douyin_consts.go:
--------------------------------------------------------------------------------
1 | package douyin
2 |
3 | var (
4 | platform = "douyin"
5 | randomStr = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
6 | )
7 |
--------------------------------------------------------------------------------
/web/src/api/menu.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 获取路由
4 | export const getRouters = () => {
5 | return request({
6 | url: '/getRouters',
7 | method: 'get'
8 | })
9 | }
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/chart.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/api/monitor/server.js:
--------------------------------------------------------------------------------
1 | import request from "@/utils/request";
2 |
3 | // 获取服务信息
4 | export function getServer() {
5 | return request({
6 | url: "/monitor/server",
7 | method: "get",
8 | });
9 | }
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/src/api/monitor/cache.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询缓存详细
4 | export function getCache() {
5 | return request({
6 | url: '/monitor/cache',
7 | method: 'get'
8 | })
9 | }
10 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/size.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/web/src/layout/components/index.js:
--------------------------------------------------------------------------------
1 | export { default as AppMain } from './AppMain'
2 | export { default as Navbar } from './Navbar'
3 | export { default as Settings } from './Settings'
4 | export { default as TagsView } from './TagsView/index.vue'
5 |
--------------------------------------------------------------------------------
/.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
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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'
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/src/components/IconSelect/requireIcons.js:
--------------------------------------------------------------------------------
1 | let icons = []
2 | const modules = import.meta.glob('./../../assets/icons/svg/*.svg');
3 | for (const path in modules) {
4 | const p = path.split('assets/icons/svg/')[1].split('.svg')[0];
5 | icons.push(p);
6 | }
7 |
8 | export default icons
--------------------------------------------------------------------------------
/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;
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/link.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/components/Git/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
14 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/web/vite/plugins/auto-import.js:
--------------------------------------------------------------------------------
1 | import autoImport from 'unplugin-auto-import/vite'
2 |
3 | export default function createAutoImport() {
4 | return autoImport({
5 | imports: [
6 | 'vue',
7 | 'vue-router',
8 | 'pinia'
9 | ],
10 | dts: false
11 | })
12 | }
13 |
--------------------------------------------------------------------------------
/web/src/directive/index.js:
--------------------------------------------------------------------------------
1 | import hasRole from './permission/hasRole'
2 | import hasPermi from './permission/hasPermi'
3 | import copyText from './common/copyText'
4 |
5 | export default function directive(app){
6 | app.directive('hasRole', hasRole)
7 | app.directive('hasPermi', hasPermi)
8 | app.directive('copyText', copyText)
9 | }
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/guide.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/web/src/components/SvgIcon/svgicon.js:
--------------------------------------------------------------------------------
1 | import * as components from '@element-plus/icons-vue'
2 |
3 | export default {
4 | install: (app) => {
5 | for (const key in components) {
6 | const componentConfig = components[key];
7 | app.component(componentConfig.name, componentConfig);
8 | }
9 | },
10 | };
11 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/web/src/utils/auth.js:
--------------------------------------------------------------------------------
1 | import Cookies from 'js-cookie'
2 |
3 | const TokenKey = 'Admin-Token'
4 |
5 | export function getToken() {
6 | return Cookies.get(TokenKey)
7 | }
8 |
9 | export function setToken(token) {
10 | return Cookies.set(TokenKey, token)
11 | }
12 |
13 | export function removeToken() {
14 | return Cookies.remove(TokenKey)
15 | }
16 |
--------------------------------------------------------------------------------
/web/src/views/redirect/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/web/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
16 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/money.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/email.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/src/assets/icons/svg/drag.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/vite/plugins/svg-icon.js:
--------------------------------------------------------------------------------
1 | import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
2 | import path from 'path'
3 |
4 | export default function createSvgIcon(isBuild) {
5 | return createSvgIconsPlugin({
6 | iconDirs: [path.resolve(process.cwd(), 'src/assets/icons/svg')],
7 | symbolId: 'icon-[dir]-[name]',
8 | svgoOptions: isBuild
9 | })
10 | }
11 |
--------------------------------------------------------------------------------
/web/src/api/live/file.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | export function listFile(query) {
4 | return request({
5 | url: '/file/manage/list',
6 | method: 'get',
7 | params: query
8 | })
9 | }
10 |
11 | export function delFile(query) {
12 | return request({
13 | url: '/file/manage',
14 | method: 'delete',
15 | params: query
16 | })
17 | }
--------------------------------------------------------------------------------
/web/src/components/Screenfull/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/web/src/api/monitor/online.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询在线用户列表
4 | export function list(query) {
5 | return request({
6 | url: '/monitor/online/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 强退用户
13 | export function forceLogout(tokenId) {
14 | return request({
15 | url: '/monitor/online/' + tokenId,
16 | method: 'delete'
17 | })
18 | }
19 |
--------------------------------------------------------------------------------
/web/src/api/monitor/jobLog.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询调度日志列表
4 | export function listJobLog(query) {
5 | return request({
6 | url: '/monitor/jobLog/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 删除调度日志
13 | export function delJobLog(jobLogId) {
14 | return request({
15 | url: '/monitor/jobLog/' + jobLogId,
16 | method: 'delete'
17 | })
18 | }
19 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/documentation.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/fullscreen.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/download.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/user.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/lock.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/excel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/web/src/utils/dynamicTitle.js:
--------------------------------------------------------------------------------
1 | import store from '@/store'
2 | import defaultSettings from '@/settings'
3 | import useSettingsStore from '@/store/modules/settings'
4 |
5 | /**
6 | * 动态修改标题
7 | */
8 | export function useDynamicTitle() {
9 | const settingsStore = useSettingsStore();
10 | if (settingsStore.dynamicTitle) {
11 | document.title = settingsStore.title + ' - ' + defaultSettings.title;
12 | } else {
13 | document.title = defaultSettings.title;
14 | }
15 | }
--------------------------------------------------------------------------------
/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/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/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/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 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/example.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/fonts.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/web/src/api/live/download.js:
--------------------------------------------------------------------------------
1 | import request from "@/utils/request";
2 |
3 | // 查询角色列表
4 | export function listDownload(query) {
5 | return request({
6 | url: "/media/download/list",
7 | method: "get",
8 | params: query,
9 | });
10 | }
11 |
12 | export function listDownloadFromCache() {
13 | return request({
14 | url: "/media/download/listCache",
15 | method: "get",
16 | });
17 | }
18 |
19 | export function delRecord(id) {
20 | return request({
21 | url: "/media/download/" + id,
22 | method: "delete",
23 | });
24 | }
25 |
--------------------------------------------------------------------------------
/web/src/layout/components/InnerLink/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
12 |
25 |
--------------------------------------------------------------------------------
/web/src/plugins/index.js:
--------------------------------------------------------------------------------
1 | import tab from './tab'
2 | import auth from './auth'
3 | import cache from './cache'
4 | import modal from './modal'
5 | import download from './download'
6 |
7 | export default function installPlugins(app){
8 | // 页签操作
9 | app.config.globalProperties.$tab = tab
10 | // 认证对象
11 | app.config.globalProperties.$auth = auth
12 | // 缓存对象
13 | app.config.globalProperties.$cache = cache
14 | // 模态框对象
15 | app.config.globalProperties.$modal = modal
16 | // 下载文件
17 | app.config.globalProperties.$download = download
18 | }
19 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/exit-fullscreen.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/star.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/api/monitor/operlog.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询操作日志列表
4 | export function list(query) {
5 | return request({
6 | url: '/monitor/operlog/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 删除操作日志
13 | export function delOperlog(operId) {
14 | return request({
15 | url: '/monitor/operlog/' + operId,
16 | method: 'delete'
17 | })
18 | }
19 |
20 | // 清空操作日志
21 | export function cleanOperlog() {
22 | return request({
23 | url: '/monitor/operlog/clean',
24 | method: 'delete'
25 | })
26 | }
27 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/slider.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/table.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/vite/plugins/index.js:
--------------------------------------------------------------------------------
1 | import vue from '@vitejs/plugin-vue'
2 |
3 | import createAutoImport from './auto-import'
4 | import createSvgIcon from './svg-icon'
5 | import createCompression from './compression'
6 | import createSetupExtend from './setup-extend'
7 |
8 | export default function createVitePlugins(viteEnv, isBuild = false) {
9 | const vitePlugins = [vue()]
10 | vitePlugins.push(createAutoImport())
11 | vitePlugins.push(createSetupExtend())
12 | vitePlugins.push(createSvgIcon(isBuild))
13 | isBuild && vitePlugins.push(...createCompression(viteEnv))
14 | return vitePlugins
15 | }
16 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/search.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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/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 |
--------------------------------------------------------------------------------
/web/src/layout/components/IframeToggle/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
13 |
20 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/education.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/tab.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/message.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/switch.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/theme.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/cookie.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/code.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/druid.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/peoples.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/input.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/server.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/web/src/directive/permission/hasRole.js:
--------------------------------------------------------------------------------
1 | /**
2 | * v-hasRole 角色权限处理
3 | * Copyright (c) 2019 ruoyi
4 | */
5 |
6 | import useUserStore from '@/store/modules/user'
7 |
8 | export default {
9 | mounted(el, binding, vnode) {
10 | const { value } = binding
11 | const super_admin = "admin";
12 | const roles = useUserStore().roles
13 |
14 | if (value && value instanceof Array && value.length > 0) {
15 | const roleFlag = value
16 |
17 | const hasRole = roles.some(role => {
18 | return super_admin === role || roleFlag.includes(role)
19 | })
20 |
21 | if (!hasRole) {
22 | el.parentNode && el.parentNode.removeChild(el)
23 | }
24 | } else {
25 | throw new Error(`请设置角色权限标签值`)
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/web/src/api/monitor/logininfor.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询登录日志列表
4 | export function list(query) {
5 | return request({
6 | url: '/monitor/logininfor/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 删除登录日志
13 | export function delLogininfor(infoId) {
14 | return request({
15 | url: '/monitor/logininfor/' + infoId,
16 | method: 'delete'
17 | })
18 | }
19 |
20 | // 解锁用户登录状态
21 | export function unlockLogininfor(userName) {
22 | return request({
23 | url: '/monitor/logininfor/unlock/' + userName,
24 | method: 'get'
25 | })
26 | }
27 |
28 | // 清空登录日志
29 | export function cleanLogininfor() {
30 | return request({
31 | url: '/monitor/logininfor/clean',
32 | method: 'delete'
33 | })
34 | }
35 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/textarea.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/time.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/layout/components/Sidebar/Link.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
41 |
--------------------------------------------------------------------------------
/web/src/components/iFrame/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
11 |
32 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/edit.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/nested.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/web/src/api/live/daily.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询角色列表
4 | export function listDaily(query) {
5 | return request({
6 | url: '/live/daily/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | export function getDaily(id) {
13 | return request({
14 | url: '/live/daily/' + id,
15 | method: 'get'
16 | })
17 | }
18 |
19 | // 新增角色
20 | export function addDaily(data) {
21 | return request({
22 | url: '/live/daily',
23 | method: 'post',
24 | data: data
25 | })
26 | }
27 |
28 | export function updateDaily(data) {
29 | return request({
30 | url: '/live/daily',
31 | method: 'put',
32 | data: data
33 | })
34 | }
35 |
36 | export function delDaily(id) {
37 | return request({
38 | url: '/live/daily/' + id,
39 | method: 'delete'
40 | })
41 | }
--------------------------------------------------------------------------------
/web/src/directive/permission/hasPermi.js:
--------------------------------------------------------------------------------
1 | /**
2 | * v-hasPermi 操作权限处理
3 | * Copyright (c) 2019 ruoyi
4 | */
5 |
6 | import useUserStore from '@/store/modules/user'
7 |
8 | export default {
9 | mounted(el, binding, vnode) {
10 | const { value } = binding
11 | const all_permission = "*:*:*";
12 | const permissions = useUserStore().permissions
13 |
14 | if (value && value instanceof Array && value.length > 0) {
15 | const permissionFlag = value
16 |
17 | const hasPermissions = permissions.some(permission => {
18 | return all_permission === permission || permissionFlag.includes(permission)
19 | })
20 |
21 | if (!hasPermissions) {
22 | el.parentNode && el.parentNode.removeChild(el)
23 | }
24 | } else {
25 | throw new Error(`请设置操作权限标签值`)
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/web/src/api/live/cookie.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询角色列表
4 | export function listCookie(query) {
5 | return request({
6 | url: '/live/cookie/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | export function getCookie(id) {
13 | return request({
14 | url: '/live/cookie/' + id,
15 | method: 'get'
16 | })
17 | }
18 |
19 | // 新增角色
20 | export function addCookie(data) {
21 | return request({
22 | url: '/live/cookie',
23 | method: 'post',
24 | data: data
25 | })
26 | }
27 |
28 | export function updateCookie(data) {
29 | return request({
30 | url: '/live/cookie',
31 | method: 'put',
32 | data: data
33 | })
34 | }
35 |
36 | export function delCookie(id) {
37 | return request({
38 | url: '/live/cookie/' + id,
39 | method: 'delete'
40 | })
41 | }
--------------------------------------------------------------------------------
/web/src/utils/dict.js:
--------------------------------------------------------------------------------
1 | import useDictStore from '@/store/modules/dict'
2 | import { getDicts } from '@/api/system/dict_data'
3 |
4 | /**
5 | * 获取字典数据
6 | */
7 | export function useDict(...args) {
8 | const res = ref({});
9 | return (() => {
10 | args.forEach((dictType, index) => {
11 | res.value[dictType] = [];
12 | const dicts = useDictStore().getDict(dictType);
13 | if (dicts) {
14 | res.value[dictType] = dicts;
15 | } else {
16 | getDicts(dictType).then(resp => {
17 | res.value[dictType] = resp.data.dictData.map(p => ({ label: p.dictLabel, value: p.dictValue, elTagType: p.listClass, elTagClass: p.cssClass, default: p.isDefault === 'Y' }))
18 | useDictStore().setDict(dictType, res.value[dictType]);
19 | })
20 | }
21 | })
22 | return toRefs(res.value);
23 | })()
24 | }
--------------------------------------------------------------------------------
/web/src/api/live/manage.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询角色列表
4 | export function listInfo(query) {
5 | return request({
6 | url: '/live/info/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | export function getLiveManage(id) {
13 | return request({
14 | url: '/live/manage/' + id,
15 | method: 'get'
16 | })
17 | }
18 |
19 | // 新增角色
20 | export function addLiveManage(data) {
21 | return request({
22 | url: '/live/manage',
23 | method: 'post',
24 | data: data
25 | })
26 | }
27 |
28 | export function updateLiveManage(data) {
29 | return request({
30 | url: '/live/manage',
31 | method: 'put',
32 | data: data
33 | })
34 | }
35 |
36 | export function delLiveManage(id) {
37 | return request({
38 | url: '/live/manage/' + id,
39 | method: 'delete'
40 | })
41 | }
--------------------------------------------------------------------------------
/web/src/api/live/author.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询角色列表
4 | export function listAuthor(query) {
5 | return request({
6 | url: '/author/manage/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | export function getAuthor(id) {
13 | return request({
14 | url: '/author/manage/' + id,
15 | method: 'get'
16 | })
17 | }
18 |
19 | // 新增角色
20 | export function addAuthor(data) {
21 | return request({
22 | url: '/author/manage',
23 | method: 'post',
24 | data: data
25 | })
26 | }
27 |
28 | export function delAuthor(id) {
29 | return request({
30 | url: '/author/manage/' + id,
31 | method: 'delete',
32 | })
33 | }
34 |
35 | export function getTrend(query) {
36 | return request({
37 | url: '/author/manage/trend',
38 | method: 'get',
39 | params: query
40 | })
41 | }
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/web/src/api/live/parse.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询角色列表
4 | export function listParseInfo(query) {
5 | return request({
6 | url: '/media/parse/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | export function getParseInfo(id) {
13 | return request({
14 | url: '/media/parse/' + id,
15 | method: 'get'
16 | })
17 | }
18 |
19 | // 新增角色
20 | export function parseUrl(data) {
21 | return request({
22 | url: '/media/parse',
23 | method: 'post',
24 | data: data
25 | })
26 | }
27 |
28 | export function delParseInfo(id) {
29 | return request({
30 | url: '/media/parse/' + id,
31 | method: 'delete'
32 | })
33 | }
34 |
35 | export function downloadMedia(data) {
36 | return request({
37 | url: '/media/parse/download',
38 | method: 'get',
39 | params: data
40 | })
41 | }
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/row.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/web/src/api/live/history.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | export function listHistory(query) {
4 | return request({
5 | url: '/live/history/list',
6 | method: 'get',
7 | params: query
8 | })
9 | }
10 | export function getHistory(id) {
11 | return request({
12 | url: '/live/history/' + id,
13 | method: 'get'
14 | })
15 | }
16 |
17 | // 新增角色
18 | export function addHistory(data) {
19 | return request({
20 | url: '/live/history',
21 | method: 'post',
22 | data: data
23 | })
24 | }
25 |
26 | export function updateHistory(data) {
27 | return request({
28 | url: '/live/history',
29 | method: 'put',
30 | data: data
31 | })
32 | }
33 |
34 | export function delHistory(id) {
35 | return request({
36 | url: '/live/history/' + id,
37 | method: 'delete'
38 | })
39 | }
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/monitor.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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/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/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/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 |
--------------------------------------------------------------------------------
/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/src/assets/icons/svg/tree-table.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/web/src/api/system/notice.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询公告列表
4 | export function listNotice(query) {
5 | return request({
6 | url: '/system/notice/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 查询公告详细
13 | export function getNotice(noticeId) {
14 | return request({
15 | url: '/system/notice/' + noticeId,
16 | method: 'get'
17 | })
18 | }
19 |
20 | // 新增公告
21 | export function addNotice(data) {
22 | return request({
23 | url: '/system/notice',
24 | method: 'post',
25 | data: data
26 | })
27 | }
28 |
29 | // 修改公告
30 | export function updateNotice(data) {
31 | return request({
32 | url: '/system/notice',
33 | method: 'put',
34 | data: data
35 | })
36 | }
37 |
38 | // 删除公告
39 | export function delNotice(noticeId) {
40 | return request({
41 | url: '/system/notice/' + noticeId,
42 | method: 'delete'
43 | })
44 | }
--------------------------------------------------------------------------------
/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/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/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/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/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/eye.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/web/src/api/system/push.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询字典数据列表
4 | export function listChannel(query) {
5 | return request({
6 | url: '/system/push/channel/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 查询字典数据详细
13 | export function getChannel(cId) {
14 | return request({
15 | url: '/system/push/channel/' + cId,
16 | method: 'get'
17 | })
18 | }
19 |
20 | // 新增字典数据
21 | export function addChannel(data) {
22 | return request({
23 | url: '/system/push/channel',
24 | method: 'post',
25 | data: data
26 | })
27 | }
28 |
29 | // 修改字典数据
30 | export function updateChannel(data) {
31 | return request({
32 | url: '/system/push/channel',
33 | method: 'put',
34 | data: data
35 | })
36 | }
37 |
38 | // 删除字典数据
39 | export function delChannel(cId) {
40 | return request({
41 | url: '/system/push/channel/' + cId,
42 | method: 'delete'
43 | })
44 | }
45 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/build.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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/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/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/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_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_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 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/clock-history.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/settings.js:
--------------------------------------------------------------------------------
1 | export default {
2 | /**
3 | * 网页标题
4 | */
5 | title: import.meta.env.VITE_APP_TITLE,
6 | /**
7 | * 侧边栏主题 深色主题theme-dark,浅色主题theme-light
8 | */
9 | sideTheme: 'theme-dark',
10 | /**
11 | * 是否系统布局配置
12 | */
13 | showSettings: false,
14 |
15 | /**
16 | * 是否显示顶部导航
17 | */
18 | topNav: false,
19 |
20 | /**
21 | * 是否显示 tagsView
22 | */
23 | tagsView: true,
24 |
25 | /**
26 | * 是否固定头部
27 | */
28 | fixedHeader: false,
29 |
30 | /**
31 | * 是否显示logo
32 | */
33 | sidebarLogo: true,
34 |
35 | /**
36 | * 是否显示动态标题
37 | */
38 | dynamicTitle: false,
39 |
40 | /**
41 | * @type {string | array} 'production' | ['production', 'development']
42 | * @description Need show err logs component.
43 | * The default is only used in the production env
44 | * If you want to also use it in dev, you can pass ['production', 'development']
45 | */
46 | errorLog: 'production'
47 | }
48 |
--------------------------------------------------------------------------------
/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/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/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 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/clipboard.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/web/vite/plugins/compression.js:
--------------------------------------------------------------------------------
1 | import compression from 'vite-plugin-compression'
2 |
3 | export default function createCompression(env) {
4 | const { VITE_BUILD_COMPRESS } = env
5 | const plugin = []
6 | if (VITE_BUILD_COMPRESS) {
7 | const compressList = VITE_BUILD_COMPRESS.split(',')
8 | if (compressList.includes('gzip')) {
9 | // http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件
10 | plugin.push(
11 | compression({
12 | ext: '.gz',
13 | deleteOriginFile: false
14 | })
15 | )
16 | }
17 | if (compressList.includes('brotli')) {
18 | plugin.push(
19 | compression({
20 | ext: '.br',
21 | algorithm: 'brotliCompress',
22 | deleteOriginFile: false
23 | })
24 | )
25 | }
26 | }
27 | return plugin
28 | }
29 |
--------------------------------------------------------------------------------
/web/src/assets/styles/transition.scss:
--------------------------------------------------------------------------------
1 | // global transition css
2 |
3 | /* fade */
4 | .fade-enter-active,
5 | .fade-leave-active {
6 | transition: opacity 0.28s;
7 | }
8 |
9 | .fade-enter,
10 | .fade-leave-active {
11 | opacity: 0;
12 | }
13 |
14 | /* fade-transform */
15 | .fade-transform--move,
16 | .fade-transform-leave-active,
17 | .fade-transform-enter-active {
18 | transition: all .5s;
19 | }
20 |
21 | .fade-transform-enter {
22 | opacity: 0;
23 | transform: translateX(-30px);
24 | }
25 |
26 | .fade-transform-leave-to {
27 | opacity: 0;
28 | transform: translateX(30px);
29 | }
30 |
31 | /* breadcrumb transition */
32 | .breadcrumb-enter-active,
33 | .breadcrumb-leave-active {
34 | transition: all .5s;
35 | }
36 |
37 | .breadcrumb-enter,
38 | .breadcrumb-leave-active {
39 | opacity: 0;
40 | transform: translateX(20px);
41 | }
42 |
43 | .breadcrumb-move {
44 | transition: all .5s;
45 | }
46 |
47 | .breadcrumb-leave-active {
48 | position: absolute;
49 | }
50 |
--------------------------------------------------------------------------------
/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/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/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/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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_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_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/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/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/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/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_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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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/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/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/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 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/list.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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/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_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_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/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 |
--------------------------------------------------------------------------------
/web/src/api/system/sys_config.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 |
4 | // 获取参数配置表列表
5 | export function listSysConfig(query) {
6 | return request({
7 | url: '/system/sys/config/list',
8 | method: 'get',
9 | params: query
10 |
11 | })
12 | }
13 |
14 | // 添加参数配置表
15 | export function addSysConfig(query) {
16 | return request({
17 | url: '/system/sys/config',
18 | method: 'post',
19 | data: query
20 |
21 | })
22 | }
23 |
24 | // 修改参数配置表
25 | export function updateSysConfig(query) {
26 | return request({
27 | url: '/system/sys/config',
28 | method: 'put',
29 | data: query
30 |
31 | })
32 | }
33 |
34 | // 删除参数配置表
35 | export function deleteSysConfig(query) {
36 | return request({
37 | url: '/system/sys/config/' + query,
38 | method: 'delete'
39 |
40 | })
41 | }
42 |
43 | // 获取参数配置表
44 | export function getSysConfig(query) {
45 | return request({
46 | url: '/system/sys/config/' + query,
47 | method: 'get'
48 |
49 | })
50 | }
51 |
52 |
--------------------------------------------------------------------------------
/web/src/api/system/sys_dict_type.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 |
4 | // 获取字典类型表列表
5 | export function listSysDictType(query) {
6 | return request({
7 | url: '/system/dict/type/list',
8 | method: 'get',
9 | params: query
10 |
11 | })
12 | }
13 |
14 | // 添加字典类型表
15 | export function addSysDictType(query) {
16 | return request({
17 | url: '/system/dict/type',
18 | method: 'post',
19 | data: query
20 |
21 | })
22 | }
23 |
24 | // 修改字典类型表
25 | export function updateSysDictType(query) {
26 | return request({
27 | url: '/system/dict/type',
28 | method: 'put',
29 | data: query
30 |
31 | })
32 | }
33 |
34 | // 删除字典类型表
35 | export function deleteSysDictType(query) {
36 | return request({
37 | url: '/system/dict/type/' + query,
38 | method: 'delete'
39 |
40 | })
41 | }
42 |
43 | // 获取字典类型表
44 | export function getSysDictType(query) {
45 | return request({
46 | url: '/system/dict/type/' + query,
47 | method: 'get'
48 |
49 | })
50 | }
51 |
52 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/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/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/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/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/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/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/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 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/icon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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/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/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 |
--------------------------------------------------------------------------------
/web/src/views/docs/support.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
技术支持
4 |
5 |
6 | 联系开发者
7 |
8 | - shichen437 (shichen437@126.com)
9 |
10 |
11 |
12 |
13 |
14 |
17 |
18 |
57 |
--------------------------------------------------------------------------------
/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/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/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/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/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 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/international.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/question.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/api/system/dict_data.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询字典数据列表
4 | export function listData(query) {
5 | return request({
6 | url: '/system/dict/data/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 查询字典数据详细
13 | export function getData(dictCode) {
14 | return request({
15 | url: '/system/dict/data/' + dictCode,
16 | method: 'get'
17 | })
18 | }
19 |
20 | // 根据字典类型查询字典数据信息
21 | export function getDicts(dictType) {
22 | return request({
23 | url: '/system/dict/type',
24 | method: 'get',
25 | params:{dictType}
26 | })
27 | }
28 |
29 | // 新增字典数据
30 | export function addData(data) {
31 | return request({
32 | url: '/system/dict/data',
33 | method: 'post',
34 | data: data
35 | })
36 | }
37 |
38 | // 修改字典数据
39 | export function updateData(data) {
40 | return request({
41 | url: '/system/dict/data',
42 | method: 'put',
43 | data: data
44 | })
45 | }
46 |
47 | // 删除字典数据
48 | export function delData(dictCode) {
49 | return request({
50 | url: '/system/dict/data/' + dictCode,
51 | method: 'delete'
52 | })
53 | }
54 |
--------------------------------------------------------------------------------
/web/src/views/docs/media.vue:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
24 |
25 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/web/src/api/login.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 登录方法
4 | export function login(userName, password, code,verifyKey, uuid) {
5 | const data = {
6 | userName,
7 | password,
8 | code,
9 | verifyKey,
10 | uuid
11 | }
12 | return request({
13 | url: '/login',
14 | headers: {
15 | isToken: false
16 | },
17 | method: 'post',
18 | data: data
19 | })
20 | }
21 |
22 | // 注册方法
23 | export function register(data) {
24 | return request({
25 | url: '/register',
26 | headers: {
27 | isToken: false
28 | },
29 | method: 'post',
30 | data: data
31 | })
32 | }
33 |
34 | // 获取用户详细信息
35 | export function getInfo() {
36 | return request({
37 | url: 'getInfo',
38 | method: 'get'
39 | })
40 | }
41 |
42 | // 退出方法
43 | export function logout() {
44 | return request({
45 | url: '/logout',
46 | method: 'post'
47 | })
48 | }
49 |
50 | // 获取验证码
51 | export function getCodeImg() {
52 | return request({
53 | url: '/captchaImage',
54 | headers: {
55 | isToken: false
56 | },
57 | method: 'get',
58 | timeout: 20000
59 | })
60 | }
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/web/src/api/system/config.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 获取参数配置表列表
4 | export function listSysConfig(query) {
5 | return request({
6 | url: '/system/sys/config/list',
7 | method: 'get',
8 | params: query
9 |
10 | })
11 | }
12 |
13 | // 添加参数配置表
14 | export function addSysConfig(query) {
15 | return request({
16 | url: '/system/sys/config',
17 | method: 'post',
18 | data: query
19 |
20 | })
21 | }
22 |
23 | // 修改参数配置表
24 | export function updateSysConfig(query) {
25 | return request({
26 | url: '/system/sys/config',
27 | method: 'put',
28 | data: query
29 |
30 | })
31 | }
32 |
33 | // 删除参数配置表
34 | export function deleteSysConfig(query) {
35 | return request({
36 | url: '/system/sys/config/' + query,
37 | method: 'delete'
38 |
39 | })
40 | }
41 |
42 | // 获取参数配置表
43 | export function getSysConfig(query) {
44 | return request({
45 | url: '/system/sys/config/' + query,
46 | method: 'get'
47 |
48 | })
49 | }
50 |
51 | // 刷新参数缓存
52 | export function refreshCache() {
53 | return request({
54 | url: '/system/config/refreshCache',
55 | method: 'delete'
56 | })
57 | }
58 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/wechat.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/web/src/components/SvgIcon/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
36 |
37 |
54 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/web/src/layout/components/AppMain.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
20 |
21 |
45 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/skill.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/people.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/web/src/assets/icons/svg/post.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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/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/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/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/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 |
--------------------------------------------------------------------------------
/web/src/api/system/menu.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询菜单列表
4 | export function listMenu(query) {
5 | return request({
6 | url: '/system/menu/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 查询菜单详细
13 | export function getMenu(menuId) {
14 | return request({
15 | url: '/system/menu/' + menuId,
16 | method: 'get'
17 | })
18 | }
19 |
20 | // 查询菜单下拉树结构
21 | export function treeselect() {
22 | return request({
23 | url: '/system/menu/treeselect',
24 | method: 'get'
25 | })
26 | }
27 |
28 | // 根据角色ID查询菜单下拉树结构
29 | export function roleMenuTreeselect(roleId) {
30 | return request({
31 | url: '/system/menu/roleMenuTreeselect/' + roleId,
32 | method: 'get'
33 | })
34 | }
35 |
36 | // 新增菜单
37 | export function addMenu(data) {
38 | return request({
39 | url: '/system/menu',
40 | method: 'post',
41 | data: data
42 | })
43 | }
44 |
45 | // 修改菜单
46 | export function updateMenu(data) {
47 | return request({
48 | url: '/system/menu',
49 | method: 'put',
50 | data: data
51 | })
52 | }
53 |
54 | // 删除菜单
55 | export function delMenu(menuId) {
56 | return request({
57 | url: '/system/menu/' + menuId,
58 | method: 'delete'
59 | })
60 | }
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------