Documentation ¶
Index ¶
- 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)
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- func NewHandler(config Config, meter metric.Meter, log logrus.FieldLogger) (*handler.Server, error)
- func ValidateDateInterval(from, to scalar.Date) error
- type AppResolver
- type ComplexityRoot
- type Config
- type DeployInfoResolver
- type DirectiveRoot
- 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 MutationResolver
- type NaisJobResolver
- type PageInfoResolver
- type QueryResolver
- type Resolver
- func (r *Resolver) App() AppResolver
- func (r *Resolver) DeployInfo() DeployInfoResolver
- func (r *Resolver) Mutation() MutationResolver
- func (r *Resolver) NaisJob() NaisJobResolver
- func (r *Resolver) PageInfo() PageInfoResolver
- func (r *Resolver) Query() QueryResolver
- func (r *Resolver) Subscription() SubscriptionResolver
- func (r *Resolver) Team() TeamResolver
- func (r *Resolver) User() UserResolver
- type ResolverRoot
- type SubscriptionResolver
- type TeamResolver
- type UserResolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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.
func NewExecutableSchema ¶
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
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 AppResolver ¶
type AppResolver interface { Instances(ctx context.Context, obj *model.App) ([]model.Instance, error) Manifest(ctx context.Context, obj *model.App) (string, error) Team(ctx context.Context, obj *model.App) (*model.Team, error) Vulnerabilities(ctx context.Context, obj *model.App) (*model.VulnerabilitiesNode, error) }
type ComplexityRoot ¶
type ComplexityRoot struct { AccessPolicy struct { Inbound func(childComplexity int) int Outbound func(childComplexity int) int } Acl struct { Access func(childComplexity int) int Application func(childComplexity int) int Team func(childComplexity int) int } App struct { AccessPolicy func(childComplexity int) int AppState func(childComplexity int) int Authz func(childComplexity int) int AutoScaling func(childComplexity int) int DeployInfo func(childComplexity int) int Env func(childComplexity int) int ID func(childComplexity int) int Image func(childComplexity int) int Ingresses func(childComplexity int) int Instances func(childComplexity int) int Manifest func(childComplexity int) int Name func(childComplexity int) int Resources func(childComplexity int) int Storage func(childComplexity int) int Team func(childComplexity int) int Variables func(childComplexity int) int Vulnerabilities func(childComplexity int) int } AppConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } AppCost struct { App func(childComplexity int) int Cost func(childComplexity int) int Sum func(childComplexity int) int } AppEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } AppState struct { Errors func(childComplexity int) int State func(childComplexity int) int } AppWithResourceUtilizationOverage struct { App func(childComplexity int) int Env func(childComplexity int) int EstimatedAnnualOverageCost func(childComplexity int) int Overage func(childComplexity int) int OverageCost func(childComplexity int) int Team func(childComplexity int) int Utilization func(childComplexity int) int } AppsStatus struct { Failing func(childComplexity int) int Total func(childComplexity int) int } AutoScaling struct { CPUThreshold func(childComplexity int) int Disabled func(childComplexity int) int Max func(childComplexity int) int Min func(childComplexity int) int } AzureAD struct { Application func(childComplexity int) int Sidecar func(childComplexity int) int } AzureApplication struct { AllowAllUsers func(childComplexity int) int Claims func(childComplexity int) int ReplyURLs func(childComplexity int) int SinglePageApplication func(childComplexity int) int Tenant func(childComplexity int) int } BigQueryDataset struct { CascadingDelete func(childComplexity int) int Description func(childComplexity int) int Name func(childComplexity int) int Permission func(childComplexity int) int } Bucket struct { CascadingDelete func(childComplexity int) int Name func(childComplexity int) int PublicAccessPrevention func(childComplexity int) int RetentionPeriodDays func(childComplexity int) int UniformBucketLevelAccess func(childComplexity int) int } Claims struct { Extra func(childComplexity int) int Groups func(childComplexity int) int } Consume struct { Name func(childComplexity int) int } Consumer struct { Name func(childComplexity int) int Orgno func(childComplexity int) int } CostEntry struct { Cost func(childComplexity int) int Date func(childComplexity int) int } CostSeries struct { CostType func(childComplexity int) int Data func(childComplexity int) int Sum func(childComplexity int) int } CurrentResourceUtilization struct { CPU func(childComplexity int) int Memory func(childComplexity int) int Timestamp func(childComplexity int) int } DailyCost struct { Series func(childComplexity int) int Sum func(childComplexity int) int } Database struct { EnvVarPrefix func(childComplexity int) int Name func(childComplexity int) int Users func(childComplexity int) int } DatabaseUser struct { Name func(childComplexity int) int } DeployInfo struct { CommitSha func(childComplexity int) int Deployer func(childComplexity int) int History func(childComplexity int, first *int, last *int, after *scalar.Cursor, before *scalar.Cursor) int Timestamp func(childComplexity int) int URL func(childComplexity int) int } Deployment struct { Created func(childComplexity int) int Env func(childComplexity int) int ID func(childComplexity int) int Repository func(childComplexity int) int Resources func(childComplexity int) int Statuses func(childComplexity int) int Team func(childComplexity int) int } DeploymentConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } DeploymentEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } DeploymentKey struct { Created func(childComplexity int) int Expires func(childComplexity int) int ID func(childComplexity int) int Key func(childComplexity int) int } DeploymentResource struct { Group func(childComplexity int) int ID func(childComplexity int) int Kind func(childComplexity int) int Name func(childComplexity int) int Namespace func(childComplexity int) int Version func(childComplexity int) int } DeploymentStatus struct { Created func(childComplexity int) int ID func(childComplexity int) int Message func(childComplexity int) int Status func(childComplexity int) int } DeprecatedIngressError struct { Ingress func(childComplexity int) int Level func(childComplexity int) int Revision func(childComplexity int) int } DeprecatedRegistryError struct { Level func(childComplexity int) int Name func(childComplexity int) int Registry func(childComplexity int) int Repository func(childComplexity int) int Revision func(childComplexity int) int Tag func(childComplexity int) int } Env struct { ID func(childComplexity int) int Name func(childComplexity int) int } EnvCost struct { Apps func(childComplexity int) int Env func(childComplexity int) int Sum func(childComplexity int) int } Error struct { Message func(childComplexity int) int } Expose struct { AllowedIntegrations func(childComplexity int) int AtMaxAge func(childComplexity int) int Consumers func(childComplexity int) int Enabled func(childComplexity int) int Name func(childComplexity int) int Product func(childComplexity int) int } External struct { Host func(childComplexity int) int Ports func(childComplexity int) int } FailedRunError struct { Level func(childComplexity int) int Revision func(childComplexity int) int RunMessage func(childComplexity int) int RunName func(childComplexity int) int } Flag struct { Name func(childComplexity int) int Value func(childComplexity int) int } GcpProject struct { Environment func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int } GithubRepository struct { Archived func(childComplexity int) int Authorizations func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int Permissions func(childComplexity int) int RoleName func(childComplexity int) int } GithubRepositoryConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } GithubRepositoryEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } Group struct { ID func(childComplexity int) int } IDPorten struct { AccessTokenLifetime func(childComplexity int) int ClientURI func(childComplexity int) int FrontchannelLogoutPath func(childComplexity int) int IntegrationType func(childComplexity int) int PostLogoutRedirectURIs func(childComplexity int) int RedirectPath func(childComplexity int) int Scopes func(childComplexity int) int SessionLifetime func(childComplexity int) int Sidecar func(childComplexity int) int } IDPortenSidecar struct { AutoLogin func(childComplexity int) int AutoLoginIgnorePaths func(childComplexity int) int Enabled func(childComplexity int) int Level func(childComplexity int) int Locale func(childComplexity int) int Resources func(childComplexity int) int } Inbound struct { Rules func(childComplexity int) int } InboundAccessError struct { Level func(childComplexity int) int Revision func(childComplexity int) int Rule func(childComplexity int) int } InfluxDb struct { Name func(childComplexity int) int } Insights struct { Enabled func(childComplexity int) int QueryStringLength func(childComplexity int) int RecordApplicationTags func(childComplexity int) int RecordClientAddress func(childComplexity int) int } Instance struct { Created func(childComplexity int) int ID func(childComplexity int) int Image func(childComplexity int) int Message func(childComplexity int) int Name func(childComplexity int) int Restarts func(childComplexity int) int State func(childComplexity int) int } InvalidNaisYamlError struct { Detail func(childComplexity int) int Level func(childComplexity int) int Revision func(childComplexity int) int } JobState struct { Errors func(childComplexity int) int State func(childComplexity int) int } JobsStatus struct { Failing func(childComplexity int) int Total func(childComplexity int) int } Kafka struct { Name func(childComplexity int) int Streams func(childComplexity int) int Topics func(childComplexity int) int } Limits struct { CPU func(childComplexity int) int Memory func(childComplexity int) int } LogLine struct { Instance func(childComplexity int) int Message func(childComplexity int) int Time func(childComplexity int) int } Maintenance struct { Day func(childComplexity int) int Hour func(childComplexity int) int } Maskinporten struct { Enabled func(childComplexity int) int Scopes func(childComplexity int) int } MaskinportenScope struct { Consumes func(childComplexity int) int Exposes func(childComplexity int) int } MonthlyCost struct { Cost func(childComplexity int) int Sum func(childComplexity int) int } Mutation struct { AuthorizeRepository func(childComplexity int, authorization model.RepositoryAuthorization, team string, repository string) int ChangeDeployKey func(childComplexity int, team string) int DeauthorizeRepository func(childComplexity int, authorization model.RepositoryAuthorization, team string, repository string) int } NaisJob struct { AccessPolicy func(childComplexity int) int Authz func(childComplexity int) int Completions func(childComplexity int) int DeployInfo func(childComplexity int) int Env func(childComplexity int) int ID func(childComplexity int) int Image func(childComplexity int) int JobState func(childComplexity int) int Manifest func(childComplexity int) int Name func(childComplexity int) int Parallelism func(childComplexity int) int Resources func(childComplexity int) int Retries func(childComplexity int) int Runs func(childComplexity int) int Schedule func(childComplexity int) int Storage func(childComplexity int) int Team func(childComplexity int) int } NaisJobConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } NaisJobEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } NewInstancesFailingError struct { FailingInstances func(childComplexity int) int Level func(childComplexity int) int Revision func(childComplexity int) int } NoRunningInstancesError struct { Level func(childComplexity int) int Revision func(childComplexity int) int } OpenSearch struct { Access func(childComplexity int) int Name func(childComplexity int) int } Outbound struct { External func(childComplexity int) int Rules func(childComplexity int) int } OutboundAccessError struct { Level func(childComplexity int) int Revision func(childComplexity int) int Rule func(childComplexity int) int } PageInfo struct { EndCursor func(childComplexity int) int From func(childComplexity int) int HasNextPage func(childComplexity int) int HasPreviousPage func(childComplexity int) int StartCursor func(childComplexity int) int To func(childComplexity int) int } Port struct { Port func(childComplexity int) int } Query struct { App func(childComplexity int, name string, team string, env string) int CurrentResourceUtilizationForApp func(childComplexity int, env string, team string, app string) int CurrentResourceUtilizationForTeam func(childComplexity int, team string) int DailyCostForApp func(childComplexity int, team string, app string, env string, from scalar.Date, to scalar.Date) int DailyCostForTeam func(childComplexity int, team string, from scalar.Date, to scalar.Date) int Deployments func(childComplexity int, first *int, last *int, after *scalar.Cursor, before *scalar.Cursor, limit *int) int EnvCost func(childComplexity int, filter model.EnvCostFilter) int MonthlyCost func(childComplexity int, filter model.MonthlyCostFilter) int Naisjob func(childComplexity int, name string, team string, env string) int Node func(childComplexity int, id scalar.Ident) int ResourceUtilizationDateRangeForApp func(childComplexity int, env string, team string, app string) int ResourceUtilizationDateRangeForTeam func(childComplexity int, team string) int ResourceUtilizationForApp func(childComplexity int, env string, team string, app string, from *scalar.Date, to *scalar.Date) int ResourceUtilizationForTeam func(childComplexity int, team string, from *scalar.Date, to *scalar.Date) int ResourceUtilizationOverageForTeam func(childComplexity int, team string) int ResourceUtilizationTrendForTeam func(childComplexity int, team string) int Search func(childComplexity int, query string, filter *model.SearchFilter, first *int, last *int, after *scalar.Cursor, before *scalar.Cursor) int Team func(childComplexity int, name string) int Teams func(childComplexity int, first *int, last *int, after *scalar.Cursor, before *scalar.Cursor) int User func(childComplexity int) int } Redis struct { Access func(childComplexity int) int Name func(childComplexity int) int } Requests struct { CPU func(childComplexity int) int Memory func(childComplexity int) int } ResourceUtilization struct { EstimatedAnnualOverageCost func(childComplexity int) int Request func(childComplexity int) int RequestCost func(childComplexity int) int RequestCostOverage func(childComplexity int) int Timestamp func(childComplexity int) int Usage func(childComplexity int) int UsageCost func(childComplexity int) int Utilization func(childComplexity int) int } ResourceUtilizationDateRange struct { From func(childComplexity int) int To func(childComplexity int) int } ResourceUtilizationForApp struct { CPU func(childComplexity int) int Memory func(childComplexity int) int } ResourceUtilizationForEnv struct { CPU func(childComplexity int) int Env func(childComplexity int) int Memory func(childComplexity int) int } ResourceUtilizationOverageForTeam struct { CPU func(childComplexity int) int Memory func(childComplexity int) int OverageCost func(childComplexity int) int Timestamp func(childComplexity int) int } ResourceUtilizationTrend struct { AverageCPUUtilization func(childComplexity int) int AverageMemoryUtilization func(childComplexity int) int CPUUtilizationTrend func(childComplexity int) int CurrentCPUUtilization func(childComplexity int) int CurrentMemoryUtilization func(childComplexity int) int MemoryUtilizationTrend func(childComplexity int) int } Resources struct { Limits func(childComplexity int) int Requests func(childComplexity int) int } Rule struct { Application func(childComplexity int) int Cluster func(childComplexity int) int IsJob func(childComplexity int) int Mutual func(childComplexity int) int MutualExplanation func(childComplexity int) int Namespace func(childComplexity int) int } Run struct { CompletionTime func(childComplexity int) int Duration func(childComplexity int) int Failed func(childComplexity int) int ID func(childComplexity int) int Image func(childComplexity int) int Message func(childComplexity int) int Name func(childComplexity int) int PodNames func(childComplexity int) int StartTime func(childComplexity int) int } SearchConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } SearchEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } Sidecar struct { AutoLogin func(childComplexity int) int AutoLoginIgnorePaths func(childComplexity int) int Resources func(childComplexity int) int } SlackAlertsChannel struct { Env func(childComplexity int) int Name func(childComplexity int) int } SqlInstance struct { AutoBackupHour func(childComplexity int) int CascadingDelete func(childComplexity int) int Collation func(childComplexity int) int Databases func(childComplexity int) int DiskAutoresize func(childComplexity int) int DiskSize func(childComplexity int) int DiskType func(childComplexity int) int Flags func(childComplexity int) int HighAvailability func(childComplexity int) int Insights func(childComplexity int) int Maintenance func(childComplexity int) int Name func(childComplexity int) int PointInTimeRecovery func(childComplexity int) int RetainedBackups func(childComplexity int) int Tier func(childComplexity int) int Type func(childComplexity int) int } Subscription struct { Log func(childComplexity int, input *model.LogSubscriptionInput) int } Team struct { Apps func(childComplexity int, first *int, last *int, after *scalar.Cursor, before *scalar.Cursor, orderBy *model.OrderBy) int DeployKey func(childComplexity int) int Deployments func(childComplexity int, first *int, last *int, after *scalar.Cursor, before *scalar.Cursor, limit *int) int Description func(childComplexity int) int GcpProjects func(childComplexity int) int GithubRepositories func(childComplexity int, first *int, last *int, after *scalar.Cursor, before *scalar.Cursor, orderBy *model.OrderBy) int ID func(childComplexity int) int Members func(childComplexity int, first *int, last *int, after *scalar.Cursor, before *scalar.Cursor) int Naisjobs func(childComplexity int, first *int, last *int, after *scalar.Cursor, before *scalar.Cursor, orderBy *model.OrderBy) int Name func(childComplexity int) int SlackAlertsChannels func(childComplexity int) int SlackChannel func(childComplexity int) int Status func(childComplexity int) int ViewerIsAdmin func(childComplexity int) int ViewerIsMember func(childComplexity int) int Vulnerabilities func(childComplexity int, first *int, last *int, after *scalar.Cursor, before *scalar.Cursor, orderBy *model.OrderBy) int VulnerabilitiesSummary func(childComplexity int) int } TeamConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } TeamEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } TeamMember struct { Email func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int Role func(childComplexity int) int } TeamMemberConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } TeamMemberEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } TeamStatus struct { Apps func(childComplexity int) int Jobs func(childComplexity int) int } TokenX struct { MountSecretsAsFilesOnly func(childComplexity int) int } Topic struct { ACL func(childComplexity int) int Name func(childComplexity int) int } User struct { Email func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int Teams func(childComplexity int, first *int, after *scalar.Cursor, last *int, before *scalar.Cursor) int } Variable struct { Name func(childComplexity int) int Value func(childComplexity int) int } VulnerabilitiesConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } VulnerabilitiesEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } VulnerabilitiesNode struct { AppName func(childComplexity int) int Env func(childComplexity int) int FindingsLink func(childComplexity int) int HasBom func(childComplexity int) int ID func(childComplexity int) int Summary func(childComplexity int) int } VulnerabilitySummary struct { Critical func(childComplexity int) int High func(childComplexity int) int Low func(childComplexity int) int Medium func(childComplexity int) int RiskScore func(childComplexity int) int Total func(childComplexity int) int Unassigned func(childComplexity int) int } }
type Config ¶
type Config struct { Schema *ast.Schema Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DeployInfoResolver ¶
type DirectiveRoot ¶
type DirectiveRoot struct { }
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func (*Metrics) ExtensionName ¶
func (*Metrics) InterceptField ¶
func (*Metrics) InterceptResponse ¶
type MutationResolver ¶
type MutationResolver interface { ChangeDeployKey(ctx context.Context, team string) (*model.DeploymentKey, error) AuthorizeRepository(ctx context.Context, authorization model.RepositoryAuthorization, team string, repository string) (*model.GithubRepository, error) }
type NaisJobResolver ¶
type PageInfoResolver ¶
type QueryResolver ¶
type QueryResolver interface { Node(ctx context.Context, id scalar.Ident) (model.Node, error) App(ctx context.Context, name string, team string, env string) (*model.App, error) DailyCostForApp(ctx context.Context, team string, app string, env string, from scalar.Date, to scalar.Date) (*model.DailyCost, error) DailyCostForTeam(ctx context.Context, team string, from scalar.Date, to scalar.Date) (*model.DailyCost, error) MonthlyCost(ctx context.Context, filter model.MonthlyCostFilter) (*model.MonthlyCost, error) EnvCost(ctx context.Context, filter model.EnvCostFilter) ([]model.EnvCost, error) Deployments(ctx context.Context, first *int, last *int, after *scalar.Cursor, before *scalar.Cursor, limit *int) (*model.DeploymentConnection, error) Naisjob(ctx context.Context, name string, team string, env string) (*model.NaisJob, error) ResourceUtilizationTrendForTeam(ctx context.Context, team string) (*model.ResourceUtilizationTrend, error) CurrentResourceUtilizationForApp(ctx context.Context, env string, team string, app string) (*model.CurrentResourceUtilization, error) CurrentResourceUtilizationForTeam(ctx context.Context, team string) (*model.CurrentResourceUtilization, error) ResourceUtilizationOverageForTeam(ctx context.Context, team string) (*model.ResourceUtilizationOverageForTeam, error) ResourceUtilizationForTeam(ctx context.Context, team string, from *scalar.Date, to *scalar.Date) ([]model.ResourceUtilizationForEnv, error) ResourceUtilizationDateRangeForTeam(ctx context.Context, team string) (*model.ResourceUtilizationDateRange, error) ResourceUtilizationDateRangeForApp(ctx context.Context, env string, team string, app string) (*model.ResourceUtilizationDateRange, error) ResourceUtilizationForApp(ctx context.Context, env string, team string, app string, from *scalar.Date, to *scalar.Date) (*model.ResourceUtilizationForApp, error) Search(ctx context.Context, query string, filter *model.SearchFilter, first *int, last *int, after *scalar.Cursor, before *scalar.Cursor) (*model.SearchConnection, error) Teams(ctx context.Context, first *int, last *int, after *scalar.Cursor, before *scalar.Cursor) (*model.TeamConnection, error) Team(ctx context.Context, name string) (*model.Team, error) User(ctx context.Context) (*model.User, error) }
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func NewResolver ¶
func NewResolver(hookdClient hookd.Client, teamsClient teams.Client, k8sClient *k8s.Client, dependencyTrackClient *dependencytrack.Client, resourceUsageClient resourceusage.Client, querier gensql.Querier, clusters []string, log logrus.FieldLogger) *Resolver
NewResolver creates a new GraphQL resolver with the given dependencies
func (*Resolver) DeployInfo ¶
func (r *Resolver) DeployInfo() DeployInfoResolver
DeployInfo returns DeployInfoResolver implementation.
func (*Resolver) Mutation ¶
func (r *Resolver) Mutation() MutationResolver
Mutation returns MutationResolver implementation.
func (*Resolver) NaisJob ¶
func (r *Resolver) NaisJob() NaisJobResolver
NaisJob returns NaisJobResolver implementation.
func (*Resolver) PageInfo ¶
func (r *Resolver) PageInfo() PageInfoResolver
PageInfo returns PageInfoResolver implementation.
func (*Resolver) Query ¶
func (r *Resolver) Query() QueryResolver
Query returns QueryResolver implementation.
func (*Resolver) Subscription ¶
func (r *Resolver) Subscription() SubscriptionResolver
Subscription returns SubscriptionResolver implementation.
func (*Resolver) Team ¶
func (r *Resolver) Team() TeamResolver
Team returns TeamResolver implementation.
func (*Resolver) User ¶
func (r *Resolver) User() UserResolver
User returns UserResolver implementation.
type ResolverRoot ¶
type ResolverRoot interface { App() AppResolver DeployInfo() DeployInfoResolver Mutation() MutationResolver NaisJob() NaisJobResolver PageInfo() PageInfoResolver Query() QueryResolver Subscription() SubscriptionResolver Team() TeamResolver User() UserResolver }
type SubscriptionResolver ¶
type TeamResolver ¶
type TeamResolver interface { Status(ctx context.Context, obj *model.Team) (*model.TeamStatus, error) Members(ctx context.Context, obj *model.Team, first *int, last *int, after *scalar.Cursor, before *scalar.Cursor) (*model.TeamMemberConnection, error) Apps(ctx context.Context, obj *model.Team, first *int, last *int, after *scalar.Cursor, before *scalar.Cursor, orderBy *model.OrderBy) (*model.AppConnection, error) Naisjobs(ctx context.Context, obj *model.Team, first *int, last *int, after *scalar.Cursor, before *scalar.Cursor, orderBy *model.OrderBy) (*model.NaisJobConnection, error) GithubRepositories(ctx context.Context, obj *model.Team, first *int, last *int, after *scalar.Cursor, before *scalar.Cursor, orderBy *model.OrderBy) (*model.GithubRepositoryConnection, error) GcpProjects(ctx context.Context, obj *model.Team) ([]model.GcpProject, error) Deployments(ctx context.Context, obj *model.Team, first *int, last *int, after *scalar.Cursor, before *scalar.Cursor, limit *int) (*model.DeploymentConnection, error) DeployKey(ctx context.Context, obj *model.Team) (*model.DeploymentKey, error) ViewerIsMember(ctx context.Context, obj *model.Team) (bool, error) ViewerIsAdmin(ctx context.Context, obj *model.Team) (bool, error) Vulnerabilities(ctx context.Context, obj *model.Team, first *int, last *int, after *scalar.Cursor, before *scalar.Cursor, orderBy *model.OrderBy) (*model.VulnerabilitiesConnection, error) VulnerabilitiesSummary(ctx context.Context, obj *model.Team) (*model.VulnerabilitySummary, error) }
Source Files ¶
- app.resolvers.go
- cost.go
- cost.resolvers.go
- deploy.go
- deploy.resolvers.go
- deployinfo.go
- deployinfo.resolvers.go
- generated.go
- log.resolvers.go
- metrics.go
- naisjob.resolvers.go
- resolver.go
- resourceusage.resolvers.go
- schema.resolvers.go
- search.go
- search.resolvers.go
- team.go
- team.resolvers.go
- user.go
- user.resolvers.go