-
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.
Added Items.proto, and added support for server items
- Loading branch information
Showing
9 changed files
with
1,381 additions
and
88 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 |
---|---|---|
@@ -1,5 +1,15 @@ | ||
load("@bazel_gazelle//:def.bzl", "gazelle") | ||
|
||
# Gazelle is used for automatically creating BUILD files and updating dependencies from go | ||
# bazel run //:gazelle -- update | ||
# bazel run //:gazelle -- update-repos https://github.com/link/to/repo/to/add | ||
# | ||
# gazelle:prefix github.com/MichiganDiningAPI | ||
# gazelle:build_file_names BUILD,BUILD.bazel | ||
gazelle(name = "gazelle") | ||
|
||
load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier") | ||
|
||
# Buildifier formats BUILD files | ||
# bazel run //:buildifier | ||
buildifier(name = "buildifier") |
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,53 +1,47 @@ | ||
load("@io_bazel_rules_go//go:def.bzl", "go_library") | ||
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") | ||
|
||
proto_library( | ||
name = "dininghalls_proto", | ||
srcs = ["dininghalls.proto"], | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
proto_library( | ||
name = "items_proto", | ||
srcs = ["items.proto"], | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
proto_library( | ||
name = "mdining_proto", | ||
srcs = ["mdining.proto"], | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
":dininghalls_proto", | ||
":items_proto", | ||
"@go_googleapis//google/api:annotations_proto", | ||
], | ||
) | ||
|
||
# go_proto_library( | ||
# name = "mdining_go_proto", | ||
# compilers = [ | ||
# "@io_bazel_rules_go//proto:go_grpc", | ||
# "@com_github_grpc_ecosystem_grpc_gateway//protoc-gen-grpc-gateway:go_gen_grpc_gateway" | ||
# ], | ||
# importpath = "github.com/MichiganDiningAPI/api/proto", | ||
# proto = ":mdining_proto", | ||
# visibility = ["//visibility:public"], | ||
# deps = ["@go_googleapis//google/api:annotations_go_proto"], | ||
# ) | ||
|
||
# go_library( | ||
# name = "go_default_library", | ||
# srcs = [""] | ||
# embed = [":mdining_go_proto"], | ||
# importpath = "github.com/MichiganDiningAPI/api/proto", | ||
# visibility = ["//visibility:public"], | ||
# ) | ||
|
||
go_proto_library( | ||
name = "go_default_library", | ||
compilers = [ | ||
"@io_bazel_rules_go//proto:go_grpc", | ||
"@grpc_ecosystem_grpc_gateway//protoc-gen-grpc-gateway:go_gen_grpc_gateway" | ||
"@grpc_ecosystem_grpc_gateway//protoc-gen-grpc-gateway:go_gen_grpc_gateway", | ||
], | ||
importpath = "github.com/MichiganDiningAPI/api/proto", | ||
proto = ":mdining_proto", | ||
protos = [":mdining_proto", ":items_proto", ":dininghalls_proto"], | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"@com_github_golang_protobuf//descriptor:go_default_library", | ||
"@com_github_golang_protobuf//proto:go_default_library", | ||
"@grpc_ecosystem_grpc_gateway//runtime:go_default_library", | ||
"@grpc_ecosystem_grpc_gateway//utilities:go_default_library", | ||
"@org_golang_google_genproto//googleapis/api/annotations:go_default_library", | ||
"@org_golang_google_grpc//:go_default_library", | ||
"@org_golang_google_grpc//codes:go_default_library", | ||
"@org_golang_google_grpc//grpclog:go_default_library", | ||
"@org_golang_google_grpc//status:go_default_library", | ||
"@grpc_ecosystem_grpc_gateway//utilities:go_default_library", | ||
"@grpc_ecosystem_grpc_gateway//runtime:go_default_library", | ||
"@org_golang_google_genproto//googleapis/api/annotations:go_default_library", | ||
], | ||
visibility = [ "//visibility:public"], | ||
) |
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,52 @@ | ||
syntax = "proto3"; | ||
|
||
package mdining; | ||
|
||
message DiningHalls { repeated DiningHall diningHalls = 1; } | ||
|
||
message DiningHall { | ||
string name = 1; | ||
string campus = 2; | ||
Building building = 3; | ||
string type = 4; | ||
Capacity capacity = 5; | ||
uint32 sortPosition = 6; | ||
repeated DayHour dayHours = 7; | ||
repeated DayEvent dayEvents = 8; | ||
|
||
message Building { | ||
string name = 1; | ||
Address address = 2; | ||
|
||
message Address { | ||
string city = 1; | ||
uint32 postalCode = 2; | ||
string state = 3; | ||
string street1 = 4; | ||
string street2 = 5; | ||
} | ||
} | ||
message Capacity { | ||
uint32 currentOccupancy = 1; | ||
uint32 currentOccupancyRatio = 2; | ||
uint32 totalCapacity = 3; | ||
} | ||
message DayHour { | ||
string key = 1; | ||
repeated string hour = 2; | ||
} | ||
message DayEvent { | ||
string key = 1; | ||
repeated CalendarEvent calendarEvent = 2; | ||
|
||
message CalendarEvent { | ||
string eventDayEnd = 1; | ||
string eventDayStart = 2; | ||
string eventDescription = 3; | ||
string eventMapLink = 4; | ||
string eventTimeStart = 5; | ||
string eventTimeEnd = 6; | ||
string eventTitle = 7; | ||
} | ||
} | ||
} |
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,24 @@ | ||
syntax = "proto3"; | ||
|
||
package mdining; | ||
|
||
message Items { | ||
map<string, Item> items = 1; | ||
} | ||
|
||
message Item { | ||
string name = 1; | ||
repeated string attributes = 2; | ||
map<string, DiningHallMatch> diningHallMatches = 3; | ||
repeated DiningHallMatch diningHallMatchesArray = 4; | ||
message DiningHallMatch { | ||
string name = 1; | ||
map<string, MealTime> mealTimes = 2; | ||
repeated MealTime mealTimesArray = 3; | ||
message MealTime { | ||
string date = 1; | ||
string formattedDate = 2; | ||
repeated string mealNames = 3; | ||
} | ||
} | ||
} |
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
Oops, something went wrong.