~bduggan/raku-protobuf

5e4889a6f61d4e065fc7b398214c8672f356916d — Brian Duggan 7 months ago ea4bbaf 0.0.1
docs
1 files changed, 23 insertions(+), 23 deletions(-)

M README.md
M README.md => README.md +23 -23
@@ 1,10 1,10 @@
# raku-protobuf

Utilities for handling protobufs with Raku
Parse and manage Protobufs with Raku

## Description

This package contains utilities for managing protobufs with raku.
This package contains utilities for managing protobufs with Raku.

Current contents:



@@ 19,35 19,35 @@ built by Protobuf::Actions.

## SYNOPSIS

  use Protobuf;
    use Protobuf;

  my $p = parse-proto("my.proto".IO.slurp);
  # returns a Protobuf::Definition
    my $p = parse-proto("my.proto".IO.slurp);
    # returns a Protobuf::Definition

  for $p.services -> $svc {
    for $p.services -> $svc {

    # each one is a Protobuf::Service
    say "service name: " ~ $svc.name;
      # each one is a Protobuf::Service
      say "service name: " ~ $svc.name;

    for $svc.endpoints -> $e {
      # each one is a Protobuf::Endpoint
      say " endpoint:  " ~ $e.name;
      for $svc.endpoints -> $e {
        # each one is a Protobuf::Endpoint
        say " endpoint:  " ~ $e.name;

      say '  request params: ' ~ $e.request.name;
      # Requests and responses are Protobuf::Message's
        say '  request params: ' ~ $e.request.name;
        # Requests and responses are Protobuf::Message's

      for $e.request.fields -> $f {
        # These are Protobuf::Field's
        say '   name : ' ~ $f.name;
        say '   type : ' ~ $f.type;
      }
      say '  response params: ' ~ $e.response.name;
      for $e.response.fields -> $f {
        say '   name : ' ~ $f.name;
        say '   type : ' ~ $f.type;
        for $e.request.fields -> $f {
          # These are Protobuf::Field's
          say '   name : ' ~ $f.name;
          say '   type : ' ~ $f.type;
        }
        say '  response params: ' ~ $e.response.name;
        for $e.response.fields -> $f {
          say '   name : ' ~ $f.name;
          say '   type : ' ~ $f.type;
        }
      }
    }
  }

## AUTHOR