Documentation ¶
Index ¶
- Constants
- type Event
- func (e *Event) AddNewValue(column string, value interface{})
- func (e *Event) AddOldValue(column string, value interface{})
- func (e *Event) Change(column string) (ec *EventChange)
- func (e Event) ChangedColumns() []string
- func (e Event) HasChangedColumn(c string) bool
- func (e Event) NewValue(c string) (*EventDataValue, bool)
- func (e Event) OldValue(c string) (*EventDataValue, bool)
- type EventChange
- type EventController
- type EventDataValue
- type EventMetadata
- type EventType
Constants ¶
View Source
const ( // EventTypeCreated ... EventTypeCreated = "CREATED" // EventTypeUpdated ... EventTypeUpdated = "UPDATED" // EventTypeDeleted ... EventTypeDeleted = "DELETED" )
View Source
const (
ORMChangeEvent = "com.graphql.orm.change"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { EventMetadata ID string `json:"id"` Changes []*EventChange `json:"changes"` OldValues map[string]*EventDataValue `json:"oldValues"` NewValues map[string]*EventDataValue `json:"newValues"` }
Event ...
func (*Event) AddNewValue ¶
AddNewValue ...
func (*Event) AddOldValue ¶
AddOldValue ...
func (*Event) Change ¶
func (e *Event) Change(column string) (ec *EventChange)
func (Event) ChangedColumns ¶
ChangedColumns returns list of names of changed columns
func (Event) HasChangedColumn ¶
HasChangedColumn check if given event has changes on specific column
type EventChange ¶
type EventChange struct { Name string `json:"name"` OldValue *EventDataValue `json:"oldValue"` NewValue *EventDataValue `json:"newValue"` }
EventChange ...
type EventController ¶
type EventController struct {
// contains filtered or unexported fields
}
func NewEventController ¶
func NewEventController() (ec EventController, err error)
type EventDataValue ¶
type EventDataValue interface{}
type EventMetadata ¶
Click to show internal directories.
Click to hide internal directories.