This repository has been archived by the owner on Mar 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
713 additions
and
22 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 |
---|---|---|
|
@@ -26,3 +26,4 @@ configs/influxdb/ | |
configs/*.conf | ||
internal/app/web/templates/ | ||
*.db | ||
upload/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,25 @@ | ||
syntax = "proto3"; | ||
package pb; | ||
|
||
import "base.proto"; | ||
|
||
option go_package = "api/pb"; | ||
|
||
service Storage { | ||
rpc UploadFile(stream FileRequest) returns (FileReply) {} | ||
} | ||
|
||
message FileRequest { | ||
oneof data { | ||
FileInfo info = 1; | ||
bytes chuck = 2; | ||
} | ||
} | ||
|
||
message FileInfo { | ||
string fileType = 1; | ||
} | ||
|
||
message FileReply { | ||
string path = 1; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,22 @@ | ||
package main | ||
|
||
import ( | ||
"flag" | ||
) | ||
|
||
var configFile = flag.String("f", "rpc.yml", "set config file which will loading") | ||
|
||
func main() { | ||
flag.Parse() | ||
|
||
a, err := CreateApp(*configFile) | ||
if err != nil { | ||
panic(err) | ||
} | ||
|
||
if err := a.Start(); err != nil { | ||
panic(err) | ||
} | ||
|
||
a.AwaitSignal() | ||
} |
Oops, something went wrong.