github.com/enbility/spine-go@v0.7.0/api/function.go (about) 1 package api 2 3 import "github.com/enbility/spine-go/model" 4 5 /* Function */ 6 7 type FunctionDataCmdInterface interface { 8 FunctionDataInterface 9 // Get the CmdType data for a read command 10 // 11 // Note: partialSelector and elements have to be pointers! 12 ReadCmdType(partialSelector any, elements any) model.CmdType 13 // Get the CmdType data for a reply command 14 ReplyCmdType(partial bool) model.CmdType 15 // Get the CmdType data for a notify or write command 16 // 17 // Note: partialSelector and elements have to be pointers! 18 NotifyOrWriteCmdType(deleteSelector, partialSelector any, partialWithoutSelector bool, deleteElements any) model.CmdType 19 } 20 21 type FunctionDataInterface interface { 22 // Get the function type 23 FunctionType() model.FunctionType 24 // Return if this function supports partial writes 25 SupportsPartialWrite() bool 26 // Get a copy of the functions data 27 DataCopyAny() any 28 // Update the functions data, only persisted if persist is true, otherwise useful for creating full write datasets 29 UpdateDataAny(remoteWrite, persist bool, data any, filterPartial *model.FilterType, filterDelete *model.FilterType) (any, *model.ErrorType) 30 }