Support bindings, model & enum generation

This commit is contained in:
Lea Anthony
2023-12-12 21:51:40 +11:00
parent 43c4966873
commit 4b04c10f14
44 changed files with 3910 additions and 3126 deletions
+29
View File
@@ -0,0 +1,29 @@
// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
/**
* @typedef {import('./models').main.Title} mainTitle
* @typedef {import('./models').main.Person} mainPerson
*/
export const GreetService = {
/**
* GreetService.Greet
* Greet does XYZ
* @param name {string}
* @param title {mainTitle}
* @returns {Promise<string>}
**/
Greet: function(name, title) { return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.NewPerson
* NewPerson creates a new person
* @param name {string}
* @returns {Promise<mainPerson>}
**/
NewPerson: function(name) { return wails.CallByID(1661412647, ...Array.prototype.slice.call(arguments, 0)); },
};
+58
View File
@@ -0,0 +1,58 @@
package main
import (
_ "embed"
"log"
"github.com/wailsapp/wails/v3/pkg/application"
)
type Title string
const (
// Mister is a title
Mister Title = "Mr"
Miss Title = "Miss"
Ms Title = "Ms"
Mrs Title = "Mrs"
Dr Title = "Dr"
)
// GreetService is great
type GreetService struct {
SomeVariable int
lowerCase string
target *Person
}
type Person struct {
Title Title
Name string
}
// Greet does XYZ
func (*GreetService) Greet(name string, title Title) string {
return "Hello " + string(title) + " " + name
}
// NewPerson creates a new person
func (*GreetService) NewPerson(name string) *Person {
return &Person{Name: name}
}
func main() {
app := application.New(application.Options{
Bind: []interface{}{
&GreetService{},
},
})
app.NewWebviewWindow()
err := app.Run()
if err != nil {
log.Fatal(err)
}
}
+33
View File
@@ -0,0 +1,33 @@
// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export namespace main {
export enum Title {
// Mister is a title
Mister = "Mr",
Miss = "Miss",
Ms = "Ms",
Mrs = "Mrs",
Dr = "Dr",
}
export class Person {
title: Title;
name: string;
constructor(source: Partial<Person> = {}) {
const { title = null, name = "" } = source;
this.title = title;
this.name = name;
}
static createFrom(source: string | object = {}): Person {
let parsedSource = typeof source === 'string' ? JSON.parse(source) : source;
return new Person(parsedSource as Partial<Person>);
}
}
}
@@ -0,0 +1,30 @@
// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
/**
* @typedef {import('./models').main.Person} mainPerson
*/
window.go = window.go || {};
window.go.main = {
GreetService: {
/**
* GreetService.Greet
* Greet does XYZ
* @param name {string}
* @returns {Promise<string>}
**/
Greet: function(name) { return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.NewPerson
* NewPerson creates a new person
* @param name {string}
* @returns {Promise<mainPerson>}
**/
NewPerson: function(name) { return wails.CallByID(1661412647, ...Array.prototype.slice.call(arguments, 0)); },
},
};
@@ -0,0 +1,22 @@
// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
/**
* @typedef {import('./models').services.Address} servicesAddress
*/
window.go = window.go || {};
window.go.services = {
OtherService: {
/**
* OtherService.Yay
*
*
* @returns {Promise<servicesAddress>}
**/
Yay: function() { return wails.CallByID(302702907, ...Array.prototype.slice.call(arguments, 0)); },
},
};
@@ -0,0 +1,37 @@
package main
import (
_ "embed"
"github.com/wailsapp/wails/v3/internal/parser/testdata/enum_from_imported_package/services"
"log"
"github.com/wailsapp/wails/v3/pkg/application"
)
// GreetService is great
type GreetService struct {
SomeVariable int
lowerCase string
}
// Greet does XYZ
func (*GreetService) Greet(name string, title services.Title) string {
return "Hello " + title.String() + " " + name
}
func main() {
app := application.New(application.Options{
Bind: []interface{}{
&GreetService{},
},
})
app.NewWebviewWindow()
err := app.Run()
if err != nil {
log.Fatal(err)
}
}
@@ -0,0 +1,47 @@
// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export namespace main {
export class Person {
name: string;
address: services.Address;
constructor(source: Partial<Person> = {}) {
const { name = "", address = null } = source;
this.name = name;
this.address = address;
}
static createFrom(source: string | object = {}): Person {
let parsedSource = typeof source === 'string' ? JSON.parse(source) : source;
return new Person(parsedSource as Partial<Person>);
}
}
}
export namespace services {
export class Address {
street: string;
state: string;
country: string;
constructor(source: Partial<Address> = {}) {
const { street = "", state = "", country = "" } = source;
this.street = street;
this.state = state;
this.country = country;
}
static createFrom(source: string | object = {}): Address {
let parsedSource = typeof source === 'string' ? JSON.parse(source) : source;
return new Address(parsedSource as Partial<Address>);
}
}
}
@@ -0,0 +1,16 @@
package services
type Title string
func (t Title) String() string {
return string(t)
}
const (
// Mister is a title
Mister Title = "Mr"
Miss Title = "Miss"
Ms Title = "Ms"
Mrs Title = "Mrs"
Dr Title = "Dr"
)
@@ -6,15 +6,12 @@
* @typedef {import('./models').main.Person} mainPerson
*/
window.go = window.go || {};
window.go.main = {
GreetService: {
export const GreetService = {
/**
* GreetService.Greet
* Greet does XYZ
* @param name {string}
* @param name {string}
* @returns {Promise<string>}
**/
Greet: function(name) { return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
@@ -22,9 +19,9 @@ window.go.main = {
/**
* GreetService.NewPerson
* NewPerson creates a new person
* @param name {string}
* @param name {string}
* @returns {Promise<mainPerson>}
**/
NewPerson: function(name) { return wails.CallByID(1661412647, ...Array.prototype.slice.call(arguments, 0)); },
},
};
@@ -6,17 +6,14 @@
* @typedef {import('./models').services.Address} servicesAddress
*/
window.go = window.go || {};
window.go.services = {
OtherService: {
export const OtherService = {
/**
* OtherService.Yay
*
*
*
* @returns {Promise<servicesAddress>}
**/
Yay: function() { return wails.CallByID(302702907, ...Array.prototype.slice.call(arguments, 0)); },
},
};
@@ -3,49 +3,46 @@
// This file is automatically generated. DO NOT EDIT
export namespace main {
export class Person {
name: string;
address: services.Address;
static createFrom(source: any = {}) {
return new Person(source);
}
export class Person {
name: string;
address: services.Address;
constructor(source: Partial<Person> = {}) {
const { name = "", address = null } = source;
this.name = name;
this.address = address;
}
constructor(source: any = {}) {
if ('string' === typeof source) {
source = JSON.parse(source);
}
static createFrom(source: string | object = {}): Person {
let parsedSource = typeof source === 'string' ? JSON.parse(source) : source;
return new Person(parsedSource as Partial<Person>);
}
this.name = source['name'];
this.address = services.Address.createFrom(source['address']);
}
}
}
export namespace services {
export class Address {
street: string;
state: string;
country: string;
static createFrom(source: any = {}) {
return new Address(source);
}
export class Address {
street: string;
state: string;
country: string;
constructor(source: Partial<Address> = {}) {
const { street = "", state = "", country = "" } = source;
this.street = street;
this.state = state;
this.country = country;
}
constructor(source: any = {}) {
if ('string' === typeof source) {
source = JSON.parse(source);
}
static createFrom(source: string | object = {}): Address {
let parsedSource = typeof source === 'string' ? JSON.parse(source) : source;
return new Address(parsedSource as Partial<Address>);
}
this.street = source['street'];
this.state = source['state'];
this.country = source['country'];
}
}
}
}
@@ -2,17 +2,14 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
window.go = window.go || {};
window.go.main = {
GreetService: {
export const GreetService = {
/**
* GreetService.Greet
* Greet someone
* @param name {string}
* @param name {string}
* @returns {Promise<string>}
**/
Greet: function(name) { return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
},
};
@@ -2,27 +2,25 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
window.go = window.go || {};
window.go.main = {
GreetService: {
export const GreetService = {
/**
* GreetService.Greet
*
* @param name {string}
* @param name {string}
* @returns {Promise<string>}
**/
Greet: function(name) { return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
},
OtherService: {
};
export const OtherService = {
/**
* OtherService.Hello
*
*
*
* @returns {Promise<void>}
**/
Hello: function() { return wails.CallByID(4249972365, ...Array.prototype.slice.call(arguments, 0)); },
},
};
@@ -2,27 +2,25 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
window.go = window.go || {};
window.go.main = {
GreetService: {
export const GreetService = {
/**
* GreetService.Greet
*
* @param name {string}
* @param name {string}
* @returns {Promise<string>}
**/
Greet: function(name) { return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
},
OtherService: {
};
export const OtherService = {
/**
* OtherService.Hello
*
*
*
* @returns {Promise<void>}
**/
Hello: function() { return wails.CallByID(4249972365, ...Array.prototype.slice.call(arguments, 0)); },
},
};
@@ -6,15 +6,12 @@
* @typedef {import('./models').main.Person} mainPerson
*/
window.go = window.go || {};
window.go.main = {
GreetService: {
export const GreetService = {
/**
* GreetService.Greet
* Greet does XYZ
* @param name {string}
* @param name {string}
* @returns {Promise<string>}
**/
Greet: function(name) { return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
@@ -22,9 +19,9 @@ window.go.main = {
/**
* GreetService.NewPerson
* NewPerson creates a new person
* @param name {string}
* @param name {string}
* @returns {Promise<mainPerson>}
**/
NewPerson: function(name) { return wails.CallByID(1661412647, ...Array.prototype.slice.call(arguments, 0)); },
},
};
@@ -6,17 +6,14 @@
* @typedef {import('./models').services.Address} servicesAddress
*/
window.go = window.go || {};
window.go.services = {
OtherService: {
export const OtherService = {
/**
* OtherService.Yay
*
*
*
* @returns {Promise<servicesAddress>}
**/
Yay: function() { return wails.CallByID(469445984, ...Array.prototype.slice.call(arguments, 0)); },
},
};
@@ -3,49 +3,46 @@
// This file is automatically generated. DO NOT EDIT
export namespace main {
export class Person {
name: string;
address: services.Address;
static createFrom(source: any = {}) {
return new Person(source);
}
export class Person {
name: string;
address: services.Address;
constructor(source: Partial<Person> = {}) {
const { name = "", address = null } = source;
this.name = name;
this.address = address;
}
constructor(source: any = {}) {
if ('string' === typeof source) {
source = JSON.parse(source);
}
static createFrom(source: string | object = {}): Person {
let parsedSource = typeof source === 'string' ? JSON.parse(source) : source;
return new Person(parsedSource as Partial<Person>);
}
this.name = source['name'];
this.address = services.Address.createFrom(source['address']);
}
}
}
export namespace services {
export class Address {
street: string;
state: string;
country: string;
static createFrom(source: any = {}) {
return new Address(source);
}
export class Address {
street: string;
state: string;
country: string;
constructor(source: Partial<Address> = {}) {
const { street = "", state = "", country = "" } = source;
this.street = street;
this.state = state;
this.country = country;
}
constructor(source: any = {}) {
if ('string' === typeof source) {
source = JSON.parse(source);
}
static createFrom(source: string | object = {}): Address {
let parsedSource = typeof source === 'string' ? JSON.parse(source) : source;
return new Address(parsedSource as Partial<Address>);
}
this.street = source['street'];
this.state = source['state'];
this.country = source['country'];
}
}
}
}
@@ -6,15 +6,12 @@
* @typedef {import('./models').main.Person} mainPerson
*/
window.go = window.go || {};
window.go.main = {
GreetService: {
export const GreetService = {
/**
* GreetService.ArrayInt
*
* @param _in {number[]}
* @param _in {number[]}
* @returns {Promise<void>}
**/
ArrayInt: function(_in) { return wails.CallByID(3862002418, ...Array.prototype.slice.call(arguments, 0)); },
@@ -22,7 +19,7 @@ window.go.main = {
/**
* GreetService.BoolInBoolOut
*
* @param _in {boolean}
* @param _in {boolean}
* @returns {Promise<boolean>}
**/
BoolInBoolOut: function(_in) { return wails.CallByID(2424639793, ...Array.prototype.slice.call(arguments, 0)); },
@@ -30,7 +27,7 @@ window.go.main = {
/**
* GreetService.Float32InFloat32Out
*
* @param _in {number}
* @param _in {number}
* @returns {Promise<number>}
**/
Float32InFloat32Out: function(_in) { return wails.CallByID(3132595881, ...Array.prototype.slice.call(arguments, 0)); },
@@ -38,7 +35,7 @@ window.go.main = {
/**
* GreetService.Float64InFloat64Out
*
* @param _in {number}
* @param _in {number}
* @returns {Promise<number>}
**/
Float64InFloat64Out: function(_in) { return wails.CallByID(2182412247, ...Array.prototype.slice.call(arguments, 0)); },
@@ -46,7 +43,7 @@ window.go.main = {
/**
* GreetService.Greet
* Greet someone
* @param name {string}
* @param name {string}
* @returns {Promise<string>}
**/
Greet: function(name) { return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
@@ -54,7 +51,7 @@ window.go.main = {
/**
* GreetService.Int16InIntOut
*
* @param _in {number}
* @param _in {number}
* @returns {Promise<number>}
**/
Int16InIntOut: function(_in) { return wails.CallByID(3306292566, ...Array.prototype.slice.call(arguments, 0)); },
@@ -62,7 +59,7 @@ window.go.main = {
/**
* GreetService.Int16PointerInAndOutput
*
* @param _in {number | null}
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
Int16PointerInAndOutput: function(_in) { return wails.CallByID(1754277916, ...Array.prototype.slice.call(arguments, 0)); },
@@ -70,7 +67,7 @@ window.go.main = {
/**
* GreetService.Int32InIntOut
*
* @param _in {number}
* @param _in {number}
* @returns {Promise<number>}
**/
Int32InIntOut: function(_in) { return wails.CallByID(1909469092, ...Array.prototype.slice.call(arguments, 0)); },
@@ -78,7 +75,7 @@ window.go.main = {
/**
* GreetService.Int32PointerInAndOutput
*
* @param _in {number | null}
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
Int32PointerInAndOutput: function(_in) { return wails.CallByID(4251088558, ...Array.prototype.slice.call(arguments, 0)); },
@@ -86,7 +83,7 @@ window.go.main = {
/**
* GreetService.Int64InIntOut
*
* @param _in {number}
* @param _in {number}
* @returns {Promise<number>}
**/
Int64InIntOut: function(_in) { return wails.CallByID(1343888303, ...Array.prototype.slice.call(arguments, 0)); },
@@ -94,7 +91,7 @@ window.go.main = {
/**
* GreetService.Int64PointerInAndOutput
*
* @param _in {number | null}
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
Int64PointerInAndOutput: function(_in) { return wails.CallByID(2205561041, ...Array.prototype.slice.call(arguments, 0)); },
@@ -102,7 +99,7 @@ window.go.main = {
/**
* GreetService.Int8InIntOut
*
* @param _in {number}
* @param _in {number}
* @returns {Promise<number>}
**/
Int8InIntOut: function(_in) { return wails.CallByID(572240879, ...Array.prototype.slice.call(arguments, 0)); },
@@ -110,7 +107,7 @@ window.go.main = {
/**
* GreetService.Int8PointerInAndOutput
*
* @param _in {number | null}
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
Int8PointerInAndOutput: function(_in) { return wails.CallByID(2189402897, ...Array.prototype.slice.call(arguments, 0)); },
@@ -118,7 +115,7 @@ window.go.main = {
/**
* GreetService.IntInIntOut
*
* @param _in {number}
* @param _in {number}
* @returns {Promise<number>}
**/
IntInIntOut: function(_in) { return wails.CallByID(642881729, ...Array.prototype.slice.call(arguments, 0)); },
@@ -126,7 +123,7 @@ window.go.main = {
/**
* GreetService.IntPointerInAndOutput
*
* @param _in {number | null}
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
IntPointerInAndOutput: function(_in) { return wails.CallByID(1066151743, ...Array.prototype.slice.call(arguments, 0)); },
@@ -134,7 +131,7 @@ window.go.main = {
/**
* GreetService.IntPointerInputNamedOutputs
*
* @param _in {number | null}
* @param _in {number | null}
* @returns {Promise<number | null, void>}
**/
IntPointerInputNamedOutputs: function(_in) { return wails.CallByID(2718999663, ...Array.prototype.slice.call(arguments, 0)); },
@@ -142,7 +139,7 @@ window.go.main = {
/**
* GreetService.MapIntInt
*
* @param _in {map}
* @param _in {map}
* @returns {Promise<void>}
**/
MapIntInt: function(_in) { return wails.CallByID(2386486356, ...Array.prototype.slice.call(arguments, 0)); },
@@ -150,7 +147,7 @@ window.go.main = {
/**
* GreetService.MapIntPointerInt
*
* @param _in {map}
* @param _in {map}
* @returns {Promise<void>}
**/
MapIntPointerInt: function(_in) { return wails.CallByID(550413585, ...Array.prototype.slice.call(arguments, 0)); },
@@ -158,7 +155,7 @@ window.go.main = {
/**
* GreetService.MapIntSliceInt
*
* @param _in {map}
* @param _in {map}
* @returns {Promise<void>}
**/
MapIntSliceInt: function(_in) { return wails.CallByID(2900172572, ...Array.prototype.slice.call(arguments, 0)); },
@@ -166,7 +163,7 @@ window.go.main = {
/**
* GreetService.MapIntSliceIntInMapIntSliceIntOut
*
* @param _in {map}
* @param _in {map}
* @returns {Promise<map>}
**/
MapIntSliceIntInMapIntSliceIntOut: function(_in) { return wails.CallByID(881980169, ...Array.prototype.slice.call(arguments, 0)); },
@@ -174,7 +171,7 @@ window.go.main = {
/**
* GreetService.NoInputsStringOut
*
*
*
* @returns {Promise<string>}
**/
NoInputsStringOut: function() { return wails.CallByID(1075577233, ...Array.prototype.slice.call(arguments, 0)); },
@@ -182,7 +179,7 @@ window.go.main = {
/**
* GreetService.PointerBoolInBoolOut
*
* @param _in {boolean | null}
* @param _in {boolean | null}
* @returns {Promise<boolean | null>}
**/
PointerBoolInBoolOut: function(_in) { return wails.CallByID(3589606958, ...Array.prototype.slice.call(arguments, 0)); },
@@ -190,7 +187,7 @@ window.go.main = {
/**
* GreetService.PointerFloat32InFloat32Out
*
* @param _in {number | null}
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
PointerFloat32InFloat32Out: function(_in) { return wails.CallByID(224675106, ...Array.prototype.slice.call(arguments, 0)); },
@@ -198,7 +195,7 @@ window.go.main = {
/**
* GreetService.PointerFloat64InFloat64Out
*
* @param _in {number | null}
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
PointerFloat64InFloat64Out: function(_in) { return wails.CallByID(2124953624, ...Array.prototype.slice.call(arguments, 0)); },
@@ -206,7 +203,7 @@ window.go.main = {
/**
* GreetService.PointerMapIntInt
*
* @param _in {map | null}
* @param _in {map | null}
* @returns {Promise<void>}
**/
PointerMapIntInt: function(_in) { return wails.CallByID(3516977899, ...Array.prototype.slice.call(arguments, 0)); },
@@ -214,7 +211,7 @@ window.go.main = {
/**
* GreetService.PointerStringInStringOut
*
* @param _in {string | null}
* @param _in {string | null}
* @returns {Promise<string | null>}
**/
PointerStringInStringOut: function(_in) { return wails.CallByID(229603958, ...Array.prototype.slice.call(arguments, 0)); },
@@ -222,7 +219,7 @@ window.go.main = {
/**
* GreetService.StringArrayInputNamedOutput
*
* @param _in {string[]}
* @param _in {string[]}
* @returns {Promise<string[]>}
**/
StringArrayInputNamedOutput: function(_in) { return wails.CallByID(3678582682, ...Array.prototype.slice.call(arguments, 0)); },
@@ -230,7 +227,7 @@ window.go.main = {
/**
* GreetService.StringArrayInputNamedOutputs
*
* @param _in {string[]}
* @param _in {string[]}
* @returns {Promise<string[], void>}
**/
StringArrayInputNamedOutputs: function(_in) { return wails.CallByID(319259595, ...Array.prototype.slice.call(arguments, 0)); },
@@ -238,7 +235,7 @@ window.go.main = {
/**
* GreetService.StringArrayInputStringArrayOut
*
* @param _in {string[]}
* @param _in {string[]}
* @returns {Promise<string[]>}
**/
StringArrayInputStringArrayOut: function(_in) { return wails.CallByID(383995060, ...Array.prototype.slice.call(arguments, 0)); },
@@ -246,7 +243,7 @@ window.go.main = {
/**
* GreetService.StringArrayInputStringOut
*
* @param _in {string[]}
* @param _in {string[]}
* @returns {Promise<string>}
**/
StringArrayInputStringOut: function(_in) { return wails.CallByID(1091960237, ...Array.prototype.slice.call(arguments, 0)); },
@@ -254,7 +251,7 @@ window.go.main = {
/**
* GreetService.StructInputStructOutput
*
* @param _in {mainPerson}
* @param _in {mainPerson}
* @returns {Promise<mainPerson>}
**/
StructInputStructOutput: function(_in) { return wails.CallByID(3835643147, ...Array.prototype.slice.call(arguments, 0)); },
@@ -262,7 +259,7 @@ window.go.main = {
/**
* GreetService.StructPointerInputErrorOutput
*
* @param _in {mainPerson | null}
* @param _in {mainPerson | null}
* @returns {Promise<void>}
**/
StructPointerInputErrorOutput: function(_in) { return wails.CallByID(2447692557, ...Array.prototype.slice.call(arguments, 0)); },
@@ -270,7 +267,7 @@ window.go.main = {
/**
* GreetService.StructPointerInputStructPointerOutput
*
* @param _in {mainPerson | null}
* @param _in {mainPerson | null}
* @returns {Promise<mainPerson>}
**/
StructPointerInputStructPointerOutput: function(_in) { return wails.CallByID(2943477349, ...Array.prototype.slice.call(arguments, 0)); },
@@ -278,7 +275,7 @@ window.go.main = {
/**
* GreetService.UInt16InUIntOut
*
* @param _in {number}
* @param _in {number}
* @returns {Promise<number>}
**/
UInt16InUIntOut: function(_in) { return wails.CallByID(3401034892, ...Array.prototype.slice.call(arguments, 0)); },
@@ -286,7 +283,7 @@ window.go.main = {
/**
* GreetService.UInt16PointerInAndOutput
*
* @param _in {number | null}
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
UInt16PointerInAndOutput: function(_in) { return wails.CallByID(1236957573, ...Array.prototype.slice.call(arguments, 0)); },
@@ -294,7 +291,7 @@ window.go.main = {
/**
* GreetService.UInt32InUIntOut
*
* @param _in {number}
* @param _in {number}
* @returns {Promise<number>}
**/
UInt32InUIntOut: function(_in) { return wails.CallByID(1160383782, ...Array.prototype.slice.call(arguments, 0)); },
@@ -302,7 +299,7 @@ window.go.main = {
/**
* GreetService.UInt32PointerInAndOutput
*
* @param _in {number | null}
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
UInt32PointerInAndOutput: function(_in) { return wails.CallByID(1739300671, ...Array.prototype.slice.call(arguments, 0)); },
@@ -310,7 +307,7 @@ window.go.main = {
/**
* GreetService.UInt64InUIntOut
*
* @param _in {number}
* @param _in {number}
* @returns {Promise<number>}
**/
UInt64InUIntOut: function(_in) { return wails.CallByID(793803239, ...Array.prototype.slice.call(arguments, 0)); },
@@ -318,7 +315,7 @@ window.go.main = {
/**
* GreetService.UInt64PointerInAndOutput
*
* @param _in {number | null}
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
UInt64PointerInAndOutput: function(_in) { return wails.CallByID(1403757716, ...Array.prototype.slice.call(arguments, 0)); },
@@ -326,7 +323,7 @@ window.go.main = {
/**
* GreetService.UInt8InUIntOut
*
* @param _in {number}
* @param _in {number}
* @returns {Promise<number>}
**/
UInt8InUIntOut: function(_in) { return wails.CallByID(2988345717, ...Array.prototype.slice.call(arguments, 0)); },
@@ -334,7 +331,7 @@ window.go.main = {
/**
* GreetService.UInt8PointerInAndOutput
*
* @param _in {number | null}
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
UInt8PointerInAndOutput: function(_in) { return wails.CallByID(518250834, ...Array.prototype.slice.call(arguments, 0)); },
@@ -342,7 +339,7 @@ window.go.main = {
/**
* GreetService.UIntInUIntOut
*
* @param _in {number}
* @param _in {number}
* @returns {Promise<number>}
**/
UIntInUIntOut: function(_in) { return wails.CallByID(2836661285, ...Array.prototype.slice.call(arguments, 0)); },
@@ -350,9 +347,9 @@ window.go.main = {
/**
* GreetService.UIntPointerInAndOutput
*
* @param _in {number | null}
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
UIntPointerInAndOutput: function(_in) { return wails.CallByID(1367187362, ...Array.prototype.slice.call(arguments, 0)); },
},
};
+45 -50
View File
@@ -3,62 +3,57 @@
// This file is automatically generated. DO NOT EDIT
export namespace main {
export class Person {
name: string;
parent: Person;
details: anon1;
static createFrom(source: any = {}) {
return new Person(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) {
source = JSON.parse(source);
}
this.name = source['name'];
this.parent = Person.createFrom(source['parent']);
this.details = anon1.createFrom(source['details']);
}
}
export class anon1 {
age: number;
address: anon2;
static createFrom(source: any = {}) {
return new anon1(source);
}
export class Person {
name: string;
parent: Person;
details: anon1;
constructor(source: Partial<Person> = {}) {
const { name = "", parent = null, details = null } = source;
this.name = name;
this.parent = parent;
this.details = details;
}
constructor(source: any = {}) {
if ('string' === typeof source) {
source = JSON.parse(source);
}
static createFrom(source: string | object = {}): Person {
let parsedSource = typeof source === 'string' ? JSON.parse(source) : source;
return new Person(parsedSource as Partial<Person>);
}
this.age = source['age'];
this.address = anon2.createFrom(source['address']);
}
}
export class anon2 {
street: string;
static createFrom(source: any = {}) {
return new anon2(source);
}
export class anon1 {
age: number;
address: anon2;
constructor(source: Partial<anon1> = {}) {
const { age = 0, address = null } = source;
this.age = age;
this.address = address;
}
constructor(source: any = {}) {
if ('string' === typeof source) {
source = JSON.parse(source);
}
static createFrom(source: string | object = {}): anon1 {
let parsedSource = typeof source === 'string' ? JSON.parse(source) : source;
return new anon1(parsedSource as Partial<anon1>);
}
this.street = source['street'];
}
}
}
export class anon2 {
street: string;
constructor(source: Partial<anon2> = {}) {
const { street = "" } = source;
this.street = street;
}
static createFrom(source: string | object = {}): anon2 {
let parsedSource = typeof source === 'string' ? JSON.parse(source) : source;
return new anon2(parsedSource as Partial<anon2>);
}
}
}
@@ -2,17 +2,14 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
window.go = window.go || {};
window.go.main = {
GreetService: {
export const GreetService = {
/**
* GreetService.Greet
* Greet someone
* @param name {string}
* @param name {string}
* @returns {Promise<string>}
**/
Greet: function(name) { return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
},
};

Some files were not shown because too many files have changed in this diff Show More