models

package
v0.7.18 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 78 Imported by: 0

Documentation

Overview

Package models - Error codes for Meshery models

Index

Constants

View Source
const (
	ErrGrafanaClientCode                  = "1450"
	ErrPageSizeCode                       = "1451"
	ErrPageNumberCode                     = "1452"
	ErrResultIDCode                       = "1453"
	ErrPerfIDCode                         = "1454"
	ErrMarshalCode                        = "1455"
	ErrUnmarshalCode                      = "1456"
	ErrGenerateUUIDCode                   = "1457"
	ErrLocalProviderSupportCode           = "1458"
	ErrGrafanaOrgCode                     = "1459"
	ErrGrafanaBoardsCode                  = "1460"
	ErrGrafanaDashboardCode               = "1461"
	ErrGrafanaDataSourceCode              = "1462"
	ErrNilQueryCode                       = "1463"
	ErrGrafanaDataCode                    = "1464"
	ErrApplicationFileNameCode            = "1465"
	ErrFilterFileNameCode                 = "1466"
	ErrPatternFileNameCode                = "1467"
	ErrMakeDirCode                        = "1468"
	ErrFolderStatCode                     = "1469"
	ErrUserIDCode                         = "1470"
	ErrDBConnectionCode                   = "1471"
	ErrNilConfigDataCode                  = "1472"
	ErrDBOpenCode                         = "1473"
	ErrDBRLockCode                        = "1474"
	ErrDBLockCode                         = "1475"
	ErrDBReadCode                         = "1476"
	ErrDBDeleteCode                       = "1477"
	ErrCopyCode                           = "1478"
	ErrDBPutCode                          = "1479"
	ErrPrometheusGetNodesCode             = "1480"
	ErrPrometheusLabelSeriesCode          = "1481"
	ErrPrometheusQueryRangeCode           = "1482"
	ErrPrometheusStaticBoardCode          = "1483"
	ErrTokenRefreshCode                   = "1484"
	ErrGetTokenCode                       = "1485"
	ErrDataReadCode                       = "1486"
	ErrTokenDecodeCode                    = "1487"
	ErrNilJWKsCode                        = "1488"
	ErrNilKeysCode                        = "1489"
	ErrTokenExpiredCode                   = "1490"
	ErrTokenClaimsCode                    = "1491"
	ErrTokenClientCheckCode               = "1492"
	ErrTokenPraseCode                     = "1493"
	ErrJWKsKeysCode                       = "1494"
	ErrDecodeBase64Code                   = "1495"
	ErrMarshalPKIXCode                    = "1496"
	ErrEncodingPEMCode                    = "1497"
	ErrPraseUnverifiedCode                = "1498"
	ErrEncodingCode                       = "1499"
	ErrFetchCode                          = "1500"
	ErrPostCode                           = "1501"
	ErrDeleteCode                         = "1502"
	ErrInvalidCapabilityCode              = "1503"
	ErrResultDataCode                     = "1504"
	ErrUnableToPersistsResultCode         = "1505"
	ErrValidURLCode                       = "1506"
	ErrTestEndpointCode                   = "1507"
	ErrLoadgeneratorCode                  = "1508"
	ErrProtocolCode                       = "1509"
	ErrTestClientCode                     = "1510"
	ErrParsingTestCode                    = "1511"
	ErrFieldCode                          = "1512"
	ErrFetchDataCode                      = "1513"
	ErrIndexOutOfRangeCode                = "1514"
	ErrSessionCopyCode                    = "1515"
	ErrSavingSeededComponentsCode         = "1516"
	ErrGettingSeededComponentsCode        = "1517"
	ErrDownloadingSeededComponentsCode    = "1518"
	ErrContextIDCode                      = "1519"
	ErrMesheryInstanceIDCode              = "1520"
	ErrMesheryNotInClusterCode            = "1521"
	ErrBrokerNotFoundCode                 = "1522"
	ErrCreateOperatorDeploymentConfigCode = "1523"
	ErrRequestMeshsyncStoreCode           = "1524"
	ErrBrokerSubscriptionCode             = "1525"
	ErrContextAlreadyPersistedCode        = "1526"
	ErrGetPackageCode                     = "1527"
	ErrTokenRevokeCode                    = "1528"
	ErrTokenIntrospectCode                = "1529"
	ErrShareDesignCode                    = "1530"
	ErrUnreachableRemoteProviderCode      = "1531"
	ErrShareFilterCode                    = "1532"
	ErrPersistEventCode                   = "1533"
	ErrUnreachableKubeAPICode             = "1534"
	ErrFlushMeshSyncDataCode              = "1535"
	ErrUpdateConnectionStatusCode         = "1540"
	ErrResultNotFoundCode                 = "1546"
	ErrPersistCredentialCode              = "1547"
	ErrPersistConnectionCode              = "1548"
	ErrPrometheusScanCode                 = "1549"
	ErrGrafanaScanCode                    = "1550"
	ErrDBCreateCode                       = "1557"
)

Please reference the following before contributing an error code: https://docs.meshery.io/project/contributing/contributing-error https://github.com/meshery/meshkit/blob/master/errors/errors.go

View Source
const (
	ChartRepo                     = "https://meshery.github.io/meshery.io/charts"
	MesheryServerBrokerConnection = "meshery-server"
)
View Source
const (
	MeshsyncStoreUpdatesSubject = "meshery-server.meshsync.store"
	MeshsyncRequestSubject      = "meshery.meshsync.request"
)
View Source
const (
	// LocalProviderType - represents local providers
	LocalProviderType ProviderType = "local"

	// RemoteProviderType - represents cloud providers
	RemoteProviderType ProviderType = "remote"

	// ProviderCtxKey is the context key for persisting provider to context
	ProviderCtxKey ContextKey = "provider"

	// TokenCtxKey is the context key for persisting token to context
	TokenCtxKey ContextKey = "token"

	// UserCtxKey is the context key for persisting user to context
	UserCtxKey ContextKey = "user"

	// UserIDCtxKey is the context key for persisting userID to context
	UserIDCtxKey ContextKey = "user_id"

	// UserPrefsCtxKey is the context key for persisting user preferences to context
	PerfObjCtxKey ContextKey = "perf_obj"

	KubeClustersKey   ContextKey = "kubeclusters"
	AllKubeClusterKey ContextKey = "allkubeclusters"

	MesheryControllerHandlersKey ContextKey = "mesherycontrollerhandlerskey"
	MeshSyncDataHandlersKey      ContextKey = "meshsyncdatahandlerskey"

	RegistryManagerKey ContextKey = "registrymanagerkey"

	HandlerKey               ContextKey = "handlerkey"
	SystemIDKey              ContextKey = "systemidKey"
	MesheryServerURL         ContextKey = "mesheryserverurl"
	MesheryServerCallbackURL ContextKey = "mesheryservercallbackurl"
)
View Source
const (
	Private   = "private"
	Public    = "public"
	Published = "published"
)

Variables

View Source
var (
	Istio   = Adapter{Name: "meshery-istio", Location: "10000"}
	Linkerd = Adapter{Name: "meshery-linkerd", Location: "10001"}
	Consul  = Adapter{Name: "meshery-consul", Location: "10002"}
	NSM     = Adapter{Name: "meshery-nsm", Location: "10004"}
	AWS     = Adapter{Name: "meshery-app-mesh", Location: "10005"}
	Traefik = Adapter{Name: "meshery-traefik-mesh", Location: "10006"}
	Kuma    = Adapter{Name: "meshery-kuma", Location: "10007"}
	Nginx   = Adapter{Name: "meshery-nginx-sm", Location: "10010"}
	Cilium  = Adapter{Name: "meshery-cilium", Location: "10012"}
)

Available Meshery adapters

View Source
var (
	ErrResultID                = errors.New(ErrResultIDCode, errors.Alert, []string{"Given resultID is not valid"}, []string{"Given resultID is nil"}, []string{}, []string{})
	ErrLocalProviderSupport    = errors.New(ErrLocalProviderSupportCode, errors.Alert, []string{"Method not supported by local provider"}, []string{}, []string{}, []string{})
	ErrNilQuery                = errors.New(ErrNilQueryCode, errors.Alert, []string{"Query data passed is nil"}, []string{}, []string{}, []string{})
	ErrApplicationFileName     = errors.New(ErrApplicationFileNameCode, errors.Alert, []string{"Invalid Applicationfile"}, []string{"Name field is either not present or is not valid"}, []string{}, []string{})
	ErrFilterFileName          = errors.New(ErrFilterFileNameCode, errors.Alert, []string{"Invalid Filterfile"}, []string{"Name field is either not present or is not valid"}, []string{}, []string{})
	ErrPatternFileName         = errors.New(ErrPatternFileNameCode, errors.Alert, []string{"Invalid Patternfile"}, []string{"Name field is either not present or is not valid"}, []string{}, []string{})
	ErrUserID                  = errors.New(ErrUserIDCode, errors.Alert, []string{"User ID is empty"}, []string{}, []string{}, []string{})
	ErrDBConnection            = errors.New(ErrDBConnectionCode, errors.Alert, []string{"Connection to DataBase does not exist"}, []string{}, []string{}, []string{})
	ErrNilConfigData           = errors.New(ErrNilConfigDataCode, errors.Alert, []string{"Given config data is nil"}, []string{}, []string{}, []string{})
	ErrNilJWKs                 = errors.New(ErrNilJWKsCode, errors.Alert, []string{"Invalid JWks"}, []string{"Value of JWKs is nil"}, []string{}, []string{})
	ErrNilKeys                 = errors.New(ErrNilKeysCode, errors.Alert, []string{"Key not found"}, []string{"JWK not found for the given KeyID"}, []string{}, []string{})
	ErrTokenExpired            = errors.New(ErrTokenExpiredCode, errors.Alert, []string{"Token has expired"}, []string{"Token is invalid, it has expired"}, []string{}, []string{})
	ErrTokenClaims             = errors.New(ErrTokenClaimsCode, errors.Alert, []string{"Error occurred while prasing claims"}, []string{}, []string{}, []string{})
	ErrValidURL                = errors.New(ErrValidURLCode, errors.Alert, []string{"Enter valid URLs"}, []string{}, []string{}, []string{})
	ErrTestEndpoint            = errors.New(ErrTestEndpointCode, errors.Alert, []string{"minimum one test endpoint needs to be specified"}, []string{}, []string{}, []string{})
	ErrLoadgenerator           = errors.New(ErrLoadgeneratorCode, errors.Alert, []string{"specify valid Loadgenerator"}, []string{}, []string{}, []string{})
	ErrProtocol                = errors.New(ErrProtocolCode, errors.Alert, []string{"specify the Protocol for all clients"}, []string{}, []string{}, []string{})
	ErrTestClient              = errors.New(ErrTestClientCode, errors.Alert, []string{"minimum one test client needs to be specified"}, []string{}, []string{}, []string{})
	ErrParsingTest             = errors.New(ErrParsingTestCode, errors.Alert, []string{"error parsing test duration, please refer to: https://docs.meshery.io/guides/mesheryctl#performance-management"}, []string{}, []string{}, []string{})
	ErrField                   = errors.New(ErrFieldCode, errors.Alert, []string{"Error: name field is blank"}, []string{}, []string{}, []string{})
	ErrIndexOutOfRange         = errors.New(ErrIndexOutOfRangeCode, errors.Alert, []string{"Error: index out of range"}, []string{}, []string{}, []string{})
	ErrContextID               = errors.New(ErrContextIDCode, errors.Alert, []string{"Error: Context ID is empty"}, []string{}, []string{}, []string{})
	ErrMesheryInstanceID       = errors.New(ErrMesheryInstanceIDCode, errors.Alert, []string{"Error: Meshery Instance ID is empty or is invalid"}, []string{}, []string{}, []string{})
	ErrMesheryNotInCluster     = errors.New(ErrMesheryNotInClusterCode, errors.Alert, []string{"Error: Meshery is not running inside a cluster"}, []string{}, []string{}, []string{})
	ErrContextAlreadyPersisted = errors.New(ErrContextAlreadyPersistedCode, errors.Alert, []string{"kubernetes context already persisted with provider"}, []string{"kubernetes context already persisted with provider"}, []string{}, []string{})
)
View Source
var (
	GlobalTokenForAnonymousResults = "dev_token"
)

GlobalTokenForAnonymousResults - stores the global token for anonymous result publishing

View Source
var K8sMeshModelMetadata = make(map[string]interface{})
View Source
var ListAvailableAdapters = []Adapter{Istio, Linkerd, Consul, Kuma, NSM, Nginx, AWS, Cilium, Traefik}

Functions

func CheckLatestVersion added in v0.6.120

func CheckLatestVersion(serverVersion string) (*bool, string, error)

checkLatestVersion takes in the current server version compares it with the target and returns the (isOutdated, latestVersion, error)

func ErrBrokerNotFound

func ErrBrokerNotFound(err error) error

func ErrBrokerSubscription

func ErrBrokerSubscription(err error) error

func ErrCopy

func ErrCopy(err error, obj string) error

func ErrCreateOperatorDeploymentConfig

func ErrCreateOperatorDeploymentConfig(err error) error

func ErrDBCreate added in v0.7.7

func ErrDBCreate(err error) error

func ErrDBDelete

func ErrDBDelete(err error, user string) error

func ErrDBLock

func ErrDBLock(err error) error

func ErrDBOpen

func ErrDBOpen(err error) error

func ErrDBPut

func ErrDBPut(err error) error

func ErrDBRLock

func ErrDBRLock(err error) error

func ErrDBRead

func ErrDBRead(err error) error

func ErrDataRead

func ErrDataRead(err error, r string) error

func ErrDecodeBase64

func ErrDecodeBase64(err error, obj string) error

func ErrDelete

func ErrDelete(err error, obj string, statusCode int) error

func ErrDownloadingSeededComponents

func ErrDownloadingSeededComponents(err error, content string) error

func ErrEncoding

func ErrEncoding(err error, obj string) error

func ErrEncodingPEM

func ErrEncodingPEM(err error) error

func ErrFetch

func ErrFetch(err error, obj string, statusCode int) error

func ErrFetchData

func ErrFetchData(err error) error

func ErrFlushMeshSyncData added in v0.6.135

func ErrFlushMeshSyncData(err error, contextName, server string) error

func ErrFolderStat

func ErrFolderStat(err error, dir string) error

func ErrGenerateUUID

func ErrGenerateUUID(err error) error

func ErrGetPackage added in v0.6.7

func ErrGetPackage(err error) error

func ErrGetToken

func ErrGetToken(err error) error

func ErrGettingSeededComponents

func ErrGettingSeededComponents(err error, content string) error

func ErrGrafanaBoards

func ErrGrafanaBoards(err error) error

func ErrGrafanaClient

func ErrGrafanaClient(err error) error

func ErrGrafanaDashboard

func ErrGrafanaDashboard(err error, UID string) error

func ErrGrafanaData

func ErrGrafanaData(err error, apiEndpoint string) error

func ErrGrafanaDataSource

func ErrGrafanaDataSource(err error, ds string) error

func ErrGrafanaOrg

func ErrGrafanaOrg(err error) error

func ErrGrafanaScan added in v0.6.182

func ErrGrafanaScan(err error) error

func ErrInvalidCapability

func ErrInvalidCapability(capability string, provider string) error

func ErrJWKsKeys

func ErrJWKsKeys(err error) error

func ErrMakeDir

func ErrMakeDir(err error, dir string) error

func ErrMarshal

func ErrMarshal(err error, obj string) error

func ErrMarshalPKIX

func ErrMarshalPKIX(err error) error

func ErrPageNumber

func ErrPageNumber(err error) error

func ErrPageSize

func ErrPageSize(err error) error

func ErrPerfID

func ErrPerfID(err error) error

func ErrPersistConnection added in v0.6.182

func ErrPersistConnection(err error) error

func ErrPersistCredential added in v0.6.182

func ErrPersistCredential(err error) error

func ErrPersistEvent added in v0.6.135

func ErrPersistEvent(err error) error

func ErrPost

func ErrPost(err error, obj string, statusCode int) error

func ErrPraseUnverified

func ErrPraseUnverified(err error) error

func ErrPrometheusGetNodes

func ErrPrometheusGetNodes(err error) error

func ErrPrometheusLabelSeries

func ErrPrometheusLabelSeries(err error) error

func ErrPrometheusQueryRange

func ErrPrometheusQueryRange(err error, query string, startTime, endTime time.Time, step time.Duration) error

func ErrPrometheusScan added in v0.6.182

func ErrPrometheusScan(err error) error

func ErrPrometheusStaticBoard

func ErrPrometheusStaticBoard(err error) error

func ErrRequestMeshsyncStore

func ErrRequestMeshsyncStore(err error) error

func ErrResultData

func ErrResultData() error

func ErrResultNotFound added in v0.6.182

func ErrResultNotFound(err error) error

func ErrSavingSeededComponents

func ErrSavingSeededComponents(err error, content string) error

func ErrSessionCopy

func ErrSessionCopy(err error) error

func ErrShareDesign added in v0.6.48

func ErrShareDesign(err error) error

func ErrShareFilter added in v0.6.127

func ErrShareFilter(err error) error

func ErrTokenClientCheck

func ErrTokenClientCheck(err error) error

func ErrTokenDecode

func ErrTokenDecode(err error) error

func ErrTokenIntrospect added in v0.6.27

func ErrTokenIntrospect(err error) error

func ErrTokenPrase

func ErrTokenPrase(err error) error

func ErrTokenRefresh

func ErrTokenRefresh(err error) error

func ErrTokenRevoke added in v0.6.27

func ErrTokenRevoke(err error) error

func ErrUnableToPersistsResult

func ErrUnableToPersistsResult(err error) error

func ErrUnmarshal

func ErrUnmarshal(err error, obj string) error

func ErrUnreachableKubeAPI added in v0.6.135

func ErrUnreachableKubeAPI(err error, server string) error

func ErrUnreachableRemoteProvider added in v0.6.63

func ErrUnreachableRemoteProvider(err error) error

func ErrUpdateConnectionStatus added in v0.6.176

func ErrUpdateConnectionStatus(err error, statusCode int) error

func FlushMeshSyncData added in v0.6.23

func FlushMeshSyncData(ctx context.Context, k8sContext K8sContext, provider Provider, eventsChan *Broadcast, userID string, mesheryInstanceID *uuid.UUID)

FlushMeshSyncData will flush the meshsync data for the passed kubernetes contextID

func GenerateK8sClientSet added in v0.6.181

func GenerateK8sClientSet(context *K8sContext, eb *events.EventBuilder, eventMetadata map[string]interface{}) (*kubernetes.Client, error)

func GetFilterName

func GetFilterName(stringifiedFile string) (string, error)

GetFilterName takes in a stringified filterfile and extracts the name from it

func GetNewDBInstance

func GetNewDBInstance() *database.Handler

func GetPatternName

func GetPatternName(stringifiedFile string) (string, error)

GetPatternName takes in a stringified patternfile and extracts the name from it

func InitMeshSyncRegistrationQueue added in v0.7.9

func InitMeshSyncRegistrationQueue()

func K8sContextGenerateID

func K8sContextGenerateID(kc K8sContext) (string, error)

K8sContextGenerateID takes in a kubernetes context and generates an ID for it

If the context remains the same, it is guaranteed that the ID will be same

func NewOperatorDeploymentConfig

func NewOperatorDeploymentConfig(adapterTracker AdaptersTrackerInterface) controllers.OperatorDeploymentConfig

func Paginate

func Paginate(page, pageSize uint) func(db *gorm.DB) *gorm.DB

Paginate is the utility for paginating the results

func RemoveStaleObjects

func RemoveStaleObjects(dbHandler database.Handler) error

func SMPPerformanceTestConfigValidator

func SMPPerformanceTestConfigValidator(perfTest *SMP.PerformanceTestConfig) error

SMPPerformanceTestConfigValidator performs validations on the given PerformanceTestConfig object

func SafeClose

func SafeClose(co io.Closer)

SafeClose is a helper function help to close the io

func SanitizeOrderInput added in v0.6.181

func SanitizeOrderInput(order string, validColumns []string) string

SanitizeOrderInput takes in the "order by" query, a validColums string slice and returns a sanitized query

it will allow to run order by query only on the columns that are present in the validColumns string slice, if any other column is requested in the query then it will be IGNORED and an empty query would be returned instead

SanitizeOrderInput also expects the query to be no longer than two words, that is the query may look like "updated_at DESC" or "name ASC"

func SetOverrideValuesForMesheryDeploy added in v0.6.120

func SetOverrideValuesForMesheryDeploy(adapters []Adapter, adapter Adapter, install bool) map[string]interface{}

setOverrideValues detects the currently insalled adapters and sets appropriate overrides so as to not uninstall them.

func TarXZ

func TarXZ(gzipStream io.Reader, destination string) error

TarXZ takes in a gzip stream and untars and uncompresses it to the destination directory

If the destination doesn't exists, it will create it

func TarXZF

func TarXZF(srcURL, destination string) error

TarXZF takes in a source url downloads the tar.gz file uncompresses and then save the file to the destination

Types

type AccountExtension

type AccountExtension struct {
	Title           string            `json:"title,omitempty"`
	OnClickCallback int               `json:"on_click_callback,omitempty"`
	Href            Href              `json:"href,omitempty"`
	Component       string            `json:"component,omitempty"`
	Link            *bool             `json:"link,omitempty"`
	Show            *bool             `json:"show,omitempty"`
	Children        AccountExtensions `json:"children,omitempty"`
	Type            string            `json:"type,omitempty"`
}

AccountExtension describes the Account extension point in the UI

type AccountExtensions

type AccountExtensions []AccountExtension

NavigatorExtensions is a collection of AccountExtension

type Adapter

type Adapter struct {
	Location     string                       `json:"adapter_location"`
	Name         string                       `json:"name"`
	Version      string                       `json:"version"`
	GitCommitSHA string                       `json:"git_commit_sha"`
	Ops          []*meshes.SupportedOperation `json:"ops"`
}

Adapter represents an adapter in Meshery

type Adapters added in v0.6.20

type Adapters struct {
	Istio   bool `json:"istio,omitempty"`
	Citrix  bool `json:"citrix,omitempty"`
	Consul  bool `json:"consul,omitempty"`
	Cilium  bool `json:"cilium,omitempty"`
	AppMesh bool `json:"appMesh,omitempty"`
	Kuma    bool `json:"kuma,omitempty"`
	Linkerd bool `json:"linkerd,omitempty"`
	Nginx   bool `json:"nginx,omitempty"`
	NSM     bool `json:"nsm,omitempty"`
}

type AdaptersTrackerInterface

type AdaptersTrackerInterface interface {
	AddAdapter(context.Context, Adapter)
	RemoveAdapter(context.Context, Adapter)
	GetAdapters(context.Context) []Adapter
	DeployAdapter(context.Context, Adapter) error
	UndeployAdapter(context.Context, Adapter) error
}

AdaptersTrackerInterface defines the methods a type should implement to be an adapter tracker

type AllUsers added in v0.6.88

type AllUsers struct {
	Page       int     `json:"page"`
	PageSize   int     `json:"page_size"`
	Data       []*User `json:"data"`
	TotalCount int     `json:"total_count"`
}

type ApplicationSourceTypesAPIResponse

type ApplicationSourceTypesAPIResponse struct {
	ApplicationType     string   `json:"application_type"`
	SupportedExtensions []string `json:"supported_extensions"`
}

type ApplicationType

type ApplicationType string

type ApplicationTypeResponse

type ApplicationTypeResponse struct {
	Type                ApplicationType `json:"application_type"`
	SupportedExtensions []string        `json:"supported_extensions"`
}

type ApplicationsAPIResponse

type ApplicationsAPIResponse struct {
	Page         uint                 `json:"page"`
	PageSize     uint                 `json:"page_size"`
	TotalCount   uint                 `json:"total_count"`
	Applications []MesheryApplication `json:"applications"`
}

ApplicationsAPIResponse response retruned by patternfile endpoint on meshery server

type ArtifactHubPackageManager added in v0.6.7

type ArtifactHubPackageManager struct {
	PackageName string
}

func (ArtifactHubPackageManager) GetPackage added in v0.6.7

func (ahpm ArtifactHubPackageManager) GetPackage() (models.Package, error)

type AuthenticationMechanism added in v0.6.21

type AuthenticationMechanism int
const (
	NoAuth AuthenticationMechanism = iota
	ProviderAuth
)

func (AuthenticationMechanism) String added in v0.6.21

func (a AuthenticationMechanism) String() string

type Broadcast added in v0.6.143

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

func NewBroadcaster added in v0.6.143

func NewBroadcaster() *Broadcast

func (*Broadcast) Publish added in v0.6.143

func (c *Broadcast) Publish(id uuid.UUID, data interface{})

func (*Broadcast) Subscribe added in v0.6.143

func (c *Broadcast) Subscribe(id uuid.UUID) (chan interface{}, func())

type Capabilities

type Capabilities []Capability

Capabilities is the collection of capability

func (Capabilities) GetEndpointForFeature

func (caps Capabilities) GetEndpointForFeature(feature Feature) (string, bool)

GetEndpointForFeature returns the endpoint for the given feature

Existence of a feature DOES NOT guarantee that the endpoint would be a not empty string as some of the features may not require an endpoint

func (Capabilities) IsSupported

func (caps Capabilities) IsSupported(feature Feature) bool

IsSupported returns true if the given feature is listed as one of the capabilities of the provider

type Capability

type Capability struct {
	Feature  Feature `json:"feature,omitempty"`
	Endpoint string  `json:"endpoint,omitempty"`
}

Capability is a capability of Provider indicating whether a feature is present

type CatalogContentType added in v0.6.176

type CatalogContentType string
const (
	CatalogPattern CatalogContentType = "pattern"
	CatalogFilter  CatalogContentType = "filter"
)

type CatalogRequest added in v0.6.176

type CatalogRequest struct {
	ID          uuid.UUID            `json:"id,omitempty" db:"id"`
	ContentID   uuid.UUID            `json:"content_id,omitempty" db:"content_id"`
	ContentName string               `json:"content_name,omitempty" db:"content_name"`
	ContentType CatalogContentType   `json:"content_type,omitempty" db:"content_type"`
	FirstName   string               `json:"first_name,omitempty" db:"first_name"`
	LastName    string               `json:"last_name,omitempty" db:"last_name"`
	Email       string               `json:"email,omitempty" db:"email"`
	Status      CatalogRequestStatus `json:"status,omitempty" db:"status"`
	CreatedAt   time.Time            `json:"created_at,omitempty" db:"created_at"`
	UpdatedAt   time.Time            `json:"updated_at,omitempty" db:"updated_at"`
}

type CatalogRequestStatus added in v0.6.176

type CatalogRequestStatus string
const (
	CatalogPending  CatalogRequestStatus = "pending"
	CatalogApproved CatalogRequestStatus = "approved"
	CatalogDenied   CatalogRequestStatus = "denied"
)

type CollaboratorExtension added in v0.6.121

type CollaboratorExtension struct {
	Component string `json:"component,omitempty"`
	Type      string `json:"type,omitempty"`
}

CollaboratorsExtension is the struct for collaborators extension

type CollaboratorExtensions added in v0.6.121

type CollaboratorExtensions []CollaboratorExtension

CollaboratorExtension describes the Collaborator extension point in the UI

type ComponentsRegistrationHelper

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

func NewComponentsRegistrationHelper

func NewComponentsRegistrationHelper(logger logger.Handler) *ComponentsRegistrationHelper

func (*ComponentsRegistrationHelper) RegisterComponents

func (cg *ComponentsRegistrationHelper) RegisterComponents(ctxs []*K8sContext, regFunc []K8sRegistrationFunction, reg *meshmodel.RegistryManager, eventsBrodcaster *Broadcast, provider Provider, userID string, skip bool)

start registration of components for the contexts

func (*ComponentsRegistrationHelper) UpdateContexts

update the map with the given list of contexts

type Configuration added in v0.6.20

type Configuration struct {
	Designs      bool `json:"designs,omitempty"`
	Applications bool `json:"applications,omitempty"`
	Filters      bool `json:"filters,omitempty"`
}

type ConfigurationChannel

type ConfigurationChannel struct {
	ApplicationsChannel []chan struct{}
	PatternsChannel     []chan struct{}
	FiltersChannel      []chan struct{}
	// contains filtered or unexported fields
}

func NewConfigurationHelper

func NewConfigurationHelper() *ConfigurationChannel

func (*ConfigurationChannel) PublishApplications

func (c *ConfigurationChannel) PublishApplications()

func (*ConfigurationChannel) PublishFilters

func (c *ConfigurationChannel) PublishFilters()

func (*ConfigurationChannel) PublishPatterns

func (c *ConfigurationChannel) PublishPatterns()

func (*ConfigurationChannel) SubscribeApplications

func (c *ConfigurationChannel) SubscribeApplications(ch chan struct{})

func (*ConfigurationChannel) SubscribeFilters

func (c *ConfigurationChannel) SubscribeFilters(ch chan struct{})

func (*ConfigurationChannel) SubscribePatterns

func (c *ConfigurationChannel) SubscribePatterns(ch chan struct{})

type ConnectionPayload added in v0.6.91

type ConnectionPayload struct {
	ID                         uuid.UUID                    `json:"id,omitempty"`
	Kind                       string                       `json:"kind,omitempty"`
	SubType                    string                       `json:"sub_type,omitempty"`
	Type                       string                       `json:"type,omitempty"`
	MetaData                   map[string]interface{}       `json:"metadata,omitempty"`
	Status                     connections.ConnectionStatus `json:"status,omitempty"`
	CredentialSecret           map[string]interface{}       `json:"credential_secret,omitempty"`
	Name                       string                       `json:"name,omitempty"`
	CredentialID               *uuid.UUID                   `json:"credential_id,omitempty"`
	Model                      string                       `json:"model,omitempty"`
	SkipCredentialVerification bool                         `json:"skip_credential_verification"`
}

type ContextKey

type ContextKey string

ContextKey is a custom type for setting context key

type CountBySeverityLevel added in v0.6.135

type CountBySeverityLevel struct {
	Severity string `json:"severity"`
	Count    int    `json:"count"`
}

type Credential added in v0.6.79

type Credential struct {
	ID     uuid.UUID  `json:"id,omitempty" db:"id"`
	Name   string     `json:"name,omitempty" db:"name"`
	UserID *uuid.UUID `json:"user_id,omitempty" db:"user_id"`
	Type   string     `json:"type,omitempty" db:"type"`
	// change to just interface
	Secret    map[string]interface{} `json:"secret,omitempty" db:"secret"`
	CreatedAt time.Time              `json:"created_at,omitempty" db:"created_at"`
	UpdatedAt time.Time              `json:"updated_at,omitempty" db:"updated_at"`
	DeletedAt sql.NullTime           `json:"deleted_at,omitempty" db:"deleted_at"`
}

type CredentialsPage added in v0.6.79

type CredentialsPage struct {
	Page        int           `json:"page"`
	PageSize    int           `json:"page_size"`
	TotalCount  int           `json:"total_count"`
	Credentials []*Credential `json:"credentials"`
}

type DashboardK8sResourcesChan

type DashboardK8sResourcesChan struct {
	ResourcesChan []chan struct{}
	// contains filtered or unexported fields
}

func NewDashboardK8sResourcesHelper

func NewDashboardK8sResourcesHelper() *DashboardK8sResourcesChan

func (*DashboardK8sResourcesChan) PublishDashboardK8sResources

func (d *DashboardK8sResourcesChan) PublishDashboardK8sResources()

func (*DashboardK8sResourcesChan) SubscribeDashbordK8Resources

func (d *DashboardK8sResourcesChan) SubscribeDashbordK8Resources(ch chan struct{})

type DatabaseSummary added in v0.6.99

type DatabaseSummary struct {
	Page        int             `json:"page"`
	PageSize    int             `json:"page_size"`
	TotalTables int             `json:"total_tables"`
	RecordCount int             `json:"record_count"`
	Tables      []*SqliteSchema `json:"tables"`
}

type DefaultLocalProvider

type DefaultLocalProvider struct {
	*MapPreferencePersister
	*EventsPersister
	ProviderProperties
	ProviderBaseURL                 string
	ResultPersister                 *MesheryResultsPersister
	SmiResultPersister              *SMIResultsPersister
	TestProfilesPersister           *TestProfilesPersister
	PerformanceProfilesPersister    *PerformanceProfilePersister
	MesheryPatternPersister         *MesheryPatternPersister
	MesheryPatternResourcePersister *PatternResourcePersister
	MesheryApplicationPersister     *MesheryApplicationPersister
	MesheryFilterPersister          *MesheryFilterPersister
	MesheryK8sContextPersister      *MesheryK8sContextPersister
	OrganizationPersister           *OrganizationPersister
	KeyPersister                    *KeyPersister

	GenericPersister *database.Handler
	KubeClient       *mesherykube.Client
	Log              logger.Handler
}

DefaultLocalProvider - represents a local provider

func (*DefaultLocalProvider) AddConnectionToEnvironment added in v0.6.143

func (l *DefaultLocalProvider) AddConnectionToEnvironment(_ *http.Request, _ string, _ string) ([]byte, error)

func (*DefaultLocalProvider) AddDesignToWorkspace added in v0.7.5

func (l *DefaultLocalProvider) AddDesignToWorkspace(_ *http.Request, _, _ string) ([]byte, error)

func (*DefaultLocalProvider) AddEnvironmentToWorkspace added in v0.7.5

func (l *DefaultLocalProvider) AddEnvironmentToWorkspace(_ *http.Request, _, _ string) ([]byte, error)

func (*DefaultLocalProvider) Cleanup

func (l *DefaultLocalProvider) Cleanup() error

func (*DefaultLocalProvider) CloneMesheryFilter added in v0.6.4

func (l *DefaultLocalProvider) CloneMesheryFilter(_ *http.Request, filterID string, cloneFilterRequest *MesheryCloneFilterRequestBody) ([]byte, error)

CloneMesheryFilter clones a meshery filter with the given id

func (*DefaultLocalProvider) CloneMesheryPattern added in v0.6.4

func (l *DefaultLocalProvider) CloneMesheryPattern(_ *http.Request, patternID string, clonePatternRequest *MesheryClonePatternRequestBody) ([]byte, error)

CloneMesheryPattern clones a meshery pattern with the given id

func (*DefaultLocalProvider) DeleteConnection added in v0.6.91

func (l *DefaultLocalProvider) DeleteConnection(_ *http.Request, _ uuid.UUID) (*connections.Connection, error)

func (*DefaultLocalProvider) DeleteEnvironment added in v0.6.143

func (l *DefaultLocalProvider) DeleteEnvironment(_ *http.Request, _ string) ([]byte, error)

func (*DefaultLocalProvider) DeleteK8sContext

func (l *DefaultLocalProvider) DeleteK8sContext(_, id string) (K8sContext, error)

func (*DefaultLocalProvider) DeleteMesheryApplication

func (l *DefaultLocalProvider) DeleteMesheryApplication(_ *http.Request, applicationID string) ([]byte, error)

DeleteMesheryApplication deletes a meshery application with the given id

func (*DefaultLocalProvider) DeleteMesheryConnection added in v0.6.52

func (l *DefaultLocalProvider) DeleteMesheryConnection() error

func (*DefaultLocalProvider) DeleteMesheryFilter

func (l *DefaultLocalProvider) DeleteMesheryFilter(_ *http.Request, filterID string) ([]byte, error)

DeleteMesheryFilter deletes a meshery filter with the given id

func (*DefaultLocalProvider) DeleteMesheryPattern

func (l *DefaultLocalProvider) DeleteMesheryPattern(_ *http.Request, patternID string) ([]byte, error)

DeleteMesheryPattern deletes a meshery pattern with the given id

func (*DefaultLocalProvider) DeleteMesheryPatternResource

func (l *DefaultLocalProvider) DeleteMesheryPatternResource(_, resourceID string) error

func (*DefaultLocalProvider) DeleteMesheryPatterns

func (l *DefaultLocalProvider) DeleteMesheryPatterns(_ *http.Request, patterns MesheryPatternDeleteRequestBody) ([]byte, error)

DeleteMesheryPattern deletes a meshery pattern with the given id

func (*DefaultLocalProvider) DeletePerformanceProfile

func (l *DefaultLocalProvider) DeletePerformanceProfile(_ *http.Request, performanceProfileID string) ([]byte, error)

DeletePerformanceProfile deletes a meshery performance profile with the given id

func (*DefaultLocalProvider) DeleteSchedule

func (l *DefaultLocalProvider) DeleteSchedule(_ *http.Request, _ string) ([]byte, error)

DeleteSchedule deletes a schedule with the given id

func (*DefaultLocalProvider) DeleteUserCredential added in v0.6.79

func (l *DefaultLocalProvider) DeleteUserCredential(_ *http.Request, credentialID uuid.UUID) (*Credential, error)

func (*DefaultLocalProvider) DeleteWorkspace added in v0.7.5

func (l *DefaultLocalProvider) DeleteWorkspace(_ *http.Request, _ string) ([]byte, error)

func (*DefaultLocalProvider) Description

func (l *DefaultLocalProvider) Description() []string

Description - returns a short description of the provider for display in the Provider UI

func (*DefaultLocalProvider) ExtensionProxy

func (l *DefaultLocalProvider) ExtensionProxy(_ *http.Request) (*ExtensionProxyResponse, error)

func (*DefaultLocalProvider) ExtractToken

func (l *DefaultLocalProvider) ExtractToken(w http.ResponseWriter, _ *http.Request)

ExtractToken - Returns the auth token and the provider type

func (*DefaultLocalProvider) FetchAllResults

func (l *DefaultLocalProvider) FetchAllResults(_, page, pageSize, _, _, _, _ string) ([]byte, error)

FetchResults - fetches results from provider backend

func (*DefaultLocalProvider) FetchResults

func (l *DefaultLocalProvider) FetchResults(_, page, pageSize, _, _, profileID string) ([]byte, error)

FetchResults - fetches results from provider backend

func (*DefaultLocalProvider) FetchSmiResult

func (l *DefaultLocalProvider) FetchSmiResult(_ *http.Request, _, _, _, _ string, resultID uuid.UUID) ([]byte, error)

FetchSmiResults - fetches results from provider backend

func (*DefaultLocalProvider) FetchSmiResults

func (l *DefaultLocalProvider) FetchSmiResults(_ *http.Request, page, pageSize, _, _ string) ([]byte, error)

FetchSmiResults - fetches results from provider backend

func (*DefaultLocalProvider) GetApplicationSourceContent

func (l *DefaultLocalProvider) GetApplicationSourceContent(_ *http.Request, applicationID string) ([]byte, error)

GetApplicationSourceContent returns application source-content from provider

func (*DefaultLocalProvider) GetCatalogMesheryFilters added in v0.6.4

func (l *DefaultLocalProvider) GetCatalogMesheryFilters(_ string, page, pageSize, search, order string) ([]byte, error)

GetCatalogMesheryFilters gives the catalog filters stored with the provider

func (*DefaultLocalProvider) GetCatalogMesheryPatterns added in v0.6.4

func (l *DefaultLocalProvider) GetCatalogMesheryPatterns(_, page, pageSize, search, order string) ([]byte, error)

GetCatalogMesheryPatterns gives the catalog patterns stored with the provider

func (*DefaultLocalProvider) GetConnectionByID added in v0.6.182

func (l *DefaultLocalProvider) GetConnectionByID(token string, connectionID uuid.UUID, kind string) (*connections.Connection, int, error)

func (*DefaultLocalProvider) GetConnections added in v0.6.91

func (l *DefaultLocalProvider) GetConnections(_ *http.Request, _ string, _, _ int, _, _ string, _ string, _ []string, _ []string) (*connections.ConnectionPage, error)

func (*DefaultLocalProvider) GetConnectionsByKind added in v0.6.117

func (l *DefaultLocalProvider) GetConnectionsByKind(_ *http.Request, _ string, _, _ int, _, _, _ string) (*map[string]interface{}, error)

func (*DefaultLocalProvider) GetConnectionsOfEnvironment added in v0.7.3

func (l *DefaultLocalProvider) GetConnectionsOfEnvironment(_ *http.Request, _, _, _, _, _, _ string) ([]byte, error)

func (*DefaultLocalProvider) GetConnectionsStatus added in v0.6.113

func (l *DefaultLocalProvider) GetConnectionsStatus(_ *http.Request, _ string) (*connections.ConnectionsStatusPage, error)

func (*DefaultLocalProvider) GetCredentialByID added in v0.6.182

func (l *DefaultLocalProvider) GetCredentialByID(token string, credentialID uuid.UUID) (*Credential, int, error)

func (*DefaultLocalProvider) GetDesignSourceContent added in v0.7.5

func (l *DefaultLocalProvider) GetDesignSourceContent(_ *http.Request, designID string) ([]byte, error)

GetDesignSourceContent returns design source-content from provider

func (*DefaultLocalProvider) GetDesignsOfWorkspace added in v0.7.5

func (l *DefaultLocalProvider) GetDesignsOfWorkspace(_ *http.Request, _, _, _, _, _, _ string) ([]byte, error)

func (*DefaultLocalProvider) GetEnvironmentByID added in v0.6.143

func (l *DefaultLocalProvider) GetEnvironmentByID(_ *http.Request, _, _ string) ([]byte, error)

func (*DefaultLocalProvider) GetEnvironments added in v0.6.143

func (l *DefaultLocalProvider) GetEnvironments(_, _, _, _, _, _, _ string) ([]byte, error)

func (*DefaultLocalProvider) GetEnvironmentsOfWorkspace added in v0.7.5

func (l *DefaultLocalProvider) GetEnvironmentsOfWorkspace(_ *http.Request, _, _, _, _, _, _ string) ([]byte, error)

func (*DefaultLocalProvider) GetGenericPersister

func (l *DefaultLocalProvider) GetGenericPersister() *database.Handler

GetGenericPersister - to return persister

func (*DefaultLocalProvider) GetK8sContext

func (l *DefaultLocalProvider) GetK8sContext(_, id string) (K8sContext, error)

func (*DefaultLocalProvider) GetK8sContexts

func (l *DefaultLocalProvider) GetK8sContexts(_, page, pageSize, search, order string, withStatus string, withCredentials bool) ([]byte, error)

func (*DefaultLocalProvider) GetKubeClient

func (l *DefaultLocalProvider) GetKubeClient() *mesherykube.Client

GetKubeClient - to get meshery kubernetes client

func (*DefaultLocalProvider) GetMesheryApplication

func (l *DefaultLocalProvider) GetMesheryApplication(_ *http.Request, applicationID string) ([]byte, error)

GetMesheryApplication gets application for the given applicationID

func (*DefaultLocalProvider) GetMesheryApplications

func (l *DefaultLocalProvider) GetMesheryApplications(_, page, pageSize, search, order string, updatedAfter string) ([]byte, error)

GetMesheryApplications gives the applications stored with the provider

func (*DefaultLocalProvider) GetMesheryFilter

func (l *DefaultLocalProvider) GetMesheryFilter(_ *http.Request, filterID string) ([]byte, error)

GetMesheryFilter gets filter for the given filterID

func (*DefaultLocalProvider) GetMesheryFilterFile

func (l *DefaultLocalProvider) GetMesheryFilterFile(_ *http.Request, filterID string) ([]byte, error)

GetMesheryFilterFile gets filter for the given filterID without the metadata

func (*DefaultLocalProvider) GetMesheryFilters

func (l *DefaultLocalProvider) GetMesheryFilters(_, page, pageSize, search, order string, visibility []string) ([]byte, error)

GetMesheryFilters gives the filters stored with the provider

func (*DefaultLocalProvider) GetMesheryPattern

func (l *DefaultLocalProvider) GetMesheryPattern(_ *http.Request, patternID string) ([]byte, error)

GetMesheryPattern gets pattern for the given patternID

func (*DefaultLocalProvider) GetMesheryPatternResource

func (l *DefaultLocalProvider) GetMesheryPatternResource(_, resourceID string) (*PatternResource, error)

func (*DefaultLocalProvider) GetMesheryPatternResources

func (l *DefaultLocalProvider) GetMesheryPatternResources(
	_,
	page,
	pageSize,
	search,
	order,
	name,
	namespace,
	typ,
	oamType string,
) (*PatternResourcePage, error)

func (*DefaultLocalProvider) GetMesheryPatterns

func (l *DefaultLocalProvider) GetMesheryPatterns(_, page, pageSize, search, order, updatedAfter string, visibility []string) ([]byte, error)

GetMesheryPatterns gives the patterns stored with the provider

func (*DefaultLocalProvider) GetOrganization added in v0.7.3

func (l *DefaultLocalProvider) GetOrganization(_ *http.Request, organizationId string) ([]byte, error)

GetOrganization returns the organization for the given organizationID

func (*DefaultLocalProvider) GetOrganizations added in v0.7.3

func (l *DefaultLocalProvider) GetOrganizations(_, page, pageSize, search, order, updatedAfter string) ([]byte, error)

GetOrganizations returns the list of organizations

func (*DefaultLocalProvider) GetPerformanceProfile

func (l *DefaultLocalProvider) GetPerformanceProfile(_ *http.Request, performanceProfileID string) ([]byte, error)

GetPerformanceProfile gets performance profile for the given performance profileID

func (*DefaultLocalProvider) GetPerformanceProfiles

func (l *DefaultLocalProvider) GetPerformanceProfiles(_, page, pageSize, _, _ string) ([]byte, error)

GetPerformanceProfiles gives the performance profiles stored with the provider

func (*DefaultLocalProvider) GetProviderCapabilities

func (l *DefaultLocalProvider) GetProviderCapabilities(w http.ResponseWriter, _ *http.Request)

GetProviderCapabilities returns all of the provider properties

func (*DefaultLocalProvider) GetProviderProperties

func (l *DefaultLocalProvider) GetProviderProperties() ProviderProperties

GetProviderProperties - Returns all the provider properties required

func (*DefaultLocalProvider) GetProviderToken

func (l *DefaultLocalProvider) GetProviderToken(_ *http.Request) (string, error)

GetProviderToken - returns provider token

func (*DefaultLocalProvider) GetProviderType

func (l *DefaultLocalProvider) GetProviderType() ProviderType

GetProviderType - Returns ProviderType

func (*DefaultLocalProvider) GetResult

func (l *DefaultLocalProvider) GetResult(_ string, resultID uuid.UUID) (*MesheryResult, error)

GetResult - fetches result from provider backend for the given result id

func (*DefaultLocalProvider) GetSchedule

func (l *DefaultLocalProvider) GetSchedule(_ *http.Request, _ string) ([]byte, error)

GetSchedule gets a schedule with the given id

func (*DefaultLocalProvider) GetSchedules

func (l *DefaultLocalProvider) GetSchedules(_ *http.Request, _, _, _ string) ([]byte, error)

GetSchedules gets the schedules stored by the current user

func (*DefaultLocalProvider) GetSession

func (l *DefaultLocalProvider) GetSession(_ *http.Request) error

GetSession - returns the session

func (*DefaultLocalProvider) GetUserByID added in v0.6.63

func (l *DefaultLocalProvider) GetUserByID(_ *http.Request, _ string) ([]byte, error)

func (*DefaultLocalProvider) GetUserCredentials added in v0.6.79

func (l *DefaultLocalProvider) GetUserCredentials(_ *http.Request, userID string, page, pageSize int, search, order string) (*CredentialsPage, error)

func (*DefaultLocalProvider) GetUserDetails

func (l *DefaultLocalProvider) GetUserDetails(_ *http.Request) (*User, error)

GetUserDetails - returns the user details

func (*DefaultLocalProvider) GetUsers added in v0.6.88

func (l *DefaultLocalProvider) GetUsers(_, _, _, _, _, _ string) ([]byte, error)

func (*DefaultLocalProvider) GetUsersKey added in v0.7.7

func (l *DefaultLocalProvider) GetUsersKey(_ *http.Request, keyID string) ([]byte, error)

GetKey returns the key for the given keyID

func (*DefaultLocalProvider) GetUsersKeys added in v0.6.124

func (l *DefaultLocalProvider) GetUsersKeys(_, _, _, search, order, updatedAfter string, _ string) ([]byte, error)

GetKeys returns the list of keys

func (*DefaultLocalProvider) GetWorkspaceByID added in v0.7.5

func (l *DefaultLocalProvider) GetWorkspaceByID(_ *http.Request, _, _ string) ([]byte, error)

func (*DefaultLocalProvider) GetWorkspaces added in v0.7.5

func (l *DefaultLocalProvider) GetWorkspaces(_, _, _, _, _, _, _ string) ([]byte, error)

func (*DefaultLocalProvider) HandleUnAuthenticated

func (l *DefaultLocalProvider) HandleUnAuthenticated(w http.ResponseWriter, req *http.Request)

HandleUnAuthenticated - logout from provider backend

func (*DefaultLocalProvider) Initialize

func (l *DefaultLocalProvider) Initialize()

Initialize will initialize the local provider

func (*DefaultLocalProvider) InitiateLogin

func (l *DefaultLocalProvider) InitiateLogin(_ http.ResponseWriter, _ *http.Request, _ bool)

InitiateLogin - initiates login flow and returns a true to indicate the handler to "return" or false to continue

func (*DefaultLocalProvider) LoadAllK8sContext

func (l *DefaultLocalProvider) LoadAllK8sContext(token string) ([]*K8sContext, error)

func (*DefaultLocalProvider) Logout

Logout - logout from provider backend

func (*DefaultLocalProvider) Name

func (l *DefaultLocalProvider) Name() string

Name - Returns Provider's friendly name

func (*DefaultLocalProvider) PackageLocation

func (l *DefaultLocalProvider) PackageLocation() string

PackageLocation returns an empty string as there is no extension package for the local provider

func (*DefaultLocalProvider) PublishCatalogFilter added in v0.6.17

func (l *DefaultLocalProvider) PublishCatalogFilter(_ *http.Request, _ *MesheryCatalogFilterRequestBody) ([]byte, error)

PublishCatalogFilter publishes filter to catalog Not supported by local provider

func (*DefaultLocalProvider) PublishCatalogPattern added in v0.6.17

func (l *DefaultLocalProvider) PublishCatalogPattern(_ *http.Request, _ *MesheryCatalogPatternRequestBody) ([]byte, error)

PublishCatalogPattern publishes pattern to catalog Not supported by local provider

func (*DefaultLocalProvider) PublishMetrics

func (l *DefaultLocalProvider) PublishMetrics(_ string, result *MesheryResult) error

PublishMetrics - publishes metrics to the provider backend asyncronously

func (*DefaultLocalProvider) PublishResults

func (l *DefaultLocalProvider) PublishResults(req *http.Request, result *MesheryResult, profileID string) (string, error)

PublishResults - publishes results to the provider backend synchronously

func (*DefaultLocalProvider) PublishSmiResults

func (l *DefaultLocalProvider) PublishSmiResults(result *SmiResult) (string, error)

PublishSmiResults - publishes results to the provider backend synchronously

func (*DefaultLocalProvider) RecordPreferences

func (l *DefaultLocalProvider) RecordPreferences(_ *http.Request, userID string, data *Preference) error

RecordPreferences - records the user preference

func (*DefaultLocalProvider) RemoteFilterFile

func (l *DefaultLocalProvider) RemoteFilterFile(_ *http.Request, resourceURL, path string, save bool, resource string) ([]byte, error)

RemoteFilterFile takes in the

func (*DefaultLocalProvider) RemotePatternFile

func (l *DefaultLocalProvider) RemotePatternFile(_ *http.Request, resourceURL, path string, save bool) ([]byte, error)

RemotePatternFile takes in the

func (*DefaultLocalProvider) RemoveConnectionFromEnvironment added in v0.6.143

func (l *DefaultLocalProvider) RemoveConnectionFromEnvironment(_ *http.Request, _ string, _ string) ([]byte, error)

func (*DefaultLocalProvider) RemoveDesignFromWorkspace added in v0.7.5

func (l *DefaultLocalProvider) RemoveDesignFromWorkspace(_ *http.Request, _ string, _ string) ([]byte, error)

func (*DefaultLocalProvider) RemoveEnvironmentFromWorkspace added in v0.7.5

func (l *DefaultLocalProvider) RemoveEnvironmentFromWorkspace(_ *http.Request, _ string, _ string) ([]byte, error)

func (*DefaultLocalProvider) SMPTestConfigDelete

func (l *DefaultLocalProvider) SMPTestConfigDelete(_ *http.Request, testUUID string) error

SMPTestConfigDelete deletes the given PerformanceTestConfig from the local datastore

func (*DefaultLocalProvider) SMPTestConfigFetch

func (l *DefaultLocalProvider) SMPTestConfigFetch(_ *http.Request, page, pageSize, _, _ string) ([]byte, error)

SMPTestConfigFetch gets all the PerformanceTestConfigs from the local datastore

func (*DefaultLocalProvider) SMPTestConfigGet

func (l *DefaultLocalProvider) SMPTestConfigGet(_ *http.Request, testUUID string) (*SMP.PerformanceTestConfig, error)

SMPTestConfigGet gets the given PerformanceTestConfig from the local datastore

func (*DefaultLocalProvider) SMPTestConfigStore

func (l *DefaultLocalProvider) SMPTestConfigStore(_ *http.Request, perfConfig *SMP.PerformanceTestConfig) (string, error)

SMPTestConfigStore Stores the given PerformanceTestConfig into local datastore

func (*DefaultLocalProvider) SaveApplicationSourceContent

func (l *DefaultLocalProvider) SaveApplicationSourceContent(_, _ string, _ []byte) error

SaveApplicationSourceContent nothing needs to be done as application is saved with source content for local provider

func (*DefaultLocalProvider) SaveConnection added in v0.6.52

func (*DefaultLocalProvider) SaveEnvironment added in v0.6.143

func (l *DefaultLocalProvider) SaveEnvironment(_ *http.Request, _ *environments.EnvironmentPayload, _ string, _ bool) ([]byte, error)

func (*DefaultLocalProvider) SaveK8sContext

func (l *DefaultLocalProvider) SaveK8sContext(_ string, k8sContext K8sContext) (connections.Connection, error)

func (*DefaultLocalProvider) SaveMesheryApplication

func (l *DefaultLocalProvider) SaveMesheryApplication(_ string, application *MesheryApplication) ([]byte, error)

SaveMesheryApplication saves given application with the provider

func (*DefaultLocalProvider) SaveMesheryFilter

func (l *DefaultLocalProvider) SaveMesheryFilter(_ string, filter *MesheryFilter) ([]byte, error)

SaveMesheryFilter saves given filter with the provider

func (*DefaultLocalProvider) SaveMesheryPattern

func (l *DefaultLocalProvider) SaveMesheryPattern(_ string, pattern *MesheryPattern) ([]byte, error)

SaveMesheryPattern saves given pattern with the provider

func (*DefaultLocalProvider) SaveMesheryPatternResource

func (l *DefaultLocalProvider) SaveMesheryPatternResource(_ string, resource *PatternResource) (*PatternResource, error)

func (*DefaultLocalProvider) SaveMesheryPatternSourceContent added in v0.6.169

func (l *DefaultLocalProvider) SaveMesheryPatternSourceContent(_, _ string, _ []byte) error

SaveMesheryPatternSourceContent nothing needs to be done as pattern is saved with source content for local provider

func (*DefaultLocalProvider) SaveOrganization added in v0.7.3

func (l *DefaultLocalProvider) SaveOrganization(_ string, organization *Organization) ([]byte, error)

SaveOrganization saves given organization with the provider

func (*DefaultLocalProvider) SavePerformanceProfile

func (l *DefaultLocalProvider) SavePerformanceProfile(_ string, performanceProfile *PerformanceProfile) ([]byte, error)

SavePerformanceProfile saves given performance profile with the provider

func (*DefaultLocalProvider) SaveSchedule

func (l *DefaultLocalProvider) SaveSchedule(_ string, _ *Schedule) ([]byte, error)

SaveSchedule saves a schedule

func (*DefaultLocalProvider) SaveUserCredential added in v0.6.79

func (l *DefaultLocalProvider) SaveUserCredential(token string, credential *Credential) (*Credential, error)

func (*DefaultLocalProvider) SaveUsersKey added in v0.7.7

func (l *DefaultLocalProvider) SaveUsersKey(_ string, keys []*Key) ([]*Key, error)

SaveKey saves the given key with the provider

func (*DefaultLocalProvider) SaveWorkspace added in v0.7.5

func (l *DefaultLocalProvider) SaveWorkspace(_ *http.Request, _ *WorkspacePayload, _ string, _ bool) ([]byte, error)

func (*DefaultLocalProvider) SeedContent

func (l *DefaultLocalProvider) SeedContent(log logger.Handler)

SeedContent- to seed various contents with local provider-like patterns, filters, and applications

func (*DefaultLocalProvider) SetKubeClient

func (l *DefaultLocalProvider) SetKubeClient(client *mesherykube.Client)

SetKubeClient - to set meshery kubernetes client

func (*DefaultLocalProvider) ShareDesign added in v0.6.48

func (l *DefaultLocalProvider) ShareDesign(_ *http.Request) (int, error)

func (*DefaultLocalProvider) ShareFilter added in v0.6.127

func (l *DefaultLocalProvider) ShareFilter(_ *http.Request) (int, error)

func (*DefaultLocalProvider) TokenHandler

func (l *DefaultLocalProvider) TokenHandler(_ http.ResponseWriter, _ *http.Request, _ bool)

TokenHandler - specific to remote auth

func (*DefaultLocalProvider) UnPublishCatalogFilter added in v0.6.100

func (l *DefaultLocalProvider) UnPublishCatalogFilter(_ *http.Request, _ *MesheryCatalogFilterRequestBody) ([]byte, error)

func (*DefaultLocalProvider) UnPublishCatalogPattern added in v0.6.92

func (l *DefaultLocalProvider) UnPublishCatalogPattern(_ *http.Request, _ *MesheryCatalogPatternRequestBody) ([]byte, error)

func (*DefaultLocalProvider) UpdateConnection added in v0.6.91

func (*DefaultLocalProvider) UpdateConnectionById added in v0.6.120

func (l *DefaultLocalProvider) UpdateConnectionById(_ *http.Request, _ *ConnectionPayload, _ string) (*connections.Connection, error)

func (*DefaultLocalProvider) UpdateConnectionStatusByID added in v0.6.176

func (l *DefaultLocalProvider) UpdateConnectionStatusByID(token string, connectionID uuid.UUID, connectionStatus connections.ConnectionStatus) (*connections.Connection, int, error)

func (*DefaultLocalProvider) UpdateEnvironment added in v0.6.143

func (*DefaultLocalProvider) UpdateToken

UpdateToken - specific to remote auth

func (*DefaultLocalProvider) UpdateUserCredential added in v0.6.79

func (l *DefaultLocalProvider) UpdateUserCredential(_ *http.Request, credential *Credential) (*Credential, error)

func (*DefaultLocalProvider) UpdateWorkspace added in v0.7.5

func (l *DefaultLocalProvider) UpdateWorkspace(_ *http.Request, _ *WorkspacePayload, _ string) (*Workspace, error)

type DesignType added in v0.6.169

type DesignType string
const (
	HelmChart     DesignType = "Helm Chart"
	DockerCompose DesignType = "Docker Compose"
	K8sManifest   DesignType = "Kubernetes Manifest"
	Design        DesignType = "Design"
)

type DesignTypeResponse added in v0.6.169

type DesignTypeResponse struct {
	Type                DesignType `json:"design_type"`
	SupportedExtensions []string   `json:"supported_extensions"`
}

func GetApplicationTypes

func GetApplicationTypes() (r []DesignTypeResponse)

func GetDesignsTypes added in v0.6.169

func GetDesignsTypes() (r []DesignTypeResponse)

type DesignerComponents added in v0.6.20

type DesignerComponents struct {
	Design      bool `json:"design,omitempty"`
	Application bool `json:"application,omitempty"`
	Filter      bool `json:"filter,omitempty"`
	Save        bool `json:"save,omitempty"`
	New         bool `json:"new,omitempty"`
	SaveAs      bool `json:"saveAs,omitempty"`
	Validate    bool `json:"validate,omitempty"`
	Deploy      bool `json:"deploy,omitempty"`
	Undeploy    bool `json:"unDeploy,omitempty"`
}

type Detail

type Detail struct {
	SmiSpecification string `json:"smi_specification,omitempty"`
	SmiVersion       string `json:"smi_version,omitempty"`
	Time             string `json:"time,omitempty"`
	Assertions       string `json:"assertions,omitempty"`
	Result           string `json:"result,omitempty"`
	Reason           string `json:"reason,omitempty"`
	Capability       string `json:"capability,omitempty"`
	Status           string `json:"status,omitempty"`
}

type DuplicateResponseComponent added in v0.6.109

type DuplicateResponseComponent struct {
	v1alpha1.ComponentDefinition
	Duplicates int `json:"duplicates"`
}

func FindDuplicateComponents added in v0.6.109

func FindDuplicateComponents(components []v1alpha1.ComponentDefinition) []DuplicateResponseComponent

type DuplicateResponseModels added in v0.6.109

type DuplicateResponseModels struct {
	v1alpha1.Model
	Duplicates int `json:"duplicates"`
}

func FindDuplicateModels added in v0.6.109

func FindDuplicateModels(models []v1alpha1.Model) []DuplicateResponseModels

type Environment

type Environment struct {
	Kubernetes string `yaml:"kubernetes,omitempty"`
	NodeCount  int    `yaml:"node_count,omitempty"`
}

Environment - represents a kubernetes environment

type EventsPersister added in v0.6.135

type EventsPersister struct {
	DB *database.Handler
}

EventsPersister assists with persisting events in local SQLite DB

func (*EventsPersister) BulkDeleteEvent added in v0.6.154

func (e *EventsPersister) BulkDeleteEvent(eventIDs []*uuid.UUID) error

func (*EventsPersister) BulkUpdateEventStatus added in v0.6.154

func (e *EventsPersister) BulkUpdateEventStatus(eventIDs []*uuid.UUID, status string) ([]*events.Event, error)

func (*EventsPersister) DeleteEvent added in v0.6.135

func (e *EventsPersister) DeleteEvent(eventID uuid.UUID) error

func (*EventsPersister) GetAllEvents added in v0.6.135

func (e *EventsPersister) GetAllEvents(eventsFilter *events.EventsFilter, userID uuid.UUID) (*EventsResponse, error)

func (*EventsPersister) GetEventTypes added in v0.6.139

func (e *EventsPersister) GetEventTypes(userID uuid.UUID) (map[string]interface{}, error)

func (*EventsPersister) PersistEvent added in v0.6.135

func (e *EventsPersister) PersistEvent(event *events.Event) error

func (*EventsPersister) UpdateEventStatus added in v0.6.135

func (e *EventsPersister) UpdateEventStatus(eventID uuid.UUID, status string) (*events.Event, error)

type EventsResponse added in v0.6.135

type EventsResponse struct {
	Events               []*events.Event         `json:"events"`
	Page                 int                     `json:"page"`
	PageSize             int                     `json:"page_size"`
	CountBySeverityLevel []*CountBySeverityLevel `json:"count_by_severity_level"`
	TotalCount           int64                   `json:"total_count"`
}

swagger:response EventsResponse

type ExtensionInput

type ExtensionInput struct {
	DBHandler       *database.Handler
	MeshSyncChannel chan struct{}
	Logger          logger.Handler
	BrokerConn      broker.Handler
}

ExtensionInput - input for a plugin

type ExtensionOutput

type ExtensionOutput struct {
	Router *Router
}

ExtensionOutput - output for a plugin

type ExtensionProxyResponse added in v0.6.55

type ExtensionProxyResponse struct {
	Body       []byte `json:"body,omitempty"`
	StatusCode int    `json:"status_code,omitempty"`
}

type Extensions

type Extensions struct {
	Navigator    NavigatorExtensions    `json:"navigator,omitempty"`
	UserPrefs    UserPrefsExtensions    `json:"user_prefs,omitempty"`
	GraphQL      GraphQLExtensions      `json:"graphql,omitempty"`
	Acccount     AccountExtensions      `json:"account,omitempty"`
	Collaborator CollaboratorExtensions `json:"collaborator,omitempty"`
}

Extensions defines the UI extension points

type Feature

type Feature string

Feature is a type to store the features of the provider

const (
	// SyncPrefs indicates the Preference Synchronization feature
	SyncPrefs Feature = "sync-prefs" // /user/preferences

	PersistResults Feature = "persist-results" // /results

	PersistResult Feature = "persist-result" // /result

	PersistSMIResults Feature = "persist-smi-results" // /smi/results

	PersistMetrics Feature = "persist-metrics" // /result/metrics

	PersistSMPTestProfile Feature = "persist-smp-test-profile" // /user/test-config

	PersistMesheryPatterns Feature = "persist-meshery-patterns" // /patterns

	PersistMesheryPatternResources Feature = "persist-meshery-pattern-resources" // /patterns/resources

	PersistMesheryFilters Feature = "persist-meshery-filters" // /filter

	PersistMesheryApplications Feature = "persist-meshery-applications" // /applications

	PersistPerformanceProfiles Feature = "persist-performance-profiles" // /user/performance/profile

	PersistSchedules Feature = "persist-schedules" // /user/schedules

	MesheryPatternsCatalog Feature = "meshery-patterns-catalog" // /patterns/catalog

	MesheryFiltersCatalog Feature = "meshery-filters-catalog" // /filters/catalog

	CloneMesheryPatterns Feature = "clone-meshery-patterns" // /patterns/clone

	CloneMesheryFilters Feature = "clone-meshery-filters" // /filters/clone

	ShareDesigns Feature = "share-designs"

	ShareFilters Feature = "share-filters"

	PersistConnection Feature = "persist-connection"

	PersistCredentials Feature = "persist-credentials"

	UsersProfile Feature = "users-profile"

	UsersIdentity Feature = "users-identity"

	UsersKeys Feature = "users-keys"

	PersistOrganizations Feature = "organizations"

	PersistEnvironments Feature = "environments"

	PersistWorkspaces Feature = "workspaces"
)

type FiltersAPIResponse

type FiltersAPIResponse struct {
	Page       uint            `json:"page"`
	PageSize   uint            `json:"page_size"`
	TotalCount uint            `json:"total_count"`
	Filters    []MesheryFilter `json:"filters"`
}

FiltersAPIResponse response retruned by filterfile endpoint on meshery server

type Grafana

type Grafana struct {
	GrafanaURL    string `json:"grafanaURL,omitempty"`
	GrafanaAPIKey string `json:"grafanaAPIKey,omitempty"`
	// GrafanaBoardSearch string          `json:"grafanaBoardSearch,omitempty"`
	GrafanaBoards []*SelectedGrafanaConfig `json:"selectedBoardsConfigs,omitempty"`
}

Grafana represents the Grafana session config

type GrafanaBoard

type GrafanaBoard struct {
	URI          string                 `json:"uri,omitempty"`
	Title        string                 `json:"title,omitempty"`
	Slug         string                 `json:"slug,omitempty"`
	UID          string                 `json:"uid,omitempty"`
	OrgID        uint                   `json:"org_id,omitempty"`
	Panels       []*sdk.Panel           `json:"panels,omitempty"`
	TemplateVars []*GrafanaTemplateVars `json:"template_vars,omitempty"`
}

GrafanaBoard represents a Grafana board

type GrafanaClient

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

GrafanaClient represents a client to Grafana in Meshery

func NewGrafanaClient

func NewGrafanaClient() *GrafanaClient

NewGrafanaClient returns a new GrafanaClient

func NewGrafanaClientForPrometheusWithHTTPClient

func NewGrafanaClientForPrometheusWithHTTPClient(client *http.Client) *GrafanaClient

NewGrafanaClientForPrometheusWithHTTPClient returns a limited GrafanaClient for use with Prometheus with the given HTTP client

func NewGrafanaClientWithHTTPClient

func NewGrafanaClientWithHTTPClient(client *http.Client) *GrafanaClient

NewGrafanaClientWithHTTPClient returns a new GrafanaClient with the given HTTP Client

func (*GrafanaClient) Close

func (g *GrafanaClient) Close()

Close - closes idle connections

func (*GrafanaClient) GetGrafanaBoards

func (g *GrafanaClient) GetGrafanaBoards(ctx context.Context, BaseURL, APIKey, dashboardSearch string) ([]*GrafanaBoard, error)

GetGrafanaBoards retrieves all the Grafana boards matching a search

func (*GrafanaClient) GrafanaQuery

func (g *GrafanaClient) GrafanaQuery(ctx context.Context, BaseURL, APIKey string, queryData *url.Values) ([]byte, error)

GrafanaQuery parses the provided query data and queries Grafana and streams response

func (*GrafanaClient) GrafanaQueryRange

func (g *GrafanaClient) GrafanaQueryRange(ctx context.Context, BaseURL, APIKey string, queryData *url.Values) ([]byte, error)

GrafanaQueryRange parses the given params and performs Grafana range queries

func (*GrafanaClient) ProcessBoard

func (g *GrafanaClient) ProcessBoard(ctx context.Context, c *sdk.Client, board *sdk.Board, link *sdk.FoundBoard) (*GrafanaBoard, error)

ProcessBoard accepts raw Grafana board and returns a processed GrafanaBoard to be used in Meshery

func (*GrafanaClient) Validate

func (g *GrafanaClient) Validate(ctx context.Context, BaseURL, APIKey string) error

Validate - helps validate grafana connection

type GrafanaConfigParams

type GrafanaConfigParams struct {
	GrafanaURL    string `json:"grafanaURL,omitempty"`
	GrafanaAPIKey string `json:"grafanaAPIKey,omitempty"`
}

Parameters to save Grafana configuration

type GrafanaDataSource

type GrafanaDataSource struct {
	ID   uint   `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

GrafanaDataSource represents a Grafana datasource like Prometheus

type GrafanaPanel

type GrafanaPanel struct {
	PType string `json:"type,omitempty"`
	ID    uint   `json:"id,omitempty"`
	Title string `json:"title,omitempty"`
}

GrafanaPanel represents Grafana panel

type GrafanaTemplateVars

type GrafanaTemplateVars struct {
	Name       string             `json:"name,omitempty"`
	Query      string             `json:"query,omitempty"`
	Datasource *GrafanaDataSource `json:"datasource,omitempty"`
	Hide       uint8              `json:"hide,omitempty"`
	Value      interface{}        `json:"value,omitempty"`
}

GrafanaTemplateVars represents template variables in a bboard

type GraphQLExtension

type GraphQLExtension struct {
	Component string `json:"component,omitempty"`
	Path      string `json:"path,omitempty"`
	Type      string `json:"type,omitempty"`
}

GraphQLExtension describes the graphql server extension point in the backend

type GraphQLExtensions

type GraphQLExtensions []GraphQLExtension

GraphQLExtensions is a collection of GraphQLExtension endpoints

type HandlerConfig

type HandlerConfig struct {
	AdapterTracker AdaptersTrackerInterface
	QueryTracker   QueryTrackerInterface

	Queue taskq.Queue

	KubeConfigFolder string

	GrafanaClient         *GrafanaClient
	GrafanaClientForQuery *GrafanaClient

	PrometheusClient         *PrometheusClient
	PrometheusClientForQuery *PrometheusClient

	// GraphQLHandler           http.Handler
	// GraphQLPlaygroundHandler http.Handler
	PlaygroundBuild        bool
	Providers              map[string]Provider
	ProviderCookieName     string
	ProviderCookieDuration time.Duration

	// to be removed
	BrokerEndpointURL *string

	PerformanceChannel       chan struct{}
	PerformanceResultChannel chan struct{}

	ApplicationChannel        *Broadcast
	PatternChannel            *Broadcast
	FilterChannel             *Broadcast
	EventBroadcaster          *Broadcast
	DashboardK8sResourcesChan *DashboardK8sResourcesChan
	MeshModelSummaryChannel   *meshmodel.SummaryChannel

	K8scontextChannel *K8scontextChan
	EventsBuffer      *events.EventStreamer
	OperatorTracker   *OperatorTracker
}

HandlerConfig holds all the config pieces needed by handler methods

type HandlerInterface

type HandlerInterface interface {
	ServerVersionHandler(w http.ResponseWriter, r *http.Request)

	ProviderMiddleware(http.Handler) http.Handler

	//Set the AuthenticationMechanism as NoAuth to skip provider authentication for certain endpoints. If the provider is enforced, then this flag will not be respected.
	//Make sure all the endpoints are behind this middleware thereby protecting them. The reason for not just skipping this middleware is:
	//1. So that we can enfore provider through this middleware whenever want for use cases where no unauthenticated endpoints should be there, at buildtime.
	//2. For adapter and other components of Meshery, they register/use endpoints without any provider authentication. Although we can have a different type of authentication built for
	//such external systems trying to communicate without provider authentication. So for different endpoints, different authentication mechanisms other than provider can be used.
	AuthMiddleware(http.Handler, AuthenticationMechanism) http.Handler
	KubernetesMiddleware(func(http.ResponseWriter, *http.Request, *Preference, *User, Provider)) func(http.ResponseWriter, *http.Request, *Preference, *User, Provider)
	K8sFSMMiddleware(func(http.ResponseWriter, *http.Request, *Preference, *User, Provider)) func(http.ResponseWriter, *http.Request, *Preference, *User, Provider)
	SessionInjectorMiddleware(func(http.ResponseWriter, *http.Request, *Preference, *User, Provider)) http.Handler
	GraphqlMiddleware(http.Handler) func(http.ResponseWriter, *http.Request, *Preference, *User, Provider)

	ProviderHandler(w http.ResponseWriter, r *http.Request)
	ProvidersHandler(w http.ResponseWriter, r *http.Request)
	ProviderUIHandler(w http.ResponseWriter, r *http.Request)
	ProviderCapabilityHandler(w http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	ProviderComponentsHandler(w http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)

	TokenHandler(w http.ResponseWriter, r *http.Request, provider Provider, fromMiddleWare bool)
	LoginHandler(w http.ResponseWriter, r *http.Request, provider Provider, fromMiddleWare bool)
	LogoutHandler(w http.ResponseWriter, req *http.Request, provider Provider)
	UserHandler(w http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	GetUserByIDHandler(w http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	GetUsers(w http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	GetUsersKeys(w http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	K8SConfigHandler(w http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	GetContextsFromK8SConfig(w http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	KubernetesPingHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	K8sRegistrationHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)

	GetAllContexts(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	GetContext(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	DeleteContext(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)

	LoadTestHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	LoadTestUsingSMPHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	CollectStaticMetrics(config *SubmitMetricsConfig) error
	FetchResultsHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	FetchAllResultsHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	GetResultHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	GetSMPServiceMeshes(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	GetSystemDatabase(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	ResetSystemDatabase(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)

	FetchSmiResultsHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	FetchSingleSmiResultHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)

	MeshAdapterConfigHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	MeshOpsHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	AdaptersHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	AvailableAdaptersHandler(w http.ResponseWriter, req *http.Request)
	EventStreamHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	AdapterPingHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)

	GetAllEvents(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	GetEventTypes(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	UpdateEventStatus(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	BulkUpdateEventStatus(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	DeleteEvent(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	BulkDeleteEvent(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)

	GrafanaConfigHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	GrafanaBoardsHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	GrafanaQueryHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	GrafanaQueryRangeHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	GrafanaPingHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	SaveSelectedGrafanaBoardsHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)

	// ScanPromGrafanaHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	// ScanPrometheusHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	// ScanGrafanaHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	PrometheusConfigHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	GrafanaBoardImportForPrometheusHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	PrometheusQueryHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	PrometheusQueryRangeHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	PrometheusPingHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	PrometheusStaticBoardHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	SaveSelectedPrometheusBoardsHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)

	UserPrefsHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)

	UserTestPreferenceHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	UserTestPreferenceStore(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	UserTestPreferenceGet(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	UserTestPreferenceDelete(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)

	SavePerformanceProfileHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	GetPerformanceProfilesHandler(w http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	GetPerformanceProfileHandler(w http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	DeletePerformanceProfileHandler(w http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)

	SessionSyncHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)

	PatternFileHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	GetMeshmodelCategories(rw http.ResponseWriter, r *http.Request)
	GetMeshmodelCategoriesByName(rw http.ResponseWriter, r *http.Request)
	GetMeshmodelModelsByName(rw http.ResponseWriter, r *http.Request)
	GetMeshmodelModelsByCategories(rw http.ResponseWriter, r *http.Request)
	GetMeshmodelModelsByCategoriesByModel(rw http.ResponseWriter, r *http.Request)
	ValidationHandler(rw http.ResponseWriter, r *http.Request)
	MeshModelGenerationHandler(rw http.ResponseWriter, r *http.Request)
	GetMeshmodelModels(rw http.ResponseWriter, r *http.Request)
	RegisterMeshmodelComponents(rw http.ResponseWriter, r *http.Request)

	GetMeshmodelRegistrants(rw http.ResponseWriter, r *http.Request)

	HandleResourceSchemas(rw http.ResponseWriter, r *http.Request)

	GetMeshmodelComponentByModel(rw http.ResponseWriter, r *http.Request)
	GetMeshmodelComponentByModelByCategory(rw http.ResponseWriter, r *http.Request)
	GetMeshmodelComponentByCategory(rw http.ResponseWriter, r *http.Request)
	GetMeshmodelComponentsByNameByModelByCategory(rw http.ResponseWriter, r *http.Request)
	GetMeshmodelComponentsByNameByCategory(rw http.ResponseWriter, r *http.Request)
	GetMeshmodelComponentsByNameByModel(rw http.ResponseWriter, r *http.Request)
	GetAllMeshmodelComponents(rw http.ResponseWriter, r *http.Request)
	GetAllMeshmodelComponentsByName(rw http.ResponseWriter, r *http.Request)
	GetAllMeshmodelRelationships(rw http.ResponseWriter, r *http.Request)
	GetMeshmodelRelationshipByName(rw http.ResponseWriter, r *http.Request)
	GetAllMeshmodelPolicies(rw http.ResponseWriter, r *http.Request)
	GetAllMeshmodelPoliciesByName(rw http.ResponseWriter, r *http.Request)
	RegisterMeshmodelRelationships(rw http.ResponseWriter, r *http.Request)
	EvaluateRelationshipPolicy(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)

	PatternFileRequestHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	DeleteMesheryPatternHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	CloneMesheryPatternHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	DownloadMesheryPatternHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	DeleteMultiMesheryPatternsHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	GetCatalogMesheryPatternsHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	PublishCatalogPatternHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	UnPublishCatalogPatternHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	GetMesheryPatternHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	DesignFileRequestHandlerWithSourceType(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	GetMesheryDesignTypesHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	GetMesheryPatternSourceHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)

	FilterFileHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	GetMesheryFilterFileHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	FilterFileRequestHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	GetCatalogMesheryFiltersHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	PublishCatalogFilterHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	UnPublishCatalogFilterHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	GetMesheryFilterHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	DeleteMesheryFilterHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	CloneMesheryFilterHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)

	ApplicationFileHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	ApplicationFileRequestHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	GetMesheryApplicationTypesHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	GetMesheryApplicationHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	GetMesheryApplicationSourceHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	GetMesheryApplicationFile(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	DeleteMesheryApplicationHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	ShareDesignHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	ShareFilterHandler(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)

	ExtensionsEndpointHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	LoadExtensionFromPackage(w http.ResponseWriter, req *http.Request, provider Provider) error
	ExtensionsVersionHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)

	SaveScheduleHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	GetSchedulesHandler(w http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	GetScheduleHandler(w http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	DeleteScheduleHandler(w http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)

	ExtensionsHandler(w http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)

	SaveUserCredential(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	GetUserCredentials(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	GetUserCredentialByID(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	UpdateUserCredential(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	DeleteUserCredential(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)

	SaveConnection(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	GetConnections(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	GetConnectionsByKind(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	GetConnectionsStatus(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	UpdateConnectionStatus(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	UpdateConnection(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	UpdateConnectionById(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	DeleteConnection(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	ProcessConnectionRegistration(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)

	GetEnvironments(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	GetEnvironmentByIDHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	SaveEnvironment(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	DeleteEnvironmentHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	UpdateEnvironmentHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	AddConnectionToEnvironmentHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	RemoveConnectionFromEnvironmentHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	GetConnectionsOfEnvironmentHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)

	GetMeshSyncResources(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	GetMeshSyncResourcesKinds(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)
	DeleteMeshSyncResource(rw http.ResponseWriter, r *http.Request, prefObj *Preference, user *User, provider Provider)

	GetOrganizations(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)

	GetWorkspacesHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	GetWorkspaceByIdHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	SaveWorkspaceHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	DeleteWorkspaceHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	UpdateWorkspaceHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	GetEnvironmentsOfWorkspaceHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	AddEnvironmentToWorkspaceHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	RemoveEnvironmentFromWorkspaceHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	GetDesignsOfWorkspaceHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	AddDesignToWorkspaceHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
	RemoveDesignFromWorkspaceHandler(w http.ResponseWriter, req *http.Request, prefObj *Preference, user *User, provider Provider)
}

HandlerInterface defines the methods a Handler should define

type HeaderComponents added in v0.6.20

type HeaderComponents struct {
	ContextSwitcher bool `json:"contextSwitcher,omitempty"`
	Settings        bool `json:"settings,omitempty"`
	Notifications   bool `json:"notifications,omitempty"`
	Profile         bool `json:"profile,omitempty"` // todo: account can have other structs, if needed needs to expand
}

type Href

type Href struct {
	URI      string `json:"uri,omitempty"`
	External *bool  `json:"external,omitempty"`
}

Href describes a link along with its type

type IngressGateway

type IngressGateway struct {
	Count     int     `yaml:"count,omitempty"`
	CPUMCores float64 `yaml:"cpu_mCores,omitempty"`
	MemMb     float64 `yaml:"mem_mb,omitempty"`
	Rps       float64 `yaml:"rps,omitempty"`
	Bps       float64 `yaml:"bps,omitempty"`
}

IngressGateway - holds ingress gateway info

type InternalKubeConfig

type InternalKubeConfig struct {
	APIVersion     string                   `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty"`
	Kind           string                   `json:"kind,omitempty" yaml:"kind,omitempty"`
	Clusters       []map[string]interface{} `json:"clusters,omitempty" yaml:"clusters,omitempty"`
	Contexts       []map[string]interface{} `json:"contexts,omitempty" yaml:"contexts,omitempty"`
	CurrentContext string                   `json:"current-context,omitempty" yaml:"current-context,omitempty"`
	Preferences    map[string]interface{}   `json:"preferences,omitempty" yaml:"preferences,omitempty"`
	Users          []map[string]interface{} `json:"users,omitempty" yaml:"users,omitempty"`
}

func (InternalKubeConfig) K8sContext

func (kcfg InternalKubeConfig) K8sContext(name string, instanceID *uuid.UUID) (K8sContext, string)

type JWK

type JWK map[string]string

JWK - a type respresting the JSON web Key

type K8SNode

type K8SNode struct {
	InternalIP              string `json:"internal_ip,omitempty"`
	HostName                string `json:"hostname,omitempty"`
	AllocatableCPU          string `json:"allocatable_cpu,omitempty"`
	AllocatableMemory       string `json:"allocatable_memory,omitempty"`
	CapacityCPU             string `json:"capacity_cpu,omitempty"`
	CapacityMemory          string `json:"capacity_memory,omitempty"`
	OSImage                 string `json:"os_image,omitempty"`
	OperatingSystem         string `json:"operating_system,omitempty"`
	KubeletVersion          string `json:"kubelet_version,omitempty"`
	KubeProxyVersion        string `json:"kubeproxy_version,omitempty"`
	ContainerRuntimeVersion string `json:"container_runtime_version,omitempty"`
	Architecture            string `json:"architecture,omitempty"`
}

K8SNode - represents a kubernetes node

type K8sContext

type K8sContext struct {
	ID                 string     `json:"id,omitempty" yaml:"id,omitempty"`
	Name               string     `json:"name,omitempty" yaml:"name,omitempty"`
	Auth               sql.Map    `json:"auth,omitempty" yaml:"auth,omitempty"`
	Cluster            sql.Map    `json:"cluster,omitempty" yaml:"cluster,omitempty"`
	Server             string     `json:"server,omitempty" yaml:"server,omitempty"`
	Owner              *uuid.UUID `json:"owner,omitempty" gorm:"-" yaml:"owner,omitempty"`
	CreatedBy          *uuid.UUID `json:"created_by,omitempty" gorm:"-" yaml:"created_by,omitempty"`
	MesheryInstanceID  *uuid.UUID `json:"meshery_instance_id,omitempty" yaml:"meshery_instance_id,omitempty"`
	KubernetesServerID *uuid.UUID `json:"kubernetes_server_id,omitempty" yaml:"kubernetes_server_id,omitempty"`
	DeploymentType     string     `json:"deployment_type,omitempty" yaml:"deployment_type,omitempty" default:"out_cluster"`
	Version            string     `json:"version,omitempty" yaml:"version,omitempty"`
	UpdatedAt          *time.Time `json:"updated_at,omitempty" yaml:"updated_at,omitempty"`
	CreatedAt          *time.Time `json:"created_at,omitempty" yaml:"created_at,omitempty"`
	ConnectionID       string     `json:"connection_id,omitempty" yaml:"connection_id,omitempty"`
}

func K8sContextsFromKubeconfig

func K8sContextsFromKubeconfig(provider Provider, userID string, eventChan *Broadcast, kubeconfig []byte, instanceID *uuid.UUID, eventMetadata map[string]interface{}) []*K8sContext

K8sContextsFromKubeconfig takes in a kubeconfig and meshery instance ID and generates kubernetes contexts from it

func NewK8sContext

func NewK8sContext(
	contextName string,
	cluster map[string]interface{},
	user map[string]interface{},
	server string,
	instanceID *uuid.UUID,
) (K8sContext, string)

NewK8sContext takes in name of the context, cluster info of the contexts, auth info, server address and meshery instance ID and will return a K8sContext from it

This function does NOT assigns kubernetes server ID to the context, either the ID can be assigned manually by invoking `AssignServerID` method or instead use `NewK8sContextWithServerID` to create a context

func NewK8sContextFromInClusterConfig

func NewK8sContextFromInClusterConfig(contextName string, instanceID *uuid.UUID) (*K8sContext, error)

func NewK8sContextWithServerID

func NewK8sContextWithServerID(
	contextName string,
	clusters map[string]interface{},
	users map[string]interface{},
	server string,
	instanceID *uuid.UUID,
) (*K8sContext, error)

func RedactCredentialsForContext added in v0.6.176

func RedactCredentialsForContext(ctx *K8sContext) (redactedContext K8sContext)

func (*K8sContext) AssignServerID

func (kc *K8sContext) AssignServerID(handler *kubernetes.Client) error

AssignServerID will attempt to assign kubernetes server ID to the kubernetes context

func (*K8sContext) AssignVersion added in v0.6.85

func (kc *K8sContext) AssignVersion(handler *kubernetes.Client) error

func (K8sContext) GenerateKubeConfig

func (kc K8sContext) GenerateKubeConfig() ([]byte, error)

GenerateKubeConfig will generate a kubeconfig from the context object and will set the "current-context" to the current context's name

func (*K8sContext) GenerateKubeHandler

func (kc *K8sContext) GenerateKubeHandler() (*kubernetes.Client, error)

func (K8sContext) PingTest

func (kc K8sContext) PingTest() error

PingTest uses the k8scontext to to "ping" the kubernetes cluster if the return value is nil then the succeeds or else it has failed

type K8sContextPersistResponse

type K8sContextPersistResponse struct {
	K8sContext K8sContext `json:"k8s_context,omitempty"`
	Inserted   bool       `json:"inserted,omitempty"`
}

K8sContextResponse - struct of response sent by provider when requested to persist k8s config

type K8sRegistrationFunction added in v0.6.23

type K8sRegistrationFunction func(provider *Provider, ctxt context.Context, config []byte, ctxID string, connectionID string, userID string, MesheryInstanceID uuid.UUID, reg *meshmodel.RegistryManager, eb *Broadcast, ctxName string) error

type K8scontextChan

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

func NewContextHelper

func NewContextHelper() *K8scontextChan

func (*K8scontextChan) PublishContext

func (k *K8scontextChan) PublishContext()

func (*K8scontextChan) SubscribeContext

func (k *K8scontextChan) SubscribeContext(ch chan struct{})

type Key added in v0.7.7

type Key struct {

	// Unique Identifier
	ID uuid.UUID `json:"id,omitempty" db:"id"`

	Owner uuid.UUID `json:"owner,omitempty" db:"owner"`

	Function string `json:"function,omitempty" db:"function"`

	Category string `json:"category,omitempty" db:"category"`

	Description string `json:"description,omitempty" db:"description"`

	Subcategory string `json:"subcategory,omitempty" db:"subcategory"`

	CreatedAt time.Time `json:"created_at,omitempty" db:"created_at"`

	UpdatedAt time.Time `json:"updated_at,omitempty" db:"updated_at"`

	DeletedAt sql.NullTime `json:"deleted_at,omitempty" db:"deleted_at"`
}

type KeyPersister added in v0.7.7

type KeyPersister struct {
	DB *database.Handler
}

KeyPersister is the persister for persisting keys in the database

func (*KeyPersister) GetUsersKey added in v0.7.7

func (kp *KeyPersister) GetUsersKey(id uuid.UUID) ([]byte, error)

GetUsersKey retrieves a key by its ID

func (*KeyPersister) GetUsersKeys added in v0.7.7

func (kp *KeyPersister) GetUsersKeys(search, order, updatedAfter string) ([]byte, error)

GetUsersKeys returns all keys based on search, order, and updatedAfter without pagination

func (*KeyPersister) SaveUsersKey added in v0.7.7

func (kp *KeyPersister) SaveUsersKey(key *Key) (*Key, error)

SaveUsersKey saves a key to the database

func (*KeyPersister) SaveUsersKeys added in v0.7.7

func (kp *KeyPersister) SaveUsersKeys(keys []*Key) ([]*Key, error)

SaveUsersKeys saves a key to the database

type KeysPage added in v0.7.7

type KeysPage struct {
	Page int `json:"page"`

	PageSize int `json:"page_size"`

	TotalCount int `json:"total_count"`

	Keys []*Key `json:"keys"`
}

type KeysRegistrationHelper added in v0.7.7

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

func NewKeysRegistrationHelper added in v0.7.7

func NewKeysRegistrationHelper(dbHandler *database.Handler, log logger.Handler) (*KeysRegistrationHelper, error)

func (*KeysRegistrationHelper) GetIndexForRegisterCol added in v0.7.7

func (kh *KeysRegistrationHelper) GetIndexForRegisterCol(cols []string) int

returns the spreadsheet column index that captures whether the key should be registered.

func (*KeysRegistrationHelper) SeedKeys added in v0.7.7

func (kh *KeysRegistrationHelper) SeedKeys(filePath string)

type LatenciesMs

type LatenciesMs struct {
	Min     float64 `yaml:"min,omitempty"`
	Average float64 `yaml:"average,omitempty"`
	P50     float64 `yaml:"p50,omitempty"`
	P90     float64 `yaml:"p90,omitempty"`
	P99     float64 `yaml:"p99,omitempty"`
	Max     float64 `yaml:"max,omitempty"`
}

LatenciesMs - represents a collection of important latencies

type ListMetaApplyConfiguration added in v0.6.162

type ListMetaApplyConfiguration struct {
	SelfLink           *string `json:"selfLink,omitempty"`
	ResourceVersion    *string `json:"resourceVersion,omitempty"`
	Continue           *string `json:"continue,omitempty"`
	RemainingItemCount *int64  `json:"remainingItemCount,omitempty"`
}

reason for adding this constucts is because these has been removed in latest client-go https://github.com/kubernetes/client-go/commit/0f17f43973be78f6dcaf6d9a8614fcb35be40d5c#diff-b49fe30cb74d2c3c9c0ca1438056432985f3cad978fd6440f91b695e16195ded

type LoadGenerator

type LoadGenerator string

LoadGenerator - represents the load generator type

const (
	// FortioLG - represents the Fortio load generator
	FortioLG LoadGenerator = "fortio"

	// Wrk2LG - represents the wrk2 load generator
	Wrk2LG LoadGenerator = "wrk2"

	// NighthawkLG - represents the nighthawk load generator
	NighthawkLG LoadGenerator = "nighthawk"
)

func (LoadGenerator) Name

func (l LoadGenerator) Name() string

Name - retrieves a string value for the generator

type LoadTestOptions

type LoadTestOptions struct {
	Name     string
	Location string
	URL      string

	HTTPQPS float64

	HTTPNumThreads int

	Headers     *map[string]string
	Cookies     *map[string]string
	Body        []byte
	ContentType string

	IsInsecure bool
	Duration   time.Duration

	LoadGenerator LoadGenerator

	SupportedLoadTestMethods SupportedLoadTestMethods

	Cert, Key, CACert string

	AllowInitialErrors bool

	Options string

	// Values required for fortio gRPC health & ping test
	GRPCStreamsCount int
	GRPCDoHealth     bool
	GRPCHealthSvc    string
	GRPCDoPing       bool
	GRPCPingDelay    time.Duration
}

LoadTestOptions represents the load test options

type LoadTestPreferences

type LoadTestPreferences struct {
	ConcurrentRequests int    `json:"c,omitempty"`
	QueriesPerSecond   int    `json:"qps,omitempty"`
	Duration           string `json:"t,omitempty"`
	LoadGenerator      string `json:"gen,omitempty"`
}

LoadTestPreferences represents the load test preferences

type LoadTestResponse

type LoadTestResponse struct {
	Status  LoadTestStatus `json:"status,omitempty"`
	Message string         `json:"message,omitempty"`
	Result  *MesheryResult `json:"result,omitempty"`
}

LoadTestResponse - used to bundle the response with status to the client

type LoadTestStatus

type LoadTestStatus string

LoadTestStatus - used for representing load test status

const (
	// LoadTestError - respresents an error status
	LoadTestError LoadTestStatus = "error"

	// LoadTestInfo - represents a info status
	LoadTestInfo LoadTestStatus = "info"

	// LoadTestSuccess - represents a success status
	LoadTestSuccess LoadTestStatus = "success"
)

type MapPreferencePersister

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

MapPreferencePersister assists with persisting session in a badger store

func NewMapPreferencePersister

func NewMapPreferencePersister() (*MapPreferencePersister, error)

NewMapPreferencePersister creates a new MapPreferencePersister instance

func (*MapPreferencePersister) ClosePersister

func (s *MapPreferencePersister) ClosePersister()

ClosePersister closes the DB

func (*MapPreferencePersister) DeleteFromPersister

func (s *MapPreferencePersister) DeleteFromPersister(userID string) error

DeleteFromPersister removes the session for the user

func (*MapPreferencePersister) ReadFromPersister

func (s *MapPreferencePersister) ReadFromPersister(userID string) (*Preference, error)

ReadFromPersister reads the session data for the given userID

func (*MapPreferencePersister) WriteToPersister

func (s *MapPreferencePersister) WriteToPersister(userID string, data *Preference) error

WriteToPersister persists session for the user

type MeshClientConfig

type MeshClientConfig struct {
	Internal    bool         `yaml:"internal,omitempty"`
	Protocol    string       `yaml:"protocol,omitempty"`
	Connections int          `yaml:"connections,omitempty"`
	Rps         float64      `yaml:"rps,omitempty"`
	LatenciesMs *LatenciesMs `yaml:"latencies_ms,omitempty"`
}

MeshClientConfig - represents a load test client config

type MeshConfig

type MeshConfig struct {
	MeshPolicyEnabled    bool `yaml:"mesh_policy_enabled,omitempty"`
	MeshTelemetryEnabled bool `yaml:"mesh_telemetry_enabled,omitempty"`
	MtlsEnabled          bool `yaml:"mtls_enabled,omitempty"`
	ProxyConcurrency     int  `yaml:"proxy_concurrency,omitempty"`
}

MeshConfig - represents a service mesh config

type MeshControlPlane

type MeshControlPlane struct {
	Count            int     `yaml:"count,omitempty"`
	CPUMCores        float64 `yaml:"cpu_mCores,omitempty"`
	MemMb            float64 `yaml:"mem_mb,omitempty"`
	Endpoints        int     `yaml:"endpoints,omitempty"`
	Services         int     `yaml:"services,omitempty"`
	Sidecars         int     `yaml:"sidecars,omitempty"`
	VirtualServices  int     `yaml:"virtual_services,omitempty"`
	DestinationRules int     `yaml:"destination_rules,omitempty"`
	LdsLatencyMs     float64 `yaml:"lds_latency_ms,omitempty"`
	CdsLatencyMs     float64 `yaml:"cds_latency_ms,omitempty"`
}

MeshControlPlane - holds control plan info

type MeshMapComponentSet added in v0.6.20

type MeshMapComponentSet struct {
	Designer   DesignerComponents `json:"designer,omitempty"`
	Visualizer bool               `json:"visualizer,omitempty"` // todo: create a component set for visualizer
}

type MeshPolicy

type MeshPolicy struct {
	Count        int     `yaml:"count,omitempty"`
	CPUMCores    float64 `yaml:"cpu_mCores,omitempty"`
	MemMb        float64 `yaml:"mem_mb,omitempty"`
	Rps          float64 `yaml:"rps,omitempty"`
	CacheHitRate float64 `yaml:"cache_hit_rate,omitempty"`
}

MeshPolicy - holds MeshPolicy info

type MeshSyncRegistrationData added in v0.7.9

type MeshSyncRegistrationData struct {
	MeshsyncDataHandler MeshsyncDataHandler
	Obj                 meshsyncmodel.KubernetesResource
}

type MeshSyncRegistrationQueue added in v0.7.9

type MeshSyncRegistrationQueue struct {
	RegChan chan MeshSyncRegistrationData
}

func GetMeshSyncRegistrationQueue added in v0.7.9

func GetMeshSyncRegistrationQueue() *MeshSyncRegistrationQueue

func (*MeshSyncRegistrationQueue) Send added in v0.7.9

type MeshSyncResourcesAPIResponse added in v0.6.163

type MeshSyncResourcesAPIResponse struct {
	Page       int                        `json:"page"`
	PageSize   int                        `json:"page_size"`
	TotalCount int64                      `json:"total_count"`
	Resources  []model.KubernetesResource `json:"resources"`
}

type MeshSyncResourcesKindsAPIResponse added in v0.7.5

type MeshSyncResourcesKindsAPIResponse struct {
	Kinds      []string `json:"kinds"`
	Page       int      `json:"page"`
	PageSize   int      `json:"page_size"`
	TotalCount int64    `json:"total_count"`
}

type MeshTelemetry

type MeshTelemetry struct {
	Count     int     `yaml:"count,omitempty"`
	CPUMCores float64 `yaml:"cpu_mCores,omitempty"`
	MemMb     float64 `yaml:"mem_mb,omitempty"`
	Rps       float64 `yaml:"rps,omitempty"`
}

MeshTelemetry - holds overall Mesh info

type MesheryApplication

type MesheryApplication struct {
	ID *uuid.UUID `json:"id,omitempty"`

	Name            string `json:"name,omitempty"`
	ApplicationFile string `json:"application_file"`
	// Meshery doesn't have the user id fields
	// but the remote provider is allowed to provide one
	UserID        *string        `json:"user_id" gorm:"-"`
	Location      isql.Map       `json:"location"`
	Type          sql.NullString `json:"type"`
	SourceContent []byte         `json:"source_content"`
	UpdatedAt     *time.Time     `json:"updated_at,omitempty"`
	CreatedAt     *time.Time     `json:"created_at,omitempty"`
}

MesheryApplication represents the applications that needs to be saved

type MesheryApplicationPage

type MesheryApplicationPage struct {
	Page         uint64                `json:"page"`
	PageSize     uint64                `json:"page_size"`
	TotalCount   int                   `json:"total_count"`
	Applications []*MesheryApplication `json:"applications"`
}

MesheryApplicationPage represents a page of applications

type MesheryApplicationPersister

type MesheryApplicationPersister struct {
	DB *database.Handler
}

MesheryApplicationPersister is the persister for persisting applications on the database

func (*MesheryApplicationPersister) DeleteMesheryApplication

func (maap *MesheryApplicationPersister) DeleteMesheryApplication(id uuid.UUID) ([]byte, error)

DeleteMesheryApplication takes in an application id and delete it if it already exists

func (*MesheryApplicationPersister) GetMesheryApplication

func (maap *MesheryApplicationPersister) GetMesheryApplication(id uuid.UUID) ([]byte, error)

func (*MesheryApplicationPersister) GetMesheryApplicationSource

func (maap *MesheryApplicationPersister) GetMesheryApplicationSource(id uuid.UUID) ([]byte, error)

func (*MesheryApplicationPersister) GetMesheryApplications

func (maap *MesheryApplicationPersister) GetMesheryApplications(search, order string, page, pageSize uint64, updatedAfter string) ([]byte, error)

GetMesheryApplications returns all of the applications

func (*MesheryApplicationPersister) SaveMesheryApplication

func (maap *MesheryApplicationPersister) SaveMesheryApplication(application *MesheryApplication) ([]byte, error)

func (*MesheryApplicationPersister) SaveMesheryApplications

func (maap *MesheryApplicationPersister) SaveMesheryApplications(applications []MesheryApplication) ([]byte, error)

SaveMesheryApplications batch inserts the given applications

type MesheryCatalogFilterRequestBody added in v0.6.17

type MesheryCatalogFilterRequestBody struct {
	ID          uuid.UUID `json:"id,omitempty"`
	CatalogData sql.Map   `json:"catalog_data,omitempty"`
}

MesheryCatalogFilterRequestBody refers to the type of request body that PublishCatalogFilter would receive

type MesheryCatalogPatternRequestBody added in v0.6.17

type MesheryCatalogPatternRequestBody struct {
	ID          uuid.UUID `json:"id,omitempty"`
	CatalogData isql.Map  `json:"catalog_data,omitempty"`
}

MesheryCatalogPatternRequestBody refers to the type of request body that PublishCatalogPattern would receive

type MesheryCloneFilterRequestBody added in v0.6.52

type MesheryCloneFilterRequestBody struct {
	Name string `json:"name,omitempty"`
}

MesheryCatalogFilterRequestBody refers to the type of request body that CloneMesheryFilterHandler would receive

type MesheryClonePatternRequestBody added in v0.6.52

type MesheryClonePatternRequestBody struct {
	Name string `json:"name,omitempty"`
}

MesheryCatalogPatternRequestBody refers to the type of request body that CloneMesheryPatternHandler would receive

type MesheryController

type MesheryController int
const (
	MesheryBroker MesheryController = iota
	Meshsync
	MesheryOperator
)

type MesheryControllerStatusAndVersion added in v0.7.11

type MesheryControllerStatusAndVersion struct {
	Status  controllers.MesheryControllerStatus
	Version string
}

type MesheryControllersHelper

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

func NewMesheryControllersHelper

func NewMesheryControllersHelper(log logger.Handler, operatorDepConfig controllers.OperatorDeploymentConfig, dbHandler *database.Handler) *MesheryControllersHelper

func (*MesheryControllersHelper) DeployUndeployedOperators

func (mch *MesheryControllersHelper) DeployUndeployedOperators(ot *OperatorTracker) *MesheryControllersHelper

looks at the status of Meshery Operator for each cluster and takes necessary action. it will deploy the operator only when it is in NotDeployed state

func (*MesheryControllersHelper) GetControllerHandlersForEachContext

func (mch *MesheryControllersHelper) GetControllerHandlersForEachContext() map[string]map[MesheryController]controllers.IMesheryController

func (*MesheryControllersHelper) GetMeshSyncDataHandlersForEachContext

func (mch *MesheryControllersHelper) GetMeshSyncDataHandlersForEachContext() map[string]MeshsyncDataHandler

func (*MesheryControllersHelper) GetOperatorsStatusMap

func (mch *MesheryControllersHelper) GetOperatorsStatusMap() map[string]controllers.MesheryControllerStatus

func (*MesheryControllersHelper) UndeployDeployedOperators added in v0.6.181

func (mch *MesheryControllersHelper) UndeployDeployedOperators(ot *OperatorTracker) *MesheryControllersHelper

func (*MesheryControllersHelper) UpdateCtxControllerHandlers

func (mch *MesheryControllersHelper) UpdateCtxControllerHandlers(ctxs []K8sContext) *MesheryControllersHelper

attach a MesheryController for each context if 1. the config is valid 2. if it is not already attached

func (*MesheryControllersHelper) UpdateMeshsynDataHandlers

func (mch *MesheryControllersHelper) UpdateMeshsynDataHandlers(ctx context.Context, connectionID, userID, mesheryInstanceID uuid.UUID, provider Provider) *MesheryControllersHelper

initializes Meshsync data handler for the contexts for whom it has not been initialized yet. Apart from updating the map, it also runs the handler after updating the map. The presence of a handler for a context in a map indicate that the meshsync data for that context is properly being handled

func (*MesheryControllersHelper) UpdateOperatorsStatusMap

func (mch *MesheryControllersHelper) UpdateOperatorsStatusMap(ot *OperatorTracker) *MesheryControllersHelper

update the status of MesheryOperator in all the contexts for whom MesheryControllers are attached should be called after UpdateCtxControllerHandlers

type MesheryDesignPage added in v0.7.5

type MesheryDesignPage struct {
	Page       int               `json:"page"`
	PageSize   int               `json:"page_size"`
	TotalCount int               `json:"total_count"`
	Designs    []*MesheryPattern `json:"designs"`
}

MesheryDesignPage - represents a page of meshery patterns

type MesheryEvents added in v0.6.135

type MesheryEvents interface {
	GetAllEvents(eventFilter *events.EventsFilter, userID uuid.UUID) (*EventsResponse, error)
	GetEventTypes(userID uuid.UUID) (map[string]interface{}, error)
	PersistEvent(data *events.Event) error
	DeleteEvent(eventID uuid.UUID) error
	UpdateEventStatus(eventID uuid.UUID, status string) (*events.Event, error)
	BulkUpdateEventStatus(eventID []*uuid.UUID, status string) ([]*events.Event, error)
	BulkDeleteEvent(eventID []*uuid.UUID) error
}

type MesheryFilter

type MesheryFilter struct {
	ID *uuid.UUID `json:"id,omitempty"`

	Name       string `json:"name,omitempty"`
	FilterFile []byte `json:"filter_file"`
	// Meshery doesn't have the user id fields
	// but the remote provider is allowed to provide one
	UserID *string `json:"user_id"`

	Location       sql.Map    `json:"location"`
	Visibility     string     `json:"visibility"`
	CatalogData    sql.Map    `json:"catalog_data"`
	FilterResource string     `json:"filter_resource"`
	UpdatedAt      *time.Time `json:"updated_at,omitempty"`
	CreatedAt      *time.Time `json:"created_at,omitempty"`
}

MesheryFilter represents the filters that needs to be saved

type MesheryFilterPage

type MesheryFilterPage struct {
	Page       uint64           `json:"page"`
	PageSize   uint64           `json:"page_size"`
	TotalCount int              `json:"total_count"`
	Filters    []*MesheryFilter `json:"filters"`
}

MesheryFilterPage represents a page of filters

type MesheryFilterPayload added in v0.6.100

type MesheryFilterPayload struct {
	ID *uuid.UUID `json:"id,omitempty"`

	Name       string `json:"name,omitempty"`
	FilterFile []byte `json:"filter_file"`
	// Meshery doesn't have the user id fields
	// but the remote provider is allowed to provide one
	UserID *string `json:"user_id"`

	Location       sql.Map    `json:"location"`
	Visibility     string     `json:"visibility"`
	CatalogData    sql.Map    `json:"catalog_data"`
	FilterResource string     `json:"filter_resource"`
	Config         string     `json:"config"`
	UpdatedAt      *time.Time `json:"updated_at,omitempty"`
	CreatedAt      *time.Time `json:"created_at,omitempty"`
}

type MesheryFilterPersister

type MesheryFilterPersister struct {
	DB *database.Handler
}

MesheryFilterPersister is the persister for persisting wasm filters on the database

func (*MesheryFilterPersister) CloneMesheryFilter added in v0.6.11

func (mfp *MesheryFilterPersister) CloneMesheryFilter(filterID string, cloneFilterRequest *MesheryCloneFilterRequestBody) ([]byte, error)

CloneMesheryFilter clones meshery filter to private

func (*MesheryFilterPersister) DeleteMesheryFilter

func (mfp *MesheryFilterPersister) DeleteMesheryFilter(id uuid.UUID) ([]byte, error)

DeleteMesheryFilter takes in a profile id and delete it if it already exists

func (*MesheryFilterPersister) GetMesheryCatalogFilters added in v0.6.11

func (mfp *MesheryFilterPersister) GetMesheryCatalogFilters(page, pageSize, search, order string) ([]byte, error)

GetMesheryCatalogFilters returns all of the published filters

func (*MesheryFilterPersister) GetMesheryFilter

func (mfp *MesheryFilterPersister) GetMesheryFilter(id uuid.UUID) ([]byte, error)

func (*MesheryFilterPersister) GetMesheryFilterFile

func (mfp *MesheryFilterPersister) GetMesheryFilterFile(id uuid.UUID) ([]byte, error)

func (*MesheryFilterPersister) GetMesheryFilters

func (mfp *MesheryFilterPersister) GetMesheryFilters(search, order string, page, pageSize uint64, visibility []string) ([]byte, error)

GetMesheryFilters returns all of the 'private' filters. Though private has no meaning here since there is only one local user. We make this distinction to be consistent with the remote provider

func (*MesheryFilterPersister) SaveMesheryFilter

func (mfp *MesheryFilterPersister) SaveMesheryFilter(filter *MesheryFilter) ([]byte, error)

func (*MesheryFilterPersister) SaveMesheryFilters

func (mfp *MesheryFilterPersister) SaveMesheryFilters(filters []MesheryFilter) ([]byte, error)

SaveMesheryFilters batch inserts the given filters

type MesheryFilterRequestBody added in v0.6.107

type MesheryFilterRequestBody struct {
	URL        string                `json:"url,omitempty"`
	Path       string                `json:"path,omitempty"`
	Save       bool                  `json:"save,omitempty"`
	Config     string                `json:"config,omitempty"`
	FilterData *MesheryFilterPayload `json:"filter_data,omitempty"`
}

MesheryFilterRequestBody refers to the type of request body that SaveMesheryFilter would receive

type MesheryK8sContextPage

type MesheryK8sContextPage struct {
	Page       uint64        `json:"page"`
	PageSize   uint64        `json:"page_size"`
	TotalCount int           `json:"total_count"`
	Contexts   []*K8sContext `json:"contexts"`
}

MesheryK8sContextPage represents a page of contexts

type MesheryK8sContextPersister

type MesheryK8sContextPersister struct {
	DB *database.Handler
}

MesheryK8sContextPersister is the persister for persisting applications on the database

func (*MesheryK8sContextPersister) DeleteMesheryK8sContext

func (mkcp *MesheryK8sContextPersister) DeleteMesheryK8sContext(id string) (K8sContext, error)

DeleteMesheryK8sContext takes in an application id and delete it if it already exists

func (*MesheryK8sContextPersister) GetMesheryK8sContext

func (mkcp *MesheryK8sContextPersister) GetMesheryK8sContext(id string) (K8sContext, error)

func (*MesheryK8sContextPersister) GetMesheryK8sContexts

func (mkcp *MesheryK8sContextPersister) GetMesheryK8sContexts(search, order string, page, pageSize uint64) ([]byte, error)

GetMesheryK8sContexts returns all of the contexts

func (*MesheryK8sContextPersister) SaveMesheryK8sContext

func (mkcp *MesheryK8sContextPersister) SaveMesheryK8sContext(mkc K8sContext) (connections.Connection, error)

type MesheryPattern

type MesheryPattern struct {
	ID *uuid.UUID `json:"id,omitempty"`

	Name        string `json:"name,omitempty"`
	PatternFile string `json:"pattern_file"`
	// Meshery doesn't have the user id fields
	// but the remote provider is allowed to provide one
	UserID *string `json:"user_id"`

	Location      isql.Map       `json:"location"`
	Visibility    string         `json:"visibility"`
	CatalogData   isql.Map       `json:"catalog_data,omitempty"`
	Type          sql.NullString `json:"type"`
	SourceContent []byte         `json:"source_content"`

	UpdatedAt *time.Time `json:"updated_at,omitempty"`
	CreatedAt *time.Time `json:"created_at,omitempty"`
}

MesheryPattern represents the patterns that needs to be saved

type MesheryPatternDeleteRequestBody

type MesheryPatternDeleteRequestBody struct {
	Patterns []deletePatternModel `json:"patterns,omitempty"`
}

MesheryPatternDeleteRequestBody refers to the type of request body that DeleteMultiMesheryPatternsHandler would receive

type MesheryPatternFileDeployPayload added in v0.7.17

type MesheryPatternFileDeployPayload struct {
	PatternFile string `json:"pattern_file"`
	PatternID   string `json:"pattern_id"`
}

type MesheryPatternPage

type MesheryPatternPage struct {
	Page       uint64            `json:"page"`
	PageSize   uint64            `json:"page_size"`
	TotalCount int               `json:"total_count"`
	Patterns   []*MesheryPattern `json:"patterns"`
}

MesheryPatternPage represents a page of performance profiles

type MesheryPatternPersister

type MesheryPatternPersister struct {
	DB *database.Handler
}

MesheryPatternPersister is the persister for persisting performance profiles on the database

func (*MesheryPatternPersister) CloneMesheryPattern added in v0.6.11

func (mpp *MesheryPatternPersister) CloneMesheryPattern(patternID string, clonePatternRequest *MesheryClonePatternRequestBody) ([]byte, error)

CloneMesheryPattern clones meshery pattern to private

func (*MesheryPatternPersister) DeleteMesheryPattern

func (mpp *MesheryPatternPersister) DeleteMesheryPattern(id uuid.UUID) ([]byte, error)

DeleteMesheryPattern takes in a profile id and delete it if it already exists

func (*MesheryPatternPersister) DeleteMesheryPatterns

func (mpp *MesheryPatternPersister) DeleteMesheryPatterns(patterns MesheryPatternDeleteRequestBody) ([]byte, error)

DeleteMesheryPatterns takes in a meshery-patterns and delete those if exist

func (*MesheryPatternPersister) GetMesheryCatalogPatterns added in v0.6.11

func (mpp *MesheryPatternPersister) GetMesheryCatalogPatterns(page, pageSize, search, order string) ([]byte, error)

GetMesheryCatalogPatterns returns all of the published patterns

func (*MesheryPatternPersister) GetMesheryPattern

func (mpp *MesheryPatternPersister) GetMesheryPattern(id uuid.UUID) ([]byte, error)

func (*MesheryPatternPersister) GetMesheryPatternSource added in v0.6.169

func (mpp *MesheryPatternPersister) GetMesheryPatternSource(id uuid.UUID) ([]byte, error)

func (*MesheryPatternPersister) GetMesheryPatterns

func (mpp *MesheryPatternPersister) GetMesheryPatterns(search, order string, page, pageSize uint64, updatedAfter string, visibility []string) ([]byte, error)

GetMesheryPatterns returns all of the 'private' patterns. Though private has no meaning here since there is only one local user. We make this distinction to be consistent with the remote provider

func (*MesheryPatternPersister) SaveMesheryPattern

func (mpp *MesheryPatternPersister) SaveMesheryPattern(pattern *MesheryPattern) ([]byte, error)

func (*MesheryPatternPersister) SaveMesheryPatterns

func (mpp *MesheryPatternPersister) SaveMesheryPatterns(patterns []MesheryPattern) ([]byte, error)

SaveMesheryPatterns batch inserts the given patterns

type MesheryResult

type MesheryResult struct {
	ID                 uuid.UUID              `json:"meshery_id,omitempty"`
	Name               string                 `json:"name,omitempty"`
	Mesh               string                 `json:"mesh,omitempty"`
	PerformanceProfile *uuid.UUID             `json:"performance_profile,omitempty"`
	TestID             string                 `json:"test_id"`
	Result             map[string]interface{} `json:"runner_results,omitempty" gorm:"type:JSONB"`

	ServerMetrics     interface{} `json:"server_metrics,omitempty" gorm:"type:JSONB"`
	ServerBoardConfig interface{} `json:"server_board_config,omitempty" gorm:"type:JSONB"`

	TestStartTime          *time.Time         `json:"test_start_time,omitempty"`
	PerformanceProfileInfo PerformanceProfile `json:"-,omitempty" gorm:"constraint:OnDelete:SET NULL;foreignKey:PerformanceProfile"`

	UpdatedAt string `json:"updated_at,omitempty"`
	CreatedAt string `json:"created_at,omitempty"`
	UserID    string `json:"user_id,omitempty"`
}

MesheryResult - represents the results from Meshery test run to be shipped

func (*MesheryResult) ConvertToSpec

func (m *MesheryResult) ConvertToSpec() (*PerformanceSpec, error)

ConvertToSpec - converts meshery result to SMP

type MesheryResultPage

type MesheryResultPage struct {
	Page       uint64           `json:"page"`
	PageSize   uint64           `json:"page_size"`
	TotalCount int              `json:"total_count"`
	Results    []*MesheryResult `json:"results"`
}

MesheryResultPage - represents a page of meshery results

type MesheryResultsPersister

type MesheryResultsPersister struct {
	DB *database.Handler
}

func (*MesheryResultsPersister) GetAllResults

func (mrp *MesheryResultsPersister) GetAllResults(page, pageSize uint64) ([]byte, error)

func (*MesheryResultsPersister) GetResult

func (mrp *MesheryResultsPersister) GetResult(key uuid.UUID) (*MesheryResult, error)

func (*MesheryResultsPersister) GetResults

func (mrp *MesheryResultsPersister) GetResults(page, pageSize uint64, profileID string) ([]byte, error)

func (*MesheryResultsPersister) WriteResult

func (mrp *MesheryResultsPersister) WriteResult(key uuid.UUID, result []byte) error

type MesheryUICapabilities added in v0.6.20

type MesheryUICapabilities struct {
	Navigator NavigatorComponents `json:"navigator,omitempty"`
	Header    HeaderComponents    `json:"header,omitempty"`
}

type MeshmodelCategoriesAPIResponse added in v0.6.99

type MeshmodelCategoriesAPIResponse struct {
	Page       int                 `json:"page"`
	PageSize   int                 `json:"page_size"`
	Count      int64               `json:"total_count"`
	Categories []v1alpha1.Category `json:"categories"`
}

API response model for meshmodel categories API

type MeshmodelComponentsAPIResponse added in v0.6.89

type MeshmodelComponentsAPIResponse struct {
	Page       int                            `json:"page"`
	PageSize   int                            `json:"page_size"`
	Count      int64                          `json:"total_count"`
	Components []v1alpha1.ComponentDefinition `json:"components"`
}

API response model for meshmodel components API

type MeshmodelComponentsDuplicateAPIResponse added in v0.6.109

type MeshmodelComponentsDuplicateAPIResponse struct {
	Page       int                          `json:"page"`
	PageSize   int                          `json:"page_size"`
	Count      int64                        `json:"total_count"`
	Components []DuplicateResponseComponent `json:"components"`
}

API response model for meshmodel components API that contains the number of duplicates for each component

type MeshmodelPoliciesAPIResponse added in v0.6.129

type MeshmodelPoliciesAPIResponse struct {
	Page     int                         `json:"page"`
	PageSize int                         `json:"page_size"`
	Count    int64                       `json:"total_count"`
	Policies []v1alpha1.PolicyDefinition `json:"policies"`
}

API response model for meshmodel relationships API

type MeshmodelRegistrantsAPIResponse added in v0.6.162

type MeshmodelRegistrantsAPIResponse struct {
	Page        int                                        `json:"page"`
	PageSize    int                                        `json:"page_size"`
	Count       int64                                      `json:"total_count"`
	Registrants []v1alpha1.MeshModelHostsWithEntitySummary `json:"registrants"`
}

type MeshmodelRelationshipsAPIResponse added in v0.6.89

type MeshmodelRelationshipsAPIResponse struct {
	Page          int                               `json:"page"`
	PageSize      int                               `json:"page_size"`
	Count         int64                             `json:"total_count"`
	Relationships []v1alpha1.RelationshipDefinition `json:"relationships"`
}

API response model for meshmodel relationships API

type MeshmodelsAPIResponse added in v0.6.89

type MeshmodelsAPIResponse struct {
	Page     int              `json:"page"`
	PageSize int              `json:"page_size"`
	Count    int64            `json:"total_count"`
	Models   []v1alpha1.Model `json:"models"`
}

API response model for meshmodel models API

type MeshmodelsDuplicateAPIResponse added in v0.6.109

type MeshmodelsDuplicateAPIResponse struct {
	Page     int                       `json:"page"`
	PageSize int                       `json:"page_size"`
	Count    int64                     `json:"total_count"`
	Models   []DuplicateResponseModels `json:"models"`
}

API response model for meshmodel models API that contains the number of duplicates for each model

type MeshsyncDataHandler

type MeshsyncDataHandler struct {
	Provider     Provider
	UserID       uuid.UUID
	ConnectionID uuid.UUID
	InstanceID   uuid.UUID
	Token        string
	// contains filtered or unexported fields
}

TODO: Create proper error codes for the functionalities this struct implements

func NewMeshsyncDataHandler

func NewMeshsyncDataHandler(broker broker.Handler, dbHandler database.Handler, log logger.Handler, provider Provider, userID, connID, instanceID uuid.UUID, token string) *MeshsyncDataHandler

func (*MeshsyncDataHandler) ListenToMeshSyncEvents

func (mh *MeshsyncDataHandler) ListenToMeshSyncEvents(out chan *broker.Message) error

func (*MeshsyncDataHandler) Run

func (mh *MeshsyncDataHandler) Run() error

func (*MeshsyncDataHandler) Unmarshal added in v0.6.182

func (mh *MeshsyncDataHandler) Unmarshal(object interface{}) (meshsyncmodel.KubernetesResource, error)

type Metrics

type Metrics struct {
	IngressGateway     *IngressGateway   `yaml:"ingress_gateway,omitempty"`
	Sidecars           *Sidecars         `yaml:"sidecars,omitempty"`
	MeshTelemetry      *MeshTelemetry    `yaml:"mesh_telemetry,omitempty"`
	MeshPolicy         *MeshPolicy       `yaml:"mesh_policy,omitempty"`
	MeshControlPlane   *MeshControlPlane `yaml:"mesh_control_plane,omitempty"`
	IndividualWorkload *Workload         `yaml:"individual_workload_1,omitempty"`
}

Metrics - holds overall metrics info

type NavigatorComponents struct {
	Dashboard     bool          `json:"dashboard,omitempty"`
	Performance   bool          `json:"performance,omitempty"`
	Conformance   bool          `json:"conformance,omitempty"`
	Extensions    bool          `json:"extensions,omitempty"`
	Toggler       bool          `json:"toggler,omitempty"`
	Help          bool          `json:"help,omitempty"`
	Lifecycle     Adapters      `json:"lifecycle,omitempty"`
	Configuration Configuration `json:"configuration,omitempty"`
}
type NavigatorExtension struct {
	Title           string              `json:"title,omitempty"`
	OnClickCallback int                 `json:"on_click_callback,omitempty"`
	Href            Href                `json:"href,omitempty"`
	Component       string              `json:"component,omitempty"`
	Icon            string              `json:"icon,omitempty"`
	Link            *bool               `json:"link,omitempty"`
	Show            *bool               `json:"show,omitempty"`
	Children        NavigatorExtensions `json:"children,omitempty"`
	Type            string              `json:"type,omitempty"`
	AllowedTo       MeshMapComponentSet `json:"allowedTo,omitempty"`
	IsBeta          *bool               `json:"isBeta,omitempty"`
}

NavigatorExtension describes the Navigator extension point in the UI

type NavigatorExtensions []NavigatorExtension

NavigatorExtensions is a collection of NavigatorExtension

type OperatorTracker added in v0.6.60

type OperatorTracker struct {
	DisableOperator bool
	// contains filtered or unexported fields
}

func NewOperatorTracker added in v0.6.60

func NewOperatorTracker(disabled bool) *OperatorTracker

func (*OperatorTracker) IsUndeployed added in v0.6.60

func (ot *OperatorTracker) IsUndeployed(ctxID string) bool

func (*OperatorTracker) Undeployed added in v0.6.60

func (ot *OperatorTracker) Undeployed(ctxID string, undeployed bool)

type Organization added in v0.7.3

type Organization struct {
	// Unique identifier
	ID          *uuid.UUID   `json:"id,omitempty" db:"id"`
	Name        string       `json:"name" db:"name"`
	Country     string       `json:"country,omitempty" db:"country"`
	Region      string       `json:"region,omitempty" db:"region"`
	Description string       `json:"description,omitempty" db:"description"`
	Owner       uuid.UUID    `json:"owner,omitempty" db:"owner"`
	CreatedAt   time.Time    `json:"created_at,omitempty" db:"created_at"`
	UpdatedAt   time.Time    `json:"updated_at,omitempty" db:"updated_at"`
	DeletedAt   sql.NullTime `json:"deleted_at,omitempty" db:"deleted_at"`
}

type OrganizationPersister added in v0.7.3

type OrganizationPersister struct {
	DB *database.Handler
}

MesheryApplicationPersister is the persister for persisting applications on the database

func (*OrganizationPersister) GetOrganizations added in v0.7.3

func (op *OrganizationPersister) GetOrganizations(search, order string, page, pageSize uint64, updatedAfter string) ([]byte, error)

GetMesheryApplications returns all of the applications

func (*OrganizationPersister) GetOrganzation added in v0.7.3

func (op *OrganizationPersister) GetOrganzation(id uuid.UUID) ([]byte, error)

func (*OrganizationPersister) SaveOrganization added in v0.7.3

func (op *OrganizationPersister) SaveOrganization(organization *Organization) ([]byte, error)

type OrganizationsPage added in v0.7.3

type OrganizationsPage struct {
	Organizations []*Organization `json:"organizations"`
	TotalCount    int             `json:"total_count"`
	Page          uint64          `json:"page"`
	PageSize      uint64          `json:"page_size"`
}

type PatternResource

type PatternResource struct {
	ID        *uuid.UUID `json:"id,omitempty"`
	UserID    *uuid.UUID `json:"user_id,omitempty"`
	Name      string     `json:"name,omitempty"`
	Namespace string     `json:"namespace,omitempty"`
	Type      string     `json:"type,omitempty"`
	OAMType   string     `json:"oam_type,omitempty"`
	Deleted   bool       `json:"deleted,omitempty"`

	CreatedAt *time.Time `json:"created_at,omitempty"`
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
}

PatternResource represents a pattern resource that is provisioned by meshery

type PatternResourcePage

type PatternResourcePage struct {
	Page       uint64             `json:"page,omitempty"`
	PageSize   uint64             `json:"page_size,omitempty"`
	TotalCount int                `json:"total_count,omitempty"`
	Resources  []*PatternResource `json:"resources,omitempty"`
}

type PatternResourcePersister

type PatternResourcePersister struct {
	DB *database.Handler
}

func (*PatternResourcePersister) DeletePatternResource

func (prp *PatternResourcePersister) DeletePatternResource(id uuid.UUID) error

func (*PatternResourcePersister) Exists

func (prp *PatternResourcePersister) Exists(name, namespace, typ, oamType string) bool

func (*PatternResourcePersister) GetPatternResource

func (prp *PatternResourcePersister) GetPatternResource(id uuid.UUID) (*PatternResource, error)

func (*PatternResourcePersister) GetPatternResourceByAttributes

func (prp *PatternResourcePersister) GetPatternResourceByAttributes(name, namespace, typ, oamType string) (*PatternResource, error)

func (*PatternResourcePersister) GetPatternResources

func (prp *PatternResourcePersister) GetPatternResources(search, order, name, namespace, typ, oamType string, page, pageSize uint64) (*PatternResourcePage, error)

func (*PatternResourcePersister) SavePatternResource

func (prp *PatternResourcePersister) SavePatternResource(pr *PatternResource) (*PatternResource, error)

type PatternSourceTypesAPIResponse added in v0.7.7

type PatternSourceTypesAPIResponse struct {
	DesignType          string   `json:"design_type"`
	SupportedExtensions []string `json:"supported_extensions"`
}

type PatternsAPIResponse

type PatternsAPIResponse struct {
	Page       uint             `json:"page"`
	PageSize   uint             `json:"page_size"`
	TotalCount uint             `json:"total_count"`
	Patterns   []MesheryPattern `json:"patterns"`
}

PatternsAPIResponse response retruned by patternfile endpoint on meshery server

type PerformanceProfile

type PerformanceProfile struct {
	ID *uuid.UUID `json:"id,omitempty"`

	Name              string         `json:"name,omitempty"`
	LastRun           *sql.Time      `json:"last_run,omitempty" gorm:"type:datetime"`
	Schedule          *uuid.UUID     `json:"schedule,omitempty"`
	LoadGenerators    pq.StringArray `json:"load_generators,omitempty" gorm:"type:text[]"`
	Endpoints         pq.StringArray `json:"endpoints,omitempty" gorm:"type:text[]"`
	ServiceMesh       string         `json:"service_mesh,omitempty"`
	ConcurrentRequest int            `json:"concurrent_request,omitempty"`
	QPS               int            `json:"qps,omitempty"`
	Duration          string         `json:"duration,omitempty"`
	TotalResults      int            `json:"total_results,omitempty"`

	RequestHeaders string  `json:"request_headers,omitempty"`
	RequestCookies string  `json:"request_cookies,omitempty"`
	Metadata       sql.Map `json:"metadata,omitempty"`
	RequestBody    string  `json:"request_body,omitempty"`
	ContentType    string  `json:"content_type,omitempty"`

	UpdatedAt *sql.Time `json:"updated_at,omitempty"`
	CreatedAt *sql.Time `json:"created_at,omitempty"`
}

PerformanceProfile represents the performance profile that needs to be saved

type PerformanceProfilePage

type PerformanceProfilePage struct {
	Page       uint64                `json:"page"`
	PageSize   uint64                `json:"page_size"`
	TotalCount int                   `json:"total_count"`
	Profiles   []*PerformanceProfile `json:"profiles"`
}

PerformanceProfilePage represents a page of performance profiles

type PerformanceProfileParameters

type PerformanceProfileParameters struct {
	// name of performance profile
	Name string `json:"name,omitempty"`
	// array of load generators
	LoadGenerators []string `json:"load_generators,omitempty" gorm:"type:text[]"`
	// array of urls of performance results
	Endpoints []string `json:"endpoints,omitempty" gorm:"type:text[]"`
	// service mesh for performance tests
	ServiceMesh string `json:"service_mesh,omitempty"`
	// number of concurrent requests
	ConcurrentRequest int `json:"concurrent_request,omitempty"`
	// qps in integer
	QPS int `json:"qps,omitempty"`
	// duration of tests e.g. 30s
	Duration string `json:"duration,omitempty"`
}

PerformanceProfileParameters structs contains parameters to save a performance profile

type PerformanceProfilePersister

type PerformanceProfilePersister struct {
	DB *database.Handler
}

PerformanceProfilePersister is the persister for persisting performance profiles on the database

func (*PerformanceProfilePersister) DeletePerformanceProfile

func (ppp *PerformanceProfilePersister) DeletePerformanceProfile(id uuid.UUID) ([]byte, error)

DeletePerformanceProfile takes in a profile id and delete it if it already exists

func (*PerformanceProfilePersister) GetPerformanceProfile

func (ppp *PerformanceProfilePersister) GetPerformanceProfile(id uuid.UUID) (*PerformanceProfile, error)

func (*PerformanceProfilePersister) GetPerformanceProfiles

func (ppp *PerformanceProfilePersister) GetPerformanceProfiles(_, search, order string, page, pageSize uint64) ([]byte, error)

GetPerformanceProfiles returns all of the performance profiles

func (*PerformanceProfilePersister) SavePerformanceProfile

func (ppp *PerformanceProfilePersister) SavePerformanceProfile(_ uuid.UUID, profile *PerformanceProfile) error

type PerformanceProfilesAPIResponse

type PerformanceProfilesAPIResponse struct {
	Page       uint                 `json:"page"`
	PageSize   uint                 `json:"page_size"`
	TotalCount uint                 `json:"total_count"`
	Profiles   []PerformanceProfile `json:"profiles,omitempty"`
}

PerformanceProfilesAPIResponse response retruned by performance endpoint on meshery server

type PerformanceResult

type PerformanceResult struct {
	MesheryID          *uuid.UUID    `json:"meshery_id,omitempty"`
	Name               string        `json:"name,omitempty"`
	Mesh               string        `json:"mesh,omitempty"`
	PerformanceProfile *uuid.UUID    `json:"performance_profile,omitempty"`
	UserID             *uuid.UUID    `json:"user_id"`
	RunnerResults      RunnerResults `json:"runner_results"`
	ServerMatrics      interface{}   `json:"server_metrics"`
	ServerBoardConfig  interface{}   `json:"server_board_config,omitempty"`
	TestStartTime      *time.Time    `json:"test_start_time,omitempty"`
}

PerformanceResult represents the result of a performance test

type PerformanceResultsAPIResponse

type PerformanceResultsAPIResponse struct {
	Page       uint                `json:"page"`
	PageSize   uint                `json:"page_size"`
	TotalCount uint                `json:"total_count"`
	Results    []PerformanceResult `json:"results,omitempty"`
}

PerformanceResultsAPIResponse response retruned by performance endpoint on meshery server

type PerformanceSpec

type PerformanceSpec struct {
	SMPVersion string `yaml:"smp_version,omitempty"`

	StartTime    time.Time    `yaml:"start_time,omitempty"`
	EndTime      time.Time    `yaml:"end_time,omitempty"`
	Latencies    *LatenciesMs `yaml:"latencies_ms,omitempty"`
	ActualQPS    float64      `yaml:"actual_qps,omitempty"`
	DetailsURI   string       `yaml:"details_uri,omitempty"`
	TestID       string       `yaml:"test_id,omitempty"`
	MeshConfigID string       `yaml:"mesh_config_id,omitempty"`
	EnvID        string       `yaml:"env_id,omitempty"`
	// contains filtered or unexported fields
}

PerformanceSpec - represents SMP, see here https://github.com/layer5io/service-mesh-performance-specification

type PerformanceTestConfig

type PerformanceTestConfig struct {
	ID                         uuid.UUID
	PerformanceTestConfigBytes []byte
	UpdatedAt                  time.Time
}

type PerformanceTestConfigFile

type PerformanceTestConfigFile struct {
	Config      *SMP.PerformanceTestConfig `json:"test,omitempty"`
	ServiceMesh *SMP.ServiceMesh           `json:"mesh,omitempty"`
}

type PerformanceTestParameters

type PerformanceTestParameters struct {
	// test-id of pre-existing test
	TestID strfmt.UUID `json:"uuid,omitempty"`
	// name of performance test
	Name string `json:"name"`
	// load generator for performance test
	LoadGenerator string `json:"loadGenerator"`
	// url for test
	URL string `json:"url"`
	// service mesh for performance test
	ServiceMesh string `json:"mesh"`
	// concurrent request in number
	ConcurrentRequest int `json:"c"`
	// qps in number
	QPS int `json:"qps"`
	// time in integer e.g. 30
	Time int `json:"t"`
	// duration e.g. s for second
	Duration string `json:"dur"`
}

PerformanceTestParameters contains parameters to run a performance test

type Preference

type Preference struct {
	MeshAdapters              []*Adapter             `json:"meshAdapters,omitempty"`
	Grafana                   *Grafana               `json:"grafana,omitempty"`
	Prometheus                *Prometheus            `json:"prometheus,omitempty"`
	LoadTestPreferences       *LoadTestPreferences   `json:"loadTestPrefs,omitempty"`
	AnonymousUsageStats       bool                   `json:"anonymousUsageStats"`
	AnonymousPerfResults      bool                   `json:"anonymousPerfResults"`
	UpdatedAt                 time.Time              `json:"updated_at,omitempty"`
	UsersExtensionPreferences map[string]interface{} `json:"usersExtensionPreferences,omitempty"`
	RemoteProviderPreferences map[string]interface{} `json:"remoteProviderPreferences,omitempty"`
}

Preference represents the data stored in session / local DB

type PreferenceParams

type PreferenceParams struct {
	AnonymousUsageStats  bool `json:"anonymousUsageStats"`
	AnonymousPerfResults bool `json:"anonymousPerfResults"`
}

Parameters to updates Anonymous stats

type PreferencePersister

type PreferencePersister interface {
	ReadFromPersister(userID string) (*Preference, error)
	WriteToPersister(userID string, data *Preference) error
	DeleteFromPersister(userID string) error
}

PreferencePersister defines methods for a session persister

type Prometheus

type Prometheus struct {
	PrometheusURL                   string                   `json:"prometheusURL,omitempty"`
	SelectedPrometheusBoardsConfigs []*SelectedGrafanaConfig `json:"selectedPrometheusBoardsConfigs,omitempty"`
}

Prometheus represents the prometheus session config

type PrometheusClient

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

PrometheusClient represents a prometheus client in Meshery

func NewPrometheusClient

func NewPrometheusClient() *PrometheusClient

NewPrometheusClient returns a PrometheusClient

func NewPrometheusClientWithHTTPClient

func NewPrometheusClientWithHTTPClient(client *http.Client) *PrometheusClient

NewPrometheusClientWithHTTPClient returns a PrometheusClient with a given http.Client

func (*PrometheusClient) Close

func (p *PrometheusClient) Close()

Close - closes idle connections

func (*PrometheusClient) ComputeStep

func (p *PrometheusClient) ComputeStep(_ context.Context, start, end time.Time) time.Duration

ComputeStep computes the step size for a window

func (*PrometheusClient) GetClusterStaticBoard

func (p *PrometheusClient) GetClusterStaticBoard(ctx context.Context, _ string) (*GrafanaBoard, error)

GetClusterStaticBoard retrieves the cluster static board config

func (*PrometheusClient) GetNodesStaticBoard

func (p *PrometheusClient) GetNodesStaticBoard(ctx context.Context, promURL string) (*GrafanaBoard, error)

GetNodesStaticBoard retrieves the per node static board config

func (*PrometheusClient) ImportGrafanaBoard

func (p *PrometheusClient) ImportGrafanaBoard(ctx context.Context, boardData []byte) (*GrafanaBoard, error)

ImportGrafanaBoard takes raw Grafana board json and returns GrafanaBoard pointer for use in Meshery

func (*PrometheusClient) Query

func (p *PrometheusClient) Query(ctx context.Context, promURL string, queryData *url.Values) ([]byte, error)

Query queries prometheus using the GrafanaClient

func (*PrometheusClient) QueryRange

func (p *PrometheusClient) QueryRange(ctx context.Context, promURL string, queryData *url.Values) ([]byte, error)

QueryRange parses the given params and performs Prometheus range queries

func (*PrometheusClient) QueryRangeUsingClient

func (p *PrometheusClient) QueryRangeUsingClient(ctx context.Context, promURL, query string, startTime, endTime time.Time, step time.Duration) (promModel.Value, error)

QueryRangeUsingClient performs a range query within a window

func (*PrometheusClient) Validate

func (p *PrometheusClient) Validate(ctx context.Context, promURL, apiKeyOrBasicAuth string) error

Validate - helps validate the connection

type Provider

type Provider interface {
	PreferencePersister
	MesheryEvents

	// Initialize will initialize a provider instance
	// by loading its capabilities and other metadata in the memory
	Initialize()

	Name() string

	// Returns ProviderType
	GetProviderType() ProviderType

	PackageLocation() string

	GetProviderCapabilities(http.ResponseWriter, *http.Request)

	GetProviderProperties() ProviderProperties
	// InitiateLogin - does the needed check, returns a true to indicate "return" or false to continue
	InitiateLogin(http.ResponseWriter, *http.Request, bool)
	TokenHandler(http.ResponseWriter, *http.Request, bool)
	ExtractToken(http.ResponseWriter, *http.Request)
	GetSession(req *http.Request) error
	GetUserDetails(*http.Request) (*User, error)
	GetUserByID(req *http.Request, userID string) ([]byte, error)
	GetUsers(token, page, pageSize, search, order, filter string) ([]byte, error)
	GetUsersKeys(token, page, pageSize, search, order, filter string, orgID string) ([]byte, error)
	GetProviderToken(req *http.Request) (string, error)
	UpdateToken(http.ResponseWriter, *http.Request) string
	Logout(http.ResponseWriter, *http.Request) error
	HandleUnAuthenticated(w http.ResponseWriter, req *http.Request)
	FetchResults(tokenVal string, page, pageSize, search, order, profileID string) ([]byte, error)
	FetchAllResults(tokenVal string, page, pageSize, search, order, from, to string) ([]byte, error)
	PublishResults(req *http.Request, result *MesheryResult, profileID string) (string, error)
	FetchSmiResults(req *http.Request, page, pageSize, search, order string) ([]byte, error)
	FetchSmiResult(req *http.Request, page, pageSize, search, order string, resultID uuid.UUID) ([]byte, error)
	PublishSmiResults(result *SmiResult) (string, error)
	PublishMetrics(tokenVal string, data *MesheryResult) error
	GetResult(tokenVal string, resultID uuid.UUID) (*MesheryResult, error)
	RecordPreferences(req *http.Request, userID string, data *Preference) error

	SaveK8sContext(token string, k8sContext K8sContext) (connections.Connection, error)
	GetK8sContexts(token, page, pageSize, search, order string, withStatus string, withCredentials bool) ([]byte, error)
	DeleteK8sContext(token, id string) (K8sContext, error)
	GetK8sContext(token, connectionID string) (K8sContext, error)
	LoadAllK8sContext(token string) ([]*K8sContext, error)

	SMPTestConfigStore(req *http.Request, perfConfig *SMP.PerformanceTestConfig) (string, error)
	SMPTestConfigGet(req *http.Request, testUUID string) (*SMP.PerformanceTestConfig, error)
	SMPTestConfigFetch(req *http.Request, page, pageSize, search, order string) ([]byte, error)
	SMPTestConfigDelete(req *http.Request, testUUID string) error

	GetGenericPersister() *database.Handler

	SetKubeClient(client *mesherykube.Client)
	GetKubeClient() *mesherykube.Client

	SaveMesheryPattern(tokenString string, pattern *MesheryPattern) ([]byte, error)
	GetMesheryPatterns(tokenString, page, pageSize, search, order string, updatedAfter string, visbility []string) ([]byte, error)
	GetCatalogMesheryPatterns(tokenString string, page, pageSize, search, order string) ([]byte, error)
	PublishCatalogPattern(req *http.Request, publishPatternRequest *MesheryCatalogPatternRequestBody) ([]byte, error)
	UnPublishCatalogPattern(req *http.Request, publishPatternRequest *MesheryCatalogPatternRequestBody) ([]byte, error)
	DeleteMesheryPattern(req *http.Request, patternID string) ([]byte, error)
	DeleteMesheryPatterns(req *http.Request, patterns MesheryPatternDeleteRequestBody) ([]byte, error)
	CloneMesheryPattern(req *http.Request, patternID string, clonePatternRequest *MesheryClonePatternRequestBody) ([]byte, error)
	GetMesheryPattern(req *http.Request, patternID string) ([]byte, error)
	RemotePatternFile(req *http.Request, resourceURL, path string, save bool) ([]byte, error)
	SaveMesheryPatternResource(token string, resource *PatternResource) (*PatternResource, error)
	GetMesheryPatternResource(token, resourceID string) (*PatternResource, error)
	GetMesheryPatternResources(token, page, pageSize, search, order, name, namespace, typ, oamType string) (*PatternResourcePage, error)
	DeleteMesheryPatternResource(token, resourceID string) error
	SaveMesheryPatternSourceContent(token string, applicationID string, sourceContent []byte) error
	GetDesignSourceContent(req *http.Request, patternID string) ([]byte, error)

	SaveMesheryFilter(tokenString string, filter *MesheryFilter) ([]byte, error)
	GetMesheryFilters(tokenString, page, pageSize, search, order string, visibility []string) ([]byte, error)
	GetCatalogMesheryFilters(tokenString string, page, pageSize, search, order string) ([]byte, error)
	PublishCatalogFilter(req *http.Request, publishFilterRequest *MesheryCatalogFilterRequestBody) ([]byte, error)
	UnPublishCatalogFilter(req *http.Request, publishFilterRequest *MesheryCatalogFilterRequestBody) ([]byte, error)
	DeleteMesheryFilter(req *http.Request, filterID string) ([]byte, error)
	CloneMesheryFilter(req *http.Request, filterID string, cloneFilterRequest *MesheryCloneFilterRequestBody) ([]byte, error)
	GetMesheryFilter(req *http.Request, filterID string) ([]byte, error)
	GetMesheryFilterFile(req *http.Request, filterID string) ([]byte, error)
	RemoteFilterFile(req *http.Request, resourceURL, path string, save bool, resource string) ([]byte, error)

	SaveMesheryApplication(tokenString string, application *MesheryApplication) ([]byte, error)
	SaveApplicationSourceContent(token string, applicationID string, sourceContent []byte) error
	GetApplicationSourceContent(req *http.Request, applicationID string) ([]byte, error)
	GetMesheryApplications(tokenString, page, pageSize, search, order string, updatedAfter string) ([]byte, error)
	DeleteMesheryApplication(req *http.Request, applicationID string) ([]byte, error)
	GetMesheryApplication(req *http.Request, applicationID string) ([]byte, error)
	ShareDesign(req *http.Request) (int, error)
	ShareFilter(req *http.Request) (int, error)

	SavePerformanceProfile(tokenString string, performanceProfile *PerformanceProfile) ([]byte, error)
	GetPerformanceProfiles(tokenString string, page, pageSize, search, order string) ([]byte, error)
	GetPerformanceProfile(req *http.Request, performanceProfileID string) ([]byte, error)
	DeletePerformanceProfile(req *http.Request, performanceProfileID string) ([]byte, error)

	SaveSchedule(tokenString string, s *Schedule) ([]byte, error)
	GetSchedules(req *http.Request, page, pageSize, order string) ([]byte, error)
	GetSchedule(req *http.Request, scheduleID string) ([]byte, error)
	DeleteSchedule(req *http.Request, scheduleID string) ([]byte, error)

	ExtensionProxy(req *http.Request) (*ExtensionProxyResponse, error)

	SaveConnection(conn *ConnectionPayload, token string, skipTokenCheck bool) (*connections.Connection, error)
	GetConnections(req *http.Request, userID string, page, pageSize int, search, order string, filter string, status []string, kind []string) (*connections.ConnectionPage, error)
	GetConnectionByID(token string, connectionID uuid.UUID, kind string) (*connections.Connection, int, error)
	GetConnectionsByKind(req *http.Request, userID string, page, pageSize int, search, order, connectionKind string) (*map[string]interface{}, error)
	GetConnectionsStatus(req *http.Request, userID string) (*connections.ConnectionsStatusPage, error)
	UpdateConnection(req *http.Request, conn *connections.Connection) (*connections.Connection, error)
	UpdateConnectionById(req *http.Request, conn *ConnectionPayload, connId string) (*connections.Connection, error)
	UpdateConnectionStatusByID(token string, connectionID uuid.UUID, connectionStatus connections.ConnectionStatus) (*connections.Connection, int, error)
	DeleteConnection(req *http.Request, connID uuid.UUID) (*connections.Connection, error)
	DeleteMesheryConnection() error

	SaveUserCredential(token string, credential *Credential) (*Credential, error)
	GetUserCredentials(req *http.Request, userID string, page, pageSize int, search, order string) (*CredentialsPage, error)
	GetCredentialByID(token string, credentialID uuid.UUID) (*Credential, int, error)
	UpdateUserCredential(req *http.Request, credential *Credential) (*Credential, error)
	DeleteUserCredential(req *http.Request, credentialID uuid.UUID) (*Credential, error)

	GetEnvironments(token, page, pageSize, search, order, filter, orgID string) ([]byte, error)
	GetEnvironmentByID(req *http.Request, environmentID, orgID string) ([]byte, error)
	SaveEnvironment(req *http.Request, env *environments.EnvironmentPayload, token string, skipTokenCheck bool) ([]byte, error)
	DeleteEnvironment(req *http.Request, environmentID string) ([]byte, error)
	UpdateEnvironment(req *http.Request, env *environments.EnvironmentPayload, environmentID string) (*environments.EnvironmentData, error)
	AddConnectionToEnvironment(req *http.Request, environmentID string, connectionID string) ([]byte, error)
	RemoveConnectionFromEnvironment(req *http.Request, environmentID string, connectionID string) ([]byte, error)
	GetConnectionsOfEnvironment(req *http.Request, environmentID, page, pagesize, search, order, filter string) ([]byte, error)

	GetOrganizations(token, page, pageSize, search, order, filter string) ([]byte, error)

	GetWorkspaces(token, page, pagesize, search, order, filter, orgID string) ([]byte, error)
	GetWorkspaceByID(req *http.Request, workspaceID, orgID string) ([]byte, error)
	SaveWorkspace(req *http.Request, workspace *WorkspacePayload, token string, skipTokenCheck bool) ([]byte, error)
	DeleteWorkspace(req *http.Request, workspaceID string) ([]byte, error)
	UpdateWorkspace(req *http.Request, workspace *WorkspacePayload, workspaceID string) (*Workspace, error)
	GetEnvironmentsOfWorkspace(req *http.Request, workspaceID, page, pagesize, search, order, filter string) ([]byte, error)
	AddEnvironmentToWorkspace(req *http.Request, workspaceID string, environmentID string) ([]byte, error)
	RemoveEnvironmentFromWorkspace(req *http.Request, workspaceID string, environmentID string) ([]byte, error)
	GetDesignsOfWorkspace(req *http.Request, workspaceID, page, pagesize, search, order, filter string) ([]byte, error)
	AddDesignToWorkspace(req *http.Request, workspaceID string, designID string) ([]byte, error)
	RemoveDesignFromWorkspace(req *http.Request, workspaceID string, designID string) ([]byte, error)
}

Provider - interface for providers

type ProviderProperties

type ProviderProperties struct {
	ProviderType        ProviderType     `json:"provider_type,omitempty"`
	PackageVersion      string           `json:"package_version,omitempty"`
	PackageURL          string           `json:"package_url,omitempty"`
	ProviderName        string           `json:"provider_name,omitempty"`
	ProviderDescription []string         `json:"provider_description,omitempty"`
	ProviderURL         string           `json:"provider_url,omitempty"`
	Extensions          Extensions       `json:"extensions,omitempty"`
	Capabilities        Capabilities     `json:"capabilities,omitempty"`
	RestrictedAccess    RestrictedAccess `json:"restrictedAccess,omitempty"`
}

ProviderProperties represents the structure of properties that a provider has

type ProviderType

type ProviderType string

ProviderType - for representing provider types

type QueryTrackerInterface

type QueryTrackerInterface interface {
	AddOrFlagQuery(ctx context.Context, uuid, query string, flag bool)
	RemoveUUID(ctx context.Context, uuid string)
	GetQueriesForUUID(ctx context.Context, uuid string) map[string]bool
}

QueryTrackerInterface defines the methods for working with query UUIDs

type RegistrationStatus

type RegistrationStatus int
const (
	RegistrationComplete RegistrationStatus = iota
	NotRegistered
	Registering
)

func (RegistrationStatus) String added in v0.6.135

func (rs RegistrationStatus) String() string

INstead define a set of actions

type RemoteProvider

type RemoteProvider struct {
	ProviderProperties
	*SessionPreferencePersister
	*EventsPersister

	SaaSTokenName     string
	RemoteProviderURL string

	SessionName   string
	RefCookieName string

	TokenStore    map[string]string
	TokenStoreMut sync.Mutex
	Keys          []map[string]string

	LoginCookieDuration time.Duration

	ProviderVersion    string
	SmiResultPersister *SMIResultsPersister
	GenericPersister   *database.Handler
	KubeClient         *mesherykube.Client
	Log                logger.Handler
	// contains filtered or unexported fields
}

RemoteProvider - represents a local provider

func (*RemoteProvider) AddConnectionToEnvironment added in v0.6.143

func (l *RemoteProvider) AddConnectionToEnvironment(req *http.Request, environmentID string, connectionID string) ([]byte, error)

func (*RemoteProvider) AddDesignToWorkspace added in v0.7.5

func (l *RemoteProvider) AddDesignToWorkspace(req *http.Request, workspaceID string, designId string) ([]byte, error)

func (*RemoteProvider) AddEnvironmentToWorkspace added in v0.7.5

func (l *RemoteProvider) AddEnvironmentToWorkspace(req *http.Request, workspaceID string, environmentID string) ([]byte, error)

func (*RemoteProvider) CloneMesheryFilter added in v0.6.4

func (l *RemoteProvider) CloneMesheryFilter(req *http.Request, filterID string, cloneFilterRequest *MesheryCloneFilterRequestBody) ([]byte, error)

CloneMesheryFilter clones a meshery filter with the given id

func (*RemoteProvider) CloneMesheryPattern added in v0.6.4

func (l *RemoteProvider) CloneMesheryPattern(req *http.Request, patternID string, clonePatternRequest *MesheryClonePatternRequestBody) ([]byte, error)

CloneMesheryPattern clones a meshery pattern with the given id

func (*RemoteProvider) DecodeTokenData

func (l *RemoteProvider) DecodeTokenData(tokenStringB64 string) (*oauth2.Token, error)

DecodeTokenData - Decodes a tokenString to a token

func (*RemoteProvider) DeleteConnection added in v0.6.91

func (l *RemoteProvider) DeleteConnection(req *http.Request, connectionID uuid.UUID) (*connections.Connection, error)

DeleteConnection - to delete a saved connection

func (*RemoteProvider) DeleteEnvironment added in v0.6.143

func (l *RemoteProvider) DeleteEnvironment(req *http.Request, environmentID string) ([]byte, error)

func (*RemoteProvider) DeleteK8sContext

func (l *RemoteProvider) DeleteK8sContext(token, id string) (K8sContext, error)

func (*RemoteProvider) DeleteMesheryApplication

func (l *RemoteProvider) DeleteMesheryApplication(req *http.Request, applicationID string) ([]byte, error)

DeleteMesheryApplication deletes a meshery application with the given id

func (*RemoteProvider) DeleteMesheryConnection added in v0.6.52

func (l *RemoteProvider) DeleteMesheryConnection() error

func (*RemoteProvider) DeleteMesheryFilter

func (l *RemoteProvider) DeleteMesheryFilter(req *http.Request, filterID string) ([]byte, error)

DeleteMesheryFilter deletes a meshery filter with the given id

func (*RemoteProvider) DeleteMesheryPattern

func (l *RemoteProvider) DeleteMesheryPattern(req *http.Request, patternID string) ([]byte, error)

DeleteMesheryPattern deletes a meshery pattern with the given id

func (*RemoteProvider) DeleteMesheryPatternResource

func (l *RemoteProvider) DeleteMesheryPatternResource(token, resourceID string) error

func (*RemoteProvider) DeleteMesheryPatterns

func (l *RemoteProvider) DeleteMesheryPatterns(req *http.Request, patterns MesheryPatternDeleteRequestBody) ([]byte, error)

DeleteMesheryPatterns deletes meshery patterns with the given ids and names

func (*RemoteProvider) DeletePerformanceProfile

func (l *RemoteProvider) DeletePerformanceProfile(req *http.Request, performanceProfileID string) ([]byte, error)

DeletePerformanceProfile deletes a performance profile with the given performanceProfileID

func (*RemoteProvider) DeleteSchedule

func (l *RemoteProvider) DeleteSchedule(req *http.Request, scheduleID string) ([]byte, error)

DeleteSchedule deletes a schedule with the given scheduleID

func (*RemoteProvider) DeleteUserCredential added in v0.6.79

func (l *RemoteProvider) DeleteUserCredential(req *http.Request, credentialID uuid.UUID) (*Credential, error)

DeleteUserCredential - to delete a saved credential

func (*RemoteProvider) DeleteWorkspace added in v0.7.5

func (l *RemoteProvider) DeleteWorkspace(req *http.Request, workspaceID string) ([]byte, error)

func (*RemoteProvider) Description

func (l *RemoteProvider) Description() []string

Description - returns a short description of the provider for display in the Provider UI

func (*RemoteProvider) DoRequest

func (l *RemoteProvider) DoRequest(req *http.Request, tokenString string) (*http.Response, error)

DoRequest - executes a request and does refreshing automatically

func (*RemoteProvider) ExtensionProxy

func (l *RemoteProvider) ExtensionProxy(req *http.Request) (*ExtensionProxyResponse, error)

ExtensionProxy - proxy requests to the remote provider which are specific to user_account extension

func (*RemoteProvider) ExtractToken

func (l *RemoteProvider) ExtractToken(w http.ResponseWriter, r *http.Request)

ExtractToken - Returns the auth token and the provider type

func (*RemoteProvider) FetchAllResults

func (l *RemoteProvider) FetchAllResults(tokenString string, page, pageSize, search, order, from, to string) ([]byte, error)

FetchAllResults - fetches results from provider backend

func (*RemoteProvider) FetchResults

func (l *RemoteProvider) FetchResults(tokenVal string, page, pageSize, search, order, profileID string) ([]byte, error)

FetchResults - fetches results for profile id from provider backend

func (*RemoteProvider) FetchSmiResult

func (l *RemoteProvider) FetchSmiResult(req *http.Request, page, pageSize, search, order string, resultID uuid.UUID) ([]byte, error)

FetchSmiResult - fetches single result from provider backend with given id

func (*RemoteProvider) FetchSmiResults

func (l *RemoteProvider) FetchSmiResults(req *http.Request, page, pageSize, search, order string) ([]byte, error)

FetchSmiResults - fetches results from provider backend

func (*RemoteProvider) GenerateKey

func (l *RemoteProvider) GenerateKey(jwk JWK) (*rsa.PublicKey, error)

GenerateKey - generate the actual key from the JWK

func (*RemoteProvider) GetApplicationSourceContent

func (l *RemoteProvider) GetApplicationSourceContent(req *http.Request, applicationID string) ([]byte, error)

GetApplicationSourceContent returns application source-content from provider

func (*RemoteProvider) GetCatalogMesheryFilters added in v0.6.4

func (l *RemoteProvider) GetCatalogMesheryFilters(tokenString string, page, pageSize, search, order string) ([]byte, error)

GetCatalogMesheryFilters gives the catalog filters stored with the provider

func (*RemoteProvider) GetCatalogMesheryPatterns added in v0.6.4

func (l *RemoteProvider) GetCatalogMesheryPatterns(tokenString string, page, pageSize, search, order string) ([]byte, error)

GetCatalogMesheryPatterns gives the catalog patterns stored with the provider

func (*RemoteProvider) GetConnectionByID added in v0.6.182

func (l *RemoteProvider) GetConnectionByID(token string, connectionID uuid.UUID, kind string) (*connections.Connection, int, error)

func (*RemoteProvider) GetConnections added in v0.6.91

func (l *RemoteProvider) GetConnections(req *http.Request, userID string, page, pageSize int, search, order string, filter string, status []string, kind []string) (*connections.ConnectionPage, error)

func (*RemoteProvider) GetConnectionsByKind added in v0.6.117

func (l *RemoteProvider) GetConnectionsByKind(req *http.Request, _ string, page, pageSize int, search, order, connectionKind string) (*map[string]interface{}, error)

GetConnectionsByKind - to get saved credentials

func (*RemoteProvider) GetConnectionsOfEnvironment added in v0.7.3

func (l *RemoteProvider) GetConnectionsOfEnvironment(req *http.Request, environmentID, page, pageSize, search, order, filter string) ([]byte, error)

func (*RemoteProvider) GetConnectionsStatus added in v0.6.113

func (l *RemoteProvider) GetConnectionsStatus(req *http.Request, userID string) (*connections.ConnectionsStatusPage, error)

func (*RemoteProvider) GetCredentialByID added in v0.6.182

func (l *RemoteProvider) GetCredentialByID(token string, credentialID uuid.UUID) (*Credential, int, error)

func (*RemoteProvider) GetDesignSourceContent added in v0.7.5

func (l *RemoteProvider) GetDesignSourceContent(req *http.Request, designID string) ([]byte, error)

GetDesignSourceContent returns design source-content from provider

func (*RemoteProvider) GetDesignsOfWorkspace added in v0.7.5

func (l *RemoteProvider) GetDesignsOfWorkspace(req *http.Request, workspaceID, page, pageSize, search, order, filter string) ([]byte, error)

func (*RemoteProvider) GetEnvironmentByID added in v0.6.143

func (l *RemoteProvider) GetEnvironmentByID(req *http.Request, environmentID, orgID string) ([]byte, error)

func (*RemoteProvider) GetEnvironments added in v0.6.143

func (l *RemoteProvider) GetEnvironments(token, page, pageSize, search, order, filter, orgID string) ([]byte, error)

func (*RemoteProvider) GetEnvironmentsOfWorkspace added in v0.7.5

func (l *RemoteProvider) GetEnvironmentsOfWorkspace(req *http.Request, workspaceID, page, pageSize, search, order, filter string) ([]byte, error)

func (*RemoteProvider) GetGenericPersister

func (l *RemoteProvider) GetGenericPersister() *database.Handler

GetGenericPersister - to return persister

func (*RemoteProvider) GetJWK

func (l *RemoteProvider) GetJWK(kid string) (JWK, error)

GetJWK - Takes a keyId and returns the JWK

func (*RemoteProvider) GetK8sContext

func (l *RemoteProvider) GetK8sContext(token, connectionID string) (K8sContext, error)

func (*RemoteProvider) GetK8sContexts

func (l *RemoteProvider) GetK8sContexts(token, page, pageSize, search, order string, withStatus string, withCredentials bool) ([]byte, error)

func (*RemoteProvider) GetKubeClient

func (l *RemoteProvider) GetKubeClient() *mesherykube.Client

GetKubeClient - to get meshery kubernetes client

func (*RemoteProvider) GetMesheryApplication

func (l *RemoteProvider) GetMesheryApplication(req *http.Request, applicationID string) ([]byte, error)

GetMesheryApplication gets application for the given applicationID

func (*RemoteProvider) GetMesheryApplications

func (l *RemoteProvider) GetMesheryApplications(tokenString string, page, pageSize, search, order string, updaterAfter string) ([]byte, error)

GetMesheryApplications gives the applications stored with the provider

func (*RemoteProvider) GetMesheryFilter

func (l *RemoteProvider) GetMesheryFilter(req *http.Request, filterID string) ([]byte, error)

GetMesheryFilter gets filter for the given filterID

func (*RemoteProvider) GetMesheryFilterFile

func (l *RemoteProvider) GetMesheryFilterFile(req *http.Request, filterID string) ([]byte, error)

GetMesheryFilterFile gets filter for the given filterID without the metadata

func (*RemoteProvider) GetMesheryFilters

func (l *RemoteProvider) GetMesheryFilters(tokenString string, page, pageSize, search, order string, visibility []string) ([]byte, error)

GetMesheryFilters gives the filters stored with the provider

func (*RemoteProvider) GetMesheryPattern

func (l *RemoteProvider) GetMesheryPattern(req *http.Request, patternID string) ([]byte, error)

GetMesheryPattern gets pattern for the given patternID

func (*RemoteProvider) GetMesheryPatternResource

func (l *RemoteProvider) GetMesheryPatternResource(token, resourceID string) (*PatternResource, error)

func (*RemoteProvider) GetMesheryPatternResources

func (l *RemoteProvider) GetMesheryPatternResources(
	token,
	page,
	pageSize,
	search,
	order,
	name,
	namespace,
	typ,
	oamType string,
) (*PatternResourcePage, error)

func (*RemoteProvider) GetMesheryPatterns

func (l *RemoteProvider) GetMesheryPatterns(tokenString string, page, pageSize, search, order, updatedAfter string, visibility []string) ([]byte, error)

GetMesheryPatterns gives the patterns stored with the provider

func (*RemoteProvider) GetOrganizations added in v0.7.3

func (l *RemoteProvider) GetOrganizations(token, page, pageSize, search, order, filter string) ([]byte, error)

func (*RemoteProvider) GetPerformanceProfile

func (l *RemoteProvider) GetPerformanceProfile(req *http.Request, performanceProfileID string) ([]byte, error)

GetPerformanceProfile gets performance profile for the given the performanceProfileID

func (*RemoteProvider) GetPerformanceProfiles

func (l *RemoteProvider) GetPerformanceProfiles(tokenString string, page, pageSize, search, order string) ([]byte, error)

GetPerformanceProfiles gives the performance profiles stored with the provider

func (*RemoteProvider) GetProviderCapabilities

func (l *RemoteProvider) GetProviderCapabilities(w http.ResponseWriter, _ *http.Request)

GetProviderCapabilities returns all of the provider properties

func (*RemoteProvider) GetProviderProperties

func (l *RemoteProvider) GetProviderProperties() ProviderProperties

GetProviderProperties - Returns all the provider properties required

func (*RemoteProvider) GetProviderToken

func (l *RemoteProvider) GetProviderToken(req *http.Request) (string, error)

GetProviderToken - returns provider token

func (*RemoteProvider) GetProviderType

func (l *RemoteProvider) GetProviderType() ProviderType

GetProviderType - Returns ProviderType

func (*RemoteProvider) GetResult

func (l *RemoteProvider) GetResult(tokenVal string, resultID uuid.UUID) (*MesheryResult, error)

GetResult - fetches result from provider backend for the given result id

func (*RemoteProvider) GetSchedule

func (l *RemoteProvider) GetSchedule(req *http.Request, scheduleID string) ([]byte, error)

GetSchedule gets schedule for the given the scheduleID

func (*RemoteProvider) GetSchedules

func (l *RemoteProvider) GetSchedules(req *http.Request, page, pageSize, order string) ([]byte, error)

GetSchedules gives the schedules stored with the provider

func (*RemoteProvider) GetSession

func (l *RemoteProvider) GetSession(req *http.Request) error

GetSession - validates the current request, attempts for a refresh of token, and then return its validity

It is assumed that each remote provider will support this feature

func (*RemoteProvider) GetToken

func (l *RemoteProvider) GetToken(req *http.Request) (string, error)

GetToken - extracts token form a request

func (*RemoteProvider) GetUserByID added in v0.6.63

func (l *RemoteProvider) GetUserByID(req *http.Request, userID string) ([]byte, error)

func (*RemoteProvider) GetUserCredentials added in v0.6.79

func (l *RemoteProvider) GetUserCredentials(req *http.Request, _ string, page, pageSize int, search, order string) (*CredentialsPage, error)

GetCredentials - to get saved credentials

func (*RemoteProvider) GetUserDetails

func (l *RemoteProvider) GetUserDetails(req *http.Request) (*User, error)

GetUserDetails - returns the user details

func (*RemoteProvider) GetUsers added in v0.6.88

func (l *RemoteProvider) GetUsers(token, page, pageSize, search, order, filter string) ([]byte, error)

func (*RemoteProvider) GetUsersKeys added in v0.6.124

func (l *RemoteProvider) GetUsersKeys(token, page, pageSize, search, order, filter string, orgID string) ([]byte, error)

Returns Keys from a user /api/identity/users/keys

func (*RemoteProvider) GetWorkspaceByID added in v0.7.5

func (l *RemoteProvider) GetWorkspaceByID(req *http.Request, workspaceID, orgID string) ([]byte, error)

func (*RemoteProvider) GetWorkspaces added in v0.7.5

func (l *RemoteProvider) GetWorkspaces(token, page, pageSize, search, order, filter, orgID string) ([]byte, error)

func (*RemoteProvider) HandleUnAuthenticated

func (l *RemoteProvider) HandleUnAuthenticated(w http.ResponseWriter, req *http.Request)

HandleUnAuthenticated

Redirects to alert user of expired sesion

func (*RemoteProvider) Initialize

func (l *RemoteProvider) Initialize()

Initialize function will initialize the RemoteProvider instance with the metadata fetched from the remote providers capabilities endpoint

func (*RemoteProvider) InitiateLogin

func (l *RemoteProvider) InitiateLogin(w http.ResponseWriter, r *http.Request, _ bool)

InitiateLogin - initiates login flow and returns a true to indicate the handler to "return" or false to continue

Every Remote Provider must offer this function

func (*RemoteProvider) LoadAllK8sContext

func (l *RemoteProvider) LoadAllK8sContext(token string) ([]*K8sContext, error)

func (*RemoteProvider) Logout

func (l *RemoteProvider) Logout(w http.ResponseWriter, req *http.Request) error

Logout - logout from provider backend

It is assumed that every remote provider will support this feature

func (*RemoteProvider) Name

func (l *RemoteProvider) Name() string

Name - Returns Provider's friendly name

func (*RemoteProvider) PackageLocation

func (l *RemoteProvider) PackageLocation() string

PackageLocation returns the location of where the package for the current provider is located

func (*RemoteProvider) PublishCatalogFilter added in v0.6.17

func (l *RemoteProvider) PublishCatalogFilter(req *http.Request, publishFilterRequest *MesheryCatalogFilterRequestBody) ([]byte, error)

CloneMesheryFilter publishes a meshery filter with the given id to catalog

func (*RemoteProvider) PublishCatalogPattern added in v0.6.17

func (l *RemoteProvider) PublishCatalogPattern(req *http.Request, publishPatternRequest *MesheryCatalogPatternRequestBody) ([]byte, error)

PublishMesheryPattern publishes a meshery pattern with the given id to catalog

func (*RemoteProvider) PublishMetrics

func (l *RemoteProvider) PublishMetrics(tokenString string, result *MesheryResult) error

PublishMetrics - publishes metrics to the provider backend asyncronously

func (*RemoteProvider) PublishResults

func (l *RemoteProvider) PublishResults(req *http.Request, result *MesheryResult, profileID string) (string, error)

PublishResults - publishes results to the provider backend synchronously

func (*RemoteProvider) PublishSmiResults

func (l *RemoteProvider) PublishSmiResults(result *SmiResult) (string, error)

PublishSmiResults - publishes results to the provider backend synchronously

func (*RemoteProvider) RecordPreferences

func (l *RemoteProvider) RecordPreferences(req *http.Request, userID string, data *Preference) error

RecordPreferences - records the user preference

func (*RemoteProvider) RemoteFilterFile

func (l *RemoteProvider) RemoteFilterFile(req *http.Request, resourceURL, path string, save bool, resource string) ([]byte, error)

func (*RemoteProvider) RemotePatternFile

func (l *RemoteProvider) RemotePatternFile(req *http.Request, resourceURL, path string, save bool) ([]byte, error)

func (*RemoteProvider) RemoveConnectionFromEnvironment added in v0.6.143

func (l *RemoteProvider) RemoveConnectionFromEnvironment(req *http.Request, environmentID string, connectionID string) ([]byte, error)

func (*RemoteProvider) RemoveDesignFromWorkspace added in v0.7.5

func (l *RemoteProvider) RemoveDesignFromWorkspace(req *http.Request, workspaceID string, designId string) ([]byte, error)

func (*RemoteProvider) RemoveEnvironmentFromWorkspace added in v0.7.5

func (l *RemoteProvider) RemoveEnvironmentFromWorkspace(req *http.Request, workspaceID string, environmentID string) ([]byte, error)

func (*RemoteProvider) SMPTestConfigDelete

func (l *RemoteProvider) SMPTestConfigDelete(req *http.Request, testUUID string) error

SMPTestConfigDelete - tombstone a given test profile

func (*RemoteProvider) SMPTestConfigFetch

func (l *RemoteProvider) SMPTestConfigFetch(req *http.Request, page, pageSize, search, order string) ([]byte, error)

SMPTestConfigFetch - retrieve list of test profiles

func (*RemoteProvider) SMPTestConfigGet

func (l *RemoteProvider) SMPTestConfigGet(req *http.Request, testUUID string) (*SMP.PerformanceTestConfig, error)

SMPTestConfigGet - retrieve a single test profile details

func (*RemoteProvider) SMPTestConfigStore

func (l *RemoteProvider) SMPTestConfigStore(req *http.Request, perfConfig *SMP.PerformanceTestConfig) (string, error)

SMPTestConfigStore - persist test profile details to provider

func (*RemoteProvider) SaveApplicationSourceContent

func (l *RemoteProvider) SaveApplicationSourceContent(tokenString string, applicationID string, sourceContent []byte) error

SaveApplicationSourceContent saves given application source content with the provider after successful save of Application with the provider

func (*RemoteProvider) SaveConnection added in v0.6.52

func (l *RemoteProvider) SaveConnection(conn *ConnectionPayload, token string, skipTokenCheck bool) (*connections.Connection, error)

func (*RemoteProvider) SaveEnvironment added in v0.6.143

func (l *RemoteProvider) SaveEnvironment(req *http.Request, env *environments.EnvironmentPayload, token string, skipTokenCheck bool) ([]byte, error)

func (*RemoteProvider) SaveK8sContext

func (l *RemoteProvider) SaveK8sContext(token string, k8sContext K8sContext) (connections.Connection, error)

func (*RemoteProvider) SaveMesheryApplication

func (l *RemoteProvider) SaveMesheryApplication(tokenString string, application *MesheryApplication) ([]byte, error)

SaveMesheryApplication saves given application with the provider

func (*RemoteProvider) SaveMesheryFilter

func (l *RemoteProvider) SaveMesheryFilter(tokenString string, filter *MesheryFilter) ([]byte, error)

SaveMesheryFilter saves given filter with the provider

func (*RemoteProvider) SaveMesheryPattern

func (l *RemoteProvider) SaveMesheryPattern(tokenString string, pattern *MesheryPattern) ([]byte, error)

SaveMesheryPattern saves given pattern with the provider

func (*RemoteProvider) SaveMesheryPatternResource

func (l *RemoteProvider) SaveMesheryPatternResource(token string, resource *PatternResource) (*PatternResource, error)

func (*RemoteProvider) SaveMesheryPatternSourceContent added in v0.6.169

func (l *RemoteProvider) SaveMesheryPatternSourceContent(tokenString string, patternID string, sourceContent []byte) error

func (*RemoteProvider) SavePerformanceProfile

func (l *RemoteProvider) SavePerformanceProfile(tokenString string, pp *PerformanceProfile) ([]byte, error)

SavePerformanceProfile saves a performance profile into the remote provider

func (*RemoteProvider) SaveSchedule

func (l *RemoteProvider) SaveSchedule(tokenString string, s *Schedule) ([]byte, error)

SaveSchedule saves a SaveSchedule into the remote provider

func (*RemoteProvider) SaveUserCredential added in v0.6.79

func (l *RemoteProvider) SaveUserCredential(token string, credential *Credential) (*Credential, error)

SaveCredential - to save a creadential for an integration

func (*RemoteProvider) SaveWorkspace added in v0.7.5

func (l *RemoteProvider) SaveWorkspace(req *http.Request, env *WorkspacePayload, token string, skipTokenCheck bool) ([]byte, error)

func (*RemoteProvider) SetKubeClient

func (l *RemoteProvider) SetKubeClient(client *mesherykube.Client)

SetKubeClient - to set meshery kubernetes client

func (*RemoteProvider) ShareDesign added in v0.6.48

func (l *RemoteProvider) ShareDesign(req *http.Request) (int, error)

func (*RemoteProvider) ShareFilter added in v0.6.127

func (l *RemoteProvider) ShareFilter(req *http.Request) (int, error)

func (*RemoteProvider) StopSyncPreferences

func (l *RemoteProvider) StopSyncPreferences()

StopSyncPreferences - used to stop sync preferences

func (*RemoteProvider) SyncPreferences

func (l *RemoteProvider) SyncPreferences()

SyncPreferences - used to sync preferences with the remote provider

func (*RemoteProvider) TokenHandler

func (l *RemoteProvider) TokenHandler(w http.ResponseWriter, r *http.Request, _ bool)

TokenHandler - specific to remote auth

func (*RemoteProvider) UnPublishCatalogFilter added in v0.6.100

func (l *RemoteProvider) UnPublishCatalogFilter(req *http.Request, publishFilterRequest *MesheryCatalogFilterRequestBody) ([]byte, error)

UnPublishMesheryFilter publishes a meshery filter with the given id to catalog

func (*RemoteProvider) UnPublishCatalogPattern added in v0.6.92

func (l *RemoteProvider) UnPublishCatalogPattern(req *http.Request, publishPatternRequest *MesheryCatalogPatternRequestBody) ([]byte, error)

UnPublishMesheryPattern publishes a meshery pattern with the given id to catalog

func (*RemoteProvider) UpdateConnection added in v0.6.91

func (l *RemoteProvider) UpdateConnection(req *http.Request, connection *connections.Connection) (*connections.Connection, error)

UpdateConnection - to update an existing connection

func (*RemoteProvider) UpdateConnectionById added in v0.6.120

func (l *RemoteProvider) UpdateConnectionById(req *http.Request, connection *ConnectionPayload, connId string) (*connections.Connection, error)

UpdateConnectionById - to update an existing connection using the connection id

func (*RemoteProvider) UpdateConnectionStatusByID added in v0.6.176

func (l *RemoteProvider) UpdateConnectionStatusByID(token string, connectionID uuid.UUID, connectionStatus connections.ConnectionStatus) (*connections.Connection, int, error)

func (*RemoteProvider) UpdateEnvironment added in v0.6.143

func (l *RemoteProvider) UpdateEnvironment(req *http.Request, env *environments.EnvironmentPayload, environmentID string) (*environments.EnvironmentData, error)

func (*RemoteProvider) UpdateJWKs

func (l *RemoteProvider) UpdateJWKs() error

UpdateJWKs - Updates Keys to the JWKS

func (*RemoteProvider) UpdateToken

func (l *RemoteProvider) UpdateToken(w http.ResponseWriter, r *http.Request) string

UpdateToken - in case the token was refreshed, this routine updates the response with the new token

func (*RemoteProvider) UpdateUserCredential added in v0.6.79

func (l *RemoteProvider) UpdateUserCredential(req *http.Request, credential *Credential) (*Credential, error)

UpdateUserCredential - to update an existing credential

func (*RemoteProvider) UpdateWorkspace added in v0.7.5

func (l *RemoteProvider) UpdateWorkspace(req *http.Request, env *WorkspacePayload, workspaceID string) (*Workspace, error)

func (*RemoteProvider) VerifyToken

func (l *RemoteProvider) VerifyToken(tokenString string) (*jwt.MapClaims, error)

VerifyToken - verifies the validity of a tokenstring

type RestrictedAccess added in v0.6.20

type RestrictedAccess struct {
	IsMesheryUIRestricted bool                  `json:"isMesheryUiRestricted"`
	AllowedComponents     MesheryUICapabilities `json:"allowedComponents,omitempty"`
}

type Router

type Router struct {
	HTTPHandler http.Handler
	Path        string
}

Router

type RunnerResults

type RunnerResults struct {
	URL               string     `json:"URL"`
	LoadGenerator     string     `json:"load-generator"`
	ActualDuration    uint64     `json:"ActualDuration"`
	RequestedDuration string     `json:"RequestedDuration"`
	QPS               float64    `json:"ActualQPS"`
	StartTime         *time.Time `json:"StartTime"`
	DurationHistogram struct {
		Average     float64 `json:"Avg,omitempty"`
		Max         float64 `json:"Max,omitempty"`
		Min         float64 `json:"Min,omitempty"`
		Percentiles []struct {
			Percentile float64 `json:"Percentile,omitempty"`
			Value      float64 `json:"Value,omitempty"`
		} `json:"Percentiles,omitempty"`
	} `json:"DurationHistogram,omitempty"`
}

type SMIResultsPersister

type SMIResultsPersister struct {
	DB *database.Handler
}

SmiResultsPersister assists with persisting session in store

func (*SMIResultsPersister) DeleteResult

func (s *SMIResultsPersister) DeleteResult(key uuid.UUID) error

func (*SMIResultsPersister) GetResult

func (s *SMIResultsPersister) GetResult(key uuid.UUID) ([]byte, error)

func (*SMIResultsPersister) GetResults

func (s *SMIResultsPersister) GetResults(page, pageSize uint64) ([]byte, error)

GetSmiResults - gets result for the page and pageSize

func (*SMIResultsPersister) UpdateResult

func (s *SMIResultsPersister) UpdateResult(key uuid.UUID, res SmiResultWithID) error

func (*SMIResultsPersister) WriteResult

func (s *SMIResultsPersister) WriteResult(key uuid.UUID, result []byte) error

WriteSmiResult persists the result

type Schedule

type Schedule struct {
	ID uuid.UUID `json:"id,omitempty"`

	// CronExpression is the UNIX cron expression (quartz expression)
	//
	// Example:
	// 	0 15 5 ? * WED,SUN *
	CronExpression string `json:"cron_expression,omitempty"`
}

Schedule is the struct for representing schedules

type SchedulesAPIResponse

type SchedulesAPIResponse struct {
	Page       uint       `json:"page"`
	PageSize   uint       `json:"page_size"`
	TotalCount uint       `json:"total_count"`
	Schedules  []Schedule `json:"schedules,omitempty"`
}

API response model for SchedulesAPI

type SelectedGrafanaConfig

type SelectedGrafanaConfig struct {
	GrafanaBoard         *GrafanaBoard `json:"board,omitempty"`
	GrafanaPanels        []*sdk.Panel  `json:"panels,omitempty"`
	SelectedTemplateVars []string      `json:"templateVars,omitempty"`
}

SelectedGrafanaConfig represents the selected boards, panels, and template variables

type SessionPreferencePersister

type SessionPreferencePersister struct {
	DB *database.Handler
}

PreferencePersister assists with persisting session in store

func (*SessionPreferencePersister) DeleteFromPersister

func (s *SessionPreferencePersister) DeleteFromPersister(userID string) error

DeleteFromPersister removes the session for the user

func (*SessionPreferencePersister) ReadFromPersister

func (s *SessionPreferencePersister) ReadFromPersister(userID string) (*Preference, error)

ReadFromPersister - reads the session data for the given userID

func (*SessionPreferencePersister) WriteToPersister

func (s *SessionPreferencePersister) WriteToPersister(userID string, data *Preference) error

WriteToPersister persists session for the user

type Sidecars

type Sidecars struct {
	Count     int     `yaml:"count,omitempty"`
	CPUMCores float64 `yaml:"cpu_mCores,omitempty"`
	MemMb     float64 `yaml:"mem_mb,omitempty"`
	Rps       float64 `yaml:"rps,omitempty"`
	Bps       float64 `yaml:"bps,omitempty"`
}

Sidecars - holds sidecars info

type SmiResult

type SmiResult struct {
	ID                uuid.UUID `json:"id,omitempty"`
	Date              string    `json:"date,omitempty"`
	MeshName          string    `json:"mesh_name,omitempty"`
	MeshVersion       string    `json:"mesh_version,omitempty"`
	CasesPassed       string    `json:"cases_passed,omitempty"`
	PassingPercentage string    `json:"passing_percentage,omitempty"`
	Status            string    `json:"status,omitempty"`
	MoreDetails       []*Detail `json:"more_details,omitempty" gorm:"type:detail[]"`
}

type SmiResultPage

type SmiResultPage struct {
	Page       uint64             `json:"page"`
	PageSize   uint64             `json:"page_size"`
	TotalCount int                `json:"total_count"`
	Results    []*SmiResultWithID `json:"results"`
}

SmiResultPage - represents a page of meshery results

type SmiResultWithID

type SmiResultWithID struct {
	ID        uuid.UUID
	SmiResult `gorm:"embedded"`
}

type SqliteSchema added in v0.6.99

type SqliteSchema struct {
	Name  string `json:"name,omitempty"`
	Type  string `json:"type,omitempty"`
	Count int64  `json:"count"`
}

type StatusApplyConfiguration added in v0.6.162

type StatusApplyConfiguration struct {
	// TypeMetaApplyConfiguration  `json:",inline"`
	*ListMetaApplyConfiguration `json:"metadata,omitempty"`
	Status                      *string                          `json:"status,omitempty"`
	Message                     *string                          `json:"message,omitempty"`
	Reason                      *metav1.StatusReason             `json:"reason,omitempty"`
	Details                     *StatusDetailsApplyConfiguration `json:"details,omitempty"`
	Code                        *int32                           `json:"code,omitempty"`
}

type StatusCauseApplyConfiguration added in v0.6.162

type StatusCauseApplyConfiguration struct {
	Type    *metav1.CauseType `json:"reason,omitempty"`
	Message *string           `json:"message,omitempty"`
	Field   *string           `json:"field,omitempty"`
}

type StatusDetailsApplyConfiguration added in v0.6.162

type StatusDetailsApplyConfiguration struct {
	Name              *string                         `json:"name,omitempty"`
	Group             *string                         `json:"group,omitempty"`
	Kind              *string                         `json:"kind,omitempty"`
	UID               *types.UID                      `json:"uid,omitempty"`
	Causes            []StatusCauseApplyConfiguration `json:"causes,omitempty"`
	RetryAfterSeconds *int32                          `json:"retryAfterSeconds,omitempty"`
}

type SubmitMetricsConfig

type SubmitMetricsConfig struct {
	TestUUID, ResultID, PromURL string
	StartTime, EndTime          time.Time
	// TokenKey,
	TokenVal string
	Provider Provider
}

SubmitMetricsConfig is used to store config used for submitting metrics

type SupportedLoadTestMethods

type SupportedLoadTestMethods int

SupportedLoadTestMethods - represents the load test method type

const (
	// HTTP Load Test
	HTTP SupportedLoadTestMethods = 1

	// TCP Load Test
	TCP SupportedLoadTestMethods = 3
)

type TestProfilesPersister

type TestProfilesPersister struct {
	DB *database.Handler
}

TestProfilesPersister assists with persisting session in store

func (*TestProfilesPersister) DeleteTestConfig

func (s *TestProfilesPersister) DeleteTestConfig(key uuid.UUID) error

DeleteTestConfig - delete result for a specific key

func (*TestProfilesPersister) GetTestConfig

func (s *TestProfilesPersister) GetTestConfig(key uuid.UUID) (*SMP.PerformanceTestConfig, error)

GetTestConfig - gets result for a specific key

func (*TestProfilesPersister) GetTestConfigs

func (s *TestProfilesPersister) GetTestConfigs(page, pageSize uint64) ([]byte, error)

GetTestConfigs - gets result for the page and pageSize

func (*TestProfilesPersister) UpdateTestConfig

func (s *TestProfilesPersister) UpdateTestConfig(key uuid.UUID, p PerformanceTestConfig) error

func (*TestProfilesPersister) WriteTestConfig

func (s *TestProfilesPersister) WriteTestConfig(key uuid.UUID, result []byte) error

WriteTestConfig persists the result

type User

type User struct {
	ID        string `json:"id,omitempty"`
	UserID    string `json:"user_id,omitempty"`
	FirstName string `json:"first_name,omitempty"`
	LastName  string `json:"last_name,omitempty"`
	AvatarURL string `json:"avatar_url,omitempty"`
	Provider  string `json:"provider,omitempty" db:"provider"`
	Email     string `json:"email,omitempty" db:"email"`
	Status    string `json:"string,omitempty"`
	Bio       string `json:"bio,omitempty" db:"bio"`

	RoleNames []string `json:"role_names,omitempty" db:"-"`
}

User - represents a user in Meshery

type UserKeys added in v0.6.124

type UserKeys struct {
	ID          string `json:"id,omitempty"`
	Owner       string `json:"owner,omitempty"`
	Function    string `json:"function,omitempty"`
	Category    string `json:"category,omitempty"`
	Description string `json:"description,omitempty"`
	Subcategory string `json:"subcategory,omitempty"`
	Created_at  string `json:"created_at,omitempty"`
	Updated_at  string `json:"updated_at,omitempty"`
	Deleted_at  string `json:"deleted_at,omitempty"`
}

type UserPref

type UserPref struct {
	User
	Preferences *Preference `json:"preferences,omitempty"`
}

UserPref - is just use to separate out the user info from preference

type UserPreference

type UserPreference struct {
	ID              string `json:"user_id"`
	PreferenceBytes []byte `json:"preference"`
}

type UserPrefsExtension

type UserPrefsExtension struct {
	Component string `json:"component,omitempty"`
	Type      string `json:"type,omitempty"`
}

UserPrefsExtension describes the user preference extension point in the UI

type UserPrefsExtensions

type UserPrefsExtensions []UserPrefsExtension

UserPrefsExtensions is a collection of UserPrefsExtension

type UserTestProfiles

type UserTestProfiles struct {
	Page        uint64                       `json:"page"`
	PageSize    uint64                       `json:"page_size"`
	TotalCount  int                          `json:"total_count"`
	TestConfigs []*SMP.PerformanceTestConfig `json:"test_configs"`
}

UserTestProfiles - represents a page of user test configs

type Workload

type Workload struct {
	Name      string  `yaml:"name,omitempty"`
	Count     int     `yaml:"count,omitempty"`
	CPUMCores float64 `yaml:"cpu_mCores,omitempty"`
	MemMb     float64 `yaml:"mem_mb,omitempty"`
}

Workload - holds workload info

type Workspace added in v0.7.5

type Workspace struct {
	ID             uuid.UUID    `json:"id,omitempty" db:"id"`
	Name           string       `json:"name,omitempty" db:"name"`
	OrganizationID uuid.UUID    `json:"organization_id,omitempty" db:"organization_id"`
	Description    string       `json:"description,omitempty" db:"description"`
	CreatedAt      time.Time    `json:"created_at,omitempty" db:"created_at"`
	UpdatedAt      time.Time    `json:"updated_at,omitempty" db:"updated_at"`
	DeletedAt      sql.NullTime `json:"deleted_at,omitempty" db:"deleted_at"`
}

type WorkspacePage added in v0.7.5

type WorkspacePage struct {
	Page       int         `json:"page"`
	PageSize   int         `json:"page_size"`
	TotalCount int         `json:"total_count"`
	Workspaces []Workspace `json:"workspaces"`
}

type WorkspacePayload added in v0.7.5

type WorkspacePayload struct {
	Name           string `json:"name,omitempty"`
	Description    string `json:"description,omitempty"`
	OrganizationID string `json:"organization_id,omitempty"`
}

type WorkspacesDesignsMapping added in v0.7.5

type WorkspacesDesignsMapping struct {
	ID          uuid.UUID    `json:"ID,omitempty" db:"id"`
	WorkspaceId uuid.UUID    `json:"workspace_id,omitempty" db:"workspace_id"`
	DesignId    uuid.UUID    `json:"design_id,omitempty" db:"design_id"`
	CreatedAt   time.Time    `json:"created_at,omitempty" db:"created_at"`
	UpdatedAt   time.Time    `json:"updated_at,omitempty" db:"updated_at"`
	DeletedAt   sql.NullTime `json:"deleted_at,omitempty" db:"deleted_at"`
}

type WorkspacesEnvironmentsMapping added in v0.7.5

type WorkspacesEnvironmentsMapping struct {
	ID            uuid.UUID    `json:"ID,omitempty" db:"id"`
	WorkspaceId   uuid.UUID    `json:"workspace_id,omitempty" db:"workspace_id"`
	EnvironmentId uuid.UUID    `json:"environment_id,omitempty" db:"environment_id"`
	CreatedAt     time.Time    `json:"created_at,omitempty" db:"created_at"`
	UpdatedAt     time.Time    `json:"updated_at,omitempty" db:"updated_at"`
	DeletedAt     sql.NullTime `json:"deleted_at,omitempty" db:"deleted_at"`
}

Jump to

Keyboard shortcuts

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