github.com/decred/politeia@v1.4.0/politeiawww/legacy/records/events.go (about) 1 // Copyright (c) 2020-2021 The Decred developers 2 // Use of this source code is governed by an ISC 3 // license that can be found in the LICENSE file. 4 5 package records 6 7 import ( 8 v1 "github.com/decred/politeia/politeiawww/api/records/v1" 9 "github.com/decred/politeia/politeiawww/legacy/user" 10 ) 11 12 const ( 13 // EventTypeNew is emitted when a new record is submitted. 14 EventTypeNew = "records-new" 15 16 // EventTypeEdit is emitted when a a record is edited. 17 EventTypeEdit = "records-edit" 18 19 // EventTypeSetStatus is emitted when a a record status is updated. 20 EventTypeSetStatus = "records-setstatus" 21 ) 22 23 // EventNew is the event data for the EventTypeNew. 24 type EventNew struct { 25 User user.User 26 Record v1.Record 27 } 28 29 // EventEdit is the event data for the EventTypeEdit. 30 type EventEdit struct { 31 User user.User 32 Record v1.Record 33 } 34 35 // EventSetStatus is the event data for the EventTypeSetStatus. 36 type EventSetStatus struct { 37 Record v1.Record 38 }