-
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.
Signed-off-by: sukhman-sukh <[email protected]>
- Loading branch information
1 parent
61130f9
commit 50b26a3
Showing
5 changed files
with
1,013 additions
and
2 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,25 @@ | ||
package main | ||
|
||
import ( | ||
"github.com/sdslabs/pinger/pkg/protobuf/pb" | ||
"google.golang.org/grpc" | ||
"net" | ||
) | ||
|
||
type server struct { | ||
pb.AlterServicesServer | ||
} | ||
|
||
func main() { | ||
lis, err := net.Listen("tcp", ":5000") | ||
if err != nil { | ||
panic(err); | ||
} | ||
|
||
grpcServer := grpc.NewServer() | ||
pb.RegisterAlterServicesServer(grpcServer, &server{}) | ||
if err := grpcServer.Serve(lis); err != nil { | ||
panic(err) | ||
} | ||
grpcServer.Serve(lis) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
syntax = "proto3"; | ||
|
||
package alter; | ||
|
||
option go_package = "/pb"; | ||
|
||
message CreateCheckRequest { | ||
string Check = 1; | ||
string PageId = 2; | ||
} | ||
|
||
message DeleteCheckRequest { | ||
string UserId = 1; | ||
string CheckId = 2; | ||
string Role = 3; | ||
} | ||
|
||
message UpdateCheckRequest { | ||
string CheckId = 1; | ||
string UpdateCheckString = 2; | ||
string UserId = 3; | ||
string Role = 4; | ||
} | ||
|
||
message CreatePageRequest { string NewPageString = 1; } | ||
|
||
message DeletePageRequest { string PageId = 1; } | ||
|
||
message UpdatePageRequest { string PageId = 1; } | ||
|
||
message Response { string Response = 1; } | ||
|
||
service AlterServices { | ||
rpc CreateCheckService(CreateCheckRequest) returns (Response) {} | ||
rpc DeleteCheckService(DeleteCheckRequest) returns (Response) {} | ||
rpc UpdateCheckService(UpdateCheckRequest) returns (Response) {} | ||
rpc CreatePageService(CreatePageRequest) returns (Response) {} | ||
rpc DeletePageService(DeletePageRequest) returns (Response) {} | ||
rpc UpdatePageService(UpdatePageRequest) returns (Response) {} | ||
} |
Oops, something went wrong.