bf65c43783
* [API Server] Add Example App for reference use. * Remove Printlns. * Upgrade app-sdk to v0.46.0, update apps to handle breaking changes. * Only start the reconciler for the example app if the v1alpha1 API version is enabled. * Some comment doc updates. * Run make update-workspace * Set codeowner for /apps/example * Run make gofmt and make update-workspace * Run prettier on apps/example/README.md * Add COPY apps/example to Dockerfile * Add an authorizer to the example app. * Fix import ordering. * Update apps/example/kinds/manifest.cue Co-authored-by: Owen Diehl <ow.diehl@gmail.com> * Run make update-workspace * Re-run make gen-go for enterprise import updates * Run make update-workspace --------- Co-authored-by: Owen Diehl <ow.diehl@gmail.com>
29 lines
756 B
Go
29 lines
756 B
Go
//
|
|
// Code generated by grafana-app-sdk. DO NOT EDIT.
|
|
//
|
|
|
|
package v1alpha1
|
|
|
|
import (
|
|
"encoding/json"
|
|
"io"
|
|
|
|
"github.com/grafana/grafana-app-sdk/resource"
|
|
)
|
|
|
|
// ExampleJSONCodec is an implementation of resource.Codec for kubernetes JSON encoding
|
|
type ExampleJSONCodec struct{}
|
|
|
|
// Read reads JSON-encoded bytes from `reader` and unmarshals them into `into`
|
|
func (*ExampleJSONCodec) Read(reader io.Reader, into resource.Object) error {
|
|
return json.NewDecoder(reader).Decode(into)
|
|
}
|
|
|
|
// Write writes JSON-encoded bytes into `writer` marshaled from `from`
|
|
func (*ExampleJSONCodec) Write(writer io.Writer, from resource.Object) error {
|
|
return json.NewEncoder(writer).Encode(from)
|
|
}
|
|
|
|
// Interface compliance checks
|
|
var _ resource.Codec = &ExampleJSONCodec{}
|