graph

package
v0.0.0-...-110fe3a Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 72 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(config gengql.Config, log logrus.FieldLogger) (*handler.Server, error)

NewHandler creates and returns a new GraphQL handler with the given configuration

func ValidateDateInterval

func ValidateDateInterval(from, to scalar.Date) error

ValidateDateInterval will validate a from => to date interval used for querying costs.

Types

type ClusterInfo

type ClusterInfo struct {
	GCP bool
}

type ClusterList

type ClusterList map[string]ClusterInfo

func (ClusterList) GCPClusters

func (c ClusterList) GCPClusters() []string

func (ClusterList) Names

func (c ClusterList) Names() []string

type DailyCosts

type DailyCosts map[string]map[scalar.Date]float64

type HookdClient

type HookdClient interface {
	Deployments(ctx context.Context, opts ...hookd.RequestOption) ([]hookd.Deploy, error)
	ChangeDeployKey(ctx context.Context, team string) (*hookd.DeployKey, error)
	DeployKey(ctx context.Context, team string) (*hookd.DeployKey, error)
}

type Metrics

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

func NewMetrics

func NewMetrics(meter metric.Meter) (*Metrics, error)

func (*Metrics) ExtensionName

func (a *Metrics) ExtensionName() string

func (*Metrics) InterceptField

func (a *Metrics) InterceptField(ctx context.Context, next graphql.Resolver) (interface{}, error)

func (*Metrics) InterceptResponse

func (a *Metrics) InterceptResponse(ctx context.Context, next graphql.ResponseHandler) *graphql.Response

func (*Metrics) Validate

func (a *Metrics) Validate(_ graphql.ExecutableSchema) error

type Resolver

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

func NewResolver

func NewResolver(hookdClient HookdClient,
	k8sClient *k8s.Client,
	vulnerabilitiesMgr *vulnerabilities.Manager,
	resourceUsageClient resourceusage.ResourceUsageClient,
	db database.Database,
	tenant string,
	tenantDomain string,
	usersyncTrigger chan<- uuid.UUID,
	auditLogger auditlogger.AuditLogger,
	clusters ClusterList,
	pubsubTopic *pubsub.Topic,
	log logrus.FieldLogger,
	sqlInstanceClient *sqlinstance.Client,
	bucketClient *bucket.Client,
	redisClient *redis.Client,
	bigQueryDatasetClient *bigquery.Client,
	openSearchClient *opensearch.Client,
	kafkaClient *kafka.Client,
	unleashMgr *unleash.Manager,
	auditer *audit.Auditor,
	slack slack.SlackClient,
) *Resolver

NewResolver creates a new GraphQL resolver with the given dependencies

func (*Resolver) AnalysisTrail

func (r *Resolver) AnalysisTrail() gengql.AnalysisTrailResolver

func (*Resolver) App

func (r *Resolver) App() gengql.AppResolver

func (*Resolver) AppUtilization

func (r *Resolver) AppUtilization() gengql.AppUtilizationResolver

func (*Resolver) AppUtilizationData

func (r *Resolver) AppUtilizationData() gengql.AppUtilizationDataResolver

func (*Resolver) AuditEventMemberAdded

func (r *Resolver) AuditEventMemberAdded() gengql.AuditEventMemberAddedResolver

func (*Resolver) AuditEventMemberRemoved

func (r *Resolver) AuditEventMemberRemoved() gengql.AuditEventMemberRemovedResolver

func (*Resolver) AuditEventMemberSetRole

func (r *Resolver) AuditEventMemberSetRole() gengql.AuditEventMemberSetRoleResolver

func (*Resolver) AuditEventTeamAddRepository

func (r *Resolver) AuditEventTeamAddRepository() gengql.AuditEventTeamAddRepositoryResolver

func (*Resolver) AuditEventTeamRemoveRepository

func (r *Resolver) AuditEventTeamRemoveRepository() gengql.AuditEventTeamRemoveRepositoryResolver

func (*Resolver) AuditEventTeamSetAlertsSlackChannel

func (r *Resolver) AuditEventTeamSetAlertsSlackChannel() gengql.AuditEventTeamSetAlertsSlackChannelResolver

func (*Resolver) AuditEventTeamSetDefaultSlackChannel

func (r *Resolver) AuditEventTeamSetDefaultSlackChannel() gengql.AuditEventTeamSetDefaultSlackChannelResolver

func (*Resolver) AuditEventTeamSetPurpose

func (r *Resolver) AuditEventTeamSetPurpose() gengql.AuditEventTeamSetPurposeResolver

func (*Resolver) BaseAuditEvent

func (r *Resolver) BaseAuditEvent() gengql.BaseAuditEventResolver

func (*Resolver) BigQueryDataset

func (r *Resolver) BigQueryDataset() gengql.BigQueryDatasetResolver

func (*Resolver) Bucket

func (r *Resolver) Bucket() gengql.BucketResolver

func (*Resolver) DeployInfo

func (r *Resolver) DeployInfo() gengql.DeployInfoResolver

func (*Resolver) Env

func (r *Resolver) Env() gengql.EnvResolver

func (*Resolver) Finding

func (r *Resolver) Finding() gengql.FindingResolver

func (*Resolver) ImageDetails

func (r *Resolver) ImageDetails() gengql.ImageDetailsResolver

func (*Resolver) KafkaTopic

func (r *Resolver) KafkaTopic() gengql.KafkaTopicResolver

func (*Resolver) KafkaTopicAcl

func (r *Resolver) KafkaTopicAcl() gengql.KafkaTopicAclResolver

func (*Resolver) Mutation

func (r *Resolver) Mutation() gengql.MutationResolver

func (*Resolver) NaisJob

func (r *Resolver) NaisJob() gengql.NaisJobResolver

func (*Resolver) OpenSearch

func (r *Resolver) OpenSearch() gengql.OpenSearchResolver

func (*Resolver) OpenSearchInstanceAccess

func (r *Resolver) OpenSearchInstanceAccess() gengql.OpenSearchInstanceAccessResolver

func (*Resolver) Query

func (r *Resolver) Query() gengql.QueryResolver

func (*Resolver) Reconciler

func (r *Resolver) Reconciler() gengql.ReconcilerResolver

func (*Resolver) ReconcilerError

func (r *Resolver) ReconcilerError() gengql.ReconcilerErrorResolver

func (*Resolver) Redis

func (r *Resolver) Redis() gengql.RedisResolver

func (*Resolver) RedisInstanceAccess

func (r *Resolver) RedisInstanceAccess() gengql.RedisInstanceAccessResolver

func (*Resolver) Role

func (r *Resolver) Role() gengql.RoleResolver

func (*Resolver) Secret

func (r *Resolver) Secret() gengql.SecretResolver

func (*Resolver) ServiceAccount

func (r *Resolver) ServiceAccount() gengql.ServiceAccountResolver

func (*Resolver) SqlInstance

func (r *Resolver) SqlInstance() gengql.SqlInstanceResolver

func (*Resolver) Subscription

func (r *Resolver) Subscription() gengql.SubscriptionResolver

func (*Resolver) Team

func (r *Resolver) Team() gengql.TeamResolver

func (*Resolver) TeamDeleteKey

func (r *Resolver) TeamDeleteKey() gengql.TeamDeleteKeyResolver

func (*Resolver) TeamMember

func (r *Resolver) TeamMember() gengql.TeamMemberResolver

func (*Resolver) TeamMemberReconciler

func (r *Resolver) TeamMemberReconciler() gengql.TeamMemberReconcilerResolver

func (*Resolver) TeamUtilizationData

func (r *Resolver) TeamUtilizationData() gengql.TeamUtilizationDataResolver

func (*Resolver) UnleashMetrics

func (r *Resolver) UnleashMetrics() gengql.UnleashMetricsResolver

func (*Resolver) User

func (r *Resolver) User() gengql.UserResolver

func (*Resolver) UsersyncRun

func (r *Resolver) UsersyncRun() gengql.UsersyncRunResolver

type SSE

type SSE struct{}

func (SSE) Do

func (SSE) Supports

func (t SSE) Supports(r *http.Request) bool

type SortedDailyCosts

type SortedDailyCosts map[string][]*model.CostEntry

func DailyCostsForTeamFromDatabaseRows

func DailyCostsForTeamFromDatabaseRows(from, to scalar.Date, rows []*gensql.Cost) (SortedDailyCosts, float64)

func DailyCostsForTeamPerEnvFromDatabaseRows

func DailyCostsForTeamPerEnvFromDatabaseRows(from, to scalar.Date, rows []*gensql.DailyEnvCostForTeamRow) (SortedDailyCosts, float64)

func DailyCostsFromDatabaseRows

func DailyCostsFromDatabaseRows(from, to scalar.Date, rows []*gensql.Cost) (SortedDailyCosts, float64)

DailyCostsFromDatabaseRows will convert a slice of cost rows from the database to a SortedDailyCosts map.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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