Documentation
¶
Index ¶
Constants ¶
View Source
const TEMPLATE_MAIN = `
package apogy
import (
openapi "github.com/aep/apogy/api/go"
)
type Document[Val any] struct {
openapi.Document
Val Val ` + "`json:\"val\"`" + `
}
{{range $t, $n := .Types}}
type {{$t}} Document[{{$t}}Val]
{{end}}
type Client struct {
openapi.ClientInterface
{{range $t, $n := .Types}}
{{$t}} *openapi.TypedClient[{{$t}}]
{{end}}
}
type ClientOption openapi.ClientOption
func NewClient(server string, opts ...ClientOption) (*Client, error) {
var optss []openapi.ClientOption
for _, o := range opts {
optss = append(optss, openapi.ClientOption(o))
}
client, err := openapi.NewClient(server, optss...)
if err != nil {
return nil, err
}
r := &Client{ClientInterface: client}
{{range $t,$n := .Types}}
r.{{$t}} = &openapi.TypedClient[{{$t}}]{client, "{{$n}}"}
{{end}}
return r, nil
}
`
View Source
const TEMPLATE_MODEL = `
package apogy
import (
)
`
Variables ¶
This section is empty.
Functions ¶
func RegisterCommands ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.