github.com/decred/politeia@v1.4.0/politeiawww/legacy/ticketvote/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 ticketvote
     6  
     7  import (
     8  	v1 "github.com/decred/politeia/politeiawww/api/ticketvote/v1"
     9  	"github.com/decred/politeia/politeiawww/legacy/user"
    10  )
    11  
    12  const (
    13  	// EventTypeAuthorize is emitted when a vote is authorized.
    14  	EventTypeAuthorize = "ticketvote-authorize"
    15  
    16  	// EventTypeStart is emitted when a vote is started.
    17  	EventTypeStart = "ticketvote-start"
    18  )
    19  
    20  // EventAuthorize is the event data for EventTypeAuthorize.
    21  type EventAuthorize struct {
    22  	Auth v1.Authorize
    23  	User user.User
    24  }
    25  
    26  // EventStart is the event data for EventTypeStart.
    27  type EventStart struct {
    28  	Starts []v1.StartDetails
    29  	User   user.User
    30  }