Skip to content

Commit 811e73b

Browse files
NAIS => Nais
1 parent 63b1f53 commit 811e73b

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# NAIS API
1+
# Nais API
22

3-
NAIS API is the main entrypoint when interacting with the API of the NAIS platform.
3+
Nais API is the main entrypoint when interacting with the API of the Nais platform.
44

55
## Local development
66

@@ -55,7 +55,7 @@ They will be re-run every time you save a `.lua` file.
5555
5656
graph TD
5757
API --> Postgres[(psql)]
58-
Service[NAIS Service] --> |GRPC|API
58+
Service[Nais Service] --> |GRPC|API
5959
Clients[External Clients] --> |GraphQL|API
6060
API -.-> PubSub{PubSub}
6161
@@ -71,10 +71,10 @@ graph TD
7171
| ---------------- | ------------------------------------------------------------------------------------------ |
7272
| API | This service |
7373
| Postgres | The postgres database storing state from this application |
74-
| NAIS Service | Services by NAIS that requires special communication with API. E.g. Reconcilers and Deploy |
74+
| Nais Service | Services by Nais that requires special communication with API. E.g. Reconcilers and Deploy |
7575
| External Clients | External clients that communicates with the API. E.g. Browsers and NADA |
7676
| Kubernetes | The Kubernetes clusters of the tenant |
77-
| PubSub | The PubSub topic used for communication between the API and the NAIS Service |
77+
| PubSub | The PubSub topic used for communication between the API and the Nais Service |
7878
| Prometheus | We collect historic data from the tenants prometheus |
7979
| Google Admin | We use the Google Admin API to manage a list of users |
8080
| BigQuery | We collect historic cost data from BigQuery |

charts/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: nais-api
3-
description: The all mighty NAIS API
3+
description: The all mighty Nais API
44
type: application
55
version: v0.1.0
66
sources:

docs/graphql_practices.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# GraphQL practices
22

3-
The following is a set of practices for developing the GraphQL API defined by NAIS API.
3+
The following is a set of practices for developing the GraphQL API defined by Nais API.
44

55
## Type conventions
66

77
### The `id` field
88

9-
NAIS API implements the [Global Object Identification specification](https://graphql.org/learn/global-object-identification/).
9+
Nais API implements the [Global Object Identification specification](https://graphql.org/learn/global-object-identification/).
1010

1111
All types should have an `id` field of type `ID!`. We create IDs using the internal `ident` package. Refer to the
1212
implementation in the internal [`teams` package](../internal/team/node.go) for an example.
@@ -100,7 +100,7 @@ type Team {
100100

101101
### Pagination
102102

103-
NAIS API implements the [GraphQL Cursor Connections specification](https://relay.dev/graphql/connections.htm).
103+
Nais API implements the [GraphQL Cursor Connections specification](https://relay.dev/graphql/connections.htm).
104104

105105
All queries/fields that return a list of items should support pagination. The rule of thumb is that if it is
106106
**possible** for the list to grow to a size that is more than 50, it should be paginated.

internal/cmd/api/config.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ type Config struct {
116116
// TenantDomain The domain for the tenant.
117117
TenantDomain string `env:"TENANT_DOMAIN,default=example.com"`
118118

119-
// GoogleManagementProjectID The ID of the NAIS management project in the tenant organization in GCP.
119+
// GoogleManagementProjectID The ID of the Nais management project in the tenant organization in GCP.
120120
GoogleManagementProjectID string `env:"GOOGLE_MANAGEMENT_PROJECT_ID"`
121121

122122
// DatabaseConnectionString is the database DSN

internal/graph/apierror/apierror.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func GetErrorPresenter(log logrus.FieldLogger) graphql.ErrorPresenterFunc {
5858
err.Message = originalError.GraphError()
5959
return err
6060
case *pgconn.PgError:
61-
err.Message = "The database encountered an error while processing your request. This is probably a transient error, please try again. If the error persists, contact the NAIS team."
61+
err.Message = "The database encountered an error while processing your request. This is probably a transient error, please try again. If the error persists, contact the Nais team."
6262
log.WithError(originalError).Errorf("database error %s: %s (%s)", originalError.Code, originalError.Message, originalError.Detail)
6363
return err
6464
case *validate.ValidationErrors:
@@ -92,7 +92,7 @@ func GetErrorPresenter(log logrus.FieldLogger) graphql.ErrorPresenterFunc {
9292
err.Message = "Request canceled"
9393
default:
9494
log.WithError(err).Errorf("unhandled error: %q", err)
95-
err.Message = "The server errored out while processing your request, and we didn't write a suitable error message. You might consider that a bug on our side. Please try again, and if the error persists, contact the NAIS team."
95+
err.Message = "The server errored out while processing your request, and we didn't write a suitable error message. You might consider that a bug on our side. Please try again, and if the error persists, contact the Nais team."
9696
}
9797

9898
return err

internal/usersync/usersyncer/usersyncer.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ func NewFromConfig(ctx context.Context, pool *pgxpool.Pool, serviceAccount, subj
7272
return New(pool, adminGroupPrefix, tenantDomain, srv, log), nil
7373
}
7474

75-
// Sync fetches all users from the Google Directory of the tenant and adds them as users in NAIS API.
75+
// Sync fetches all users from the Google Directory of the tenant and adds them as users in Nais API.
7676
//
77-
// If a user already exist in NAIS API the user will get the name and email potentially updated if it has changed in the
77+
// If a user already exist in Nais API the user will get the name and email potentially updated if it has changed in the
7878
// Google Directory.
7979
//
8080
// After all users have been synced, users that have an email address that matches the tenant domain that no longer
8181
// exist in the Google Directory will be removed.
8282
//
83-
// All users present in the admin group in the Google Directory will also be granted the admin role in NAIS API, and
83+
// All users present in the admin group in the Google Directory will also be granted the admin role in Nais API, and
8484
// existing admins that no longer exist in the admin group will get the admin role revoked.
8585
func (s *Usersynchronizer) Sync(ctx context.Context) error {
8686
googleUsers, err := getGoogleUsers(ctx, s.service.Users, s.tenantDomain, s.log)
@@ -167,7 +167,7 @@ func AssignDefaultPermissionsToUser(ctx context.Context, querier usersyncsql.Que
167167
return nil
168168
}
169169

170-
// deleteUnknownUsers will delete users from NAIS API that does not exist in the Google Directory.
170+
// deleteUnknownUsers will delete users from Nais API that does not exist in the Google Directory.
171171
func deleteUnknownUsers(ctx context.Context, querier usersyncsql.Querier, unknownUsers map[uuid.UUID]*usersyncsql.User, log logrus.FieldLogger) error {
172172
for _, user := range unknownUsers {
173173
if err := querier.Delete(ctx, user.ID); err != nil {

0 commit comments

Comments
 (0)