ticketvote

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2021 License: ISC Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EventTypeAuthorize is emitted when a vote is authorized.
	EventTypeAuthorize = "ticketvote-authorize"

	// EventTypeStart is emitted when a vote is started.
	EventTypeStart = "ticketvote-start"
)

Variables

This section is empty.

Functions

func DisableLog

func DisableLog()

DisableLog disables all library log output. Logging output is disabled by default until either UseLogger or SetLogWriter are called.

func UseLogger

func UseLogger(logger slog.Logger)

UseLogger uses a specified Logger to output package logging info. This should be used in preference to SetLogWriter if the caller is also using slog.

Types

type EventAuthorize

type EventAuthorize struct {
	Auth v1.Authorize
	User user.User
}

EventAuthorize is the event data for EventTypeAuthorize.

type EventStart

type EventStart struct {
	Starts []v1.StartDetails
	User   user.User
}

EventStart is the event data for EventTypeStart.

type TicketVote

type TicketVote struct {
	// contains filtered or unexported fields
}

TicketVote is the context for the ticketvote API.

func New

func New(cfg *config.Config, pdc *pdclient.Client, s *sessions.Sessions, e *events.Manager, plugins []pdv2.Plugin) (*TicketVote, error)

New returns a new TicketVote context.

func (*TicketVote) HandleAuthorize

func (t *TicketVote) HandleAuthorize(w http.ResponseWriter, r *http.Request)

HandleAuthorize is the request handler for the ticketvote v1 Authorize route.

func (*TicketVote) HandleCastBallot

func (t *TicketVote) HandleCastBallot(w http.ResponseWriter, r *http.Request)

HandleCastBallot is the request handler for the ticketvote v1 CastBallot route.

func (*TicketVote) HandleDetails

func (t *TicketVote) HandleDetails(w http.ResponseWriter, r *http.Request)

HandleDetails is the request handler for the ticketvote v1 Details route.

func (*TicketVote) HandleInventory

func (t *TicketVote) HandleInventory(w http.ResponseWriter, r *http.Request)

HandleInventory is the request handler for the ticketvote v1 Inventory route.

func (*TicketVote) HandlePolicy

func (t *TicketVote) HandlePolicy(w http.ResponseWriter, r *http.Request)

HandlePolicy is the request handler for the ticketvote v1 Policy route.

func (*TicketVote) HandleResults

func (t *TicketVote) HandleResults(w http.ResponseWriter, r *http.Request)

HandleResults is the request handler for the ticketvote v1 Results route.

func (*TicketVote) HandleStart

func (t *TicketVote) HandleStart(w http.ResponseWriter, r *http.Request)

HandleStart is the requeset handler for the ticketvote v1 Start route.

func (*TicketVote) HandleSubmissions

func (t *TicketVote) HandleSubmissions(w http.ResponseWriter, r *http.Request)

HandleSubmissions is the request handler for the ticketvote v1 Submissions route.

func (*TicketVote) HandleSummaries

func (t *TicketVote) HandleSummaries(w http.ResponseWriter, r *http.Request)

HandleSummaries is the request handler for the ticketvote v1 Summaries route.

func (*TicketVote) HandleTimestamps

func (t *TicketVote) HandleTimestamps(w http.ResponseWriter, r *http.Request)

HandleTimestamps is the request handler for the ticketvote v1 Timestamps route.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL