feat(database): add CRUD operations for parsed sessions and update session name functionality
This commit is contained in:
@@ -48,6 +48,22 @@ export namespace model {
|
||||
this.heroes = source["heroes"];
|
||||
}
|
||||
}
|
||||
export class ParsedSession {
|
||||
id: number;
|
||||
session_name: string;
|
||||
created_at: number;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new ParsedSession(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.id = source["id"];
|
||||
this.session_name = source["session_name"];
|
||||
this.created_at = source["created_at"];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
10
frontend/wailsjs/go/service/App.d.ts
vendored
10
frontend/wailsjs/go/service/App.d.ts
vendored
@@ -2,6 +2,8 @@
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
import {model} from '../models';
|
||||
|
||||
export function DeleteParsedSession(arg1:number):Promise<void>;
|
||||
|
||||
export function ExportCurrentData(arg1:string):Promise<void>;
|
||||
|
||||
export function ExportData(arg1:Array<string>,arg2:string):Promise<void>;
|
||||
@@ -20,6 +22,10 @@ export function GetLatestParsedDataFromDatabase():Promise<model.ParsedResult>;
|
||||
|
||||
export function GetNetworkInterfaces():Promise<Array<model.NetworkInterface>>;
|
||||
|
||||
export function GetParsedDataByID(arg1:number):Promise<model.ParsedResult>;
|
||||
|
||||
export function GetParsedSessions():Promise<Array<model.ParsedSession>>;
|
||||
|
||||
export function ParseData(arg1:Array<string>):Promise<string>;
|
||||
|
||||
export function ReadRawJsonFile():Promise<model.ParsedResult>;
|
||||
@@ -30,6 +36,10 @@ export function SaveParsedDataToDatabase(arg1:string,arg2:string,arg3:string):Pr
|
||||
|
||||
export function StartCapture(arg1:string):Promise<void>;
|
||||
|
||||
export function StartCaptureWithFilter(arg1:string,arg2:string):Promise<void>;
|
||||
|
||||
export function StopAndParseCapture():Promise<model.ParsedResult>;
|
||||
|
||||
export function StopCapture():Promise<void>;
|
||||
|
||||
export function UpdateParsedSessionName(arg1:number,arg2:string):Promise<void>;
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
export function DeleteParsedSession(arg1) {
|
||||
return window['go']['service']['App']['DeleteParsedSession'](arg1);
|
||||
}
|
||||
|
||||
export function ExportCurrentData(arg1) {
|
||||
return window['go']['service']['App']['ExportCurrentData'](arg1);
|
||||
}
|
||||
@@ -38,6 +42,14 @@ export function GetNetworkInterfaces() {
|
||||
return window['go']['service']['App']['GetNetworkInterfaces']();
|
||||
}
|
||||
|
||||
export function GetParsedDataByID(arg1) {
|
||||
return window['go']['service']['App']['GetParsedDataByID'](arg1);
|
||||
}
|
||||
|
||||
export function GetParsedSessions() {
|
||||
return window['go']['service']['App']['GetParsedSessions']();
|
||||
}
|
||||
|
||||
export function ParseData(arg1) {
|
||||
return window['go']['service']['App']['ParseData'](arg1);
|
||||
}
|
||||
@@ -58,6 +70,10 @@ export function StartCapture(arg1) {
|
||||
return window['go']['service']['App']['StartCapture'](arg1);
|
||||
}
|
||||
|
||||
export function StartCaptureWithFilter(arg1, arg2) {
|
||||
return window['go']['service']['App']['StartCaptureWithFilter'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function StopAndParseCapture() {
|
||||
return window['go']['service']['App']['StopAndParseCapture']();
|
||||
}
|
||||
@@ -65,3 +81,7 @@ export function StopAndParseCapture() {
|
||||
export function StopCapture() {
|
||||
return window['go']['service']['App']['StopCapture']();
|
||||
}
|
||||
|
||||
export function UpdateParsedSessionName(arg1, arg2) {
|
||||
return window['go']['service']['App']['UpdateParsedSessionName'](arg1, arg2);
|
||||
}
|
||||
|
||||
@@ -48,6 +48,10 @@ export function EventsOff(eventName, ...additionalEventNames) {
|
||||
return window.runtime.EventsOff(eventName, ...additionalEventNames);
|
||||
}
|
||||
|
||||
export function EventsOffAll() {
|
||||
return window.runtime.EventsOffAll();
|
||||
}
|
||||
|
||||
export function EventsOnce(eventName, callback) {
|
||||
return EventsOnMultiple(eventName, callback, 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user