Documentation
¶
Index ¶
- type ChangeNotifier
- type CompleteSessionView
- type Disconnector
- type DynamoClient
- type InterestRecorder
- type JoinSessionRequest
- type LoadFacilitatorSessionRequest
- type LoadSessionRequest
- type Loader
- type ParticipantSessionView
- type Saver
- type ShowVotesRequest
- type StartRequest
- type Starter
- type User
- type VoteRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangeNotifier ¶
type ChangeNotifier func(ctx context.Context, updated CompleteSessionView) error
func NewChangeNotifier ¶
func NewChangeNotifier(dynamo DynamoClient, watcherTable string, dispatchMessage api.MessageDispatcher) ChangeNotifier
type CompleteSessionView ¶
type CompleteSessionView struct {
SessionID string `json:"sessionId"`
VotesShown bool `json:"votesShown"`
FacilitatorSessionKey string `json:"facilitatorSessionKey,omitempty"`
Facilitator User `json:"facilitator"`
FacilitatorPoints bool `json:"facilitatorPoints"`
Participants []User `json:"participants"`
}
type Disconnector ¶
func NewDisconnector ¶
func NewDisconnector(dynamo DynamoClient, tableName string, locker lock.GlobalLockAppropriator, loadSession Loader, saveSession Saver) Disconnector
type DynamoClient ¶
type DynamoClient interface {
GetItemWithContext(ctx aws.Context, input *dynamodb.GetItemInput, opts ...request.Option) (*dynamodb.GetItemOutput, error)
PutItemWithContext(ctx aws.Context, input *dynamodb.PutItemInput, opts ...request.Option) (*dynamodb.PutItemOutput, error)
DeleteItemWithContext(ctx aws.Context, input *dynamodb.DeleteItemInput, opts ...request.Option) (*dynamodb.DeleteItemOutput, error)
}
type InterestRecorder ¶
func NewInterestRecorder ¶
func NewInterestRecorder(dynamo DynamoClient, sessionTable string, watcherTable string, locker lock.GlobalLockAppropriator, sessionExpiration time.Duration) InterestRecorder
type JoinSessionRequest ¶
type LoadSessionRequest ¶
type LoadSessionRequest struct {
SessionID string `json:"sessionId"`
}
type Loader ¶
type Loader func(ctx context.Context, sessionID string) (*CompleteSessionView, error)
func NewLoader ¶
func NewLoader(dynamo DynamoClient, tableName string) Loader
type ParticipantSessionView ¶
type ParticipantSessionView struct {
SessionID string `json:"sessionId"`
VotesShown bool `json:"votesShown"`
Facilitator User `json:"facilitator"`
FacilitatorPoints bool `json:"facilitatorPoints"`
Participants []User `json:"participants"`
}
func ToParticipantView ¶
func ToParticipantView(s CompleteSessionView, connectionID string) ParticipantSessionView
type Saver ¶
type Saver func(ctx context.Context, toSave CompleteSessionView) error
func NewSaver ¶
func NewSaver(dynamo DynamoClient, tableName string, notifyObservers ChangeNotifier, sessionExpiration time.Duration) Saver
type ShowVotesRequest ¶
type StartRequest ¶
type Starter ¶
type Starter func(ctx context.Context, toStart StartRequest) (CompleteSessionView, error)
func NewStarter ¶
func NewStarter(dynamo DynamoClient, tableName string, sessionExpiration time.Duration) Starter
type VoteRequest ¶
Click to show internal directories.
Click to hide internal directories.