content

package
v5.19.4 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CustomUIDOrUID

func CustomUIDOrUID(cr v1beta1.GrafanaContentResource, contentUID string) string

Wrapper around CustomUID, contentModelUID or default metadata.uid

func HasChanged added in v5.19.0

func HasChanged(cr v1beta1.GrafanaContentResource, hash string) bool

func IsUpdatedUID

func IsUpdatedUID(cr v1beta1.GrafanaContentResource, uid string) bool

func Unchanged

func Unchanged(cr v1beta1.GrafanaContentResource, hash string) bool

Unchanged checks if the stored content hash on the status matches the input

Types

type ContentResolver

type ContentResolver struct {
	Client client.Client
	// contains filtered or unexported fields
}

func NewContentResolver

func NewContentResolver(cr v1beta1.GrafanaContentResource, client client.Client, opts ...Option) *ContentResolver

func (*ContentResolver) Resolve

func (h *ContentResolver) Resolve(ctx context.Context) (map[string]any, string, error)

type ContentSourceType

type ContentSourceType string
const (
	ContentSourceTypeRawJSON    ContentSourceType = "json"
	ContentSourceTypeGzipJSON   ContentSourceType = "gzipJson"
	ContentSourceJsonnetProject ContentSourceType = "jsonnetProjectWithRuntimeRaw"
	ContentSourceTypeURL        ContentSourceType = "url"
	ContentSourceTypeJsonnet    ContentSourceType = "jsonnet"
	ContentSourceTypeGrafanaCom ContentSourceType = "grafana"
	ContentSourceConfigMap      ContentSourceType = "configmap"
)

type Option

type Option func(r *ContentResolver)

func WithDisabledSources

func WithDisabledSources(disabledSources []ContentSourceType) Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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