GithubHelp home page GithubHelp logo

machinebox / remoto Goto Github PK

View Code? Open in Web Editor NEW
303.0 303.0 14.0 11.48 MB

Ultra-simple RPC ecosystem designed for right now.

Home Page: https://remotoproject.com/

License: Apache License 2.0

Go 62.68% Makefile 0.60% CSS 0.12% HTML 16.83% JavaScript 19.77%
apis golang microservices mobile rpc web

remoto's People

Contributors

jamesjwarren avatar matryer avatar romanyx 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

remoto's Issues

install failed

go env

GOARCH="amd64"
GOBIN="/home/wdy/go/bin"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/wdy/gitlab"
GORACE=""
GOROOT="/home/wdy/go"
GOTOOLDIR="/home/wdy/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build039446685=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

wdy@wdy:~$ go get -u -v github.com/matryer/remoto
github.com/matryer/remoto (download)
github.com/gobuffalo/plush (download)
github.com/gobuffalo/envy (download)
github.com/joho/godotenv (download)
github.com/gobuffalo/github_flavored_markdown (download)
# cd /home/wdy/gitlab/src/github.com/gobuffalo/github_flavored_markdown; git pull --ff-only
From https://github.com/gobuffalo/github_flavored_markdown
 * [new branch]      fix-blackfriday -> origin/fix-blackfriday
 * [new branch]      master          -> origin/master
 * [new tag]         v1.0.0          -> v1.0.0
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> master

package github.com/gobuffalo/github_flavored_markdown: exit status 1
github.com/gobuffalo/tags (download)
github.com/fatih/structs (download)
github.com/pkg/errors (download)
github.com/gobuffalo/uuid (download)
github.com/gobuffalo/validate (download)
github.com/markbates/going (download)
# cd .; git clone https://github.com/markbates/going /home/wdy/gitlab/src/github.com/markbates/going
Cloning into '/home/wdy/gitlab/src/github.com/markbates/going'...
error: Untracked working tree file '.gitignore' would be overwritten by merge.
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'

package github.com/markbates/going/wait: exit status 128
github.com/markbates/inflect (download)
github.com/serenize/snaker (download)
github.com/spf13/cobra (download)
github.com/spf13/pflag (download)

add LICENSE

Apache for example could be a good choice

Typescript client template

I'm interested in generating a typescript client, guessing others might be too. I'm keen to work on the necessary template, has there been any prior work on this?

console: import fails

Importing the remototypes package fails in the console due to importing issues.

To recreate the problem use the following remoto definition in the console:

package classificationbox

import (
	"github.com/machinebox/remoto/remototypes"
)

You will get error:

4:2: could not import github.com/machinebox/remoto/remototypes (open ./vendor/github.com/machinebox/remoto/remototypes: no such file or directory) 
  • Should it be explicitly handled in generator/importer.go?

Consider adding default templates to cli

(Really excited about this project!)

The idea of being able to use your own templates is neat, however, when starting out it may be easier (and more manageable) to use a default (built-in) template if one is not supplied, at least for the supported server/client: Go and ES6.

I don't want to keep a copy of server.go.plush or client.go.plush within our repo. From day-to-day I'd update the remoto cli (if needed) and use it to generate source code without worrying about templates.

remoto project.remoto.go go-server -o server.go

go-server go-client es6-client etc. otherwise check for the supplied template path.

explicitly disallow imports

for simplicity, a remoto definition file should contain everything required, so no important of other types. We'll encourage copy and paste for completeness.

Clarification of decoder behaviour

In the examples, GreetRequest is a simple struct with a single Name field. I was expecting to send the request as an object

{ "name": "mike" }

But I get the error:

decode json: json: cannot unmarshal object into Go value of type []*simplyProjected.SimpleRequest

If I send it as an array its fine. Is the expected behaviour of the decoder to assume an array of objects?

[{ "name": "mike" }]

https://github.com/machinebox/remoto/blob/master/examples/greeter/server/greeter/server.go#L90

generation failed: undeclared name

Hello,

I tried generating a server with remoto and got an undeclared name error. I reproduced the error with:

remoto generate infoer.remoto.go ~/go/src/github.com/machinebox/remoto/templates/remotohttp/server.go.plush 
parse: conf.Check: io.Reader.go:12:7: undeclared name: Info

With the code here
The Info struct is declared in the same package, but remoto cannot understand/find it.

Am I using this wrong?

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.