ch06/

directory
v0.0.0-...-b3ab350 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2020 License: CC-BY-4.0

README

Chapter 6: Secured gRPC

ProductInfo Service and Client

  • Online retail scenario has a ProductInfo microservice which is responsible for managing the products and their information. The consumer of that service can add, retrieve products via that service.

  • ProductInfo service and the consumer of that service are implemented in both Go and Java languages.

  • This use case shows how you can implement both ProductInfo service and its consumer.

Service Definition

package ecommerce;

service ProductInfo {
    rpc addProduct(Product) returns (ProductID);
    rpc getProduct(ProductID) returns (Product);
}

message Product {
    string id = 1;
    string name = 2;
    string description = 3;
    float price = 4;
}

message ProductID {
    string value = 1;
}

Implementation

Directories

Path Synopsis
basic-authentication
mutual-tls-channel
secure-channel
token-based-authentication

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL