machinebox / remoto Goto Github PK
View Code? Open in Web Editor NEWUltra-simple RPC ecosystem designed for right now.
Home Page: https://remotoproject.com/
License: Apache License 2.0
Ultra-simple RPC ecosystem designed for right now.
Home Page: https://remotoproject.com/
License: Apache License 2.0
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)
Using a single file will be more obvious
Apache for example could be a good choice
... in fact, insist on not pointers.
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?
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 be able to share common types within the same package.
(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.
for simplicity, a remoto definition file should contain everything required, so no important of other types. We'll encourage copy and paste for completeness.
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
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.