Documentation ¶
Index ¶
- type GrafanaResource
- type GrafanaResourceMetadata
- func (m *GrafanaResourceMetadata) GetCreatedBy() string
- func (m *GrafanaResourceMetadata) GetFolder() string
- func (m *GrafanaResourceMetadata) GetOriginInfo() *ResourceOriginInfo
- func (m *GrafanaResourceMetadata) GetSlug() string
- func (m *GrafanaResourceMetadata) GetUpdatedBy() string
- func (m *GrafanaResourceMetadata) GetUpdatedTimestamp() *time.Time
- func (m *GrafanaResourceMetadata) SetCreatedBy(user string)
- func (m *GrafanaResourceMetadata) SetFolder(uid string)
- func (m *GrafanaResourceMetadata) SetOriginInfo(info *ResourceOriginInfo)
- func (m *GrafanaResourceMetadata) SetSlug(v string)
- func (m *GrafanaResourceMetadata) SetUpdatedBy(user string)
- func (m *GrafanaResourceMetadata) SetUpdatedTimestamp(v *time.Time)
- type ResourceOriginInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GrafanaResource ¶
type GrafanaResource[Spec interface{}, Status interface{}] struct { APIVersion string `json:"apiVersion"` Kind string `json:"kind"` Metadata GrafanaResourceMetadata `json:"metadata"` Spec *Spec `json:"spec,omitempty"` Status *Status `json:"status,omitempty"` // contains filtered or unexported fields }
GrafanaResource is a generic kubernetes resource with a helper for the common grafana metadata This is a temporary solution until this object (or similar) can be moved to the app-sdk or kindsys
type GrafanaResourceMetadata ¶
type GrafanaResourceMetadata v1.ObjectMeta
GrafanaResourceMetadata is standard k8s object metadata with helper functions
func (*GrafanaResourceMetadata) GetCreatedBy ¶
func (m *GrafanaResourceMetadata) GetCreatedBy() string
func (*GrafanaResourceMetadata) GetFolder ¶
func (m *GrafanaResourceMetadata) GetFolder() string
func (*GrafanaResourceMetadata) GetOriginInfo ¶
func (m *GrafanaResourceMetadata) GetOriginInfo() *ResourceOriginInfo
GetOriginInfo returns the origin info stored in k8s metadata annotations
func (*GrafanaResourceMetadata) GetSlug ¶
func (m *GrafanaResourceMetadata) GetSlug() string
func (*GrafanaResourceMetadata) GetUpdatedBy ¶
func (m *GrafanaResourceMetadata) GetUpdatedBy() string
func (*GrafanaResourceMetadata) GetUpdatedTimestamp ¶
func (m *GrafanaResourceMetadata) GetUpdatedTimestamp() *time.Time
func (*GrafanaResourceMetadata) SetCreatedBy ¶
func (m *GrafanaResourceMetadata) SetCreatedBy(user string)
func (*GrafanaResourceMetadata) SetFolder ¶
func (m *GrafanaResourceMetadata) SetFolder(uid string)
func (*GrafanaResourceMetadata) SetOriginInfo ¶
func (m *GrafanaResourceMetadata) SetOriginInfo(info *ResourceOriginInfo)
func (*GrafanaResourceMetadata) SetSlug ¶
func (m *GrafanaResourceMetadata) SetSlug(v string)
func (*GrafanaResourceMetadata) SetUpdatedBy ¶
func (m *GrafanaResourceMetadata) SetUpdatedBy(user string)
func (*GrafanaResourceMetadata) SetUpdatedTimestamp ¶
func (m *GrafanaResourceMetadata) SetUpdatedTimestamp(v *time.Time)
type ResourceOriginInfo ¶
type ResourceOriginInfo struct { // Name of the origin/provisioning source Name string `json:"name,omitempty"` // The path within the named origin above (external_id in the existing dashboard provisioing) Path string `json:"path,omitempty"` // Verification/identification key (check_sum in existing dashboard provisioning) Key string `json:"key,omitempty"` // Origin modification timestamp when the resource was saved // This will be before the resource updated time Timestamp *time.Time `json:"time,omitempty"` // contains filtered or unexported fields }
ResourceOriginInfo is saved in annotations. This is used to identify where the resource came from This object can model the same data as our existing provisioning table or a more general git sync
Click to show internal directories.
Click to hide internal directories.