package
0.0.0-20250307055322-04d9774b42d2
Repository: https://github.com/snetsystems/cloudhub.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
AddQueryConfig updates a cell by converting InfluxQL into queryconfigs If influxql cannot be represented by a full query config, then, the query config's raw text is set to the command.
AddQueryConfigs updates all the celsl in the dashboard to have query config objects corresponding to their influxql queries.
Assets creates a middleware that will serve a single page app.
AuthAPI adds the OAuth routes if auth is enabled.
AuthorizedToken extracts the token and validates; if valid the next handler will be run.
AuthorizedUser extracts the user name and provider from context.
BasicAuthAPI adds the Basic routes if auth is enabled.
BasicAuthWrapper returns http handlers that wraps the supplied handler with HTTP Basic authentication.
CorrectWidthHeight changes the cell to have at least the minimum width and height.
DashboardDefaults updates the dashboard with the default values if none are specified.
Error writes an JSON message.
ErrorBasic writes an JSON message by basic login.
FlushingHandler may not actually do anything, but it was ostensibly implemented to flush response writers that can be flushed for the purposes in the comment above.
FormatTestResultJSON is Test Result string to json format convert.
FormatTestResultJSONCompare compares two JSON strings and returns the differences in a formatted string.
GetServerInfluxDBs retrieves InfluxDB information from the server.
HasAuthorizedToken extracts the token from a request and validates it using the authenticator.
HasCorrectAxes verifies that only permitted axes exist within a DashboardCell.
HasCorrectColors verifies that the format of each color is correct.
HasCorrectLegend verifies that the format of the legend is correct.
HasCorrectQueryType ensures that all query types have a non-empty value.
Logger is middleware that logs the request.
MoveTimeShift moves TimeShift from the QueryConfig to the DashboardQuery.
NewAIConfig converts map to AI Struct.
NewConfigTemplatesManager creates a new ConfigTemplatesManager.
NewCustomLinks transforms `--custom-link` CLI flag data or `CUSTOM_LINKS` ENV var data into a data structure that the CloudHub client will expect.
NewDefaultURLPrefixer returns a URLPrefixer that will prefix any src and href attributes found in HTML as well as any url() directives found in CSS with the provided prefix.
NewMux attaches all the route handlers; handler returned servers cloudhub.
NewOSP converts map to OSP Struct.
NewSNMPManager initializes a new SNMP manager.
RawStoreAccess gives a super admin access to the data store without a facade.
Redoc serves the swagger JSON using the redoc package.
RemoveElements removes elements from the origin slice that are present in the delete slice.
RouteMatchesPrincipal checks that the organization on context matches the organization in the route.
SetQuit other go routine quit.
Spec servers the swagger.json file from bindata.
ToQueryConfig converts InfluxQL into queryconfigs If influxql cannot be represented by a full query config, then, the query config's raw text is set to the query.
ValidateDeviceIP checks if DeviceIP is a valid IPv4 or IPv6 address.
ValidateNote sanitizes note html against XSS attacks and validates note visibility.
ValidateQueryConfig checks any query config input.
ValidDashboardCellRequest verifies that the dashboard cells have a query and have the correct axes specified.
ValidDashboardRequest verifies that the dashboard cells have a query.
ValidDatabaseRequest checks if the database posted is valid.
ValidInfluxRequest checks if queries specify a command.
ValidRetentionPolicyRequest checks if a retention policy is valid on POST.
ValidRuleRequest checks if the requested rule change is valid.
ValidSourceRequest checks if name, url, type, and role are valid.
ValidTemplateRequest checks if the request sent to the server is the correct format.
ValidTopologRequest verifies that the topology.
# Constants
ChunkSize is the number of bytes per chunked transfer-encoding.
CollectorSelectionRatio determines the ratio criteria for selecting collectors and is intended for future use.
ML/DL Setting.
DebugDefault is the default item to load if 404.
DebugDir is the prefix of the assets in development mode.
Default is the default item to load if 404.
DefaultContentType is the content-type to return for the Default file.
DefaultHeight is used if not specified.
DefaultOrganizationID is the id of the default organization.
DefaultWidth is used if not specified.
Dir is prefix of the assets in the bindata.
Define constants for the learn states.
Define constants for the learn states.
Define constants for the learn states.
ErrNotFlusher.
enabled.
JSONType the mimetype for a json request.
ML/DL Setting.
LearnTaskField represents the learn_task template field.
ML/DL Setting.
LogstashTemplateField represents the logstash_gen template field.
Define constants for the learn states.
Define constants for the learn states.
ML/DL Setting.
MLFunctionGaussianStd represents an ML algorithm for Gaussian standard deviation calculations.
MLFunctionLinearDescent represents an ML algorithm for multiplication-based operations.
MLFunctionScalingNormalized represents an ML algorithm for scaling and normalization.
Define constants for the learn states.
Basic Login.
General Acitivity Logging.
CSP.
General Acitivity Logging.
General Acitivity Logging.
Dashboards Cells.
General Acitivity Logging.
General Acitivity Logging.
Dashboards.
General Acitivity Logging.
General Acitivity Logging.
Dashboards Templates.
General Acitivity Logging.
General Acitivity Logging.
Databases.
General Acitivity Logging.
General Acitivity Logging.
General Acitivity Logging.
Kapacitors.
General Acitivity Logging.
General Acitivity Logging.
Kapacitors Rules.
General Acitivity Logging.
General Acitivity Logging.
General Acitivity Logging.
Locked.
Mappings.
General Acitivity Logging.
General Acitivity Logging.
Network Device LogStash Config.
General Acitivity Logging.
General Acitivity Logging.
Network Device.
General Acitivity Logging.
General Acitivity Logging.
Network Device Org.
General Acitivity Logging.
General Acitivity Logging.
Organizations.
General Acitivity Logging.
General Acitivity Logging.
Organizations Users.
General Acitivity Logging.
General Acitivity Logging.
Retention Policies.
General Acitivity Logging.
General Acitivity Logging.
Retry.
General Acitivity Logging.
General Acitivity Logging.
Sources Roles.
General Acitivity Logging.
General Acitivity Logging.
Sources.
General Acitivity Logging.
General Acitivity Logging.
Sources Users.
General Acitivity Logging.
General Acitivity Logging.
SuperAdminNewUsers.
General Acitivity Logging.
Topologies.
General Acitivity Logging.
General Acitivity Logging.
General Acitivity Logging.
Users.
General Acitivity Logging.
General Acitivity Logging.
vSpheres.
General Acitivity Logging.
General Acitivity Logging.
PredictionTaskField represents the prediction_task template field.
ML/DL Setting.
Define constants for the learn states.
msg flag type.
ML/DL Setting.
ServerContextKey is the key used to specify that the server is making the requet via context.
msg flag type.
UserContextKey is the context key for retrieving the user off of context.
# Variables
BasicProvider is the name of the basic provider.
BasicScheme is the name of the basic scheme.
EmailKey is used to kapacitor via context.Context to request-scoped functions.
SecretKey is the name of password hash key.
# Structs
AllRoutes is a handler that returns all links to resources in CloudHub server, as well as external links for the client to know about, such as for JSON feeds or custom side nav buttons.
AssetsOpts configures the asset middleware.
ASTRequest ...
ASTResponse ...
AuthRoute are the routes for each type of OAuth2 provider.
BasicAuthRoute are the routes for each type of cloudhub provider.
ConfigTemplatesManager manages configuration templates.
CustomLink is a handler that returns a custom link to be used in server's routes response, within ExternalLinks.
ErrorMessage is the error response format for all service errors.
ErrorMessageBasic is the error response format for basic login service errors.
FailedDevice represents a structure for a failed device.
FilteredDeviceV3 is SNMP V3 device Info.
GoSNMPAdapter wraps gosnmp.GoSNMP to conform to SNMPInterface.
InfluxClient returns a new client to connect to OSS.
InfluxdbInfo InfluxDB access Info.
KapacitorStatus is the current state of a running task.
MinionResponse contains the lists of minions in various states.
MountableRouter is an implementation of a cloudhub.Router which supports prefixing each route of a Delegated cloudhub.Router with a prefix.
MultiDashboardBuilder builds a DashboardsStore backed by bolt and the filesystem.
MultiKapacitorBuilder implements KapacitorBuilder.
MultiLayoutBuilder implements LayoutBuilder and will return a Layouts.
MultiOrganizationBuilder builds a OrganizationsStore backed by bolt and the filesystem.
MultiProtoboardsBuilder implements LayoutBuilder and will return a Layouts.
MultiSourceBuilder implements SourcesBuilder.
MuxOpts are the options for the router.
OSP is to access to OpenStack API.
QueriesRequest converts all queries to queryConfigs with the help of the template variables.
QueriesResponse is the response for a QueriesRequest.
QueryRequest is query that will be converted to a queryConfig.
QueryResponse is the return result of a QueryRequest including the raw query, the templated query, the queryConfig and the queryAST.
RequestBody represents the structure of the request payload containing cells, user preferences, and topology options for the topology.
Response represents the overall response structure from the Salt API.
RetryPolicy retry policy server option.
ReturnData represents the data returned for each response entry.
ReturnWheelKeyListData contains the detailed data of the wheel key list.
Server for the CloudHub API.
Service handles REST calls to the persistence.
SNMPCollector collects SNMP data.
SNMPConfig holds the SNMP configuration.
SNMPManager manages SNMP operations and holds the configuration.
SNMPQuery represents an SNMP query.
SNMPResponse is SNMP Connection after Response.
Store implements the DataStore interface.
SuggestionResponse provides the parameters available for a given Flux function.
SuggestionsResponse provides a list of available Flux functions.
TemplateService ...
URLPrefixer is a wrapper for an http.Handler that will prefix all occurrences of a relative URL with the configured Prefix.
ValidTextTemplateRequest is the request json for validation.
WindowResize ssh terminal.
# Interfaces
DashboardBuilder is responsible for building dashboards.
DataStore is collection of resources that are used by the Service Abstracting this into an interface was useful for isolated testing.
KapacitorBuilder builds a KapacitorStore.
LayoutBuilder is responsible for building Layouts.
OrganizationBuilder is responsible for building dashboards.
ProtoboardsBuilder is responsible for building Protoboards.
SNMPInterface defines the required methods for interacting with SNMP.
SourcesBuilder builds a MultiSourceStore.
TimeSeriesClient returns the correct client for a time series database.
# Type aliases
AuthRoutes contains all OAuth2 provider routes.
Params are params.
RetryPolicys all retry oplicy.