rokka-io / rokka-go Goto Github PK
View Code? Open in Web Editor NEWRokka API client library and CLI in Go
Home Page: https://rokka.io
License: MIT License
Rokka API client library and CLI in Go
Home Page: https://rokka.io
License: MIT License
(Not just a JSON output anymore)
-raw
)See rokka-io/rokka-site#65 for docs.
chmod +x
the binarySearching sourceimages can be done on various fields in various ways. How we currently implement it is that you can pass a string for each of those values and define on your own whether you want to use a range or just a value.
This is not very typesafe and could be made easier by the library. Question is: is it worth the effort?
An example of how we could implement that for the string type (untested code):
type MaybeRangedString struct {
Val string
Range RangedString
}
func (mrs *MaybeRangedString) EncodeValues(key string, v *url.Values) error {
if mrs.Val != "" {
v.Set(key, mrs.Val)
return nil
} else {
return mrs.Range.Encode(key, v)
}
}
// RangedString is a string with from and to values.
// FromExclusive/ToExclusive define how the query string range is passed.
//
// From needs to be set always.
type RangedString struct {
From string
To string
FromExclusive bool
ToExclusive bool
}
// EncodeValues implements query.Encoder for custom range encoding.
func (rs *RangedString) EncodeValues(key string, v *url.Values) error {
s := ""
if rs.FromExclusive {
s += "{"
} else {
s += "["
}
s += rs.From
if rs.To != "" {
s += "," + rs.To
}
if rs.ToExclusive {
s += "}"
} else {
s += "]"
}
v.Set(key, s)
return nil
}
Similar implementations would have to be provided for the other types, though some things can probably be reused accross the types.
Opinions?
Todo still:
chregu@pri14:~/tmp$ rokka stacks delete $YOUR_ORG test
Stack successfully deletedchregu@pri14:~/tmp$
There should be a new line after "deleted"
to be able to immediately open the sourceimage in the browser and see how it looks like.
Probably needs some way to use the image host to generate the URL. May not be possible just with a template change.
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.