feat(storage): add StorageManager and cache subsystem; integrate storage into ConnectionManager and GitopsApp, migrate legacy connections, and add tests
This commit is contained in:
32
ts/cache/documents/classes.cached.project.ts
vendored
Normal file
32
ts/cache/documents/classes.cached.project.ts
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
import * as plugins from '../../plugins.ts';
|
||||
import { CacheDb } from '../classes.cachedb.ts';
|
||||
import { CachedDocument, TTL } from '../classes.cached.document.ts';
|
||||
|
||||
/**
|
||||
* Cached project data from git providers. TTL: 5 minutes.
|
||||
*/
|
||||
@plugins.smartdata.Collection(() => CacheDb.getInstance().getDb())
|
||||
export class CachedProject extends CachedDocument<CachedProject> {
|
||||
@plugins.smartdata.unI()
|
||||
public id: string = '';
|
||||
|
||||
@plugins.smartdata.svDb()
|
||||
public connectionId: string = '';
|
||||
|
||||
@plugins.smartdata.svDb()
|
||||
public projectName: string = '';
|
||||
|
||||
@plugins.smartdata.svDb()
|
||||
public projectUrl: string = '';
|
||||
|
||||
@plugins.smartdata.svDb()
|
||||
public description: string = '';
|
||||
|
||||
@plugins.smartdata.svDb()
|
||||
public defaultBranch: string = '';
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.setTTL(TTL.MINUTES_5);
|
||||
}
|
||||
}
|
||||
1
ts/cache/documents/index.ts
vendored
Normal file
1
ts/cache/documents/index.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { CachedProject } from './classes.cached.project.ts';
|
||||
Reference in New Issue
Block a user