model

package
v0.0.0-...-7068118 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllRepositoryAuthorization = []RepositoryAuthorization{
	RepositoryAuthorizationDeploy,
}
View Source
var AllSortOrder = []SortOrder{
	SortOrderAsc,
	SortOrderDesc,
}

Functions

func Compare

func Compare[T constraints.Ordered](a, b T, direction SortOrder) bool

func IsHealthy

func IsHealthy(cs []v1alpha1.Condition) bool

func SortWith

func SortWith[T any](slice []T, eval func(a, b T) bool)

Types

type ACL

type ACL struct {
	Access      string    `json:"access"`
	Application string    `json:"application"`
	Team        slug.Slug `json:"team"`
}

type AccessPolicy

type AccessPolicy struct {
	Inbound  Inbound  `json:"inbound"`
	Outbound Outbound `json:"outbound"`
}

type App

type App struct {
	ID           scalar.Ident `json:"id"`
	Name         string       `json:"name"`
	Image        string       `json:"image"`
	DeployInfo   DeployInfo   `json:"deployInfo"`
	Env          Env          `json:"env"`
	Ingresses    []string     `json:"ingresses"`
	AccessPolicy AccessPolicy `json:"accessPolicy"`
	Resources    Resources    `json:"resources"`
	AutoScaling  AutoScaling  `json:"autoScaling"`
	Storage      []Storage    `json:"storage"`
	Variables    []*Variable  `json:"variables"`
	Authz        []Authz      `json:"authz"`
	AppState     AppState     `json:"appState"`

	GQLVars AppGQLVars `json:"-"`
}

func (App) IsSearchNode

func (App) IsSearchNode()

func (App) IsWorkload

func (App) IsWorkload()

type AppCost

type AppCost struct {
	// The name of the application.
	App string `json:"app"`
	// The sum of all cost entries for the application in euros.
	Sum float64 `json:"sum"`
	// A list of cost entries for the application.
	Cost []*CostEntry `json:"cost"`
}

App cost type.

type AppGQLVars

type AppGQLVars struct {
	SecretNames []string
	Team        slug.Slug
}

type AppList

type AppList struct {
	Nodes    []*App   `json:"nodes"`
	PageInfo PageInfo `json:"pageInfo"`
}

type AppState

type AppState struct {
	State  State        `json:"state"`
	Errors []StateError `json:"errors"`
}

type AppWithResourceUtilizationOverage

type AppWithResourceUtilizationOverage struct {
	// The overage for the app.
	Overage float64 `json:"overage"`
	// The overage cost for the app.
	OverageCost float64 `json:"overageCost"`
	// Estimated annual cost of the request overage.
	EstimatedAnnualOverageCost float64 `json:"estimatedAnnualOverageCost"`
	// The utilization in percent.
	Utilization float64 `json:"utilization"`
	// The environment where the app is running.
	Env string `json:"env"`
	// The name of the team who owns the app.
	Team slug.Slug `json:"team"`
	// The name of the app.
	App string `json:"app"`
}

Resource utilization overage cost for an app.

type AppsStatus

type AppsStatus struct {
	Total   int `json:"total"`
	Failing int `json:"failing"`
}

Team status for apps.

type AuditLog

type AuditLog struct {
	// ID of the log entry.
	ID scalar.Ident `json:"id"`
	// String representation of the action performed.
	Action string `json:"action"`
	// The related correlation ID.
	CorrelationID string `json:"correlationID"`
	// The identity of the actor who performed the action. When this field is empty it means that some backend process performed the action. The value, when present, is either the name of a service account, or the email address of a user.
	Actor *string `json:"actor,omitempty"`
	// The type of the audit log target.
	TargetType string `json:"targetType"`
	// The identifier of the target.
	TargetIdentifier string `json:"targetIdentifier"`
	// Log entry message.
	Message string `json:"message"`
	// Creation time of the log entry.
	CreatedAt time.Time `json:"createdAt"`
}

Audit log type.

type AuditLogList

type AuditLogList struct {
	Nodes    []*AuditLog `json:"nodes"`
	PageInfo PageInfo    `json:"pageInfo"`
}

type AuthenticatedUser

type AuthenticatedUser interface {
	IsAuthenticatedUser()
}

Authenticated user type. Can be a user or a service account.

type Authz

type Authz interface {
	IsAuthz()
}

type AutoScaling

type AutoScaling struct {
	Disabled bool `json:"disabled"`
	// CPU threshold in percent
	CPUThreshold int `json:"cpuThreshold"`
	Max          int `json:"max"`
	Min          int `json:"min"`
}

type AzureAd

type AzureAd struct {
	Application *AzureApplication `json:"application,omitempty"`
	Sidecar     *Sidecar          `json:"sidecar,omitempty"`
}

func (AzureAd) IsAuthz

func (AzureAd) IsAuthz()

type AzureApplication

type AzureApplication struct {
	AllowAllUsers         bool     `json:"allowAllUsers"`
	Claims                Claims   `json:"claims"`
	ReplyURLs             []string `json:"replyURLs"`
	SinglePageApplication bool     `json:"singlePageApplication"`
	Tenant                string   `json:"tenant"`
}

type BackupConfiguration

type BackupConfiguration struct {
	Enabled                     bool   `json:"enabled"`
	StartTime                   string `json:"startTime"`
	RetainedBackups             int    `json:"retainedBackups"`
	PointInTimeRecovery         bool   `json:"pointInTimeRecovery"`
	TransactionLogRetentionDays int    `json:"transactionLogRetentionDays"`
}

type BigQueryDataset

type BigQueryDataset struct {
	CascadingDelete bool   `json:"cascadingDelete"`
	Description     string `json:"description"`
	Name            string `json:"name"`
	Permission      string `json:"permission"`
}

func (BigQueryDataset) GetName

func (this BigQueryDataset) GetName() string

func (BigQueryDataset) IsStorage

func (BigQueryDataset) IsStorage()

type Bucket

type Bucket struct {
	CascadingDelete          bool   `json:"cascadingDelete"`
	Name                     string `json:"name"`
	PublicAccessPrevention   bool   `json:"publicAccessPrevention"`
	RetentionPeriodDays      int    `json:"retentionPeriodDays"`
	UniformBucketLevelAccess bool   `json:"uniformBucketLevelAccess"`
}

func (Bucket) GetName

func (this Bucket) GetName() string

func (Bucket) IsStorage

func (Bucket) IsStorage()

type Claims

type Claims struct {
	Extra  []string `json:"extra"`
	Groups []*Group `json:"groups"`
}

type Condition

type Condition struct {
	Message            string `json:"message"`
	Reason             string `json:"reason"`
	Status             string `json:"status"`
	Type               string `json:"type"`
	LastTransitionTime string `json:"lastTransitionTime"`
}

type Consume

type Consume struct {
	Name string `json:"name"`
}

type Consumer

type Consumer struct {
	Name  string `json:"name"`
	Orgno string `json:"orgno"`
}

type CostEntry

type CostEntry struct {
	// The date for the entry.
	Date scalar.Date `json:"date"`
	// The cost in euros.
	Cost float64 `json:"cost"`
}

Cost entry type.

type CostSeries

type CostSeries struct {
	// The type of cost.
	CostType string `json:"costType"`
	// The sum of all daily costs in the series for this cost type in euros.
	Sum float64 `json:"sum"`
	// The cost data.
	Data []*CostEntry `json:"data"`
}

Cost series type.

type CreateTeamInput

type CreateTeamInput struct {
	// Team slug. After creation, this value can not be changed.
	Slug slug.Slug `json:"slug"`
	// Team purpose.
	Purpose string `json:"purpose"`
	// Specify the Slack channel for the team.
	SlackChannel string `json:"slackChannel"`
}

Input for creating a new team.

func (CreateTeamInput) Sanitize

func (input CreateTeamInput) Sanitize() CreateTeamInput

func (CreateTeamInput) Validate

func (input CreateTeamInput) Validate() error

type CurrentResourceUtilization

type CurrentResourceUtilization struct {
	// The timestamp used for the calculated values.
	Timestamp time.Time `json:"timestamp"`
	// The CPU utilization.
	CPU ResourceUtilization `json:"cpu"`
	// The memory utilization.
	Memory ResourceUtilization `json:"memory"`
}

Current resource utilization type.

type DailyCost

type DailyCost struct {
	// The sum of all costs in the cost series in euros.
	Sum float64 `json:"sum"`
	// The cost series.
	Series []*CostSeries `json:"series"`
}

Daily cost type.

type DeleteAppResult

type DeleteAppResult struct {
	// Whether the app was deleted or not.
	Deleted bool    `json:"deleted"`
	Error   *string `json:"error,omitempty"`
}

type DeleteJobResult

type DeleteJobResult struct {
	// Whether the job was deleted or not.
	Deleted bool    `json:"deleted"`
	Error   *string `json:"error,omitempty"`
}

type DeployInfo

type DeployInfo struct {
	Deployer  string            `json:"deployer"`
	Timestamp *time.Time        `json:"timestamp,omitempty"`
	CommitSha string            `json:"commitSha"`
	URL       string            `json:"url"`
	GQLVars   DeployInfoGQLVars `json:"-"`
}

type DeployInfoGQLVars

type DeployInfoGQLVars struct {
	App  string
	Job  string
	Env  string
	Team slug.Slug
}

type Deployment

type Deployment struct {
	ID         scalar.Ident          `json:"id"`
	Team       Team                  `json:"team"`
	Resources  []*DeploymentResource `json:"resources"`
	Env        string                `json:"env"`
	Statuses   []*DeploymentStatus   `json:"statuses"`
	Created    time.Time             `json:"created"`
	Repository string                `json:"repository"`
}

type DeploymentKey

type DeploymentKey struct {
	// The unique identifier of the deployment key.
	ID scalar.Ident `json:"id"`
	// The actual key.
	Key string `json:"key"`
	// The date the deployment key was created.
	Created time.Time `json:"created"`
	// The date the deployment key expires.
	Expires time.Time `json:"expires"`
}

Deployment key type.

type DeploymentList

type DeploymentList struct {
	Nodes    []*Deployment `json:"nodes"`
	PageInfo PageInfo      `json:"pageInfo"`
}

func (DeploymentList) IsDeploymentResponse

func (DeploymentList) IsDeploymentResponse()

type DeploymentResource

type DeploymentResource struct {
	ID        scalar.Ident `json:"id"`
	Group     string       `json:"group"`
	Kind      string       `json:"kind"`
	Name      string       `json:"name"`
	Version   string       `json:"version"`
	Namespace string       `json:"namespace"`
}

type DeploymentResponse

type DeploymentResponse interface {
	IsDeploymentResponse()
}

type DeploymentStatus

type DeploymentStatus struct {
	ID      scalar.Ident `json:"id"`
	Status  string       `json:"status"`
	Message *string      `json:"message,omitempty"`
	Created time.Time    `json:"created"`
}

type DeprecatedIngressError

type DeprecatedIngressError struct {
	Revision string     `json:"revision"`
	Level    ErrorLevel `json:"level"`
	Ingress  string     `json:"ingress"`
}

func (DeprecatedIngressError) GetLevel

func (this DeprecatedIngressError) GetLevel() ErrorLevel

func (DeprecatedIngressError) GetRevision

func (this DeprecatedIngressError) GetRevision() string

func (DeprecatedIngressError) IsStateError

func (DeprecatedIngressError) IsStateError()

type DeprecatedRegistryError

type DeprecatedRegistryError struct {
	Revision   string     `json:"revision"`
	Level      ErrorLevel `json:"level"`
	Registry   string     `json:"registry"`
	Repository string     `json:"repository"`
	Name       string     `json:"name"`
	Tag        string     `json:"tag"`
}

func (DeprecatedRegistryError) GetLevel

func (this DeprecatedRegistryError) GetLevel() ErrorLevel

func (DeprecatedRegistryError) GetRevision

func (this DeprecatedRegistryError) GetRevision() string

func (DeprecatedRegistryError) IsStateError

func (DeprecatedRegistryError) IsStateError()

type Env

type Env struct {
	Team   string                    `json:"-"`
	Name   string                    `json:"name"`
	DBType *database.TeamEnvironment `json:"-"`
}

type EnvCost

type EnvCost struct {
	// The name of the environment.
	Env string `json:"env"`
	// The sum of all app costs for the environment in euros.
	Sum float64 `json:"sum"`
	// A list of app costs in the environment.
	Apps []*AppCost `json:"apps"`
}

Env cost type.

type EnvCostFilter

type EnvCostFilter struct {
	// Start date for the cost series, inclusive.
	From scalar.Date `json:"from"`
	// End date for cost series, inclusive.
	To scalar.Date `json:"to"`
	// The name of the team to get costs for.
	Team slug.Slug `json:"team"`
}

Env cost filter input type.

type Error

type Error struct {
	Message string `json:"message"`
}

func (Error) IsDeploymentResponse

func (Error) IsDeploymentResponse()

type ErrorLevel

type ErrorLevel string
const (
	ErrorLevelTodo    ErrorLevel = "TODO"
	ErrorLevelWarning ErrorLevel = "WARNING"
	ErrorLevelError   ErrorLevel = "ERROR"
)

func (ErrorLevel) IsValid

func (e ErrorLevel) IsValid() bool

func (ErrorLevel) MarshalGQL

func (e ErrorLevel) MarshalGQL(w io.Writer)

func (ErrorLevel) String

func (e ErrorLevel) String() string

func (*ErrorLevel) UnmarshalGQL

func (e *ErrorLevel) UnmarshalGQL(v interface{}) error

type Expose

type Expose struct {
	AllowedIntegrations []string    `json:"allowedIntegrations"`
	AtMaxAge            int         `json:"atMaxAge"`
	Consumers           []*Consumer `json:"consumers"`
	Enabled             bool        `json:"enabled"`
	Name                string      `json:"name"`
	Product             string      `json:"product"`
}

type External

type External struct {
	Host  string  `json:"host"`
	Ports []*Port `json:"ports"`
}

type FailedRunError

type FailedRunError struct {
	Revision   string     `json:"revision"`
	Level      ErrorLevel `json:"level"`
	RunMessage string     `json:"runMessage"`
	RunName    string     `json:"runName"`
}

func (FailedRunError) GetLevel

func (this FailedRunError) GetLevel() ErrorLevel

func (FailedRunError) GetRevision

func (this FailedRunError) GetRevision() string

func (FailedRunError) IsStateError

func (FailedRunError) IsStateError()

type Flag

type Flag struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type GcpProject

type GcpProject struct {
	// The environment for the project.
	Environment string `json:"environment"`
	// The display name of the project.
	ProjectName string `json:"projectName"`
	// The GCP project ID.
	ProjectID string `json:"projectId"`
}

GCP project type.

type GitHubRepositoriesFilter

type GitHubRepositoriesFilter struct {
	// Whether or not to include archived repositories. Defaults to false.
	IncludeArchivedRepositories *bool `json:"includeArchivedRepositories,omitempty"`
}

Input for filtering GitHub repositories.

type GitHubRepository

type GitHubRepository struct {
	ID          scalar.Ident                  `json:"id"`
	Name        string                        `json:"name"`
	Permissions []*GitHubRepositoryPermission `json:"permissions"`
	RoleName    string                        `json:"roleName"`
	Archived    bool                          `json:"archived"`
	GQLVars     GitHubRepositoryGQLVars       `json:"-"`
}

type GitHubRepositoryGQLVars

type GitHubRepositoryGQLVars struct {
	TeamSlug slug.Slug
}

type GitHubRepositoryList

type GitHubRepositoryList struct {
	// The list of GitHub repositories.
	Nodes []*GitHubRepository `json:"nodes"`
	// Pagination information.
	PageInfo PageInfo `json:"pageInfo"`
}

Paginated GitHub repository type.

type GitHubRepositoryPermission

type GitHubRepositoryPermission struct {
	// Name of the permission.
	Name string `json:"name"`
	// Whether or not the permission is granted for the repository.
	Granted bool `json:"granted"`
}

GitHub repository permission type.

type Group

type Group struct {
	ID string `json:"id"`
}

type IDPorten

type IDPorten struct {
	AccessTokenLifetime    *int             `json:"accessTokenLifetime,omitempty"`
	ClientURI              *string          `json:"clientURI,omitempty"`
	FrontchannelLogoutPath *string          `json:"frontchannelLogoutPath,omitempty"`
	IntegrationType        *string          `json:"integrationType,omitempty"`
	PostLogoutRedirectURIs []*string        `json:"postLogoutRedirectURIs,omitempty"`
	RedirectPath           *string          `json:"redirectPath,omitempty"`
	Scopes                 []*string        `json:"scopes,omitempty"`
	SessionLifetime        *int             `json:"sessionLifetime,omitempty"`
	Sidecar                *IDPortenSidecar `json:"sidecar,omitempty"`
}

func (IDPorten) IsAuthz

func (IDPorten) IsAuthz()

type IDPortenSidecar

type IDPortenSidecar struct {
	AutoLogin            *bool      `json:"autoLogin,omitempty"`
	AutoLoginIgnorePaths []*string  `json:"autoLoginIgnorePaths,omitempty"`
	Enabled              *bool      `json:"enabled,omitempty"`
	Level                *string    `json:"level,omitempty"`
	Locale               *string    `json:"locale,omitempty"`
	Resources            *Resources `json:"resources,omitempty"`
}

type Inbound

type Inbound struct {
	Rules []*Rule `json:"rules"`
}

type InboundAccessError

type InboundAccessError struct {
	Revision string     `json:"revision"`
	Level    ErrorLevel `json:"level"`
	Rule     Rule       `json:"rule"`
}

func (InboundAccessError) GetLevel

func (this InboundAccessError) GetLevel() ErrorLevel

func (InboundAccessError) GetRevision

func (this InboundAccessError) GetRevision() string

func (InboundAccessError) IsStateError

func (InboundAccessError) IsStateError()

type InfluxDb

type InfluxDb struct {
	Name string `json:"name"`
}

func (InfluxDb) GetName

func (this InfluxDb) GetName() string

func (InfluxDb) IsStorage

func (InfluxDb) IsStorage()

type Insights

type Insights struct {
	Enabled               bool `json:"enabled"`
	QueryStringLength     int  `json:"queryStringLength"`
	RecordApplicationTags bool `json:"recordApplicationTags"`
	RecordClientAddress   bool `json:"recordClientAddress"`
}

type Instance

type Instance struct {
	ID       scalar.Ident  `json:"id"`
	Name     string        `json:"name"`
	State    InstanceState `json:"state"`
	Message  string        `json:"message"`
	Image    string        `json:"image"`
	Restarts int           `json:"restarts"`
	Created  time.Time     `json:"created"`

	GQLVars InstanceGQLVars `json:"-"`
}

type InstanceGQLVars

type InstanceGQLVars struct {
	Env     string
	Team    slug.Slug
	AppName string
}

type InstanceState

type InstanceState string
const (
	InstanceStateRunning InstanceState = "RUNNING"
	InstanceStateFailing InstanceState = "FAILING"
	InstanceStateUnknown InstanceState = "UNKNOWN"
)

func (InstanceState) IsValid

func (e InstanceState) IsValid() bool

func (InstanceState) MarshalGQL

func (e InstanceState) MarshalGQL(w io.Writer)

func (InstanceState) String

func (e InstanceState) String() string

func (*InstanceState) UnmarshalGQL

func (e *InstanceState) UnmarshalGQL(v interface{}) error

type InvalidNaisYamlError

type InvalidNaisYamlError struct {
	Revision string     `json:"revision"`
	Level    ErrorLevel `json:"level"`
	Detail   string     `json:"detail"`
}

func (InvalidNaisYamlError) GetLevel

func (this InvalidNaisYamlError) GetLevel() ErrorLevel

func (InvalidNaisYamlError) GetRevision

func (this InvalidNaisYamlError) GetRevision() string

func (InvalidNaisYamlError) IsStateError

func (InvalidNaisYamlError) IsStateError()

type JobState

type JobState struct {
	State  State        `json:"state"`
	Errors []StateError `json:"errors"`
}

type JobsStatus

type JobsStatus struct {
	Total   int `json:"total"`
	Failing int `json:"failing"`
}

Team status for jobs.

type Kafka

type Kafka struct {
	// The kafka pool name
	Name    string   `json:"name"`
	Streams bool     `json:"streams"`
	Topics  []*Topic `json:"topics"`
}

func (Kafka) GetName

func (this Kafka) GetName() string

func (Kafka) IsStorage

func (Kafka) IsStorage()

type Limits

type Limits struct {
	CPU    string `json:"cpu"`
	Memory string `json:"memory"`
}

type LogLine

type LogLine struct {
	Time     time.Time `json:"time"`
	Message  string    `json:"message"`
	Instance string    `json:"instance"`
}

type LogSubscriptionInput

type LogSubscriptionInput struct {
	App       *string   `json:"app,omitempty"`
	Job       *string   `json:"job,omitempty"`
	Env       string    `json:"env"`
	Team      slug.Slug `json:"team"`
	Instances []string  `json:"instances,omitempty"`
}

type MaintenanceWindow

type MaintenanceWindow struct {
	Day  int `json:"day"`
	Hour int `json:"hour"`
}

type Maskinporten

type Maskinporten struct {
	Scopes  MaskinportenScope `json:"scopes"`
	Enabled bool              `json:"enabled"`
}

func (Maskinporten) IsAuthz

func (Maskinporten) IsAuthz()

type MaskinportenScope

type MaskinportenScope struct {
	Consumes []*Consume `json:"consumes"`
	Exposes  []*Expose  `json:"exposes"`
}

type MonthlyCost

type MonthlyCost struct {
	// Sum for all months in the series in euros.
	Sum float64 `json:"sum"`
	// A list of monthly cost entries.
	Cost []*CostEntry `json:"cost"`
}

Montly cost type.

type MonthlyCostFilter

type MonthlyCostFilter struct {
	// The name of the team to get costs for.
	Team slug.Slug `json:"team"`
	// The name of the application to get costs for.
	App string `json:"app"`
	// The name of the environment to get costs for.
	Env string `json:"env"`
}

Monthly cost filter input type.

type Mutation

type Mutation struct {
}

The root query for implementing GraphQL mutations.

type NaisJob

type NaisJob struct {
	ID           scalar.Ident   `json:"id"`
	AccessPolicy AccessPolicy   `json:"accessPolicy"`
	DeployInfo   DeployInfo     `json:"deployInfo"`
	Env          Env            `json:"env"`
	Image        string         `json:"image"`
	Name         string         `json:"name"`
	Resources    Resources      `json:"resources"`
	Schedule     string         `json:"schedule"`
	Storage      []Storage      `json:"storage"`
	Authz        []Authz        `json:"authz"`
	Completions  int            `json:"completions"`
	Parallelism  int            `json:"parallelism"`
	Retries      int            `json:"retries"`
	JobState     JobState       `json:"jobState"`
	GQLVars      NaisJobGQLVars `json:"-"`
}

func (NaisJob) IsSearchNode

func (NaisJob) IsSearchNode()

func (NaisJob) IsWorkload

func (NaisJob) IsWorkload()

type NaisJobGQLVars

type NaisJobGQLVars struct {
	SecretNames []string
	Team        slug.Slug
}

type NaisJobList

type NaisJobList struct {
	Nodes    []*NaisJob `json:"nodes"`
	PageInfo PageInfo   `json:"pageInfo"`
}

type NaisNamespace

type NaisNamespace struct {
	// The environment for the namespace.
	Environment string `json:"environment"`
	// The namespace.
	Namespace slug.Slug `json:"namespace"`
}

NAIS namespace type.

type NewInstancesFailingError

type NewInstancesFailingError struct {
	Revision         string     `json:"revision"`
	Level            ErrorLevel `json:"level"`
	FailingInstances []string   `json:"failingInstances"`
}

func (NewInstancesFailingError) GetLevel

func (this NewInstancesFailingError) GetLevel() ErrorLevel

func (NewInstancesFailingError) GetRevision

func (this NewInstancesFailingError) GetRevision() string

func (NewInstancesFailingError) IsStateError

func (NewInstancesFailingError) IsStateError()

type NoRunningInstancesError

type NoRunningInstancesError struct {
	Revision string     `json:"revision"`
	Level    ErrorLevel `json:"level"`
}

func (NoRunningInstancesError) GetLevel

func (this NoRunningInstancesError) GetLevel() ErrorLevel

func (NoRunningInstancesError) GetRevision

func (this NoRunningInstancesError) GetRevision() string

func (NoRunningInstancesError) IsStateError

func (NoRunningInstancesError) IsStateError()

type OpenSearch

type OpenSearch struct {
	// The opensearch instance name
	Name   string `json:"name"`
	Access string `json:"access"`
}

func (OpenSearch) GetName

func (this OpenSearch) GetName() string

func (OpenSearch) IsStorage

func (OpenSearch) IsStorage()

type OrderBy

type OrderBy struct {
	// Order direction.
	Direction SortOrder `json:"direction"`
	// The field to order by.
	Field OrderByField `json:"field"`
}

type OrderByField

type OrderByField string
const (
	// Order by name
	OrderByFieldName OrderByField = "NAME"
	// Order by env
	OrderByFieldEnv OrderByField = "ENV"
	// Order by deployed time
	OrderByFieldDeployed OrderByField = "DEPLOYED"
	// Order by status
	OrderByFieldStatus OrderByField = "STATUS"
	// Order by appName.
	OrderByFieldAppName OrderByField = "APP_NAME"
	// Order by env.
	OrderByFieldEnvName OrderByField = "ENV_NAME"
	// Order by risk score
	OrderByFieldRiskScore OrderByField = "RISK_SCORE"
	// Order apps by vulnerability severity critical
	OrderByFieldSeverityCritical OrderByField = "SEVERITY_CRITICAL"
	// Order apps by vulnerability severity high
	OrderByFieldSeverityHigh OrderByField = "SEVERITY_HIGH"
	// Order apps by vulnerability severity medium
	OrderByFieldSeverityMedium OrderByField = "SEVERITY_MEDIUM"
	// Order apps by vulnerability severity low
	OrderByFieldSeverityLow OrderByField = "SEVERITY_LOW"
	// Order apps by vulnerability severity unassigned
	OrderByFieldSeverityUnassigned OrderByField = "SEVERITY_UNASSIGNED"
	// Order by PostgreSQL version
	OrderByFieldVersion OrderByField = "VERSION"
	// Order by cost
	OrderByFieldCost OrderByField = "COST"
	// Order by CPU utilization
	OrderByFieldCPU OrderByField = "CPU"
	// Order by memory utilization
	OrderByFieldMemory OrderByField = "MEMORY"
	// Order by disk utilization
	OrderByFieldDisk OrderByField = "DISK"
)

func (OrderByField) IsValid

func (e OrderByField) IsValid() bool

func (OrderByField) MarshalGQL

func (e OrderByField) MarshalGQL(w io.Writer)

func (OrderByField) String

func (e OrderByField) String() string

func (*OrderByField) UnmarshalGQL

func (e *OrderByField) UnmarshalGQL(v interface{}) error

type Outbound

type Outbound struct {
	Rules    []*Rule     `json:"rules"`
	External []*External `json:"external"`
}

type OutboundAccessError

type OutboundAccessError struct {
	Revision string     `json:"revision"`
	Level    ErrorLevel `json:"level"`
	Rule     Rule       `json:"rule"`
}

func (OutboundAccessError) GetLevel

func (this OutboundAccessError) GetLevel() ErrorLevel

func (OutboundAccessError) GetRevision

func (this OutboundAccessError) GetRevision() string

func (OutboundAccessError) IsStateError

func (OutboundAccessError) IsStateError()

type PageInfo

type PageInfo struct {
	// The total amount if items accessible.
	TotalCount int `json:"totalCount"`
	// Whether or not there exists a next page in the data set.
	HasNextPage bool `json:"hasNextPage"`
	// Whether or not there exists a previous page in the data set.
	HasPreviousPage bool `json:"hasPreviousPage"`
}

Pagination information.

func NewPageInfo

func NewPageInfo(p *Pagination, total int) PageInfo

func PaginatedSlice

func PaginatedSlice[T any](slice []T, p *Pagination) ([]T, PageInfo)

type Pagination

type Pagination struct {
	Offset int
	Limit  int
}

func NewPagination

func NewPagination(offset, limit *int) *Pagination

type Port

type Port struct {
	Port int `json:"port"`
}

type Query

type Query struct {
}

The query root for the NAIS GraphQL API.

type Reconciler

type Reconciler struct {
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`
	Description string `json:"description"`
	Enabled     bool   `json:"enabled"`
	MemberAware bool   `json:"memberAware"`
}

type ReconcilerConfig

type ReconcilerConfig struct {
	// Configuration key.
	Key string `json:"key"`
	// The human-friendly name of the configuration key.
	DisplayName string `json:"displayName"`
	// Configuration description.
	Description string `json:"description"`
	// Whether or not the configuration key has a value.
	Configured bool `json:"configured"`
	// Whether or not the configuration value is considered a secret. Secret values will not be exposed through the API.
	Secret bool `json:"secret"`
	// Configuration value. This will be set to null if the value is considered a secret.
	Value *string `json:"value,omitempty"`
}

Reconciler configuration type.

type ReconcilerConfigInput

type ReconcilerConfigInput struct {
	// Configuration key.
	Key string `json:"key"`
	// Configuration value.
	Value string `json:"value"`
}

Reconciler configuration input.

type ReconcilerList

type ReconcilerList struct {
	// The list of reconcilers.
	Nodes []*Reconciler `json:"nodes"`
	// Pagination information.
	PageInfo PageInfo `json:"pageInfo"`
}

Paginated reconcilers type.

type Redis

type Redis struct {
	Name   string `json:"name"`
	Access string `json:"access"`
}

func (Redis) GetName

func (this Redis) GetName() string

func (Redis) IsStorage

func (Redis) IsStorage()

type RepositoryAuthorization

type RepositoryAuthorization string

Repository authorizations.

const (
	// Authorize for NAIS deployment.
	RepositoryAuthorizationDeploy RepositoryAuthorization = "DEPLOY"
)

func (RepositoryAuthorization) IsValid

func (e RepositoryAuthorization) IsValid() bool

func (RepositoryAuthorization) MarshalGQL

func (e RepositoryAuthorization) MarshalGQL(w io.Writer)

func (RepositoryAuthorization) String

func (e RepositoryAuthorization) String() string

func (*RepositoryAuthorization) UnmarshalGQL

func (e *RepositoryAuthorization) UnmarshalGQL(v interface{}) error

type Requests

type Requests struct {
	CPU    string `json:"cpu"`
	Memory string `json:"memory"`
}

type ResourceType

type ResourceType string

Resource type.

const (
	ResourceTypeCPU    ResourceType = "CPU"
	ResourceTypeMemory ResourceType = "MEMORY"
)

func (ResourceType) IsValid

func (e ResourceType) IsValid() bool

func (ResourceType) MarshalGQL

func (e ResourceType) MarshalGQL(w io.Writer)

func (ResourceType) String

func (e ResourceType) String() string

func (ResourceType) ToDatabaseEnum

func (t ResourceType) ToDatabaseEnum() gensql.ResourceType

func (*ResourceType) UnmarshalGQL

func (e *ResourceType) UnmarshalGQL(v interface{}) error

type ResourceUtilization

type ResourceUtilization struct {
	// Timestamp of the value.
	Timestamp time.Time `json:"timestamp"`
	// The requested resource amount per pod.
	Request float64 `json:"request"`
	// The cost associated with the requested resource amount.
	RequestCost float64 `json:"requestCost"`
	// The actual resource usage.
	Usage float64 `json:"usage"`
	// The cost associated with the actual resource usage.
	UsageCost float64 `json:"usageCost"`
	// The overage of the requested resource amount.
	RequestCostOverage float64 `json:"requestCostOverage"`
	// The utilization in percent.
	Utilization float64 `json:"utilization"`
	// Estimated annual cost of the request overage.
	EstimatedAnnualOverageCost float64 `json:"estimatedAnnualOverageCost"`
}

Resource utilization type.

type ResourceUtilizationDateRange

type ResourceUtilizationDateRange struct {
	// The start of the range.
	From *scalar.Date `json:"from,omitempty"`
	// The end of the range.
	To *scalar.Date `json:"to,omitempty"`
}

Date range type.

type ResourceUtilizationForApp

type ResourceUtilizationForApp struct {
	// CPU resource utilization data for the environment.
	CPU []*ResourceUtilization `json:"cpu"`
	// Memory resource utilization data for the environment.
	Memory []*ResourceUtilization `json:"memory"`
}

Resource utilization for app type.

type ResourceUtilizationForEnv

type ResourceUtilizationForEnv struct {
	// Name of the environment.
	Env string `json:"env"`
	// CPU resource utilization data for the environment.
	CPU []*ResourceUtilization `json:"cpu"`
	// Memory resource utilization data for the environment.
	Memory []*ResourceUtilization `json:"memory"`
}

Resource utilization for env type.

type ResourceUtilizationOverageForTeam

type ResourceUtilizationOverageForTeam struct {
	// The sum of the overage cost for all apps.
	OverageCost float64 `json:"overageCost"`
	// Timestamp used for the calculated values.
	Timestamp time.Time `json:"timestamp"`
	// List of CPU overage data for all apps.
	CPU []*AppWithResourceUtilizationOverage `json:"cpu"`
	// List of memory overage data for all apps.
	Memory []*AppWithResourceUtilizationOverage `json:"memory"`
}

Resource utilization overage cost for team type.

type ResourceUtilizationTrend

type ResourceUtilizationTrend struct {
	// The current CPU utilization.
	CurrentCPUUtilization float64 `json:"currentCpuUtilization"`
	// The average CPU utilization from the previous week.
	AverageCPUUtilization float64 `json:"averageCpuUtilization"`
	// The CPU utilization trend in percentage.
	CPUUtilizationTrend float64 `json:"cpuUtilizationTrend"`
	// The current memory utilization.
	CurrentMemoryUtilization float64 `json:"currentMemoryUtilization"`
	// The average memory utilization from the previous week.
	AverageMemoryUtilization float64 `json:"averageMemoryUtilization"`
	// The memory utilization trend in percentage.
	MemoryUtilizationTrend float64 `json:"memoryUtilizationTrend"`
}

Resource utilization trend type.

type Resources

type Resources struct {
	Limits   Limits   `json:"limits"`
	Requests Requests `json:"requests"`
}

type RestartAppResult

type RestartAppResult struct {
	Error *string `json:"error,omitempty"`
}

type Role

type Role struct {
	Name     string      `json:"name"`
	IsGlobal bool        `json:"isGlobal"`
	GQLVars  RoleGQLVars `json:"-"`
}

type RoleGQLVars

type RoleGQLVars struct {
	TargetServiceAccountID uuid.UUID
	TargetTeamSlug         *slug.Slug
}

type Rule

type Rule struct {
	Application       string `json:"application"`
	Namespace         string `json:"namespace"`
	Cluster           string `json:"cluster"`
	Mutual            bool   `json:"mutual"`
	MutualExplanation string `json:"mutualExplanation"`
	IsJob             bool   `json:"isJob"`
}

type Run

type Run struct {
	ID             scalar.Ident `json:"id"`
	Name           string       `json:"name"`
	PodNames       []string     `json:"podNames"`
	StartTime      *time.Time   `json:"startTime,omitempty"`
	CompletionTime *time.Time   `json:"completionTime,omitempty"`
	Duration       string       `json:"duration"`
	Image          string       `json:"image"`
	Message        string       `json:"message"`
	Failed         bool         `json:"failed"`
	GQLVars        RunGQLVars   `json:"-"`
}

type RunGQLVars

type RunGQLVars struct {
	Env     string
	Team    slug.Slug
	NaisJob string
}

type SQLDatabase

type SQLDatabase struct {
	Charset        *string      `json:"charset"`
	Collation      *string      `json:"collation"`
	DeletionPolicy *string      `json:"deletionPolicy"`
	InstanceRef    string       `json:"instanceRef"`
	Healthy        bool         `json:"healthy"`
	Name           string       `json:"name"`
	Conditions     []*Condition `json:"conditions"`
}

func ToSqlDatabase

func ToSqlDatabase(u *unstructured.Unstructured, sqlInstanceName string) (*SQLDatabase, error)

func (SQLDatabase) GetName

func (i SQLDatabase) GetName() string

func (SQLDatabase) IsStorage

func (SQLDatabase) IsStorage()

type SQLInstance

type SQLInstance struct {
	BackupConfiguration *BackupConfiguration `json:"backupConfiguration"`
	CascadingDelete     bool                 `json:"cascadingDelete"`
	ConnectionName      string               `json:"connectionName"`
	DiskAutoresize      bool                 `json:"diskAutoresize"`
	DiskAutoresizeLimit int                  `json:"diskAutoresizeLimit"`
	Env                 Env                  `json:"env"`
	Flags               []*Flag              `json:"flags"`
	HighAvailability    bool                 `json:"highAvailability"`
	ID                  scalar.Ident         `json:"id"`
	MaintenanceWindow   *MaintenanceWindow   `json:"maintenanceWindow"`
	MaintenanceVersion  *string              `json:"maintenanceVersion"`
	Metrics             *SQLInstanceMetrics  `json:"metrics"`
	Name                string               `json:"name"`
	ProjectID           string               `json:"projectId"`
	Tier                string               `json:"tier"`
	Type                string               `json:"type"`
	Status              SQLInstanceStatus    `json:"status"`
	GQLVars             SQLInstanceGQLVars   `json:"-"`
}

func ToSqlInstance

func ToSqlInstance(u *unstructured.Unstructured, env string) (*SQLInstance, error)

func (SQLInstance) GetName

func (i SQLInstance) GetName() string

func (SQLInstance) IsHealthy

func (i SQLInstance) IsHealthy() bool

func (SQLInstance) IsNotReady

func (i SQLInstance) IsNotReady() bool

func (SQLInstance) IsSearchNode

func (SQLInstance) IsSearchNode()

func (SQLInstance) IsStorage

func (SQLInstance) IsStorage()

type SQLInstanceCPU

type SQLInstanceCPU struct {
	Cores       float64 `json:"cores"`
	Utilization float64 `json:"utilization"`
}

type SQLInstanceDisk

type SQLInstanceDisk struct {
	QuotaBytes  int     `json:"quotaBytes"`
	Utilization float64 `json:"utilization"`
}

type SQLInstanceGQLVars

type SQLInstanceGQLVars struct {
	TeamSlug       slug.Slug
	Labels         map[string]string
	Annotations    map[string]string
	OwnerReference *v1.OwnerReference
}

type SQLInstanceMemory

type SQLInstanceMemory struct {
	QuotaBytes  int     `json:"quotaBytes"`
	Utilization float64 `json:"utilization"`
}

type SQLInstanceMetrics

type SQLInstanceMetrics struct {
	Cost   float64            `json:"cost"`
	CPU    *SQLInstanceCPU    `json:"cpu"`
	Memory *SQLInstanceMemory `json:"memory"`
	Disk   *SQLInstanceDisk   `json:"disk"`
}

type SQLInstanceStatus

type SQLInstanceStatus struct {
	Conditions       []*Condition `json:"conditions"`
	PublicIPAddress  *string      `json:"publicIpAddress,omitempty"`
	PrivateIPAddress *string      `json:"privateIpAddress,omitempty"`
}

type SQLInstancesList

type SQLInstancesList struct {
	Nodes    []*SQLInstance       `json:"nodes"`
	PageInfo PageInfo             `json:"pageInfo"`
	Metrics  *SQLInstancesMetrics `json:"metrics"`
}

type SQLInstancesMetrics

type SQLInstancesMetrics struct {
	Cost   float64           `json:"cost"`
	CPU    SQLInstanceCPU    `json:"cpu"`
	Memory SQLInstanceMemory `json:"memory"`
	Disk   SQLInstanceDisk   `json:"disk"`
}

type SQLInstancesStatus

type SQLInstancesStatus struct {
	Total           int `json:"total"`
	Failing         int `json:"failing"`
	OtherConditions int `json:"otherConditions"`
}

type SearchFilter

type SearchFilter struct {
	Type *SearchType `json:"type,omitempty"`
}

type SearchList

type SearchList struct {
	PageInfo PageInfo     `json:"pageInfo"`
	Nodes    []SearchNode `json:"nodes"`
}

type SearchNode

type SearchNode interface {
	IsSearchNode()
}

type SearchType

type SearchType string
const (
	SearchTypeApp         SearchType = "APP"
	SearchTypeTeam        SearchType = "TEAM"
	SearchTypeNaisjob     SearchType = "NAISJOB"
	SearchTypeSQLInstance SearchType = "SQLINSTANCE"
)

func (SearchType) IsValid

func (e SearchType) IsValid() bool

func (SearchType) MarshalGQL

func (e SearchType) MarshalGQL(w io.Writer)

func (SearchType) String

func (e SearchType) String() string

func (*SearchType) UnmarshalGQL

func (e *SearchType) UnmarshalGQL(v interface{}) error

type Secret

type Secret struct {
	ID             scalar.Ident      `json:"id"` // This is a graphql ID, cahcing, deduplication etc
	Name           string            `json:"name"`
	Data           map[string]string `json:"data"`
	LastModifiedAt *time.Time        `json:"lastModifiedAt,omitempty"`

	GQLVars SecretGQLVars `json:"-"` // Internal context for custom resolvers
}

type SecretGQLVars

type SecretGQLVars struct {
	Env            string
	Team           slug.Slug
	LastModifiedBy string
}

type ServiceAccount

type ServiceAccount struct {
	ID   uuid.UUID `json:"id"`
	Name string    `json:"name"`
}

func (ServiceAccount) IsAuthenticatedUser

func (ServiceAccount) IsAuthenticatedUser()

type Sidecar

type Sidecar struct {
	AutoLogin            bool      `json:"autoLogin"`
	AutoLoginIgnorePaths []string  `json:"autoLoginIgnorePaths"`
	Resources            Resources `json:"resources"`
}

type SlackAlertsChannel

type SlackAlertsChannel struct {
	// The environment for the alerts sent to the channel.
	Environment string `json:"environment"`
	// The name of the Slack channel.
	ChannelName string `json:"channelName"`
}

Slack alerts channel type.

type SlackAlertsChannelInput

type SlackAlertsChannelInput struct {
	// The environment for the alerts sent to the channel.
	Environment string `json:"environment"`
	// The name of the Slack channel.
	ChannelName *string `json:"channelName,omitempty"`
}

Slack alerts channel input.

type SortOrder

type SortOrder string
const (
	// Ascending sort order.
	SortOrderAsc SortOrder = "ASC"
	// Descending sort order.
	SortOrderDesc SortOrder = "DESC"
)

func (SortOrder) IsValid

func (e SortOrder) IsValid() bool

func (SortOrder) MarshalGQL

func (e SortOrder) MarshalGQL(w io.Writer)

func (SortOrder) String

func (e SortOrder) String() string

func (*SortOrder) UnmarshalGQL

func (e *SortOrder) UnmarshalGQL(v interface{}) error

type State

type State string
const (
	StateNais    State = "NAIS"
	StateNotnais State = "NOTNAIS"
	StateFailing State = "FAILING"
	StateUnknown State = "UNKNOWN"
)

func (State) IsValid

func (e State) IsValid() bool

func (State) MarshalGQL

func (e State) MarshalGQL(w io.Writer)

func (State) String

func (e State) String() string

func (*State) UnmarshalGQL

func (e *State) UnmarshalGQL(v interface{}) error

type StateError

type StateError interface {
	IsStateError()
	GetRevision() string
	GetLevel() ErrorLevel
}

type Storage

type Storage interface {
	IsStorage()
	GetName() string
}

type Subscription

type Subscription struct {
}

type SyncError

type SyncError struct {
	// Creation time of the error.
	CreatedAt time.Time `json:"createdAt"`
	// The name of the reconciler.
	Reconciler string `json:"reconciler"`
	// Error message.
	Error string `json:"error"`
}

Sync error type.

type SynchronizationFailingError

type SynchronizationFailingError struct {
	Revision string     `json:"revision"`
	Level    ErrorLevel `json:"level"`
	Detail   string     `json:"detail"`
}

func (SynchronizationFailingError) GetLevel

func (this SynchronizationFailingError) GetLevel() ErrorLevel

func (SynchronizationFailingError) GetRevision

func (this SynchronizationFailingError) GetRevision() string

func (SynchronizationFailingError) IsStateError

func (SynchronizationFailingError) IsStateError()

type Team

type Team struct {
	Slug                   slug.Slug  `json:"slug"`
	Purpose                string     `json:"purpose"`
	LastSuccessfulSync     *time.Time `json:"lastSuccessfulSync,omitempty"`
	SlackChannel           string     `json:"slackChannel"`
	GoogleGroupEmail       *string    `json:"googleGroupEmail"`
	GitHubTeamSlug         *string    `json:"gitHubTeamSlug"`
	AzureGroupID           *uuid.UUID `json:"azureGroupID"`
	GoogleArtifactRegistry *string    `json:"googleArtifactRegistry"`
}

func (Team) IsSearchNode

func (Team) IsSearchNode()

type TeamDeleteKey

type TeamDeleteKey struct {
	Key       string               `json:"key"`
	CreatedAt time.Time            `json:"createdAt"`
	Expires   time.Time            `json:"expires"`
	GQLVars   TeamDeleteKeyGQLVars `json:"-"`
}

type TeamDeleteKeyGQLVars

type TeamDeleteKeyGQLVars struct {
	TeamSlug slug.Slug
	UserID   uuid.UUID
}

type TeamInventory

type TeamInventory struct {
	SQLInstances []*SQLInstance `json:"sqlInstances"`
}

type TeamList

type TeamList struct {
	// The list of teams.
	Nodes []*Team `json:"nodes"`
	// Pagination information.
	PageInfo PageInfo `json:"pageInfo"`
}

Paginated teams type.

type TeamMember

type TeamMember struct {
	TeamRole TeamRole
	TeamSlug slug.Slug
	UserID   scalar.Ident
}

type TeamMemberInput

type TeamMemberInput struct {
	// The ID of user.
	UserID scalar.Ident `json:"userId"`
	// The role that the user will receive.
	Role TeamRole `json:"role"`
	// Reconcilers to opt the team member out of.
	ReconcilerOptOuts []string `json:"reconcilerOptOuts,omitempty"`
}

Team member input.

type TeamMemberList

type TeamMemberList struct {
	Nodes    []*TeamMember `json:"nodes"`
	PageInfo PageInfo      `json:"pageInfo"`
}

type TeamMemberReconciler

type TeamMemberReconciler struct {
	Enabled bool                        `json:"enabled"`
	GQLVars TeamMemberReconcilerGQLVars `json:"-"`
}

type TeamMemberReconcilerGQLVars

type TeamMemberReconcilerGQLVars struct {
	Name string
}

type TeamRole

type TeamRole string

Available team roles.

const (
	// Regular member, read only access.
	TeamRoleMember TeamRole = "MEMBER"
	// Team owner, full access to the team.
	TeamRoleOwner TeamRole = "OWNER"
)

func (TeamRole) IsValid

func (e TeamRole) IsValid() bool

func (TeamRole) MarshalGQL

func (e TeamRole) MarshalGQL(w io.Writer)

func (TeamRole) String

func (e TeamRole) String() string

func (*TeamRole) UnmarshalGQL

func (e *TeamRole) UnmarshalGQL(v interface{}) error

type TeamStatus

type TeamStatus struct {
	Apps         AppsStatus         `json:"apps"`
	Jobs         JobsStatus         `json:"jobs"`
	SQLInstances SQLInstancesStatus `json:"sqlInstances"`
}

Team status.

type TeamSync

type TeamSync struct {
	CorrelationID uuid.UUID `json:"correlationID"`
}

type TeamsFilter

type TeamsFilter struct {
	Github *TeamsFilterGitHub `json:"github,omitempty"`
}

Input for filtering teams.

type TeamsFilterGitHub

type TeamsFilterGitHub struct {
	// Filter repostiories by repo name
	RepoName string `json:"repoName"`
	// Filter repostiories by permission name
	PermissionName string `json:"permissionName"`
}

type TokenX

type TokenX struct {
	MountSecretsAsFilesOnly bool `json:"mountSecretsAsFilesOnly"`
}

func (TokenX) IsAuthz

func (TokenX) IsAuthz()

type Topic

type Topic struct {
	Name string `json:"name"`
	ACL  []*ACL `json:"acl"`
}

type UpdateTeamInput

type UpdateTeamInput struct {
	// Specify team purpose to update the existing value.
	Purpose *string `json:"purpose,omitempty"`
	// Specify the Slack channel to update the existing value.
	SlackChannel *string `json:"slackChannel,omitempty"`
	// A list of Slack channels for NAIS alerts.
	SlackAlertsChannels []*SlackAlertsChannelInput `json:"slackAlertsChannels,omitempty"`
}

Input for updating an existing team.

func (UpdateTeamInput) Sanitize

func (input UpdateTeamInput) Sanitize() UpdateTeamInput

func (UpdateTeamInput) Validate

func (input UpdateTeamInput) Validate(validEnvironments []string) error

type User

type User struct {
	ID         scalar.Ident `json:"id"`
	Email      string       `json:"email"`
	Name       string       `json:"name"`
	ExternalID string       `json:"externalId"`
}

func (User) IsAuthenticatedUser

func (User) IsAuthenticatedUser()

type UserList

type UserList struct {
	Nodes    []*User  `json:"nodes"`
	PageInfo PageInfo `json:"pageInfo"`
}

type UserSyncRun

type UserSyncRun struct {
	CorrelationID uuid.UUID          `json:"correlationID"`
	StartedAt     time.Time          `json:"startedAt"`
	FinishedAt    *time.Time         `json:"finishedAt,omitempty"`
	GQLVars       UserSyncRunGQLVars `json:"-"`
}

type UserSyncRunGQLVars

type UserSyncRunGQLVars struct {
	Status usersync.RunStatus
	Error  error
}

type UserSyncRunStatus

type UserSyncRunStatus string

User sync run status.

const (
	// User sync run in progress.
	UserSyncRunStatusInProgress UserSyncRunStatus = "IN_PROGRESS"
	// Successful user sync run.
	UserSyncRunStatusSuccess UserSyncRunStatus = "SUCCESS"
	// Failed user sync run.
	UserSyncRunStatusFailure UserSyncRunStatus = "FAILURE"
)

func (UserSyncRunStatus) IsValid

func (e UserSyncRunStatus) IsValid() bool

func (UserSyncRunStatus) MarshalGQL

func (e UserSyncRunStatus) MarshalGQL(w io.Writer)

func (UserSyncRunStatus) String

func (e UserSyncRunStatus) String() string

func (*UserSyncRunStatus) UnmarshalGQL

func (e *UserSyncRunStatus) UnmarshalGQL(v interface{}) error

type Variable

type Variable struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type VariableInput

type VariableInput struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type Vulnerability

type Vulnerability struct {
	ID           scalar.Ident          `json:"id"`
	AppName      string                `json:"appName"`
	Env          string                `json:"env"`
	FindingsLink string                `json:"findingsLink"`
	Summary      *VulnerabilitySummary `json:"summary,omitempty"`
	HasBom       bool                  `json:"hasBom"`
}

type VulnerabilityFilter

type VulnerabilityFilter struct {
	// Filter by environment
	Envs []string `json:"envs,omitempty"`
	// Require the presence of a Software Bill of Materials (SBOM) in the vulnerability report.
	RequireSbom *bool `json:"requireSbom,omitempty"`
}

type VulnerabilityList

type VulnerabilityList struct {
	Nodes    []*Vulnerability `json:"nodes"`
	PageInfo PageInfo         `json:"pageInfo"`
}

type VulnerabilityMetric

type VulnerabilityMetric struct {
	// The date of the metric.
	Date time.Time `json:"date"`
	// The number of critical vulnerabilities.
	Critical int `json:"critical"`
	// The number of high vulnerabilities.
	High int `json:"high"`
	// The number of medium vulnerabilities.
	Medium int `json:"medium"`
	// The number of low vulnerabilities.
	Low int `json:"low"`
	// The number of unassigned vulnerabilities.
	Unassigned int `json:"unassigned"`
	// The weighted severity score calculated from the number of vulnerabilities.
	RiskScore int `json:"riskScore"`
	// The number of applications with vulnerabilities.
	Count int `json:"count"`
}

type VulnerabilityMetrics

type VulnerabilityMetrics struct {
	// The minimum date for the metrics available in the database.
	MinDate *scalar.Date `json:"minDate,omitempty"`
	// The maximum date for the metrics available in the database.
	MaxDate *scalar.Date `json:"maxDate,omitempty"`
	// The metrics for the team's applications.
	Data []*VulnerabilityMetric `json:"data"`
}

type VulnerabilitySummary

type VulnerabilitySummary struct {
	Total      int `json:"total"`
	RiskScore  int `json:"riskScore"`
	Critical   int `json:"critical"`
	High       int `json:"high"`
	Medium     int `json:"medium"`
	Low        int `json:"low"`
	Unassigned int `json:"unassigned"`
	BomCount   int `json:"bomCount"`
}

type Workload

type Workload interface {
	IsWorkload()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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