com

package module
v0.0.0-...-6e8b2b8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2020 License: MIT Imports: 3 Imported by: 6

Documentation

Index

Constants

View Source
const (
	BindingType_Property BindingType = "Property"
	BindingType_Context              = "Context"
	BindingType_List                 = "List"
)
View Source
const (

	// Event from Binding to Listener shows changing of data
	Event_change = "change"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Binding

type Binding interface {
	AttachChange(data EventData, fn EventHandler)
	AttachChangeOnce(data EventData, fn EventHandler)
	FireChange(param EventParam)
	DetachChange(fn EventHandler)
	HasChange() bool

	AttachDataReceived(data EventData, fn EventHandler)
	AttachDataReceivedOnce(data EventData, fn EventHandler)
	FireDataReceived(param EventParam)
	DetachDataReceived(fn EventHandler)
	HasDataReceived() bool

	AttachDataRequested(data EventData, fn EventHandler)
	AttachDataRequestedOnce(data EventData, fn EventHandler)
	FireDataRequested(param EventParam)
	DetachDataRequested(fn EventHandler)
	HasDataRequested() bool

	GetPath() string
	GetContext() Context
	Get() interface{}
	Handle(Event)
}

type BindingDescription

type BindingDescription struct {
	Model string
	Path  string
	Type  BindingType
	// contains filtered or unexported fields
}

func NewBindingDescription

func NewBindingDescription(m, p string) BindingDescription

func ParseBindingString

func ParseBindingString(s string) (BindingDescription, bool)

func (BindingDescription) IsAbsolute

func (bd BindingDescription) IsAbsolute() bool

func (BindingDescription) IsNil

func (bd BindingDescription) IsNil() bool

func (BindingDescription) NotEquals

func (bd BindingDescription) NotEquals(d BindingDescription) bool

func (BindingDescription) String

func (bd BindingDescription) String() string

type BindingType

type BindingType string

type Context

type Context interface {
	// gibt immer ein Model zurück
	GetModel() interface{}
	GetObject(p string) interface{}
	GetValue(p string) Value
	GetPath() string
}

type ContextBinding

type ContextBinding interface {
	Binding
}

type Event

type Event interface {
	Type() string
	Data() EventData
	Param() EventParam
}

type EventData

type EventData interface {
	Data() interface{}
}

type EventHandler

type EventHandler interface {
	Handle(Event)
}

func MakeHandler

func MakeHandler(fn func(Event)) EventHandler

type EventParam

type EventParam interface {
	Param() interface{}
}

type ListBinding

type ListBinding interface {
	Binding
	AttachSort(data EventData, fn EventHandler)
	AttachSortOnce(data EventData, fn EventHandler)
	FireSort(param EventParam)
	DetachSort(fn EventHandler)
	HasSort() bool
	AttachFilter(data EventData, fn EventHandler)
	AttachFilterOnce(data EventData, fn EventHandler)
	FireFilter(param EventParam)
	DetachFilter(fn EventHandler)
	HasFilter() bool
}

type NewValue

type NewValue interface {
	NewValue() interface{}
}

type OldValue

type OldValue interface {
	OldValue() interface{}
}

type PropertyBinding

type PropertyBinding interface {
	Binding
}

type Value

type Value interface {
	String() string
	IsValid() bool
	Interface() interface{}
	ArraySize() int
	Set(s interface{})
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL