Documentation ¶
Index ¶
- Variables
- func Compare[T constraints.Ordered](a, b T, direction SortOrder) bool
- func SortWith[T any](slice []T, eval func(a, b T) bool)
- type ACL
- type AccessPolicy
- type App
- type AppConnection
- type AppCost
- type AppEdge
- type AppGQLVars
- type AppState
- type AppWithResourceUtilizationOverage
- type AppsStatus
- type Authz
- type AutoScaling
- type AzureAd
- type AzureApplication
- type BigQueryDataset
- type Bucket
- type Claims
- type Connection
- type Consume
- type Consumer
- type CostEntry
- type CostSeries
- type CurrentResourceUtilization
- type DailyCost
- type Database
- type DatabaseUser
- type DeployInfo
- type DeployInfoGQLVars
- type Deployment
- type DeploymentConnection
- type DeploymentEdge
- type DeploymentKey
- type DeploymentResource
- type DeploymentResponse
- type DeploymentStatus
- type DeprecatedIngressError
- type DeprecatedRegistryError
- type Edge
- type Env
- type EnvCost
- type EnvCostFilter
- type Error
- type ErrorLevel
- type Expose
- type External
- type FailedRunError
- type Flag
- type GcpProject
- type GithubRepository
- type GithubRepositoryConnection
- type GithubRepositoryEdge
- 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 Maintenance
- type Maskinporten
- type MaskinportenScope
- type MonthlyCost
- type MonthlyCostFilter
- type NaisJob
- type NaisJobConnection
- type NaisJobEdge
- type NaisJobGQLVars
- type NewInstancesFailingError
- type NoRunningInstancesError
- type Node
- type OpenSearch
- type OrderBy
- type OrderByField
- type Outbound
- type OutboundAccessError
- type PageInfo
- type Pagination
- type Port
- type Redis
- type RepositoryAuthorization
- type Requests
- type ResourceType
- type ResourceUtilization
- type ResourceUtilizationDateRange
- type ResourceUtilizationForApp
- type ResourceUtilizationForEnv
- type ResourceUtilizationOverageForTeam
- type ResourceUtilizationTrend
- type Resources
- type Rule
- type Run
- type RunGQLVars
- type SQLInstance
- type SearchConnection
- type SearchEdge
- type SearchFilter
- type SearchNode
- type SearchType
- type Sidecar
- type SlackAlertsChannel
- type SortOrder
- type State
- type StateError
- type Storage
- type Team
- type TeamConnection
- type TeamEdge
- type TeamMember
- type TeamMemberConnection
- type TeamMemberEdge
- type TeamRole
- type TeamStatus
- type TokenX
- type Topic
- type User
- type Variable
- type VulnerabilitiesConnection
- type VulnerabilitiesEdge
- type VulnerabilitiesNode
- type VulnerabilitySummary
Constants ¶
This section is empty.
Variables ¶
var AllErrorLevel = []ErrorLevel{ ErrorLevelInfo, ErrorLevelWarning, ErrorLevelError, }
var AllInstanceState = []InstanceState{ InstanceStateRunning, InstanceStateFailing, InstanceStateUnknown, }
var AllOrderByField = []OrderByField{ OrderByFieldName, OrderByFieldEnv, OrderByFieldDeployed, OrderByFieldStatus, OrderByFieldAppName, OrderByFieldEnvName, OrderByFieldRiskScore, OrderByFieldSeverityCritical, OrderByFieldSeverityHigh, OrderByFieldSeverityMedium, OrderByFieldSeverityLow, OrderByFieldSeverityUnassigned, OrderByFieldRole, }
var AllRepositoryAuthorization = []RepositoryAuthorization{ RepositoryAuthorizationDeploy, }
var AllResourceType = []ResourceType{ ResourceTypeCPU, ResourceTypeMemory, }
var AllSearchType = []SearchType{ SearchTypeApp, SearchTypeTeam, SearchTypeNaisjob, }
var AllSortOrder = []SortOrder{ SortOrderAsc, SortOrderDesc, }
var AllState = []State{ StateNais, StateNotnais, StateFailing, StateUnknown, }
var AllTeamRole = []TeamRole{ TeamRoleMember, TeamRoleOwner, }
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"` Instances []Instance `json:"instances"` AccessPolicy AccessPolicy `json:"accessPolicy"` Resources Resources `json:"resources"` AutoScaling AutoScaling `json:"autoScaling"` Storage []Storage `json:"storage"` Variables []Variable `json:"variables"` Authz []Authz `json:"authz"` Manifest string `json:"manifest"` Team Team `json:"team"` AppState AppState `json:"appState"` Vulnerabilities *VulnerabilitiesNode `json:"vulnerabilities,omitempty"` GQLVars AppGQLVars `json:"-"` }
func (App) IsSearchNode ¶
func (App) IsSearchNode()
type AppConnection ¶
type AppConnection struct { TotalCount int `json:"totalCount"` PageInfo PageInfo `json:"pageInfo"` Edges []AppEdge `json:"edges"` }
func (AppConnection) GetPageInfo ¶
func (this AppConnection) GetPageInfo() PageInfo
Pagination information.
func (AppConnection) GetTotalCount ¶
func (this AppConnection) GetTotalCount() int
The total count of items in the connection.
func (AppConnection) IsConnection ¶
func (AppConnection) IsConnection()
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 {
Team string
}
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 string `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 AutoScaling ¶
type AzureAd ¶
type AzureAd struct { Application *AzureApplication `json:"application,omitempty"` Sidecar *Sidecar `json:"sidecar,omitempty"` }
type AzureApplication ¶
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 Connection ¶
type Connection interface { IsConnection() // The total count of items in the connection. GetTotalCount() int // Pagination information. GetPageInfo() PageInfo // A list of edges. GetEdges() []Edge }
Connection interface.
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 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 Database ¶
type Database struct { EnvVarPrefix string `json:"envVarPrefix"` Name string `json:"name"` Users []DatabaseUser `json:"users"` }
type DatabaseUser ¶
type DatabaseUser struct {
Name string `json:"name"`
}
type DeployInfo ¶
type DeployInfo struct { Deployer string `json:"deployer"` Timestamp *time.Time `json:"timestamp,omitempty"` CommitSha string `json:"commitSha"` URL string `json:"url"` History DeploymentResponse `json:"history"` GQLVars DeployInfoGQLVars `json:"-"` }
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 DeploymentConnection ¶
type DeploymentConnection struct { TotalCount int `json:"totalCount"` PageInfo PageInfo `json:"pageInfo"` Edges []DeploymentEdge `json:"edges"` }
func (DeploymentConnection) GetEdges ¶
func (this DeploymentConnection) GetEdges() []Edge
A list of edges.
func (DeploymentConnection) GetPageInfo ¶
func (this DeploymentConnection) GetPageInfo() PageInfo
Pagination information.
func (DeploymentConnection) GetTotalCount ¶
func (this DeploymentConnection) GetTotalCount() int
The total count of items in the connection.
func (DeploymentConnection) IsConnection ¶
func (DeploymentConnection) IsConnection()
func (DeploymentConnection) IsDeploymentResponse ¶
func (DeploymentConnection) IsDeploymentResponse()
type DeploymentEdge ¶
type DeploymentEdge struct { Cursor scalar.Cursor `json:"cursor"` Node Deployment `json:"node"` }
func (DeploymentEdge) GetCursor ¶
func (this DeploymentEdge) GetCursor() scalar.Cursor
A cursor for use in pagination.
func (DeploymentEdge) IsEdge ¶
func (DeploymentEdge) IsEdge()
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.
func (DeploymentKey) GetID ¶
func (this DeploymentKey) GetID() scalar.Ident
The unique ID of an object.
func (DeploymentKey) IsNode ¶
func (DeploymentKey) IsNode()
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 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 string `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 ( ErrorLevelInfo ErrorLevel = "INFO" 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 unique identifier of the GCP project. ID string `json:"id"` // The name of the GCP project. Name string `json:"name"` // The environment for the GCP project. Environment string `json:"environment"` }
GCP project type.
type GithubRepository ¶
type GithubRepository struct { ID scalar.Ident `json:"id"` // The name of the GitHub repository. Name string `json:"name"` // The authorizations for the GitHub repository. Authorizations []RepositoryAuthorization `json:"authorizations,omitempty"` // The name of the role the team has been granted in the repository. RoleName string `json:"roleName"` // The permissions the team has for the GitHub repository. Permissions []string `json:"permissions,omitempty"` // Whether or not the repository is archived. Archived bool `json:"archived"` }
GitHub repository type.
type GithubRepositoryConnection ¶
type GithubRepositoryConnection struct { // The total count of available GitHub repositories. TotalCount int `json:"totalCount"` // Pagination information. PageInfo PageInfo `json:"pageInfo"` // A list of GitHub repository edges. Edges []GithubRepositoryEdge `json:"edges"` }
GitHub repository connection type.
func (GithubRepositoryConnection) GetEdges ¶
func (this GithubRepositoryConnection) GetEdges() []Edge
A list of edges.
func (GithubRepositoryConnection) GetPageInfo ¶
func (this GithubRepositoryConnection) GetPageInfo() PageInfo
Pagination information.
func (GithubRepositoryConnection) GetTotalCount ¶
func (this GithubRepositoryConnection) GetTotalCount() int
The total count of items in the connection.
func (GithubRepositoryConnection) IsConnection ¶
func (GithubRepositoryConnection) IsConnection()
type GithubRepositoryEdge ¶
type GithubRepositoryEdge struct { // A cursor for use in pagination. Cursor scalar.Cursor `json:"cursor"` // The GitHub repository at the end of the edge. Node GithubRepository `json:"node"` }
GitHub repository edge type.
func (GithubRepositoryEdge) GetCursor ¶
func (this GithubRepositoryEdge) GetCursor() scalar.Cursor
A cursor for use in pagination.
func (GithubRepositoryEdge) IsEdge ¶
func (GithubRepositoryEdge) IsEdge()
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 InstanceGQLVars ¶
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 Maintenance ¶
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 string `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"` Runs []Run `json:"runs"` Manifest string `json:"manifest"` Name string `json:"name"` Resources Resources `json:"resources"` Schedule string `json:"schedule"` Team Team `json:"team"` 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()
type NaisJobConnection ¶
type NaisJobConnection struct { TotalCount int `json:"totalCount"` PageInfo PageInfo `json:"pageInfo"` Edges []NaisJobEdge `json:"edges"` }
func (NaisJobConnection) GetEdges ¶
func (this NaisJobConnection) GetEdges() []Edge
A list of edges.
func (NaisJobConnection) GetPageInfo ¶
func (this NaisJobConnection) GetPageInfo() PageInfo
Pagination information.
func (NaisJobConnection) GetTotalCount ¶
func (this NaisJobConnection) GetTotalCount() int
The total count of items in the connection.
func (NaisJobConnection) IsConnection ¶
func (NaisJobConnection) IsConnection()
type NaisJobEdge ¶
func (NaisJobEdge) GetCursor ¶
func (this NaisJobEdge) GetCursor() scalar.Cursor
A cursor for use in pagination.
func (NaisJobEdge) IsEdge ¶
func (NaisJobEdge) IsEdge()
type NaisJobGQLVars ¶
type NaisJobGQLVars struct {
Team string
}
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"` 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 authorizations OrderByFieldRole OrderByField = "ROLE" )
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 { // When paginating forwards, are there more items? HasNextPage bool `json:"hasNextPage"` // When paginating backwards, are there more items? HasPreviousPage bool `json:"hasPreviousPage"` // A cursor corresponding to the first node in the connection. StartCursor *scalar.Cursor `json:"startCursor,omitempty"` // A cursor corresponding to the last node in the connection. EndCursor *scalar.Cursor `json:"endCursor,omitempty"` From int `json:"from"` To int `json:"to"` }
PageInfo is a type that contains pagination information in a Relay style.
type Pagination ¶
type Pagination struct {
// contains filtered or unexported fields
}
func NewPagination ¶
func NewPagination(first, last *int, after, before *scalar.Cursor) (*Pagination, error)
func (*Pagination) After ¶
func (p *Pagination) After() *scalar.Cursor
func (*Pagination) Before ¶
func (p *Pagination) Before() *scalar.Cursor
func (*Pagination) First ¶
func (p *Pagination) First() int
func (*Pagination) ForSlice ¶
func (p *Pagination) ForSlice(length int) (start, end int)
func (*Pagination) Last ¶
func (p *Pagination) Last() int
type RepositoryAuthorization ¶
type RepositoryAuthorization string
Repo authorizations.
const ( // Authorized 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
ToDatabaseEnum converts a ResourceType to the database enum type
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 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 SQLInstance ¶
type SQLInstance struct { AutoBackupHour int `json:"autoBackupHour"` CascadingDelete bool `json:"cascadingDelete"` Collation string `json:"collation"` Databases []Database `json:"databases"` DiskAutoresize bool `json:"diskAutoresize"` DiskSize int `json:"diskSize"` DiskType string `json:"diskType"` Flags []Flag `json:"flags"` HighAvailability bool `json:"highAvailability"` Insights Insights `json:"insights"` Maintenance Maintenance `json:"maintenance"` Name string `json:"name"` PointInTimeRecovery bool `json:"pointInTimeRecovery"` RetainedBackups int `json:"retainedBackups"` Tier string `json:"tier"` Type string `json:"type"` }
func (SQLInstance) GetName ¶
func (this SQLInstance) GetName() string
func (SQLInstance) IsStorage ¶
func (SQLInstance) IsStorage()
type SearchConnection ¶
type SearchConnection struct { TotalCount int `json:"totalCount"` PageInfo PageInfo `json:"pageInfo"` Edges []SearchEdge `json:"edges"` }
func (SearchConnection) GetPageInfo ¶
func (this SearchConnection) GetPageInfo() PageInfo
Pagination information.
func (SearchConnection) GetTotalCount ¶
func (this SearchConnection) GetTotalCount() int
The total count of items in the connection.
func (SearchConnection) IsConnection ¶
func (SearchConnection) IsConnection()
type SearchEdge ¶
type SearchEdge struct { Node SearchNode `json:"node"` Cursor scalar.Cursor `json:"cursor"` Rank int `json:"-"` }
func (SearchEdge) GetCursor ¶
func (this SearchEdge) GetCursor() scalar.Cursor
A cursor for use in pagination.
func (SearchEdge) IsEdge ¶
func (SearchEdge) IsEdge()
type SearchFilter ¶
type SearchFilter struct {
Type *SearchType `json:"type,omitempty"`
}
type SearchNode ¶
type SearchNode interface {
IsSearchNode()
}
type SearchType ¶
type SearchType string
const ( SearchTypeApp SearchType = "APP" SearchTypeTeam SearchType = "TEAM" SearchTypeNaisjob SearchType = "NAISJOB" )
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 SlackAlertsChannel ¶
type SlackAlertsChannel struct { // The name of the Slack alerts channel. Name string `json:"name"` // The environment for the Slack alerts channel. Env string `json:"env"` }
Slack alerts channel type.
type SortOrder ¶
type SortOrder string
func (SortOrder) MarshalGQL ¶
func (*SortOrder) UnmarshalGQL ¶
type StateError ¶
type StateError interface { IsStateError() GetRevision() string GetLevel() ErrorLevel }
type Team ¶
type Team struct { // The unique identifier of the team. ID scalar.Ident `json:"id"` // The name of the team. Name string `json:"name"` // The description of the team. Description string `json:"description"` // The status of the team. Status TeamStatus `json:"status"` // Team members. Members TeamMemberConnection `json:"members"` // The NAIS applications owned by the team. Apps AppConnection `json:"apps"` // The NAIS jobs owned by the team. Naisjobs NaisJobConnection `json:"naisjobs"` // The GitHub repositories that the team has access to. GithubRepositories GithubRepositoryConnection `json:"githubRepositories"` // The main Slack channel for the team. SlackChannel string `json:"slackChannel"` // Slack alerts channels for the team. SlackAlertsChannels []SlackAlertsChannel `json:"slackAlertsChannels"` GcpProjects []GcpProject `json:"gcpProjects"` // The deployments of the team's applications. Deployments DeploymentConnection `json:"deployments"` // The deploy key of the team. DeployKey DeploymentKey `json:"deployKey"` // Whether or not the viewer is a member of the team. ViewerIsMember bool `json:"viewerIsMember"` // Whether or not the viewer is an administrator of the team. ViewerIsAdmin bool `json:"viewerIsAdmin"` // The vulnerabilities for the team's applications. Vulnerabilities VulnerabilitiesConnection `json:"vulnerabilities"` VulnerabilitiesSummary VulnerabilitySummary `json:"vulnerabilitiesSummary"` }
Team type.
func (Team) IsSearchNode ¶
func (Team) IsSearchNode()
type TeamConnection ¶
type TeamConnection struct { // The total count of available teams. TotalCount int `json:"totalCount"` // Pagination information. PageInfo PageInfo `json:"pageInfo"` // A list of team edges. Edges []TeamEdge `json:"edges"` }
Team connection type.
func (TeamConnection) GetPageInfo ¶
func (this TeamConnection) GetPageInfo() PageInfo
Pagination information.
func (TeamConnection) GetTotalCount ¶
func (this TeamConnection) GetTotalCount() int
The total count of items in the connection.
func (TeamConnection) IsConnection ¶
func (TeamConnection) IsConnection()
type TeamEdge ¶
type TeamEdge struct { // A cursor for use in pagination. Cursor scalar.Cursor `json:"cursor"` // The team at the end of the edge. Node Team `json:"node"` }
Team edge type.
type TeamMember ¶
type TeamMember struct { // The unique identifier of the team member. ID scalar.Ident `json:"id"` // The name of the team member. Name string `json:"name"` // The email of the team member. Email string `json:"email"` // The role of the team member. Role TeamRole `json:"role"` }
Team member type.
func (TeamMember) IsNode ¶
func (TeamMember) IsNode()
type TeamMemberConnection ¶
type TeamMemberConnection struct { // The total count of available team members. TotalCount int `json:"totalCount"` // Pagination information. PageInfo PageInfo `json:"pageInfo"` // A list of team member edges. Edges []TeamMemberEdge `json:"edges"` }
Team member connection type.
func (TeamMemberConnection) GetEdges ¶
func (this TeamMemberConnection) GetEdges() []Edge
A list of edges.
func (TeamMemberConnection) GetPageInfo ¶
func (this TeamMemberConnection) GetPageInfo() PageInfo
Pagination information.
func (TeamMemberConnection) GetTotalCount ¶
func (this TeamMemberConnection) GetTotalCount() int
The total count of items in the connection.
func (TeamMemberConnection) IsConnection ¶
func (TeamMemberConnection) IsConnection()
type TeamMemberEdge ¶
type TeamMemberEdge struct { // A cursor for use in pagination. Cursor scalar.Cursor `json:"cursor"` // The team member at the end of the edge. Node TeamMember `json:"node"` }
Team member edge type.
func (TeamMemberEdge) GetCursor ¶
func (this TeamMemberEdge) GetCursor() scalar.Cursor
A cursor for use in pagination.
func (TeamMemberEdge) IsEdge ¶
func (TeamMemberEdge) IsEdge()
type TeamRole ¶
type TeamRole string
Team member roles.
func (TeamRole) MarshalGQL ¶
func (*TeamRole) UnmarshalGQL ¶
type TeamStatus ¶
type TeamStatus struct { Apps AppsStatus `json:"apps"` Jobs JobsStatus `json:"jobs"` }
Team status.
type User ¶
type User struct { // The unique identifier for the user. ID scalar.Ident `json:"id"` // The user's full name. Name string `json:"name"` // The user's email address. Email string `json:"email"` // Teams that the user is a member and/or owner of. Teams TeamConnection `json:"teams"` }
type VulnerabilitiesConnection ¶
type VulnerabilitiesConnection struct { TotalCount int `json:"totalCount"` PageInfo PageInfo `json:"pageInfo"` Edges []VulnerabilitiesEdge `json:"edges"` }
func (VulnerabilitiesConnection) GetEdges ¶
func (this VulnerabilitiesConnection) GetEdges() []Edge
A list of edges.
func (VulnerabilitiesConnection) GetPageInfo ¶
func (this VulnerabilitiesConnection) GetPageInfo() PageInfo
Pagination information.
func (VulnerabilitiesConnection) GetTotalCount ¶
func (this VulnerabilitiesConnection) GetTotalCount() int
The total count of items in the connection.
func (VulnerabilitiesConnection) IsConnection ¶
func (VulnerabilitiesConnection) IsConnection()
type VulnerabilitiesEdge ¶
type VulnerabilitiesEdge struct { Cursor scalar.Cursor `json:"cursor"` Node VulnerabilitiesNode `json:"node"` }
func (VulnerabilitiesEdge) GetCursor ¶
func (this VulnerabilitiesEdge) GetCursor() scalar.Cursor
A cursor for use in pagination.
func (VulnerabilitiesEdge) IsEdge ¶
func (VulnerabilitiesEdge) IsEdge()
type VulnerabilitiesNode ¶
type VulnerabilitiesNode 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"` }
func (VulnerabilitiesNode) GetID ¶
func (this VulnerabilitiesNode) GetID() scalar.Ident
The unique ID of an object.
func (VulnerabilitiesNode) IsNode ¶
func (VulnerabilitiesNode) IsNode()