grafana/pkg/kinds/rolebinding/rolebinding_gen.go
Ryan McKinley 10ea92fa09
Schemas: minor updates from the k8s branch (#71688)
Co-authored-by: sam boyer <sdboyer@grafana.com>
2023-07-21 19:17:11 +03:00

40 lines
1.0 KiB
Go

// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// kinds/gen.go
// Using jennies:
// GoTypesJenny
//
// Run 'make gen-cue' from repository root to regenerate.
package rolebinding
import (
"github.com/grafana/grafana/pkg/kinds"
)
// Resource is the kubernetes style representation of RoleBinding. (TODO be better)
type K8sResource = kinds.GrafanaResource[Spec, Status]
// NewResource creates a new instance of the resource with a given name (UID)
func NewK8sResource(name string, s *Spec) K8sResource {
return K8sResource{
Kind: "RoleBinding",
APIVersion: "v0-0-alpha",
Metadata: kinds.GrafanaResourceMetadata{
Name: name,
Annotations: make(map[string]string),
Labels: make(map[string]string),
},
Spec: s,
}
}
// Resource is the wire representation of RoleBinding.
// It currently will soon be merged into the k8s flavor (TODO be better)
type Resource struct {
Metadata Metadata `json:"metadata"`
Spec Spec `json:"spec"`
Status Status `json:"status"`
}