mirror of
https://github.com/mudler/luet.git
synced 2025-09-02 15:54:39 +00:00
Update go-pluggable
This commit is contained in:
7
vendor/github.com/mudler/go-pluggable/events.go
generated
vendored
7
vendor/github.com/mudler/go-pluggable/events.go
generated
vendored
@@ -29,6 +29,7 @@ type EventType string
|
||||
type Event struct {
|
||||
Name EventType `json:"name"`
|
||||
Data string `json:"data"`
|
||||
File string `json:"file"` // If Data >> 10K write content to file instead
|
||||
}
|
||||
|
||||
// EventResponse describes the event response structure
|
||||
@@ -45,6 +46,12 @@ func (e Event) JSON() (string, error) {
|
||||
return string(dat), err
|
||||
}
|
||||
|
||||
// Copy returns a copy of Event
|
||||
func (e Event) Copy() *Event {
|
||||
copy := &e
|
||||
return copy
|
||||
}
|
||||
|
||||
func (e Event) ResponseEventName(s string) EventType {
|
||||
return EventType(fmt.Sprintf("%s-%s", e.Name, s))
|
||||
}
|
||||
|
Reference in New Issue
Block a user