Code Monkey home page Code Monkey logo

goprotowrap's People

Contributors

bwester avatar zellyn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

goprotowrap's Issues

Generate dot output

It would be nice to generate dot output to illustrate cycles. It could prompt the user to paste it into https://mdaines.github.io/viz.js/

Example current output:
square/up/protos/squareup/omnibus/api_attempt_failed_bill_classification;api_attempt_failed_bill_classification --> square/up/protos/squareup/omnibus/api;api
squareup/omnibus/api/attempt_failed_bill_classification.proto imports squareup/omnibus/api/options.proto
square/up/protos/squareup/omnibus/api_resolve_failed_bill;api_resolve_failed_bill --> square/up/protos/squareup/omnibus/api;api
squareup/omnibus/api/resolve_failed_bill.proto imports squareup/omnibus/api/options.proto
square/up/protos/squareup/omnibus/api_classify_failed_bill;api_classify_failed_bill --> square/up/protos/squareup/omnibus/api;api
squareup/omnibus/api/classify_failed_bill.proto imports squareup/omnibus/api/options.proto
square/up/protos/squareup/omnibus/api_list_failed_bill_audit_logs;api_list_failed_bill_audit_logs --> square/up/protos/squareup/omnibus/api;api
squareup/omnibus/api/list_failed_bill_audit_logs.proto imports squareup/omnibus/api/options.proto
square/up/protos/squareup/omnibus/api;api --> square/up/protos/squareup/omnibus/api_list_failed_bill_audit_logs;api_list_failed_bill_audit_logs
squareup/omnibus/api/service.proto imports squareup/omnibus/api/list_failed_bill_audit_logs.proto
square/up/protos/squareup/omnibus/api;api --> square/up/protos/squareup/omnibus/api_classify_failed_bill;api_classify_failed_bill
squareup/omnibus/api/service.proto imports squareup/omnibus/api/classify_failed_bill.proto
squareup/omnibus/api/service.proto imports squareup/omnibus/api/create_internal_legacy_refund.proto
squareup/omnibus/api/service.proto imports squareup/omnibus/api/approve_refund.proto
squareup/omnibus/api/service.proto imports squareup/omnibus/api/reject_refund.proto
square/up/protos/squareup/omnibus/api;api --> square/up/protos/squareup/omnibus/api_resolve_failed_bill;api_resolve_failed_bill
squareup/omnibus/api/service.proto imports squareup/omnibus/api/resolve_failed_bill.proto
square/up/protos/squareup/omnibus/api;api --> square/up/protos/squareup/omnibus/api_attempt_failed_bill_classification;api_attempt_failed_bill_classification
squareup/omnibus/api/service.proto imports squareup/omnibus/api/attempt_failed_bill_classification.proto

Example dot output:

digraph G {
subgraph cluster_2 {
node [style=filled];
label = "api_attempt_failed_bill_classification";
"attempt_failed_bill_classification.proto";
}
subgraph cluster_3 {
node [style=filled];
label = "api_resolve_failed_bill";
"resolve_failed_bill.proto";
}
subgraph cluster_4 {
node [style=filled];
label = "api_classify_failed_bill";
"classify_failed_bill.proto";
"approve_refund.proto";
"reject_refund.proto";
"create_internal_legacy_refund.proto";
}
subgraph cluster_5 {
node [style=filled];
label = "api_list_failed_bill_audit_logs";
"list_failed_bill_audit_logs.proto";
}
subgraph cluster_6 {
node [style=filled];
label = "api";
"service.proto";
"options.proto";
}

"attempt_failed_bill_classification.proto" -> "options.proto";
"resolve_failed_bill.proto" -> "options.proto";
"classify_failed_bill.proto" -> "options.proto";
"list_failed_bill_audit_logs.proto" -> "options.proto";
"service.proto" -> "list_failed_bill_audit_logs.proto";
"service.proto" -> "classify_failed_bill.proto";
"service.proto" -> "create_internal_legacy_refund.proto";
"service.proto" -> "approve_refund.proto";
"service.proto" -> "reject_refund.proto";
"service.proto" -> "resolve_failed_bill.proto";
"service.proto" -> "attempt_failed_bill_classification.proto";

}

Protowrap assumes project is inside GOPATH

protowrap will generate go files to a directory which resembles the go package of pb file.

Example:

syntax = "proto3";
package foo;
option go_package = "github.com/xyz/project/foo";

When compiled, will generate go files in a relative directory./github.com/xyz/project/foo/foo.pb.go.

This is not suitable for projects which use Go modules because the package path does not need to match the actual filesystem path of the project.
I temporarily resolved this issue by moving generated files into the right directory after they're generated

Example usage/package structure

I'm interested in using this, but I'm not really sure how my proto files should be organized. I'm getting the error:

Error: proto file "<the file>" must have a lexicographical prefix of one of the import directories

Can you update the readme with some examples?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.