Skip to content

Commit

Permalink
(feature) Add api key source
Browse files Browse the repository at this point in the history
  • Loading branch information
AHarmlessPyro committed Oct 4, 2022
1 parent 44f8e28 commit 8b7746b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend/src/models/keys.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { API_KEY_TYPE } from "@common/enums"
import {
Entity,
BaseEntity,
Expand All @@ -22,6 +23,9 @@ export class ApiKey extends BaseEntity {
@Column({ type: "text", nullable: false })
keyIdentifier: string

@Column({ type: "enum", enum: API_KEY_TYPE, nullable: false, default: API_KEY_TYPE.GENERIC })
for: API_KEY_TYPE

@CreateDateColumn({ type: "timestamptz" })
createdAt: Date

Expand Down
6 changes: 6 additions & 0 deletions common/src/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,9 @@ export enum GCP_SOURCE_TYPE {
SUBNET,
TAG,
}

export enum API_KEY_TYPE {
GCP = "GCP",
AWS = "AWS",
GENERIC = "GENERIC"
}

0 comments on commit 8b7746b

Please sign in to comment.