mirror of
https://github.com/cnotch/ipchub.git
synced 2025-09-26 19:41:18 +08:00
rename to ipchub
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -10,7 +10,7 @@ logs
|
||||
bin
|
||||
|
||||
# file
|
||||
tomatox
|
||||
ipchub
|
||||
routetable.json
|
||||
users.json
|
||||
|
||||
|
6
.vscode/launch.json
vendored
6
.vscode/launch.json
vendored
@@ -5,7 +5,7 @@
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "tomatox",
|
||||
"name": "ipchub",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
@@ -14,7 +14,7 @@
|
||||
"args": []
|
||||
},
|
||||
{
|
||||
"name": "tomatox -log-tofile",
|
||||
"name": "ipchub -log-tofile",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
@@ -23,7 +23,7 @@
|
||||
"args": ["-log-tofile"]
|
||||
},
|
||||
{
|
||||
"name": "tomatox -h",
|
||||
"name": "ipchub -h",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
|
@@ -12,16 +12,16 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/cnotch/ipchub/provider/auth"
|
||||
"github.com/cnotch/ipchub/utils"
|
||||
cfg "github.com/cnotch/loader"
|
||||
"github.com/cnotch/tomatox/provider/auth"
|
||||
"github.com/cnotch/tomatox/utils"
|
||||
"github.com/cnotch/xlog"
|
||||
)
|
||||
|
||||
// 服务名
|
||||
const (
|
||||
Vendor = "CAOHONGJU"
|
||||
Name = "tomatox"
|
||||
Name = "ipchub"
|
||||
Version = "V1.0.0"
|
||||
)
|
||||
|
||||
|
@@ -1,19 +0,0 @@
|
||||
// Copyright (c) 2019,CAOHONGJU All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package config
|
||||
|
||||
import (
|
||||
"flag"
|
||||
)
|
||||
|
||||
// RtmpConfig rtsp 配置
|
||||
type RtmpConfig struct {
|
||||
ChunkSize int `json:"chunksize"`
|
||||
}
|
||||
|
||||
func (c *RtmpConfig) initFlags() {
|
||||
// RTSP 组播
|
||||
flag.IntVar(&c.ChunkSize, "rtmp-chunksize", 16*1024, "Set RTMP ChunkSize")
|
||||
}
|
@@ -1,21 +0,0 @@
|
||||
// Copyright (c) 2019,CAOHONGJU All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package config
|
||||
|
||||
import (
|
||||
"flag"
|
||||
|
||||
"github.com/cnotch/tomatox/provider/auth"
|
||||
)
|
||||
|
||||
// RtspConfig rtsp 配置
|
||||
type RtspConfig struct {
|
||||
AuthMode auth.Mode `json:"authmode"`
|
||||
}
|
||||
|
||||
func (c *RtspConfig) initFlags() {
|
||||
// RTSP 组播
|
||||
flag.Var(&c.AuthMode, "rtsp-auth", "Set RTSP auth mode")
|
||||
}
|
2
go.mod
2
go.mod
@@ -1,4 +1,4 @@
|
||||
module github.com/cnotch/tomatox
|
||||
module github.com/cnotch/ipchub
|
||||
|
||||
go 1.14
|
||||
|
||||
|
@@ -6,7 +6,7 @@
|
||||
"log": {
|
||||
"level": "INFO",
|
||||
"tofile": false,
|
||||
"filename": "./logs/tomatox.log",
|
||||
"filename": "./logs/ipchub.log",
|
||||
"maxsize": 20,
|
||||
"maxdays": 7,
|
||||
"maxbackups": 14,
|
6
main.go
6
main.go
@@ -5,10 +5,10 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/cnotch/ipchub/config"
|
||||
"github.com/cnotch/ipchub/provider/auth"
|
||||
"github.com/cnotch/ipchub/provider/route"
|
||||
"github.com/cnotch/scheduler"
|
||||
"github.com/cnotch/tomatox/config"
|
||||
"github.com/cnotch/tomatox/provider/auth"
|
||||
"github.com/cnotch/tomatox/provider/route"
|
||||
"github.com/cnotch/xlog"
|
||||
)
|
||||
|
||||
|
2
makefile
2
makefile
@@ -5,7 +5,7 @@ GOCLEAN=$(GOCMD) clean
|
||||
GOTEST=$(GOCMD) test
|
||||
GOGET=$(GOCMD) get
|
||||
ENABLED_CGO=0
|
||||
BINARY_NAME=tomatox
|
||||
BINARY_NAME=ipchub
|
||||
BINARY_DIR= bin/v1.0.0
|
||||
|
||||
build:
|
||||
|
@@ -5,7 +5,7 @@
|
||||
package rtp
|
||||
|
||||
import (
|
||||
"github.com/cnotch/tomatox/av/h264"
|
||||
"github.com/cnotch/ipchub/av/h264"
|
||||
)
|
||||
|
||||
type h264FrameExtractor struct {
|
||||
|
@@ -7,7 +7,7 @@ package rtp
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/cnotch/tomatox/av/aac"
|
||||
"github.com/cnotch/ipchub/av/aac"
|
||||
)
|
||||
|
||||
type mpesFrameExtractor struct {
|
||||
|
@@ -14,7 +14,7 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/cnotch/tomatox/utils/scan"
|
||||
"github.com/cnotch/ipchub/utils/scan"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@@ -11,7 +11,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/cnotch/tomatox/utils/scan"
|
||||
"github.com/cnotch/ipchub/utils/scan"
|
||||
)
|
||||
|
||||
// RTSP 响应状态码.
|
||||
|
@@ -11,7 +11,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/cnotch/tomatox/utils"
|
||||
"github.com/cnotch/ipchub/utils"
|
||||
)
|
||||
|
||||
// JSON json 提供者
|
||||
|
@@ -8,7 +8,7 @@ import (
|
||||
"strings"
|
||||
"unicode"
|
||||
|
||||
"github.com/cnotch/tomatox/utils/scan"
|
||||
"github.com/cnotch/ipchub/utils/scan"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@@ -8,7 +8,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/cnotch/tomatox/provider/security"
|
||||
"github.com/cnotch/ipchub/provider/security"
|
||||
)
|
||||
|
||||
// Token 用户登录后的Token
|
||||
|
@@ -10,7 +10,7 @@ import (
|
||||
"errors"
|
||||
"strings"
|
||||
|
||||
"github.com/cnotch/tomatox/utils/scan"
|
||||
"github.com/cnotch/ipchub/utils/scan"
|
||||
)
|
||||
|
||||
// AccessRight 访问权限类型
|
||||
|
@@ -11,7 +11,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/cnotch/tomatox/utils"
|
||||
"github.com/cnotch/ipchub/utils"
|
||||
)
|
||||
|
||||
// JSON json 提供者
|
||||
|
@@ -7,7 +7,7 @@ package route
|
||||
import (
|
||||
"net/url"
|
||||
|
||||
"github.com/cnotch/tomatox/utils"
|
||||
"github.com/cnotch/ipchub/utils"
|
||||
)
|
||||
|
||||
// Route 路由
|
||||
|
@@ -7,7 +7,7 @@ package route
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/cnotch/tomatox/utils"
|
||||
"github.com/cnotch/ipchub/utils"
|
||||
"github.com/cnotch/xlog"
|
||||
)
|
||||
|
||||
|
@@ -22,7 +22,7 @@ import (
|
||||
|
||||
// BenchmarkOf-8 100000000 14.5 ns/op 0 B/op 0 allocs/op
|
||||
func BenchmarkOf(b *testing.B) {
|
||||
v := []byte("a/b/c/d/e/f/g/h/this/is/tomatox")
|
||||
v := []byte("a/b/c/d/e/f/g/h/this/is/ipchub")
|
||||
|
||||
b.ReportAllocs()
|
||||
b.ResetTimer()
|
||||
@@ -33,7 +33,7 @@ func BenchmarkOf(b *testing.B) {
|
||||
|
||||
// BenchmarkOfString-8 100000000 18.4 ns/op 0 B/op 0 allocs/op
|
||||
func BenchmarkOfString(b *testing.B) {
|
||||
v := "a/b/c/d/e/f/g/h/this/is/tomatox"
|
||||
v := "a/b/c/d/e/f/g/h/this/is/ipchub"
|
||||
|
||||
b.ReportAllocs()
|
||||
b.ResetTimer()
|
||||
|
Reference in New Issue
Block a user