ports

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: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EncodeOperation = "Encode"
	DecodeOperation = "Decode"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertContactPoints

type AlertContactPoints interface {
	ListContactPoints() ([]*models.EmbeddedContactPoint, error)
	DownloadContactPoints() (string, error)
	ClearContactPoints() ([]string, error)
	UploadContactPoints() ([]string, error)
}

type AlertPolicies

type AlertPolicies interface {
	DownloadAlertNotifications() (string, error)
	ListAlertNotifications() (*models.Route, error)
	ClearAlertNotifications() error
	UploadAlertNotifications() (*models.Route, error)
}

type AlertRules

type AlertRules interface {
	DownloadAlertRules(filter Filter) ([]string, error)
	ListAlertRules(filter Filter) ([]*customModels.AlertRuleWithNestedFolder, error)
	ClearAlertRules(filter Filter) ([]string, error)
	UploadAlertRules(filter Filter) ([]*customModels.AlertRuleWithNestedFolder, error)
}

type AlertTemplates

type AlertTemplates interface {
	DownloadAlertTemplates() (string, error)
	ListAlertTemplates() ([]*models.NotificationTemplate, error)
	ClearAlertTemplates() ([]string, error)
	UploadAlertTemplates() ([]string, error)
}

type AlertTimings

type AlertTimings interface {
	DownloadAlertTimings() (string, error)
	ListAlertTimings() ([]*models.MuteTimeInterval, error)
	ClearAlertTimings() error
	UploadAlertTimings() ([]string, error)
}

type AuthenticationApi

type AuthenticationApi interface {
	// TokenApi
	ServiceAccountApi
	Login()
	EncodeValue(in string) string
	DecodeValue(in string) string
}

AuthenticationApi Contract definition

type CipherEncoder

type CipherEncoder interface {
	Encode(resourceType domain.ResourceType, b []byte) ([]byte, error)
	Decode(resourceType domain.ResourceType, b []byte) ([]byte, error)
	EncodeValue(b string) (string, error)
	DecodeValue(b string) (string, error)
}

type ConnectionPermissions

type ConnectionPermissions interface {
	// Permissions Enterprise only
	ListConnectionPermissions(filter Filter) []customModels.ConnectionPermissionItem
	DownloadConnectionPermissions(filter Filter) []string
	UploadConnectionPermissions(filter Filter) []string
	DeleteAllConnectionPermissions(filter Filter) []string
}

type ConnectionsApi

type ConnectionsApi interface {
	ListConnections(filter Filter) []models.DataSourceListItemDTO
	DownloadConnections(filter Filter) []string
	UploadConnections(filter Filter) []string
	DeleteAllConnections(filter Filter) []string
	ConnectionPermissions
}

ConnectionsApi Contract definition

type DashboardPermissionsApi

type DashboardPermissionsApi interface {
	ListDashboardPermissions(filterReq Filter) ([]customModels.DashboardAndPermissions, error)
	DownloadDashboardPermissions(filterReq Filter) ([]string, error)
	ClearDashboardPermissions(filterReq Filter) error
	UploadDashboardPermissions(filterReq Filter) ([]string, error)
}

type DashboardsApi

type DashboardsApi interface {
	ListDashboards(filter Filter) []*customModels.NestedHit
	DownloadDashboards(filter Filter) []string
	UploadDashboards(filterReq Filter) ([]string, error)
	DeleteAllDashboards(filter Filter) []string
}

DashboardsApi Contract definition

type ExtendedApi

type ExtendedApi interface {
	GetConfiguredOrgId(orgName string) (int64, error)
}

type Filter

type Filter interface {
	// Setup should not need ctx, but may revisit
	RegisterReader(entityType reflect.Type, fn domain.FilterReader) error
	RegisterDataProcessor(entityType domain.FilterType, entity domain.ProcessorEntity) error
	AddValidation(f domain.FilterType, validation domain.InputValidation, expected any)
	// Runtime validation all have context
	Validate(context.Context, domain.FilterType, any) bool
	ValidateAll(ctx context.Context, data any) bool // ValidateAll if Entry is valid
	GetExpectedValue(ctx context.Context, filterType domain.FilterType) any
	GetExpectedString(ctx context.Context, filterType domain.FilterType) string
	GetExpectedStringSlice(ctx context.Context, filterType domain.FilterType) ([]string, error)
	GetReaderValue(ctx context.Context, filterType domain.FilterType, obj any) any
}

type FoldersApi

type FoldersApi interface {
	ListFolders(filter Filter) []*customModels.NestedHit
	DownloadFolders(filter Filter) []string
	UploadFolders(filter Filter) []string
	DeleteAllFolders(filter Filter) []string
	// Permissions
	ListFolderPermissions(filter Filter) map[*customModels.NestedHit][]*models.DashboardACLInfoDTO
	DownloadFolderPermissions(filter Filter) []string
	UploadFolderPermissions(filter Filter) []string
}

FoldersApi Contract definition

type LibraryElementsApi

type LibraryElementsApi interface {
	ListLibraryElements(filter Filter) []*customModels.WithNested[models.LibraryElementDTO]
	ListLibraryElementsConnections(filter Filter, connectionID string) []*models.DashboardFullWithMeta
	DownloadLibraryElements(filter Filter) []string
	UploadLibraryElements(filter Filter) []string
	DeleteAllLibraryElements(filter Filter) []string
}

type LicenseApi

type LicenseApi interface {
	IsEnterprise() bool
}

type OrgPreferencesApi

type OrgPreferencesApi interface {
	GetOrgPreferences() (*models.PreferencesSpec, error)
	UploadOrgPreferences(orgName string, pref *models.PreferencesSpec) error
}

OrgPreferencesApi Contract definition

type OrganizationsApi

type OrganizationsApi interface {
	OrgPreferencesApi
	InitOrganizations()
	// contains filtered or unexported methods
}

OrganizationsApi Contract definition

type ServerInfoApi

type ServerInfoApi interface {
	GetServerInfo() map[string]any
}

type ServiceAccountApi

type ServiceAccountApi interface {
	ListServiceAccounts() []*customModels.ServiceAccountDTOWithTokens
	ListServiceAccountsTokens(id int64) ([]*models.TokenDTO, error)
	DeleteServiceAccount(accountId int64) error
	DeleteAllServiceAccounts() []string
	DeleteServiceAccountTokens(serviceId int64) []string
	CreateServiceAccountToken(serviceAccountId int64, name string, expiration int64) (*models.NewAPIKeyResult, error)
	CreateServiceAccount(name, role string, expiration int64) (*models.ServiceAccountDTO, error)
}

type Storage

type Storage interface {
	WriteFile(filename string, data []byte) error                // WriteFile returns error or writes byte array to destination
	ReadFile(filename string) ([]byte, error)                    // ReadFile returns byte array or error with data from file
	FindAllFiles(folder string, fullPath bool) ([]string, error) // FindAllFiles recursively list all files for a given path
	Name() string                                                // Name of storage engine
	GetPrefix() string                                           // Prefix used by storage engine
}

TODO: pull all the cloud based interaction into a Plugin System

type TeamsApi

type TeamsApi interface {
	// Team
	DownloadTeams(filter Filter) map[*models.TeamDTO][]*models.TeamMemberDTO
	UploadTeams(filter Filter) map[*models.TeamDTO][]*models.TeamMemberDTO
	ListTeams(filter Filter) map[*models.TeamDTO][]*models.TeamMemberDTO
	DeleteTeam(filter Filter) ([]*models.TeamDTO, error)
}

type Templating

type Templating interface {
	Generate(templateName string) (map[string][]string, error)
	ListTemplates() []string
}

Templating defines an interface for generating and listing dashboard templates based on templating configuration.

type UsersApi

type UsersApi interface {
	// UserApi
	ListUsers(filter Filter) []*models.UserSearchHitDTO
	DownloadUsers(filter Filter) []string
	UploadUsers(filter Filter) []customModels.UserProfileWithAuth
	DeleteAllUsers(filter Filter) []string
	// Tools
	PromoteUser(userLogin string) (string, error)
	GetUserInfo() (*models.UserProfileDTO, error)
}

UsersApi Contract definition

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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