ponzu-cms / go-client Goto Github PK
View Code? Open in Web Editor NEWGo HTTP client for Ponzu
License: BSD 3-Clause "New" or "Revised" License
Go HTTP client for Ponzu
License: BSD 3-Clause "New" or "Revised" License
Wishing to hear opinions..
I would prefer a faster API that can still work with json but I can use protobufs too.
I want to do some work on extending ponzu but hate the loose typing of json and http handlers.
If Flatbuffers with grpc were the basis then you can expose that also as a rest / graphql API for those that are cool with untyped.
It would also make building real apps on top of the headless CMS much easier. For example you can use a grpc Flatbuffers client that is code generated and then built complex GUI using gopherjs or flutter easily.
Both support protobuf and Flatbuffers.
I am aware that this is a big refactoring. But I still think it's worth raising as ponzu might benefit.
Would this be useful? Not 100% sure about how/where driver.Valuer
would be used, but a making a *client.APIResponse
implement the sql.Scanner
interface would let users do:
resp, err := client.Content("Blog", 1)
if err != nil {
return err
}
// content.Blog is the Blog type imported from user's Ponzu content package
var singleBlogPost content.Blog
resp.Scan(&singleBlogPost)
// then use singleBlogPost and all it's fields
fmt.Println("The title of the blog post is:", singleBlogPost.Title)
not sure why I left this undone, but adding here as a reminder, or if someone else wants to contribute.
./gdb64.exe --interpreter=mi --args "client.exe" [E:/go/src/github.com/ponzu-cms/go-client/client]
panic: assignment to entry in nil map
goroutine 1 [running]:
net/textproto.MIMEHeader.Set(0x0, 0x67cfd3, 0xd, 0x67f2ae, 0x14)
d:/go/src/net/textproto/header.go:22 +0x5a
net/http.Header.Set(0x0, 0x67cfd3, 0xd, 0x67f2ae, 0x14)
d:/go/src/net/http/header.go:31 +0x5a
main.main()
e:/go/src/github.com/ponzu-cms/go-client/client/main.go:18 +0xc3
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.