-
-
Save vitiko/baa045f49ac4cc74e2b7b9918ac0e1e7 to your computer and use it in GitHub Desktop.
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
syntax = "proto3"; | |
package service; | |
import "google/api/annotations.proto"; | |
import "google/protobuf/empty.proto"; | |
import "github.com/s7techlab/cckit/examples/cpaper_asservice/schema/schema.proto"; | |
service CPaper { | |
// List method returns all registered commercial papers | |
rpc List (google.protobuf.Empty) returns (schema.CommercialPaperList) { | |
option (google.api.http) = { | |
get: "/cpaper" | |
}; | |
} | |
// Get method returns commercial paper data by id | |
rpc Get (schema.CommercialPaperId) returns (schema.CommercialPaper) { | |
option (google.api.http) = { | |
get: "/cpaper/{issuer}/{paper_number}" | |
}; | |
} | |
// GetByExternalId | |
rpc GetByExternalId (schema.ExternalId) returns (schema.CommercialPaper) { | |
option (google.api.http) = { | |
get: "/cpaper/extid/{id}" | |
}; | |
} | |
// Issue commercial paper | |
rpc Issue (schema.IssueCommercialPaper) returns (schema.CommercialPaper) { | |
option (google.api.http) = { | |
post : "/cpaper/issue" | |
body: "*" | |
}; | |
} | |
// Buy commercial paper | |
rpc Buy (schema.BuyCommercialPaper) returns (schema.CommercialPaper) { | |
option (google.api.http) = { | |
post: "/cpaper/buy" | |
body: "*" | |
}; | |
} | |
// Redeem commercial paper | |
rpc Redeem (schema.RedeemCommercialPaper) returns (schema.CommercialPaper) { | |
option (google.api.http) = { | |
post: "/cpaper/redeem" | |
body: "*" | |
}; | |
} | |
// Delete commercial paper | |
rpc Delete (schema.CommercialPaperId) returns (schema.CommercialPaper) { | |
option (google.api.http) = { | |
delete: "/cpaper/{issuer}/{paper_number}" | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment