domain

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: BSD-3-Clause-LBNL Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertRuleFilterParams

type AlertRuleFilterParams struct {
	Folder               string
	UID                  string
	Label                []string
	IgnoreWatchedFolders bool
}

AlertRuleFilterParams defines the filtering criteria used to narrow down alert rules during import or export operations. It allows filtering by folder name, a set of labels, and provides an option to ignore folder-based rules.

type AlertRuleWithNestedFolder

type AlertRuleWithNestedFolder struct {
	*models.ProvisionedAlertRule
	NestedPath string
}

type ConnectionPermissionItem

type ConnectionPermissionItem struct {
	Connection  *models.DataSourceListItemDTO
	Permissions []*models.ResourcePermissionDTO
}

ConnectionPermissionItem holds a connection and its associated permissions.

type ContextHandler

type ContextHandler struct {
	// contains filtered or unexported fields
}

func NewContextHandler

func NewContextHandler(h slog.Handler, out *os.File, err *os.File, opts *tint.Options) *ContextHandler

func (*ContextHandler) Enabled

func (h *ContextHandler) Enabled(ctx context.Context, level slog.Level) bool

func (*ContextHandler) Handle

func (h *ContextHandler) Handle(ctx context.Context, r slog.Record) error

func (*ContextHandler) WithAttrs

func (h *ContextHandler) WithAttrs(attrs []slog.Attr) slog.Handler

func (*ContextHandler) WithGroup

func (h *ContextHandler) WithGroup(name string) slog.Handler

type DashboardAndPermissions

type DashboardAndPermissions struct {
	Dashboard   *NestedHit
	Permissions []*models.DashboardACLInfoDTO
}

DashboardAndPermissions holds a dashboard reference and its permission list.

type FilterReader

type FilterReader func(context.Context, FilterType, any) (any, error)

type FilterType

type FilterType string

FilterType Currently supported filters

const (
	TagsFilter          FilterType = "TagsFilter"
	DashFilter          FilterType = "DashFilter"
	FolderFilter        FilterType = "FolderFilter"
	AlertRuleFilterType            = "AlertRuleFilter"
	Name                FilterType = "Name"
	UID                 FilterType = "UID"
	ConnectionName      FilterType = "ConnectionName" // used for Connection name
	AuthLabel           FilterType = "AuthLabel"
	OrgFilter           FilterType = "OrgFilter"
)

func (FilterType) String

func (s FilterType) String() string

type InputValidation

type InputValidation func(ctx context.Context, value any, expected any) error

type NestedHit

type NestedHit struct {
	*models.Hit
	NestedPath string
}

NestedHit represents a Dashboard or Folder with an associated nested path in dashboard filtering.

type OrgsDTOWithPreferences

type OrgsDTOWithPreferences struct {
	Organization *models.OrgDTO          `json:"organization"`
	Preferences  *models.PreferencesSpec `json:"preferences"` // Preferences are preferences associated with a given org.  theme, dashboard, timezone, etc
}

OrgsDTOWithPreferences represents an organization and its preferences.

type Processor

type Processor func(ctx context.Context, item any) (any, error)

type ProcessorEntity

type ProcessorEntity struct {
	Name string
	// priority  int8
	// postProcess bool
	Processor Processor
}

func (ProcessorEntity) Validate

func (p ProcessorEntity) Validate() error

type ResourceType

type ResourceType string
const (
	ConnectionPermissionResource ResourceType = "connections-permissions"
	ConnectionResource           ResourceType = "connections"
	DashboardPermissionsResource ResourceType = "dashboards-permissions"
	DashboardResource            ResourceType = "dashboards"
	FolderPermissionResource     ResourceType = "folders-permissions"
	FolderResource               ResourceType = "folders"
	LibraryElementResource       ResourceType = "libraryelements"
	OrganizationResource         ResourceType = "organizations"
	OrganizationMetaResource     ResourceType = "org"
	TeamResource                 ResourceType = "teams"
	UserResource                 ResourceType = "users"
	TemplatesResource            ResourceType = "templates"
	SecureSecretsResource        ResourceType = "secure"
	AlertingResource             ResourceType = "alerting"
	AlertingRulesResource        ResourceType = "alerting-rules"
)

func (*ResourceType) GetPath

func (s *ResourceType) GetPath(basePath string, orgName string) string

GetPath returns the path of the resource type, if Namespaced, will delimit the path by org Id

func (*ResourceType) String

func (s *ResourceType) String() string

String returns the string representation of the resource type

type ServiceAccountDTOWithTokens

type ServiceAccountDTOWithTokens struct {
	ServiceAccount *models.ServiceAccountDTO
	Tokens         []*models.TokenDTO
}

ServiceAccountDTOWithTokens represents a service account and its associated tokens.

type UserProfileWithAuth

type UserProfileWithAuth struct {
	models.UserProfileDTO
	Password string // #nosec G117 is the user's temporary generated password
}

UserProfileWithAuth embeds UserProfileDTO and adds a Password field for authentication.

type WithNested

type WithNested[T any] struct {
	Entity     *T
	NestedPath string
}

WithNested represents an entity with a nested path for filtering purposes.

Jump to

Keyboard shortcuts

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