Documentation ¶
Index ¶
- type Bindings
- func (b *Bindings) Add(structPtr interface{}) error
- func (b *Bindings) AddEnumToGenerateTS(e interface{})
- func (b *Bindings) AddStructToGenerateTS(packageName string, structName string, s interface{})
- func (b *Bindings) DB() *DB
- func (b *Bindings) GenerateGoBindings(baseDir string) error
- func (b *Bindings) GenerateModels() ([]byte, error)
- func (b *Bindings) SetOutputType(outputType string) *Bindings
- func (b *Bindings) SetTsPrefix(prefix string) *Bindings
- func (b *Bindings) SetTsSuffix(postfix string) *Bindings
- func (b *Bindings) ToJSON() (string, error)
- func (b *Bindings) WriteModels(modelsDir string) error
- type BoundMethod
- type DB
- func (d *DB) AddMethod(packageName string, structName string, methodName string, ...)
- func (d *DB) GetMethod(qualifiedMethodName string) *BoundMethod
- func (d *DB) GetMethodFromStore(packageName string, structName string, methodName string) *BoundMethod
- func (d *DB) GetObfuscatedMethod(id int) *BoundMethod
- func (d *DB) ToJSON() (string, error)
- func (d *DB) UpdateObfuscatedCallMap() map[string]int
- type ObfuscatedMethod
- type Parameter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bindings ¶
type Bindings struct {
// contains filtered or unexported fields
}
func NewBindings ¶
func NewBindings(logger *logger.Logger, structPointersToBind []interface{}, exemptions []interface{}, obfuscate bool, enumsToBind []interface{}) *Bindings
NewBindings returns a new Bindings object
func (*Bindings) AddEnumToGenerateTS ¶
func (b *Bindings) AddEnumToGenerateTS(e interface{})
func (*Bindings) AddStructToGenerateTS ¶
func (*Bindings) GenerateGoBindings ¶
func (*Bindings) GenerateModels ¶
func (*Bindings) SetOutputType ¶
func (*Bindings) SetTsPrefix ¶
func (*Bindings) SetTsSuffix ¶
func (*Bindings) WriteModels ¶
type BoundMethod ¶
type BoundMethod struct { Name string `json:"name"` Inputs []*Parameter `json:"inputs,omitempty"` Outputs []*Parameter `json:"outputs,omitempty"` Comments string `json:"comments,omitempty"` Method reflect.Value `json:"-"` }
BoundMethod defines all the data related to a Go method that is bound to the Wails application
func (*BoundMethod) Call ¶
func (b *BoundMethod) Call(args []interface{}) (interface{}, error)
Call will attempt to call this bound method with the given args
func (*BoundMethod) InputCount ¶
func (b *BoundMethod) InputCount() int
InputCount returns the number of inputs this bound method has
func (*BoundMethod) OutputCount ¶
func (b *BoundMethod) OutputCount() int
OutputCount returns the number of outputs this bound method has
func (*BoundMethod) ParseArgs ¶
func (b *BoundMethod) ParseArgs(args []json.RawMessage) ([]interface{}, error)
ParseArgs method converts the input json into the types expected by the method
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB is our database of method bindings
func (*DB) AddMethod ¶
func (d *DB) AddMethod(packageName string, structName string, methodName string, methodDefinition *BoundMethod)
AddMethod adds the given method definition to the db using the given qualified path: packageName.structName.methodName
func (*DB) GetMethod ¶
func (d *DB) GetMethod(qualifiedMethodName string) *BoundMethod
GetMethod returns the method for the given qualified method name qualifiedMethodName is "packagename.structname.methodname"
func (*DB) GetMethodFromStore ¶
func (d *DB) GetMethodFromStore(packageName string, structName string, methodName string) *BoundMethod
GetMethodFromStore returns the method for the given package/struct/method names nil is returned if any one of those does not exist
func (*DB) GetObfuscatedMethod ¶
func (d *DB) GetObfuscatedMethod(id int) *BoundMethod
GetObfuscatedMethod returns the method for the given ID
func (*DB) UpdateObfuscatedCallMap ¶
UpdateObfuscatedCallMap sets up the secure call mappings
type ObfuscatedMethod ¶
type ObfuscatedMethod struct {
// contains filtered or unexported fields
}