kinds

package
v0.0.0-testrgm3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL