models

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter added in v0.0.6

type Adapter struct {
	Location string            `json:"adapter_location"`
	Name     string            `json:"name"`
	Ops      map[string]string `json:"ops"`
}

type AdaptersTrackerInterface added in v0.0.6

type AdaptersTrackerInterface interface {
	AddAdapter(context.Context, string)
	RemoveAdapter(context.Context, string)
	GetAdapters(context.Context) []string
}

type GrafanaBoard added in v0.0.6

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       []*GrafanaPanel        `json:"panels,omitempty"`
	Panels       []*sdk.Panel           `json:"panels,omitempty"`
	TemplateVars []*GrafanaTemplateVars `json:"template_vars,omitempty"`
}

type GrafanaDataSource added in v0.0.6

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

type GrafanaPanel added in v0.0.6

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

type GrafanaTemplateVars added in v0.0.6

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"`
}

type HandlerConfig

type HandlerConfig struct {
	SessionName   string
	RefCookieName string

	SessionStore sessions.Store

	SaaSTokenName string
	SaaSBaseURL   string

	AdapterTracker AdaptersTrackerInterface
	QueryTracker   QueryTrackerInterface

	Queue taskq.Queue
}

type HandlerInterface

type HandlerInterface interface {
	AuthMiddleware(next http.Handler) http.Handler

	LoginHandler(w http.ResponseWriter, r *http.Request)
	LogoutHandler(w http.ResponseWriter, req *http.Request)
	UserHandler(w http.ResponseWriter, r *http.Request)

	K8SConfigHandler(w http.ResponseWriter, r *http.Request)
	LoadTestHandler(w http.ResponseWriter, req *http.Request)
	CollectStaticMetrics(config *SubmitMetricsConfig) error
	FetchResultsHandler(w http.ResponseWriter, req *http.Request)

	MeshAdapterConfigHandler(w http.ResponseWriter, req *http.Request)
	MeshOpsHandler(w http.ResponseWriter, req *http.Request)
	GetAllAdaptersHandler(w http.ResponseWriter, req *http.Request)
	EventStreamHandler(w http.ResponseWriter, req *http.Request)

	GrafanaConfigHandler(w http.ResponseWriter, req *http.Request)
	GrafanaBoardsHandler(w http.ResponseWriter, req *http.Request)
	GrafanaQueryHandler(w http.ResponseWriter, req *http.Request)
	GrafanaQueryRangeHandler(w http.ResponseWriter, req *http.Request)

	PrometheusConfigHandler(w http.ResponseWriter, req *http.Request)
	GrafanaBoardImportForPrometheusHandler(w http.ResponseWriter, req *http.Request)
	PrometheusQueryHandler(w http.ResponseWriter, req *http.Request)
	PrometheusQueryRangeHandler(w http.ResponseWriter, req *http.Request)
	PrometheusStaticBoardHandler(w http.ResponseWriter, req *http.Request)
}

type LoadTestOptions added in v0.0.6

type LoadTestOptions struct {
	Name string
	URL  string

	HTTPQPS float64

	HTTPNumThreads int

	IsInsecure bool
	Duration   time.Duration

	Cert, Key, CACert string

	AllowInitialErrors bool

	IsGRPC           bool
	GRPCStreamsCount int
	GRPCDoHealth     bool
	GRPCHealthSvc    string
	GRPCDoPing       bool
	GRPCPingDelay    time.Duration
}

type MesheryResult added in v0.0.6

type MesheryResult struct {
	ID     uuid.UUID              `json:"meshery_id,omitempty"`
	Name   string                 `json:"name,omitempty"`
	Mesh   string                 `json:"mesh,omitempty"`
	Result map[string]interface{} `json:"runner_results,omitempty"`

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

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

type QueryTrackerInterface added in v0.0.6

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
}

type SubmitMetricsConfig added in v0.0.6

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

type User

type User struct {
	UserId    string `json:"user_id,omitempty"`
	FirstName string `json:"first_name,omitempty"`
	LastName  string `json:"last_name,omitempty"`
	AvatarURL string `json:"avatar_url,omitempty"`
}

User - represents a user in Meshery

Jump to

Keyboard shortcuts

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