forked from ZeStream/zestream-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' of github.com:ZeStream/zestream-server into dev
- Loading branch information
Showing
8 changed files
with
147 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: golangci-lint | ||
on: | ||
push: | ||
branches: ["master","dev"] | ||
pull_request: | ||
branches: ["master","dev"] | ||
jobs: | ||
golangci: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.19 | ||
- uses: actions/checkout@v3 | ||
- name: Tidy | ||
run: go mod tidy | ||
- name: Lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: v1.46.2 | ||
args: --timeout=3m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
issues: | ||
new: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,45 @@ | ||
package types | ||
|
||
type Video struct { | ||
ID string `json:"id"` | ||
Src string `json:"src"` | ||
Type string `json:"type"` | ||
ID string `json:"id"` | ||
Src string `json:"src"` | ||
Type string `json:"type"` | ||
Watermark WaterMark `json:"watermark"` | ||
} | ||
|
||
type WaterMark struct { | ||
ID string `json:"id"` | ||
Src string `json:"src"` | ||
Dimension Dimension `json:"dimension"` | ||
Position Dimension `json:"position"` | ||
} | ||
|
||
type Dimension struct { | ||
X string `json:"x"` | ||
Y string `json:"y"` | ||
} | ||
|
||
type DIMENSION int | ||
|
||
const ( | ||
X DIMENSION = iota | ||
Y | ||
) | ||
|
||
var WaterMarkSizeMap = map[DIMENSION]string{ | ||
X: "x", | ||
Y: "y", | ||
} | ||
|
||
var WaterMarkPositionMap = map[DIMENSION]string{ | ||
X: "x", | ||
Y: "y", | ||
} | ||
|
||
func (w *WaterMark) IsEmpty() bool { | ||
if w.ID == "" { | ||
return true | ||
} | ||
|
||
return false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters