![JAR search and dependency download from the Maven repository](/logo.png)
template.Go.stg Maven / Gradle / Ivy
group T;
GoApiParam(type, name) ::= <<
>>
GoApiSetter(type, name) ::= <<
request. =
>>
GoApiPayloadParam(type, name) ::= <<
`json:""`
>>
GoApiType(apitype, name, paramPayload, ret) ::= <<
type RaptApi struct {
Context RaptApiLoginPayload `json:"context"`
}
type RaptApiResponse struct {
Response `json:"response"`
InError bool `json:"inError"`
}
>>
GoApiFn(apitype, name, apiParams, setterParams, ret) ::= <<
func (rctx *RaptureContext) _() {
request := RaptApi {}
request.Context = rctx.Context
// Now we need to set the params
jsonString, err := json.Marshal(request)
if err != nil {
log.Fatal(err)
}
resp := rctx.performDistRequest("", "", string(jsonString))
var response RaptApiResponse
json.Unmarshal(resp, &response)
return response.Response
}
>>
GoApi(types, fns) ::= <<
package rapture
import (
"encoding/json"
"log"
)
>>
GoStruct(name, fields) ::= <<
type struct {
}
>>
GoStructField(name, type) ::= <<
>>
GoStructFile(structs) ::= <<
package rapture
>>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy