handler

package
v0.0.0-...-4fe8a44 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 69 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SERVICE_NAME = "automate-gateway"

Functions

func FindKeyValue

func FindKeyValue(tags []*query.Kv, key string) (*query.Kv, bool)

FindKeyValue finds a Tag object in the array based on key match

func NewLegacyIngestServer

func NewLegacyIngestServer(ingestStatusClient ingest.IngestStatusServiceClient) *legacyIngestServer

func NewNotificationsServer

func NewNotificationsServer(notificationsClient notifications.NotificationsClient) *notificationsServer

func RemoveKeyValue

func RemoveKeyValue(tags []*query.Kv, key string) []*query.Kv

RemoveKeyValue removes an item from the array base on key match

func ToUUID

func ToUUID(id string) string

Types

type Applications

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

Applications - the applications service data structure

func NewApplicationsHandler

func NewApplicationsHandler(applicationsClient applications.ApplicationsServiceClient) *Applications

NewApplicationsHandler - create a new applications service handler

func (*Applications) DeleteDisconnectedServices

func (a *Applications) DeleteDisconnectedServices(
	ctx context.Context,
	request *applications.DisconnectedServicesReq) (*applications.ServicesRes, error)

func (*Applications) DeleteServicesByID

func (a *Applications) DeleteServicesByID(
	ctx context.Context,
	request *applications.DeleteServicesByIDReq) (*applications.ServicesRes, error)

func (*Applications) FindServices

func (*Applications) GetDeleteDisconnectedServicesConfig

func (a *Applications) GetDeleteDisconnectedServicesConfig(
	ctx context.Context,
	request *applications.GetDeleteDisconnectedServicesConfigReq) (*applications.PeriodicJobConfig, error)

func (*Applications) GetDisconnectedServices

func (a *Applications) GetDisconnectedServices(
	ctx context.Context,
	request *applications.DisconnectedServicesReq) (*applications.ServicesRes, error)

func (*Applications) GetServiceGroups

func (a *Applications) GetServiceGroups(
	ctx context.Context,
	request *applications.ServiceGroupsReq) (*applications.ServiceGroups, error)

GetServiceGroups returns a list of service groups

func (*Applications) GetServiceGroupsHealthCounts

func (a *Applications) GetServiceGroupsHealthCounts(
	ctx context.Context,
	request *applications.ServiceGroupsHealthCountsReq) (*applications.HealthCounts, error)

GetServiceGroupsHealthCounts returns the health counts from all service groups

func (*Applications) GetServices

GetServices returns a list of services

func (*Applications) GetServicesBySG

GetServicesBySG returns a list of services within a service-group

func (*Applications) GetServicesStats

func (*Applications) GetServicesUsageCount

GetServicesUsageCount fetches the count of service

func (*Applications) GetVersion

GetVersion fetches the version of team service

func (*Applications) UpdateTelemetryReported

UpdateTelemetryReported Updates the application services telemetry reported date in postgres

type CdsServer

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

CdsServer stores inter-service automate-cds client

func NewCdsServer

func NewCdsServer(client inter_service.AutomateCdsServiceClient) *CdsServer

NewCdsServer initializes CdsServer with client

func (*CdsServer) InstallContentItem

func (s *CdsServer) InstallContentItem(ctx context.Context,
	request *request.InstallContentItem) (*response.InstallContentItem, error)

InstallContentItem - Returns a list of CDS content metadata

func (*CdsServer) IsContentEnabled

func (s *CdsServer) IsContentEnabled(ctx context.Context,
	request *request.ContentEnabled) (*response.ContentEnabled, error)

IsContentEnabled - check if content is enabled

func (*CdsServer) ListContentItems

func (s *CdsServer) ListContentItems(ctx context.Context,
	request *request.ContentItems) (*response.ContentItems, error)

ListContentItems - Returns a list of CDS content metadata

func (*CdsServer) SubmitCredentials

func (s *CdsServer) SubmitCredentials(ctx context.Context,
	request *request.Credentials) (*response.Credentials, error)

SubmitToken - submit a token to enable content

type CfgMgmtServer

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

CfgMgmtServer stores client

func NewCfgMgmtServer

func NewCfgMgmtServer(cfgMgmtClient cmsService.CfgMgmtServiceClient) *CfgMgmtServer

NewCfgMgmtServer initializes CfgMgmtServer with client

func (*CfgMgmtServer) CreateRollout

func (a *CfgMgmtServer) CreateRollout(ctx context.Context, req *cfgReq.CreateRollout) (*cfgRes.Rollout, error)

func (*CfgMgmtServer) CreateRolloutTest

func (a *CfgMgmtServer) CreateRolloutTest(ctx context.Context, req *cfgReq.CreateRolloutTest) (*cfgRes.CreateRolloutTest, error)

func (*CfgMgmtServer) GetAttributes

func (s *CfgMgmtServer) GetAttributes(ctx context.Context, request *cfgReq.Node) (*cfgRes.NodeAttribute, error)

func (*CfgMgmtServer) GetCheckInCountsTimeSeries

func (s *CfgMgmtServer) GetCheckInCountsTimeSeries(ctx context.Context,
	request *cfgReq.CheckInCountsTimeSeries) (*cfgRes.CheckInCountsTimeSeries, error)

GetCheckInCountsTimeSeries - Returns a daily time series of unique node check-ins for the number of day requested

func (*CfgMgmtServer) GetErrors

func (s *CfgMgmtServer) GetErrors(ctx context.Context, request *cfgReq.Errors) (*cfgRes.Errors, error)

func (*CfgMgmtServer) GetMissingNodeDurationCounts

func (s *CfgMgmtServer) GetMissingNodeDurationCounts(ctx context.Context,
	request *cfgReq.MissingNodeDurationCounts) (*cfgRes.MissingNodeDurationCounts, error)

func (*CfgMgmtServer) GetNodeMetadataCounts

func (s *CfgMgmtServer) GetNodeMetadataCounts(ctx context.Context,
	request *cfgReq.NodeMetadataCounts) (*cfgRes.NodeMetadataCounts, error)

GetNodeMetadataCounts - For each type of field provided return distinct values the amount for each. For example, if the 'platform' field is requested 'windows' 10, 'redhat' 5, and 'ubuntu' 8 could be returned. The number next to each represents the number of nodes with that type of platform.

func (*CfgMgmtServer) GetNodeRun

func (s *CfgMgmtServer) GetNodeRun(ctx context.Context, request *cfgReq.NodeRun) (*cfgRes.Run, error)

GetNodeRun returns the requested run

func (*CfgMgmtServer) GetNodeRunsDailyStatusTimeSeries

func (s *CfgMgmtServer) GetNodeRunsDailyStatusTimeSeries(ctx context.Context,
	request *cfgReq.NodeRunsDailyStatusTimeSeries) (*cfgRes.NodeRunsDailyStatusTimeSeries, error)

GetNodeRunsDailyStatusTimeSeries - Provides the status of runs for each 24-hour duration. For multiple runs in one 24-hour duration, the most recent failed run will be returned. If there are no failed runs the most recent successful run will be returned. If no runs are found in the 24-hour duration, the status will be "missing" and no run information will be returned.

func (*CfgMgmtServer) GetNodes

func (s *CfgMgmtServer) GetNodes(ctx context.Context, request *cfgReq.Nodes) (*gpStruct.ListValue, error)

GetNodes returns an array of Nodes returned from the Cfgmgmt (a.k.a. config-mgmt) Service

func (*CfgMgmtServer) GetNodesCounts

func (s *CfgMgmtServer) GetNodesCounts(ctx context.Context, request *cfgReq.NodesCounts) (*cfgRes.NodesCounts, error)

GetNodesCounts returns the nodes counts

func (*CfgMgmtServer) GetNodesUsageCount

GetNodesUsageCount returns the count of unique nodes with lastRun in a given time.

func (*CfgMgmtServer) GetOrganizations

func (s *CfgMgmtServer) GetOrganizations(ctx context.Context, e *cfgReq.Organizations) (*gpStruct.ListValue, error)

GetOrganizations returns the names of every organization for the configuration management service

func (*CfgMgmtServer) GetPolicyCookbooks

func (s *CfgMgmtServer) GetPolicyCookbooks(ctx context.Context, request *cfgReq.PolicyRevision) (*cfgRes.PolicyCookbooks, error)

GetPolicyCookbooks returns PolicyCookbooks with their policy identifiers based on a policy revision ID.

func (*CfgMgmtServer) GetRolloutById

func (a *CfgMgmtServer) GetRolloutById(ctx context.Context, req *cfgReq.RolloutById) (*cfgRes.Rollout, error)

func (*CfgMgmtServer) GetRolloutForChefRun

func (a *CfgMgmtServer) GetRolloutForChefRun(context.Context, *cfgReq.RolloutForChefRun) (*cfgRes.Rollout, error)

func (*CfgMgmtServer) GetRollouts

func (a *CfgMgmtServer) GetRollouts(ctx context.Context, req *cfgReq.Rollouts) (*cfgRes.Rollouts, error)

func (*CfgMgmtServer) GetRuns

func (s *CfgMgmtServer) GetRuns(ctx context.Context, request *cfgReq.Runs) (*gpStruct.ListValue, error)

GetRuns returns an array of Runs returned from the Cfgmgmt (a.k.a. config-mgmt) Service

func (*CfgMgmtServer) GetRunsCounts

func (s *CfgMgmtServer) GetRunsCounts(ctx context.Context, request *cfgReq.RunsCounts) (*cfgRes.RunsCounts, error)

GetRunsCounts returns the runs counts

func (*CfgMgmtServer) GetSourceFqdns

func (s *CfgMgmtServer) GetSourceFqdns(ctx context.Context, e *cfgReq.SourceFqdns) (*gpStruct.ListValue, error)

GetSourceFqdns returns the names of every organization for the configuration management service

func (*CfgMgmtServer) GetSuggestions

func (s *CfgMgmtServer) GetSuggestions(ctx context.Context, request *sharedReq.Suggestion) (*gpStruct.ListValue, error)

Get suggestions returns an array of suggestions from config management

func (*CfgMgmtServer) GetVersion

GetVersion returns the version info for the configuration management service

func (*CfgMgmtServer) UpdateTelemetryReported

UpdateTelemetryReported Updates the last client run telemetry reported date in postgres

type ChefIngestJobSchedulerServer

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

func NewChefIngestJobSchedulerServer

func NewChefIngestJobSchedulerServer(jobSchedulerClient ingest.JobSchedulerServiceClient) *ChefIngestJobSchedulerServer

func (*ChefIngestJobSchedulerServer) ConfigureDeleteNodesScheduler

func (server *ChefIngestJobSchedulerServer) ConfigureDeleteNodesScheduler(ctx context.Context,
	config *req.SchedulerConfig) (*res.ConfigureDeleteNodesScheduler, error)

ConfigureDeleteNodesScheduler changed the configurations for the delete node scheduler

func (*ChefIngestJobSchedulerServer) ConfigureMissingNodesForDeletionScheduler

func (server *ChefIngestJobSchedulerServer) ConfigureMissingNodesForDeletionScheduler(ctx context.Context,
	config *req.SchedulerConfig) (*res.ConfigureMissingNodesForDeletionScheduler, error)

ConfigureMissingNodesForDeletionScheduler changed the configurations for mark missing nodes for deletion scheduler

func (*ChefIngestJobSchedulerServer) ConfigureNodesMissingScheduler

func (server *ChefIngestJobSchedulerServer) ConfigureNodesMissingScheduler(ctx context.Context, parameters *req.SchedulerConfig) (*res.ConfigureNodesMissingScheduler, error)

ConfigureNodesMissingScheduler rpc call to configure the NodesMissing Job

func (*ChefIngestJobSchedulerServer) DeleteMarkedNodes

func (server *ChefIngestJobSchedulerServer) DeleteMarkedNodes(ctx context.Context, empty *req.DeleteMarkedNodes) (*res.DeleteMarkedNodes, error)

DeleteMarkedNodes - run the delete node task now

func (*ChefIngestJobSchedulerServer) GetStatusJobScheduler

func (server *ChefIngestJobSchedulerServer) GetStatusJobScheduler(ctx context.Context, empty *req.GetStatusJobScheduler) (*res.JobSchedulerStatus, error)

GetStatusJobScheduler - collect and return the status of all the jobs in the Job Scheduler

func (*ChefIngestJobSchedulerServer) MarkMissingNodesForDeletion

MarkMissingNodesForDeletion - run the mark missing nodes for deletion task now

func (*ChefIngestJobSchedulerServer) MarkNodesMissing

func (server *ChefIngestJobSchedulerServer) MarkNodesMissing(ctx context.Context, empty *req.MarkNodesMissing) (*res.MarkNodesMissing, error)

MarkNodesMissing - run the mark nodes missing task now

func (*ChefIngestJobSchedulerServer) StartDeleteNodesScheduler

StartDeleteNodesScheduler - start the scheduled task of deleting nodes

func (*ChefIngestJobSchedulerServer) StartMissingNodesForDeletionScheduler

StartMissingNodesForDeletionScheduler - start the scheduled task mark missing nodes for deletion

func (*ChefIngestJobSchedulerServer) StartNodesMissingScheduler

StartNodesMissingScheduler - start the scheduled task of deleting nodes

func (*ChefIngestJobSchedulerServer) StopDeleteNodesScheduler

StopDeleteNodesScheduler - stop the scheduled delete node task from running

func (*ChefIngestJobSchedulerServer) StopMissingNodesForDeletionScheduler

StopMissingNodesForDeletionScheduler - stop the scheduled mark missing nodes for deletion task from running

func (*ChefIngestJobSchedulerServer) StopNodesMissingScheduler

StopNodesMissingScheduler - stop the scheduled delete node task from running

type ChefIngestServer

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

func NewChefIngestServer

func NewChefIngestServer(automateUrl *url.URL, ingesterClient ingest.ChefIngesterServiceClient, notifierClient notifier.Notifier) *ChefIngestServer

func (*ChefIngestServer) GetVersion

func (*ChefIngestServer) ProcessChefAction

func (*ChefIngestServer) ProcessChefRun

func (s *ChefIngestServer) ProcessChefRun(ctx context.Context, request *ingestReq.Run) (*ingestResp.ProcessChefRunResponse, error)

func (*ChefIngestServer) ProcessLivenessPing

func (s *ChefIngestServer) ProcessLivenessPing(ctx context.Context, request *ingestReq.Liveness) (*ingestResp.ProcessLivenessResponse, error)

func (*ChefIngestServer) ProcessNodeDelete

type Datafeed

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

Secrets - the data_feed service data structure

func NewDatafeedHandler

func NewDatafeedHandler(datafeedClient data_feed.DatafeedServiceClient) *Datafeed

NewDatafeedHandler - create a new datafeed service handler

func (*Datafeed) AddDestination

Create - create a new destination

func (*Datafeed) DeleteDestination

Delete - delete an existing destination

func (*Datafeed) GetDestination

GetDestination - get the destination information for one destination.

func (*Datafeed) ListDestinations

List - List the stored destinations

func (*Datafeed) UpdateDestination

Update - update an existing destination

type DeploymentServer

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

func NewDeploymentServer

func NewDeploymentServer(dc api.DeploymentClient) *DeploymentServer

func (*DeploymentServer) GetVersion

func (s *DeploymentServer) GetVersion(ctx context.Context, _ *gp.Empty) (*deployment.Version, error)

type EventFeedServer

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

EventFeedServer stores client

func NewEventFeedServer

func NewEventFeedServer(feedClient event_feed_api.EventFeedServiceClient) *EventFeedServer

NewEventFeedServer creates a new server instance

func (*EventFeedServer) EventExport

EventExport - downloading events as JSON or CSV

func (*EventFeedServer) GetEventFeed

GetEventFeed returns a list of all Events

func (*EventFeedServer) GetEventStringBuckets

GetEventStringBuckets - gets the buckets for the guitar strings

func (*EventFeedServer) GetEventTaskCounts

GetEventTaskCounts - gets event type counts

func (*EventFeedServer) GetEventTypeCounts

GetEventTypeCounts - gets event type counts

type Gateway

type Gateway struct{}

func NewGatewayServer

func NewGatewayServer() *Gateway

func (*Gateway) GetHealth

func (m *Gateway) GetHealth(ctx context.Context, empty *gp.Empty) (*pb.Health, error)

GetHealth returns the health of the service

func (*Gateway) GetVersion

func (m *Gateway) GetVersion(ctx context.Context, empty *gp.Empty) (*pb.Version, error)

GetVersion returns the service version

type LicenseServer

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

func NewLicenseServer

func NewLicenseServer(
	client license_control.LicenseControlServiceClient,
	deployClient deployment_service.DeploymentClient,
	trialLicenseURL *url.URL) *LicenseServer

NewLicenseServer returns the initialized state of the license handlers: a client to license-control-service and the URL of trial-license-service

func (*LicenseServer) ApplyLicense

ApplyLicense applies the provided license token (provided as string JWT) to the system.

func (*LicenseServer) GetStatus

GetStatus queries l-c-s for the status of the license currently in use

func (*LicenseServer) RequestLicense

type NodeManager

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

func NewNodeManagerHandler

func NewNodeManagerHandler(nodeManagerClient nodeManagerService.NodeManagerServiceClient, jobsClient jobsService.JobsServiceClient) *NodeManager

func (*NodeManager) Connect

func (a *NodeManager) Connect(ctx context.Context, in *manager.Id) (*manager.ConnectResponse, error)

func (*NodeManager) Create

func (a *NodeManager) Create(ctx context.Context, in *manager.NodeManager) (*manager.Ids, error)

func (*NodeManager) Delete

func (a *NodeManager) Delete(ctx context.Context, in *manager.Id) (*gp.Empty, error)

func (*NodeManager) DeleteWithNodeStateStopped

func (a *NodeManager) DeleteWithNodeStateStopped(ctx context.Context, in *manager.Id) (*gp.Empty, error)

func (*NodeManager) DeleteWithNodeStateTerminated

func (a *NodeManager) DeleteWithNodeStateTerminated(ctx context.Context, in *manager.Id) (*gp.Empty, error)

func (*NodeManager) DeleteWithNodes

func (a *NodeManager) DeleteWithNodes(ctx context.Context, in *manager.Id) (*manager.Ids, error)

func (*NodeManager) List

func (*NodeManager) Read

func (a *NodeManager) Read(ctx context.Context, in *manager.Id) (*manager.NodeManager, error)

func (*NodeManager) SearchNodeFields

func (a *NodeManager) SearchNodeFields(ctx context.Context, in *manager.FieldQuery) (*manager.Fields, error)

func (*NodeManager) SearchNodes

func (a *NodeManager) SearchNodes(ctx context.Context, in *manager.NodeQuery) (*manager.Nodes, error)

func (*NodeManager) Update

func (a *NodeManager) Update(ctx context.Context, in *manager.NodeManager) (*gp.Empty, error)

type Nodes

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

func NewNodesHandler

func NewNodesHandler(nodesClient nodesService.NodesServiceClient, jobsClient jobsService.JobsServiceClient) *Nodes

func (*Nodes) BulkCreate

func (a *Nodes) BulkCreate(ctx context.Context, in *nodes.Nodes) (*nodes.Ids, error)

func (*Nodes) BulkDelete

func (a *Nodes) BulkDelete(ctx context.Context, in *nodes.Query) (*nodes.BulkDeleteResponse, error)

func (*Nodes) BulkDeleteById

func (a *Nodes) BulkDeleteById(ctx context.Context, in *nodes.Ids) (*nodes.BulkDeleteResponse, error)

func (*Nodes) Create

func (a *Nodes) Create(ctx context.Context, in *nodes.Node) (*nodes.Id, error)

func (*Nodes) Delete

func (a *Nodes) Delete(ctx context.Context, in *nodes.Id) (*gp.Empty, error)

func (*Nodes) List

func (a *Nodes) List(ctx context.Context, in *nodes.Query) (*nodes.Nodes, error)

func (*Nodes) Read

func (a *Nodes) Read(ctx context.Context, in *nodes.Id) (*nodes.Node, error)

func (*Nodes) Rerun

func (a *Nodes) Rerun(ctx context.Context, in *nodes.Id) (*nodes.RerunResponse, error)

func (*Nodes) Update

func (a *Nodes) Update(ctx context.Context, in *nodes.Node) (*gp.Empty, error)

type ReportManager

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

func NewReportManagerHandler

func NewReportManagerHandler(reportManagerClient reportManagerService.ReportManagerServiceClient) *ReportManager

func (*ReportManager) ListDownloadReportRequests

func (r *ReportManager) ListDownloadReportRequests(ctx context.Context, in *empty.Empty) (*report_manager.ListDownloadReportRequestsResponse, error)

type Secrets

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

Secrets - the secrets service data structure

func NewSecretsHandler

func NewSecretsHandler(secretClient secrets.SecretsServiceClient) *Secrets

NewSecretsHandler - create a new secrets service handler

func (*Secrets) Create

func (a *Secrets) Create(ctx context.Context, in *secrets.Secret) (*secrets.Id, error)

Create - create a new secret

func (*Secrets) Delete

func (a *Secrets) Delete(ctx context.Context, in *secrets.Id) (*secrets.DeleteResponse, error)

Delete - delete an existing secret

func (*Secrets) List

func (a *Secrets) List(ctx context.Context, in *secrets.Query) (*secrets.Secrets, error)

List - List the stored secret based off the provided query

func (*Secrets) Read

func (a *Secrets) Read(ctx context.Context, in *secrets.Id) (*secrets.Secret, error)

Read - read the stored information for one secret.

func (*Secrets) Update

func (a *Secrets) Update(ctx context.Context, in *secrets.Secret) (*secrets.UpdateResponse, error)

Update - update an existing secret

type TelemetryServer

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

func (*TelemetryServer) GetTelemetryConfiguration

func (t *TelemetryServer) GetTelemetryConfiguration(ctx context.Context, request *telemetry.TelemetryRequest) (*telemetry.TelemetryResponse, error)

GetTelemetryConfiguration returns the license and telemetry information

type UserSettingsServiceServer

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

func (*UserSettingsServiceServer) DeleteUserSettings

Directories

Path Synopsis
iam

Jump to

Keyboard shortcuts

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