mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-04 10:21:40 +00:00
master -> develop (#20)
* Squash merge develop into master * feat: add automated production release workflow * feat: add Gitflow workflow for syncing branches * ci: update workflow runner to latest ubuntu version * feat: enable buf.build publishing on master and develop branches --------- Co-authored-by: Prad Nukala <prad@sonr.io>
This commit is contained in:
co-authored by
Prad Nukala
parent
7b0693ef67
commit
228adb7f93
+37
@@ -0,0 +1,37 @@
|
||||
@go.Package { name = "github.com/onsonr/sonr/motr/api" }
|
||||
|
||||
module api
|
||||
|
||||
import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"
|
||||
|
||||
class JsonField extends go.Field {
|
||||
structTags {
|
||||
["json"] = "%{name},omitempty"
|
||||
}
|
||||
}
|
||||
|
||||
abstract class Request {
|
||||
route: String
|
||||
method: String
|
||||
headers: Map<String, String>
|
||||
origin: String?
|
||||
userAgent: String?
|
||||
body: Dynamic
|
||||
}
|
||||
|
||||
abstract class Response {
|
||||
statusCode: Int
|
||||
headers: Map<String, String>
|
||||
body: Dynamic
|
||||
}
|
||||
|
||||
class GetAccountsRequest extends Request {
|
||||
route = "/accounts"
|
||||
method = "GET"
|
||||
headers = {
|
||||
"Content-Type" = "application/json"
|
||||
}
|
||||
origin = null
|
||||
userAgent = null
|
||||
body = null
|
||||
}
|
||||
Reference in New Issue
Block a user