Documentation ¶
Overview ¶
Package v1alpha1 contains types required for v1alpha1 +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:defaulter-gen=TypeMeta +groupName=o11y.prism.oam.dev
Index ¶
- Constants
- Variables
- func NewEmptyCredentialGrafanaSecretError() error
- func NewEmptyEndpointGrafanaSecretError() error
- func NewInvalidGrafanaSecretNameError() error
- type AccessCredential
- type BasicAuth
- type Grafana
- func (in *Grafana) ConvertToTable(ctx context.Context, object runtime.Object, tableOptions runtime.Object) (*metav1.Table, error)
- func (in *Grafana) Create(ctx context.Context, obj runtime.Object, ...) (runtime.Object, error)
- func (in *Grafana) DeepCopy() *Grafana
- func (in *Grafana) DeepCopyInto(out *Grafana)
- func (in *Grafana) DeepCopyObject() runtime.Object
- func (in *Grafana) Delete(ctx context.Context, name string, deleteValidation rest.ValidateObjectFunc, ...) (obj runtime.Object, _ bool, err error)
- func (in *Grafana) Destroy()
- func (in *Grafana) DoRequest(ctx context.Context, method string, path string, body io.Reader) ([]byte, int, error)
- func (in *Grafana) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)
- func (in *Grafana) GetCredentialType() GrafanaCredentialType
- func (in *Grafana) GetGroupVersionResource() schema.GroupVersionResource
- func (in *Grafana) GetObjectMeta() *metav1.ObjectMeta
- func (in *Grafana) IsStorageVersion() bool
- func (in *Grafana) List(ctx context.Context, options *metainternalversion.ListOptions) (runtime.Object, error)
- func (in *Grafana) NamespaceScoped() bool
- func (in *Grafana) New() runtime.Object
- func (in *Grafana) NewList() runtime.Object
- func (in *Grafana) ShortNames() []string
- func (in *Grafana) ToSecret() *corev1.Secret
- func (in *Grafana) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, ...) (obj runtime.Object, _ bool, err error)
- type GrafanaClient
- type GrafanaCredentialType
- type GrafanaList
- type GrafanaSpec
- type GrafanaSubResourceRequest
- func (in *GrafanaSubResourceRequest) Do(ctx context.Context, cli GrafanaClient) error
- func (in *GrafanaSubResourceRequest) WithBodyFunc(bodyFunc func() ([]byte, error)) *GrafanaSubResourceRequest
- func (in *GrafanaSubResourceRequest) WithMethod(method string) *GrafanaSubResourceRequest
- func (in *GrafanaSubResourceRequest) WithOnSuccess(onSuccess func(respBody []byte) error) *GrafanaSubResourceRequest
- func (in *GrafanaSubResourceRequest) WithPathFunc(pathFunc func() (string, error)) *GrafanaSubResourceRequest
Constants ¶
const ( // Group the group for the apiextensions Group = "o11y.prism.oam.dev" // Version the version for the v1alpha1 apiextensions Version = "v1alpha1" )
Variables ¶
var ( // GrafanaResource resource name for Grafana GrafanaResource = "grafanas" // GrafanaKind kind name for Grafana GrafanaKind = "Grafana" // GrafanaGroupResource GroupResource for Grafana GrafanaGroupResource = schema.GroupResource{Group: Group, Resource: GrafanaResource} // GrafanaGroupVersionKind GroupVersionKind for Grafana GrafanaGroupVersionKind = GroupVersion.WithKind(GrafanaKind) )
var AddToScheme = func(scheme *runtime.Scheme) error { metav1.AddToGroupVersion(scheme, GroupVersion) scheme.AddKnownTypes(GroupVersion, &Grafana{}, &GrafanaList{}, ) return nil }
AddToScheme add virtual cluster scheme
var GroupVersion = schema.GroupVersion{Group: Group, Version: Version}
GroupVersion the apiextensions v1alpha1 group version
Functions ¶
func NewEmptyCredentialGrafanaSecretError ¶
func NewEmptyCredentialGrafanaSecretError() error
NewEmptyCredentialGrafanaSecretError create an invalid grafana secret error due to no credential found
func NewEmptyEndpointGrafanaSecretError ¶
func NewEmptyEndpointGrafanaSecretError() error
NewEmptyEndpointGrafanaSecretError create an invalid grafana secret error due to no endpoint found
func NewInvalidGrafanaSecretNameError ¶
func NewInvalidGrafanaSecretNameError() error
NewInvalidGrafanaSecretNameError create an invalid grafana secret error due to invalid name
Types ¶
type AccessCredential ¶
type AccessCredential struct { *BasicAuth `json:",inline,omitempty"` Token *string `json:"token,omitempty"` }
AccessCredential defines the access credential for the grafana api
func (*AccessCredential) DeepCopy ¶
func (in *AccessCredential) DeepCopy() *AccessCredential
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessCredential.
func (*AccessCredential) DeepCopyInto ¶
func (in *AccessCredential) DeepCopyInto(out *AccessCredential)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BasicAuth ¶
BasicAuth defines the basic auth credential
func (*BasicAuth) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasicAuth.
func (*BasicAuth) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Grafana ¶
type Grafana struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec GrafanaSpec `json:"spec,omitempty"` }
Grafana defines the instance of grafana +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func NewGrafanaFromSecret ¶
NewGrafanaFromSecret create grafana from secret
func (*Grafana) ConvertToTable ¶
func (in *Grafana) ConvertToTable(ctx context.Context, object runtime.Object, tableOptions runtime.Object) (*metav1.Table, error)
ConvertToTable convert resource to table
func (*Grafana) Create ¶
func (in *Grafana) Create(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error)
Create creates a new version of a resource.
func (*Grafana) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Grafana.
func (*Grafana) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Grafana) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Grafana) Delete ¶
func (in *Grafana) Delete(ctx context.Context, name string, deleteValidation rest.ValidateObjectFunc, options *metav1.DeleteOptions) (obj runtime.Object, _ bool, err error)
Delete finds a resource in the storage and deletes it.
func (*Grafana) DoRequest ¶
func (in *Grafana) DoRequest(ctx context.Context, method string, path string, body io.Reader) ([]byte, int, error)
DoRequest do request for the current grafana
func (*Grafana) Get ¶
func (in *Grafana) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)
Get finds a resource in the storage by name and returns it.
func (*Grafana) GetCredentialType ¶
func (in *Grafana) GetCredentialType() GrafanaCredentialType
GetCredentialType .
func (*Grafana) GetGroupVersionResource ¶
func (in *Grafana) GetGroupVersionResource() schema.GroupVersionResource
GetGroupVersionResource returns the GroupVersionResource for this resource.
func (*Grafana) GetObjectMeta ¶
func (in *Grafana) GetObjectMeta() *metav1.ObjectMeta
GetObjectMeta returns the object meta reference.
func (*Grafana) IsStorageVersion ¶
IsStorageVersion returns true if the object is also the internal version
func (*Grafana) List ¶
func (in *Grafana) List(ctx context.Context, options *metainternalversion.ListOptions) (runtime.Object, error)
List selects resources in the storage which match to the selector. 'options' can be nil.
func (*Grafana) NamespaceScoped ¶
NamespaceScoped returns if the object must be in a namespace.
func (*Grafana) ShortNames ¶
ShortNames delivers a list of short names for a resource.
func (*Grafana) Update ¶
func (in *Grafana) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (obj runtime.Object, _ bool, err error)
Update finds a resource in the storage and updates it.
type GrafanaClient ¶
type GrafanaClient interface { Get(ctx context.Context, name string) (*Grafana, error) List(ctx context.Context, options ...client.ListOption) (*GrafanaList, error) Create(ctx context.Context, grafana *Grafana) error Update(ctx context.Context, grafana *Grafana) error Delete(ctx context.Context, grafana *Grafana) error }
GrafanaClient client for operate grafana +kubebuilder:object:generate=false
func NewGrafanaClient ¶
func NewGrafanaClient(cli client.Client) GrafanaClient
NewGrafanaClient create a client for accessing grafana
type GrafanaCredentialType ¶
type GrafanaCredentialType string
GrafanaCredentialType defines the credential type for grafana
const ( // GrafanaCredentialTypeNotAvailable not available GrafanaCredentialTypeNotAvailable GrafanaCredentialType = "NA" // GrafanaCredentialTypeBasicAuth basic auth GrafanaCredentialTypeBasicAuth GrafanaCredentialType = "BasicAuth" // GrafanaCredentialTypeBearerToken bearer token GrafanaCredentialTypeBearerToken GrafanaCredentialType = "BearerToken" )
type GrafanaList ¶
type GrafanaList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Grafana `json:"items"` }
GrafanaList list for Grafana +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*GrafanaList) DeepCopy ¶
func (in *GrafanaList) DeepCopy() *GrafanaList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GrafanaList.
func (*GrafanaList) DeepCopyInto ¶
func (in *GrafanaList) DeepCopyInto(out *GrafanaList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GrafanaList) DeepCopyObject ¶
func (in *GrafanaList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type GrafanaSpec ¶
type GrafanaSpec struct { Endpoint string `json:"endpoint"` Access AccessCredential `json:"access"` }
GrafanaSpec defines the spec for grafana instance
func (*GrafanaSpec) DeepCopy ¶
func (in *GrafanaSpec) DeepCopy() *GrafanaSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GrafanaSpec.
func (*GrafanaSpec) DeepCopyInto ¶
func (in *GrafanaSpec) DeepCopyInto(out *GrafanaSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GrafanaSubResourceRequest ¶
type GrafanaSubResourceRequest struct {
// contains filtered or unexported fields
}
GrafanaSubResourceRequest request for grafana subresources +kubebuilder:object:generate=false
func NewGrafanaSubResourceRequest ¶
func NewGrafanaSubResourceRequest(subResource resource.Object, name string) *GrafanaSubResourceRequest
NewGrafanaSubResourceRequest create request for grafana subresource
func (*GrafanaSubResourceRequest) Do ¶
func (in *GrafanaSubResourceRequest) Do(ctx context.Context, cli GrafanaClient) error
func (*GrafanaSubResourceRequest) WithBodyFunc ¶
func (in *GrafanaSubResourceRequest) WithBodyFunc(bodyFunc func() ([]byte, error)) *GrafanaSubResourceRequest
func (*GrafanaSubResourceRequest) WithMethod ¶
func (in *GrafanaSubResourceRequest) WithMethod(method string) *GrafanaSubResourceRequest
func (*GrafanaSubResourceRequest) WithOnSuccess ¶
func (in *GrafanaSubResourceRequest) WithOnSuccess(onSuccess func(respBody []byte) error) *GrafanaSubResourceRequest
func (*GrafanaSubResourceRequest) WithPathFunc ¶
func (in *GrafanaSubResourceRequest) WithPathFunc(pathFunc func() (string, error)) *GrafanaSubResourceRequest