Skip to content

Commit

Permalink
move diagrams to service definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
havan committed Dec 12, 2023
1 parent 0c13376 commit 458d0f6
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 17 deletions.
5 changes: 3 additions & 2 deletions proto/cmp/services/activity/v1alpha1/search.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ import "cmp/types/v1alpha1/traveller.proto";
// ### Activity Search Request
//
// Search request for Activities
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha1/search.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha1/search.proto.dot.svg)
message ActivitySearchRequest {
// Message Header. Contains api version, message info string and end-user wallet address
cmp.types.v1alpha1.Header header = 1;
Expand Down Expand Up @@ -98,6 +96,9 @@ message ActivitySearchResponse {
// ### Activity Search Service
//
// Takes `ActivitySearchRequest` message type and returns `ActivitySearchResponse` message type.
//
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha1/search.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha1/search.proto.dot.svg)
service ActivitySearchService {
rpc ActivitySearch(ActivitySearchRequest) returns (ActivitySearchResponse);
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ import "cmp/types/v1alpha1/partner.proto";
// ### Partner Configuration message type
//
// This message type represents the partner configuration on T-Chain (not implemented yet)
//
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/partner/v1alpha1/partner_configuration.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/partner/v1alpha1/partner_configuration.proto.dot.svg)
message PartnerConfiguration {
// List of partners from the on-chain Partner Configuration
repeated cmp.types.v1alpha1.Partner partners = 1;
Expand All @@ -33,8 +30,12 @@ message GetPartnerConfigurationResponse {
int32 current_block_height = 2;
}

// ### Get Partner Configuration Service
//
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/partner/v1alpha1/partner_configuration.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/partner/v1alpha1/partner_configuration.proto.dot.svg)
service GetPartnerConfigurationService {
// Get Partner Configuration Service
// #### GetPartnerConfiguration
//
// Takes `GetPartnerConfigurationRequest` which contains optional block height
// and partner wallet addresses and returns `GetPartnerConfigurationResponse`
Expand Down
10 changes: 5 additions & 5 deletions proto/cmp/services/ping/v1alpha1/ping.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,32 @@ import "google/protobuf/timestamp.proto";
// The ping message is designed to test the availability of a provider service
// and to test the network latency as in the gRPC metadata information the
// DateTime is stored of each hop.
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/ping/v1alpha1/ping.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/ping/v1alpha1/ping.proto.dot.svg)
message PingRequest {
// Message Header
// Contains api version, message info string and end user wallet address
cmp.types.v1alpha1.Header header = 1;

// Ping message
string ping_message = 2;

// DateTime of the ping request
google.protobuf.Timestamp timestamp = 3;
}

message PingResponse {
// Message Header
// Contains api version, message info string, sender & receiver wallet
// addresses
cmp.types.v1alpha1.Header header = 1;

// Ping message
string ping_message = 2;

// DateTime of the ping response
google.protobuf.Timestamp timestamp = 3;
}

// The Ping Service definition
//
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/ping/v1alpha1/ping.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/ping/v1alpha1/ping.proto.dot.svg)
service PingService {
// Ping Method
rpc Ping(PingRequest) returns (PingResponse);
Expand Down
13 changes: 8 additions & 5 deletions proto/cmp/services/transport/v1alpha1/search.proto
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
syntax = "proto3";

// ## This is the package level description for Transport Service
// ## Transport Service
//
// The Transport Service is used for flights, trains, and buses.
//
// Any search message response in the Camino Messenger Protocol only includes dynamic data. Static data can be cached and kept up to data with the Product List and Product Details messages.
// Any search message response in the Camino Messenger Protocol only includes dynamic
// data. Static data can be cached and kept up to data with the Product List and
// Product Details messages.
//
// This package is a WIP.
package cmp.services.transport.v1alpha1;
Expand All @@ -17,8 +19,6 @@ import "cmp/types/v1alpha1/search.proto";
import "cmp/types/v1alpha1/traveller.proto";

// ### Transport Search Request
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/search.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/search.proto.dot.svg)
message TransportSearchRequest {
// Message Header. Contains api version, message info string and end-user wallet address
cmp.types.v1alpha1.Header header = 1;
Expand Down Expand Up @@ -71,9 +71,12 @@ message TransportSearchResponse {
repeated TransportSearchResult results = 4;
}

// ## Transport Search Service
// ### Transport Search Service
//
// Takes `TransportSearchRequest` message type and returns `TransportSearchResponse` message type.
//
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/search.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/search.proto.dot.svg)
service TransportSearchService {
rpc TransportSearch(TransportSearchRequest) returns (TransportSearchResponse);
}
2 changes: 1 addition & 1 deletion proto/cmp/services/transport/v1alpha1/trip_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ message TripSegment {
// Ex: "BC"
string retailer_code = 3;

// Sub Provider Code, replacing Operating carrier or identifying sub contracted services
// Sub Provider Code, replacing Operating carrier or identifying sub contracted services
// provided by other suppliers
// Ex: "BC"
string sub_provider_code = 4;
Expand Down

0 comments on commit 458d0f6

Please sign in to comment.