mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 10:06:00 +00:00
48 lines
1.2 KiB
JavaScript
48 lines
1.2 KiB
JavaScript
const fileFormat = {
|
|
packageName: 'dbgate-plugin-xml',
|
|
// file format identifier
|
|
storageType: 'xml@dbgate-plugin-xml',
|
|
// file extension without leading dot
|
|
extension: 'xml',
|
|
// human readable file format name
|
|
name: 'XML file',
|
|
// function name from backend, which contains reader factory, postfixed by package name
|
|
readerFunc: 'reader@dbgate-plugin-xml',
|
|
// function name from backend, which contains writer factory, postfixed by package name
|
|
writerFunc: 'writer@dbgate-plugin-xml',
|
|
// optional list of format arguments, which can be edited from UI
|
|
args: [
|
|
{
|
|
type: 'text',
|
|
name: 'rootElementName',
|
|
label: 'Root element name',
|
|
apiName: 'rootElementName',
|
|
direction: 'target',
|
|
},
|
|
{
|
|
type: 'text',
|
|
name: 'itemElementName',
|
|
label: 'Item element name',
|
|
apiName: 'itemElementName',
|
|
},
|
|
],
|
|
};
|
|
|
|
export default {
|
|
fileFormats: [fileFormat],
|
|
|
|
quickExports: [
|
|
{
|
|
label: 'XML file',
|
|
extension: 'xml',
|
|
createWriter: (fileName) => ({
|
|
functionName: 'writer@dbgate-plugin-xml',
|
|
props: {
|
|
fileName,
|
|
},
|
|
}),
|
|
},
|
|
],
|
|
|
|
};
|
|
|