Documentation ¶
Index ¶
- type Attendee
- type AttendeeIdList
- type AttendeeService
- type Impl
- type Mock
- type MockImpl
- func (m *MockImpl) GetAttendee(ctx context.Context, id int64) (Attendee, error)
- func (m *MockImpl) GetStatus(ctx context.Context, id int64) (Status, error)
- func (m *MockImpl) ListMyRegistrationIds(ctx context.Context) ([]int64, error)
- func (m *MockImpl) Reset()
- func (m *MockImpl) SetupRegistered(subject string, badgeNo int64, status Status, nickname string, email string)
- func (m *MockImpl) Unavailable()
- type Status
- type StatusDto
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attendee ¶
type Attendee struct { ID int64 `json:"id"` // badge number Nickname string `json:"nickname"` // fan name Email string `json:"email"` SpokenLanguages string `json:"spoken_languages"` // configurable subset of configured language codes, comma separated (de,en) RegistrationLanguage string `json:"registration_language"` // one out of configurable subset of RFC 5646 locales (default en-US) // comma separated lists, allowed choices are convention dependent Flags string `json:"flags"` // hc,anon,ev Packages string `json:"packages"` // room-none,attendance,stage,sponsor,sponsor2 Options string `json:"options"` // art,anim,music,suit }
type AttendeeIdList ¶
type AttendeeIdList struct {
Ids []int64 `json:"ids"`
}
type AttendeeService ¶
type AttendeeService interface { // ListMyRegistrationIds which attendee ids belong to the current user? // // If your request was made with an api token, this will fail and should not be called. // // Admins are treated like normal users for this request, and will also only receive badge numbers // they have personally registered. // // Forwards the jwt from the request. ListMyRegistrationIds(ctx context.Context) ([]int64, error) // GetStatus obtains the status for a given attendee id. // // Nonexistent registrations will return StatusDeleted because the distinction isn't important. // // If your request was made by an admin, you can read everyone's status. A user can only read their own status. // // Forwards the jwt from the request. GetStatus(ctx context.Context, id int64) (Status, error) // GetAttendee obtains part of the registration information for given attendee id. // // Used for internal nickname lookups, etc. // // Uses the api token for full access, so access control must be performed in the implementation. GetAttendee(ctx context.Context, id int64) (Attendee, error) }
func New ¶
func New(attendeeServiceBaseUrl string) (AttendeeService, error)
type Impl ¶
type Impl struct {
// contains filtered or unexported fields
}
func (*Impl) GetAttendee ¶
type Mock ¶
type MockImpl ¶
type MockImpl struct { IdsBySubject map[string][]int64 StatusById map[int64]Status AttendeeById map[int64]Attendee }
func (*MockImpl) GetAttendee ¶
func (*MockImpl) ListMyRegistrationIds ¶
func (*MockImpl) SetupRegistered ¶
func (*MockImpl) Unavailable ¶
func (m *MockImpl) Unavailable()
Click to show internal directories.
Click to hide internal directories.