Documentation ¶
Index ¶
- func NewHandler(config gengql.Config, log logrus.FieldLogger) (*handler.Server, error)
- func ValidateDateInterval(from, to scalar.Date) error
- type ClusterInfo
- type ClusterList
- type DailyCosts
- type HookdClient
- type Metrics
- func (a *Metrics) ExtensionName() string
- func (a *Metrics) InterceptField(ctx context.Context, next graphql.Resolver) (interface{}, error)
- func (a *Metrics) InterceptResponse(ctx context.Context, next graphql.ResponseHandler) *graphql.Response
- func (a *Metrics) Validate(_ graphql.ExecutableSchema) error
- type Resolver
- func (r *Resolver) AnalysisTrail() gengql.AnalysisTrailResolver
- func (r *Resolver) App() gengql.AppResolver
- func (r *Resolver) AppUtilization() gengql.AppUtilizationResolver
- func (r *Resolver) AppUtilizationData() gengql.AppUtilizationDataResolver
- func (r *Resolver) AuditEventMemberAdded() gengql.AuditEventMemberAddedResolver
- func (r *Resolver) AuditEventMemberRemoved() gengql.AuditEventMemberRemovedResolver
- func (r *Resolver) AuditEventMemberSetRole() gengql.AuditEventMemberSetRoleResolver
- func (r *Resolver) AuditEventTeamAddRepository() gengql.AuditEventTeamAddRepositoryResolver
- func (r *Resolver) AuditEventTeamRemoveRepository() gengql.AuditEventTeamRemoveRepositoryResolver
- func (r *Resolver) AuditEventTeamSetAlertsSlackChannel() gengql.AuditEventTeamSetAlertsSlackChannelResolver
- func (r *Resolver) AuditEventTeamSetDefaultSlackChannel() gengql.AuditEventTeamSetDefaultSlackChannelResolver
- func (r *Resolver) AuditEventTeamSetPurpose() gengql.AuditEventTeamSetPurposeResolver
- func (r *Resolver) BaseAuditEvent() gengql.BaseAuditEventResolver
- func (r *Resolver) BigQueryDataset() gengql.BigQueryDatasetResolver
- func (r *Resolver) Bucket() gengql.BucketResolver
- func (r *Resolver) DeployInfo() gengql.DeployInfoResolver
- func (r *Resolver) Env() gengql.EnvResolver
- func (r *Resolver) Finding() gengql.FindingResolver
- func (r *Resolver) ImageDetails() gengql.ImageDetailsResolver
- func (r *Resolver) KafkaTopic() gengql.KafkaTopicResolver
- func (r *Resolver) KafkaTopicAcl() gengql.KafkaTopicAclResolver
- func (r *Resolver) Mutation() gengql.MutationResolver
- func (r *Resolver) NaisJob() gengql.NaisJobResolver
- func (r *Resolver) OpenSearch() gengql.OpenSearchResolver
- func (r *Resolver) OpenSearchInstanceAccess() gengql.OpenSearchInstanceAccessResolver
- func (r *Resolver) Query() gengql.QueryResolver
- func (r *Resolver) Reconciler() gengql.ReconcilerResolver
- func (r *Resolver) ReconcilerError() gengql.ReconcilerErrorResolver
- func (r *Resolver) Redis() gengql.RedisResolver
- func (r *Resolver) RedisInstanceAccess() gengql.RedisInstanceAccessResolver
- func (r *Resolver) Role() gengql.RoleResolver
- func (r *Resolver) Secret() gengql.SecretResolver
- func (r *Resolver) ServiceAccount() gengql.ServiceAccountResolver
- func (r *Resolver) SqlInstance() gengql.SqlInstanceResolver
- func (r *Resolver) Subscription() gengql.SubscriptionResolver
- func (r *Resolver) Team() gengql.TeamResolver
- func (r *Resolver) TeamDeleteKey() gengql.TeamDeleteKeyResolver
- func (r *Resolver) TeamMember() gengql.TeamMemberResolver
- func (r *Resolver) TeamMemberReconciler() gengql.TeamMemberReconcilerResolver
- func (r *Resolver) TeamUtilizationData() gengql.TeamUtilizationDataResolver
- func (r *Resolver) UnleashMetrics() gengql.UnleashMetricsResolver
- func (r *Resolver) User() gengql.UserResolver
- func (r *Resolver) UsersyncRun() gengql.UsersyncRunResolver
- type SSE
- type SortedDailyCosts
- func DailyCostsForTeamFromDatabaseRows(from, to scalar.Date, rows []*gensql.Cost) (SortedDailyCosts, float64)
- func DailyCostsForTeamPerEnvFromDatabaseRows(from, to scalar.Date, rows []*gensql.DailyEnvCostForTeamRow) (SortedDailyCosts, float64)
- func DailyCostsFromDatabaseRows(from, to scalar.Date, rows []*gensql.Cost) (SortedDailyCosts, float64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
NewHandler creates and returns a new GraphQL handler with the given configuration
func ValidateDateInterval ¶
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 HookdClient ¶
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func (*Metrics) ExtensionName ¶
func (*Metrics) InterceptField ¶
func (*Metrics) InterceptResponse ¶
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 (t SSE) Do(w http.ResponseWriter, r *http.Request, exec graphql.GraphExecutor)
type SortedDailyCosts ¶
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.
Source Files ¶
- app.resolvers.go
- auditevents.go
- auditevents.resolvers.go
- auditlogs.go
- authentication.resolvers.go
- cost.go
- cost.resolvers.go
- deploy.go
- deploy.resolvers.go
- deployinfo.go
- deployinfo.resolvers.go
- env.resolvers.go
- feedback.resolvers.go
- github_repo.go
- image_details.resolvers.go
- log.resolvers.go
- metrics.go
- naisjob.resolvers.go
- persistence.go
- persistence.resolvers.go
- pubsub.go
- reconcilers.go
- reconcilers.resolvers.go
- resolver.go
- roles.go
- schema.resolvers.go
- search.resolvers.go
- secrets.go
- secrets.resolvers.go
- serviceAccounts.resolvers.go
- sse_transport.go
- teams.go
- teams.resolvers.go
- unleash.resolvers.go
- users.resolvers.go
Click to show internal directories.
Click to hide internal directories.