Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SK-1628: add scaffolding for v2 implementation #151

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions v2/error/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//imports

class SkyflowError {

constructor() {

}

}
7 changes: 7 additions & 0 deletions v2/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Skyflow from './vault/skyflow';
import { LogLevel } from './utils';

export {
LogLevel,
Skyflow,
};
15 changes: 15 additions & 0 deletions v2/management/config/management/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//imports

class ManagementConfig {

//fields

constructor() {

}

//getters and setters

}

export default ManagementConfig;
27 changes: 27 additions & 0 deletions v2/management/controller/policy/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//imports

class Policy {

constructor() {

}

static initialize() {
//return policy object
}

update() {

}

delete() {

}

get() {

}

}

export default Policy;
27 changes: 27 additions & 0 deletions v2/management/controller/role/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//imports

class Role {

constructor() {

}

static initialize() {
//return role object
}

update() {

}

delete() {

}

get() {

}

}

export default Role;
27 changes: 27 additions & 0 deletions v2/management/controller/vault/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//imports

class Vault {

constructor() {

}

static initialize() {
//return vault object
}

update() {

}

delete() {

}

get() {

}

}

export default Vault;
41 changes: 41 additions & 0 deletions v2/management/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
//imports

class Management {

constructor() {

}

static initialize() {
//return management object
}

createVault() {
//return vault object using static func
//cache - store the vault object in a list
}

createRole() {
//return role object using static func
//cache - store the role object in a list
}

createPolicy() {
//return policy object using static func
//cache - store the policy object in a list
}

vault(vaultId: string) {
// return vault object from the cached list
}

role(roleId: string) {
// return role object from the cached list
}

policy(policyId: string) {
// return policy object from the cached list
}
}

export default Management;
15 changes: 15 additions & 0 deletions v2/management/model/request/create-vault/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//imports

class CreateVaultRequest {

//fields

constructor() {

}

//getters and setters

}

export default CreateVaultRequest;
15 changes: 15 additions & 0 deletions v2/management/model/request/delete-policy/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//imports

class DeletePolicyRequest {

//fields

constructor() {

}

//getters and setters

}

export default DeletePolicyRequest;
15 changes: 15 additions & 0 deletions v2/management/model/response/create-vault/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//imports

class CreateVaultResponse {

//fields

constructor() {

}

//getters and setters

}

export default CreateVaultResponse;
15 changes: 15 additions & 0 deletions v2/management/model/response/delete-policy/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//imports

class DeletePolicyResponse {

//fields

constructor() {

}

//getters and setters

}

export default DeletePolicyResponse;
16 changes: 16 additions & 0 deletions v2/management/skyflow/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { SkyflowConfig } from "../types";

class Skyflow {

constructor(config: SkyflowConfig) {

}

management() {
//cache management object if created
// return management object using static func
}

}

export default Skyflow;
7 changes: 7 additions & 0 deletions v2/management/types/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { LogLevel } from "../../utils";
import ManagementConfig from "../config/management";

export interface SkyflowConfig {
managementConfig: ManagementConfig[],
logLevel?: LogLevel,
}
10 changes: 10 additions & 0 deletions v2/utils/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// utils functions & helper functions
//common code between vault & management

export enum LogLevel {
WARN = 'WARN',
INFO = 'INFO',
DEBUG = 'DEBUG',
ERROR = 'ERROR',
OFF = 'OFF'
}
1 change: 1 addition & 0 deletions v2/utils/validations/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// add client config validations & request validations
15 changes: 15 additions & 0 deletions v2/vault/config/connection/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//imports

class ConnectionConfig {

//fields

constructor() {

}

//getters and setters

}

export default ConnectionConfig;
15 changes: 15 additions & 0 deletions v2/vault/config/credentials/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//imports

class Credentials {

//fields

constructor() {

}

//getters and setters

}

export default Credentials;
15 changes: 15 additions & 0 deletions v2/vault/config/vault/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//imports

class VaultConfig {

//fields

constructor() {

}

//getters and setters

}

export default VaultConfig;
19 changes: 19 additions & 0 deletions v2/vault/controller/audit/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//imports

class Audit {

constructor() {

}

static initialize() {
//return audit object
}

list() {

}

}

export default Audit;
19 changes: 19 additions & 0 deletions v2/vault/controller/binlookup/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//imports

class BinLookUp {

constructor() {

}

static initialize() {
//return binlookup object
}

get() {

}

}

export default BinLookUp;
19 changes: 19 additions & 0 deletions v2/vault/controller/connections/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//imports

class Connection {

constructor() {

}

static initialize() {
//return connections object
}

invoke() {

}

}

export default Connection;
Loading
Loading