model

package
v0.0.0-...-be2aeb8 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 9 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 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        string `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"`
	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) GetID

func (this App) GetID() scalar.Ident

The unique ID of an object.

func (App) IsNode

func (App) IsNode()

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) GetEdges

func (this AppConnection) GetEdges() []Edge

A list of 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 AppEdge

type AppEdge struct {
	Cursor scalar.Cursor `json:"cursor"`
	Node   App           `json:"node"`
}

func (AppEdge) GetCursor

func (this AppEdge) GetCursor() scalar.Cursor

A cursor for use in pagination.

func (AppEdge) IsEdge

func (AppEdge) IsEdge()

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

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

Team status for apps.

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 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 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 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 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 DeployInfoGQLVars struct {
	App  string
	Job  string
	Env  string
	Team string
}

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 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 Edge

type Edge interface {
	IsEdge()
	// A cursor for use in pagination.
	GetCursor() scalar.Cursor
}

Edge interface.

type Env

type Env struct {
	ID   scalar.Ident `json:"id"`
	Name string       `json:"name"`
}

func (Env) GetID

func (this Env) GetID() scalar.Ident

The unique ID of an object.

func (Env) IsNode

func (Env) IsNode()

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 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 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 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:"-"`
}

func (Instance) GetID

func (this Instance) GetID() scalar.Ident

The unique ID of an object.

func (Instance) IsNode

func (Instance) IsNode()

type InstanceGQLVars

type InstanceGQLVars struct {
	Env     string
	Team    string
	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      string   `json:"team"`
	Instances []string `json:"instances,omitempty"`
}

type Maintenance

type Maintenance 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 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) GetID

func (this NaisJob) GetID() scalar.Ident

The unique ID of an object.

func (NaisJob) IsNode

func (NaisJob) IsNode()

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

type NaisJobEdge struct {
	Cursor scalar.Cursor `json:"cursor"`
	Node   NaisJob       `json:"node"`
}

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 Node

type Node interface {
	IsNode()
	// The unique ID of an object.
	GetID() scalar.Ident
}

Node interface.

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 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 {
	// 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 Port

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

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

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 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

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 Resources

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

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:"-"`
}

func (Run) GetID

func (this Run) GetID() scalar.Ident

The unique ID of an object.

func (Run) IsNode

func (Run) IsNode()

type RunGQLVars

type RunGQLVars struct {
	Env     string
	Team    string
	NaisJob string
}

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) GetEdges

func (this SearchConnection) GetEdges() []Edge

A list of 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 Sidecar

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

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
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 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) GetID

func (this Team) GetID() scalar.Ident

The unique ID of an object.

func (Team) IsNode

func (Team) IsNode()

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) GetEdges

func (this TeamConnection) GetEdges() []Edge

A list of edges.

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.

func (TeamEdge) GetCursor

func (this TeamEdge) GetCursor() scalar.Cursor

A cursor for use in pagination.

func (TeamEdge) IsEdge

func (TeamEdge) IsEdge()

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) GetID

func (this TeamMember) GetID() scalar.Ident

The unique ID of an object.

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.

const (
	// A regular team member.
	TeamRoleMember TeamRole = "MEMBER"
	// A team owner/administrator.
	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"`
}

Team status.

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 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"`
}

func (User) GetID

func (this User) GetID() scalar.Ident

The unique ID of an object.

func (User) IsNode

func (User) IsNode()

type Variable

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

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()

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"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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