handler

package
v0.0.0-...-0490640 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 75 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SERVICE_NAME = "automate-gateway"

Functions

func NewLegacyIngestServer

func NewLegacyIngestServer(ingestStatusClient ingest.IngestStatusClient) *legacyIngestServer

func NewNotificationsServer

func NewNotificationsServer(notificationsClient notifications.NotificationsClient) *notificationsServer

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) GetServiceGroups

GetServiceGroups returns a list of service groups

func (*Applications) GetServiceGroupsHealthCounts

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) GetVersion

GetVersion fetches the version of team service

type AuthzServer

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

AuthzServer is the server interface

func NewAuthzServer

func NewAuthzServer(
	client authz.AuthorizationClient,
	clientV2 authzV2.AuthorizationClient,
	filterHandler middleware.SwitchingFilterHandler,
) *AuthzServer

NewAuthzServer creates a server with its client

func (*AuthzServer) CreatePolicy

CreatePolicy creates a new policy in authz-service.

func (*AuthzServer) DeletePolicy

DeletePolicy removes a policy from authz-service by id.

func (*AuthzServer) GetVersion

GetVersion returns service version

func (*AuthzServer) Introspect

Introspect returns a list of the supported HTTP methods with a Boolean status indicating allowed or denied, for the given, single endpoint. This method must be used for parameterized endpoints but may also be used for non-parameterized endpoints.

func (*AuthzServer) IntrospectAll

IntrospectAll returns a list of all HTTP endpoints the requestor has access to and, for each endpoint, a map of the supported HTTP methods with a Boolean status indicating allowed or denied.

func (*AuthzServer) IntrospectAllProjects

IntrospectAllProjects returns a list of all projects the requestor has access to.

func (*AuthzServer) IntrospectSome

IntrospectSome returns a list of the supported HTTP methods with a Boolean status indicating allowed or denied, for each endpoint in the request list. All supplied endpoints must be non-parameterized.

func (*AuthzServer) ListPolicies

ListPolicies returns an array of all policy objects that currently exist in authz-service.

type CfgMgmtServer

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

CfgMgmtServer stores client

func NewCfgMgmtServer

func NewCfgMgmtServer(cfgMgmtClient cmsService.CfgMgmtClient) *CfgMgmtServer

NewCfgMgmtServer initializes CfgMgmtServer with client

func (*CfgMgmtServer) GetAttributes

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

func (*CfgMgmtServer) GetNodeRun

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

GetNodeRun returns the requested run

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) 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) 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

type ChefIngestJobSchedulerServer

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

func NewChefIngestJobSchedulerServer

func NewChefIngestJobSchedulerServer(jobSchedulerClient ingest.JobSchedulerClient) *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) StartJobScheduler

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

StartJobScheduler - Start the Job Scheduler

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) StopJobScheduler

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

StopJobScheduler - Stop the Job Scheduler

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.ChefIngesterClient, 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 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(cfgMgmtClient cmsService.CfgMgmtClient, feedClient ccFeed.FeedServiceClient) *EventFeedServer

NewEventFeedServer creates a new server instance

func (*EventFeedServer) GetEventFeed

func (s *EventFeedServer) GetEventFeed(ctx context.Context,
	request *agReq.EventFilter) (*agRes.Events, error)

GetEventFeed returns a list of all Events

func (*EventFeedServer) GetEventStringBuckets

func (s *EventFeedServer) GetEventStringBuckets(ctx context.Context,
	request *agReq.EventStrings) (*agRes.EventStrings, error)

GetEventStringBuckets - gets the buckets for the guitar strings

func (*EventFeedServer) GetEventTaskCounts

func (s *EventFeedServer) GetEventTaskCounts(ctx context.Context,
	request *agReq.EventCountsFilter) (*agRes.EventCounts, error)

GetEventTaskCounts - gets event type counts

func (*EventFeedServer) GetEventTypeCounts

func (s *EventFeedServer) GetEventTypeCounts(ctx context.Context,
	request *agReq.EventCountsFilter) (*agRes.EventCounts, error)

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.LicenseControlClient,
	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 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 TeamsServer

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

func NewTeamsServer

func NewTeamsServer(client teams.TeamsV1Client) *TeamsServer

func (*TeamsServer) AddUsers

AddUsers puts an array of userIDs to a team upstream

func (*TeamsServer) CreateTeam

CreateTeam posts a team upstream

func (*TeamsServer) DeleteTeam

DeleteTeam deletes a team upstream

func (*TeamsServer) GetTeam

GetTeam fetches a single team by ID

func (*TeamsServer) GetTeams

func (a *TeamsServer) GetTeams(ctx context.Context, _ *gwreq.GetTeamsReq) (*gwres.Teams, error)

GetTeams fetches an array of existing teams

func (*TeamsServer) GetTeamsForUser

GetTeamsForUser returns all the teams for a specific user

func (*TeamsServer) GetUsers

GetUsers returns an array of userIDs for a team downstream

func (*TeamsServer) GetVersion

GetVersion fetches the version of team service

func (*TeamsServer) RemoveUsers

RemoveUsers deletes an array of userIDs from a team upstream

func (*TeamsServer) UpdateTeam

UpdateTeam updates a team upstream

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 TokensServer

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

TokensServer stores token

func NewTokensMgmtServer

func NewTokensMgmtServer(tokensMgmtClient authn.TokensMgmtClient) *TokensServer

NewTokensMgmtServer initializes Server with client

func (*TokensServer) CreateToken

func (a *TokensServer) CreateToken(ctx context.Context, r *authReq.CreateToken) (*authRes.Token, error)

func (*TokensServer) DeleteToken

func (a *TokensServer) DeleteToken(ctx context.Context, r *authReq.Uuid) (*authRes.DeleteTokenResp, error)

func (*TokensServer) GetToken

func (a *TokensServer) GetToken(ctx context.Context, r *authReq.Uuid) (*authRes.Token, error)

func (*TokensServer) GetTokens

func (a *TokensServer) GetTokens(ctx context.Context, _ *authReq.GetTokensReq) (*authRes.Tokens, error)

func (*TokensServer) UpdateToken

func (a *TokensServer) UpdateToken(ctx context.Context, r *authReq.UpdateToken) (*authRes.Token, error)

type UsersServer

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

UsersServer stores client to an upstream auth service

func NewUsersMgmtServer

func NewUsersMgmtServer(client local_user.UsersMgmtClient) *UsersServer

NewUsersMgmtServer initializes Server with client

func (*UsersServer) CreateUser

CreateUser posts a user upstream

func (*UsersServer) DeleteUser

DeleteUser deletes an existing user from upstream Deprecated: 20180424200344 -----------------------------------------------

func (*UsersServer) DeleteUserByUsername

func (a *UsersServer) DeleteUserByUsername(ctx context.Context,
	r *localUserReq.Username) (*localUserRes.DeleteUserResp, error)

DeleteUserByUsername deletes an existing user upstream

func (*UsersServer) GetUser

GetUser fetches an existing user from upstream Deprecated: 20180424200344

func (*UsersServer) GetUserByUsername

func (a *UsersServer) GetUserByUsername(ctx context.Context,
	r *localUserReq.Username) (*localUserRes.User, error)

GetUserByUsername fetches an existing user from upstream

func (*UsersServer) GetUsers

GetUsers fetches a map of existing users and extracts each user into an array

func (*UsersServer) UpdateSelf

UpdateSelf allows a user to update their own info, requiring the previous password if they want to change password.

func (*UsersServer) UpdateUser

UpdateUser updates an existing user.

Directories

Path Synopsis
iam

Jump to

Keyboard shortcuts

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