Documentation ¶
Index ¶
- Variables
- func Compare[T constraints.Ordered](a, b T, direction SortOrder) bool
- func IsHealthy(cs []v1alpha1.Condition) bool
- func SortWith[T any](slice []T, eval func(a, b T) bool)
- type ACL
- type AccessPolicy
- type App
- type AppCost
- type AppGQLVars
- type AppList
- type AppState
- type AppWithResourceUtilizationOverage
- type AppsStatus
- type AuditLog
- type AuditLogList
- type AuthenticatedUser
- type Authz
- type AutoScaling
- type AzureAd
- type AzureApplication
- type BackupConfiguration
- type BigQueryDataset
- type Bucket
- type Claims
- type Condition
- type Consume
- type Consumer
- type CostEntry
- type CostSeries
- type CreateTeamInput
- type CurrentResourceUtilization
- type DailyCost
- type DeleteAppResult
- type DeleteJobResult
- type DeployInfo
- type DeployInfoGQLVars
- type Deployment
- type DeploymentKey
- type DeploymentList
- type DeploymentResource
- type DeploymentResponse
- type DeploymentStatus
- type DeprecatedIngressError
- type DeprecatedRegistryError
- type Env
- type EnvCost
- type EnvCostFilter
- type Error
- type ErrorLevel
- type Expose
- type External
- type FailedRunError
- type Flag
- type GcpProject
- type GitHubRepositoriesFilter
- type GitHubRepository
- type GitHubRepositoryGQLVars
- type GitHubRepositoryList
- type GitHubRepositoryPermission
- type Group
- type IDPorten
- type IDPortenSidecar
- type Inbound
- type InboundAccessError
- type InfluxDb
- type Insights
- type Instance
- type InstanceGQLVars
- type InstanceState
- type InvalidNaisYamlError
- type JobState
- type JobsStatus
- type Kafka
- type Limits
- type LogLine
- type LogSubscriptionInput
- type MaintenanceWindow
- type Maskinporten
- type MaskinportenScope
- type MonthlyCost
- type MonthlyCostFilter
- type Mutation
- type NaisJob
- type NaisJobGQLVars
- type NaisJobList
- type NaisNamespace
- type NewInstancesFailingError
- type NoRunningInstancesError
- type OpenSearch
- type OrderBy
- type OrderByField
- type Outbound
- type OutboundAccessError
- type PageInfo
- type Pagination
- type Port
- type Query
- type Reconciler
- type ReconcilerConfig
- type ReconcilerConfigInput
- type ReconcilerList
- type Redis
- type RepositoryAuthorization
- type Requests
- type ResourceType
- type ResourceUtilization
- type ResourceUtilizationDateRange
- type ResourceUtilizationForApp
- type ResourceUtilizationForEnv
- type ResourceUtilizationOverageForTeam
- type ResourceUtilizationTrend
- type Resources
- type RestartAppResult
- type Role
- type RoleGQLVars
- type Rule
- type Run
- type RunGQLVars
- type SQLDatabase
- type SQLInstance
- type SQLInstanceCPU
- type SQLInstanceDisk
- type SQLInstanceGQLVars
- type SQLInstanceMemory
- type SQLInstanceMetrics
- type SQLInstanceStatus
- type SQLInstancesList
- type SQLInstancesMetrics
- type SQLInstancesStatus
- type SearchFilter
- type SearchList
- type SearchNode
- type SearchType
- type Secret
- type SecretGQLVars
- type ServiceAccount
- type Sidecar
- type SlackAlertsChannel
- type SlackAlertsChannelInput
- type SortOrder
- type State
- type StateError
- type Storage
- type Subscription
- type SyncError
- type SynchronizationFailingError
- type Team
- type TeamDeleteKey
- type TeamDeleteKeyGQLVars
- type TeamInventory
- type TeamList
- type TeamMember
- type TeamMemberInput
- type TeamMemberList
- type TeamMemberReconciler
- type TeamMemberReconcilerGQLVars
- type TeamRole
- type TeamStatus
- type TeamSync
- type TeamsFilter
- type TeamsFilterGitHub
- type TokenX
- type Topic
- type UpdateTeamInput
- type User
- type UserList
- type UserSyncRun
- type UserSyncRunGQLVars
- type UserSyncRunStatus
- type Variable
- type VariableInput
- type Vulnerability
- type VulnerabilityFilter
- type VulnerabilityList
- type VulnerabilityMetric
- type VulnerabilityMetrics
- type VulnerabilitySummary
- type Workload
Constants ¶
This section is empty.
Variables ¶
var AllErrorLevel = []ErrorLevel{ ErrorLevelTodo, ErrorLevelWarning, ErrorLevelError, }
var AllInstanceState = []InstanceState{ InstanceStateRunning, InstanceStateFailing, InstanceStateUnknown, }
var AllOrderByField = []OrderByField{ OrderByFieldName, OrderByFieldEnv, OrderByFieldDeployed, OrderByFieldStatus, OrderByFieldAppName, OrderByFieldEnvName, OrderByFieldRiskScore, OrderByFieldSeverityCritical, OrderByFieldSeverityHigh, OrderByFieldSeverityMedium, OrderByFieldSeverityLow, OrderByFieldSeverityUnassigned, OrderByFieldVersion, OrderByFieldCost, OrderByFieldCPU, OrderByFieldMemory, OrderByFieldDisk, }
var AllRepositoryAuthorization = []RepositoryAuthorization{ RepositoryAuthorizationDeploy, }
var AllResourceType = []ResourceType{ ResourceTypeCPU, ResourceTypeMemory, }
var AllSearchType = []SearchType{ SearchTypeApp, SearchTypeTeam, SearchTypeNaisjob, SearchTypeSQLInstance, }
var AllSortOrder = []SortOrder{ SortOrderAsc, SortOrderDesc, }
var AllState = []State{ StateNais, StateNotnais, StateFailing, StateUnknown, }
var AllTeamRole = []TeamRole{ TeamRoleMember, TeamRoleOwner, }
var AllUserSyncRunStatus = []UserSyncRunStatus{ UserSyncRunStatusInProgress, UserSyncRunStatusSuccess, UserSyncRunStatusFailure, }
Functions ¶
Types ¶
type AccessPolicy ¶
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 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 ¶
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 AuthenticatedUser ¶
type AuthenticatedUser interface {
IsAuthenticatedUser()
}
Authenticated user type. Can be a user or a service account.
type AutoScaling ¶
type AzureAd ¶
type AzureAd struct { Application *AzureApplication `json:"application,omitempty"` Sidecar *Sidecar `json:"sidecar,omitempty"` }
type AzureApplication ¶
type BackupConfiguration ¶
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 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 DeleteJobResult ¶
type DeployInfo ¶
type DeployInfoGQLVars ¶
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 DeploymentResponse ¶
type DeploymentResponse interface {
IsDeploymentResponse()
}
type DeploymentStatus ¶
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 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 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 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 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"` }
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 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 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 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 ¶
Team status for jobs.
type Kafka ¶
type LogSubscriptionInput ¶
type MaintenanceWindow ¶
type Maskinporten ¶
type Maskinporten struct { Scopes MaskinportenScope `json:"scopes"` Enabled bool `json:"enabled"` }
func (Maskinporten) IsAuthz ¶
func (Maskinporten) IsAuthz()
type MaskinportenScope ¶
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 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 NaisJobList ¶
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 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 ¶
func NewPagination ¶
func NewPagination(offset, limit *int) *Pagination
type Reconciler ¶
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 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 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 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 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 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 SQLInstanceDisk ¶
type SQLInstanceGQLVars ¶
type SQLInstanceMemory ¶
type SQLInstanceMetrics ¶
type SQLInstanceMetrics struct { Cost float64 `json:"cost"` CPU *SQLInstanceCPU `json:"cpu"` Memory *SQLInstanceMemory `json:"memory"` Disk *SQLInstanceDisk `json:"disk"` }
type SQLInstanceStatus ¶
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 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 ServiceAccount ¶
func (ServiceAccount) IsAuthenticatedUser ¶
func (ServiceAccount) IsAuthenticatedUser()
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
func (SortOrder) MarshalGQL ¶
func (*SortOrder) UnmarshalGQL ¶
type StateError ¶
type StateError interface { IsStateError() GetRevision() string GetLevel() ErrorLevel }
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 TeamDeleteKeyGQLVars ¶
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 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.
func (TeamRole) MarshalGQL ¶
func (*TeamRole) UnmarshalGQL ¶
type TeamStatus ¶
type TeamStatus struct { Apps AppsStatus `json:"apps"` Jobs JobsStatus `json:"jobs"` SQLInstances SQLInstancesStatus `json:"sqlInstances"` }
Team status.
type TeamsFilter ¶
type TeamsFilter struct {
Github *TeamsFilterGitHub `json:"github,omitempty"`
}
Input for filtering teams.
type TeamsFilterGitHub ¶
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 UserSyncRun ¶
type UserSyncRunGQLVars ¶
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 VariableInput ¶
type Vulnerability ¶
type VulnerabilityFilter ¶
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"` }