syntax = "proto3"; import "google/protobuf/empty.proto"; import "google/protobuf/wrappers.proto"; package event; option go_package = "github.com/hub1989/jc-protobuf/event"; service EventService { rpc getStreamData(google.protobuf.Empty) returns (EventResponse); rpc getNextEvent(google.protobuf.Empty) returns (EventResponse); rpc getComingEvents(google.protobuf.Empty) returns (EventResponses); rpc getEventsWithMessages(google.protobuf.Empty) returns (EventResponses); rpc getEventByPid(google.protobuf.StringValue) returns (EventResponse); } service EventAdminService { rpc getEventByPid(google.protobuf.StringValue) returns (EventAdminResponse); rpc getEventsByPids(StringListRequest) returns (EventAdminResponses); rpc addStreamingLink (StreamingLinkRequest) returns (google.protobuf.Empty); rpc createEvent(CreateEventRequest) returns (EventAdminResponse); rpc getIntervalSchedules(google.protobuf.Empty) returns (StringListResponse); rpc addEventData(ServiceDataRequest) returns (google.protobuf.Empty); rpc getAllEvents(PageableRequest) returns (PageableAdminResponse); } service Mp3Service { rpc addMessageToEvent(Mp3Request) returns (Mp3Response); rpc getMessageForEvent(google.protobuf.StringValue) returns (Mp3Response); rpc getAllMessages(PageableRequest) returns (PageableMp3Response); } service ComponentHealthService { rpc showDetails(google.protobuf.Empty) returns (InternalHealthResponse); } // Requests message StringListRequest { repeated google.protobuf.StringValue strings = 1; } message StringListResponse { repeated google.protobuf.StringValue strings = 1; } message InternalHealthResponse { string status = 1; string description = 2; map details = 3; string lastSeen = 4; string ipAddress = 5; } message StreamingLinkRequest { string eventPid = 1; string streamingLink = 2; } message ServiceDataRequest { string eventPid = 1; int32 men = 2; int32 women = 3; int32 children = 4; } message CreateEventRequest { string date = 1; string name = 2; bool recurring = 3; string startTime = 4; string endTime = 5; google.protobuf.StringValue intervalSchedule = 6; google.protobuf.Int32Value intervalRate = 7; } message EventResponse { string date = 1; string name = 2; string startTime = 3; string endTime = 4; string dayOfWeek = 5; string pid = 6; google.protobuf.StringValue streamingLink = 7; } message EventResponses { repeated EventResponse events = 1; } message EventAdminResponse { string date = 1; string name = 2; bool recurring = 3; string startTime = 4; string endTime = 5; google.protobuf.StringValue intervalSchedule = 6; google.protobuf.Int32Value intervalRate = 7; google.protobuf.StringValue streamingLink = 8; google.protobuf.StringValue messageLink = 9; int32 men = 10; int32 women = 11; int32 children = 12; double totalInSek = 13; string pid = 14; } message EventAdminResponses { repeated EventAdminResponse events = 1; } message Mp3Request { string eventPid = 1; google.protobuf.StringValue messageTitle = 2; google.protobuf.StringValue speaker = 3; google.protobuf.StringValue messageLink = 4; } message Mp3Response { google.protobuf.StringValue messageLink = 1; google.protobuf.StringValue messageTitle = 2; string eventName = 3; string date = 4; google.protobuf.StringValue speaker = 5; string eventPid = 6; } message Mp3Responses { repeated Mp3Response messages = 1; } message PageableMp3Response { repeated Mp3Response data = 1; google.protobuf.Int64Value page_number = 2; google.protobuf.Int64Value number_per_page = 3; google.protobuf.StringValue last_item_id = 4; google.protobuf.Int64Value total = 5; google.protobuf.Int64Value noOfItemsInBatch = 6; } message PageableRequest { google.protobuf.Int64Value page_number = 1; google.protobuf.Int64Value number_per_page = 2; google.protobuf.StringValue last_item_id = 3; } message PageableAdminResponse { repeated EventAdminResponse data = 1; google.protobuf.Int64Value page_number = 2; google.protobuf.Int64Value number_per_page = 3; google.protobuf.StringValue last_item_id = 4; google.protobuf.Int64Value total = 5; google.protobuf.Int64Value noOfItemsInBatch = 6; }