models

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CalcResults

type CalcResults struct {
	Name    string
	Dev, QA Distribution
}

func NewCalcResults

func NewCalcResults(name string) CalcResults

func (CalcResults) Total added in v1.2.0

func (r CalcResults) Total() Distribution

type CookieData

type CookieData struct {
	User    UserInfo
	Session SessionInfo
}

type Distribution added in v1.2.0

type Distribution struct {
	Prefix string
	// contains filtered or unexported fields
}

func NewDistribution added in v1.2.0

func NewDistribution(prefix string) Distribution

func (*Distribution) Add added in v1.2.0

func (d *Distribution) Add(card string)

func (Distribution) Any added in v1.2.0

func (d Distribution) Any() bool

func (Distribution) Avg added in v1.2.0

func (d Distribution) Avg() float64

func (Distribution) Distribution added in v1.2.0

func (d Distribution) Distribution() string

func (Distribution) Points added in v1.2.0

func (d Distribution) Points() string

type ReadyUser

type ReadyUser struct {
	User
	Ready       bool
	Participant bool
}

type Session

type Session struct {
	SessionInfo
	ID      string
	Expires time.Time
	Showing bool

	Users map[string]*User
	// contains filtered or unexported fields
}

func NewSession

func NewSession(ID string, Expires time.Time, sessionInfo SessionInfo) *Session

func (*Session) AllCardsSelected added in v1.3.0

func (session *Session) AllCardsSelected() bool

func (*Session) Calc

func (session *Session) Calc() []CalcResults

func (*Session) Close

func (session *Session) Close()

func (*Session) DeleteUser added in v1.3.0

func (session *Session) DeleteUser(ID string)

func (Session) MultiRow added in v1.2.0

func (session Session) MultiRow() bool

func (*Session) NewUser

func (session *Session) NewUser(name string, userType UserType, isQA bool) *User

func (*Session) ReadyUsers

func (session *Session) ReadyUsers() []ReadyUser

func (*Session) Reset

func (session *Session) Reset()

func (*Session) SendUpdates

func (session *Session) SendUpdates()

func (*Session) WrapContext

func (session *Session) WrapContext(ctx context.Context) context.Context

type SessionInfo

type SessionInfo struct {
	Cards          []string
	Rows           []string
	MapToFibonacci bool
}

func NewSessionInfo

func NewSessionInfo(cards, rows []string, mapToFibonacci bool) SessionInfo

type User

type User struct {
	UserInfo
	Active bool
	ID     string
	Cards  map[string]string

	UpdateCh chan struct{}
}

func (*User) Close added in v1.3.0

func (user *User) Close()

type UserInfo

type UserInfo struct {
	Name string
	Type UserType
	IsQA bool
}

type UserType

type UserType string
var (
	UserTypeParticipant UserType = "Participant"
	UserTypeWatcher     UserType = "Watcher"
)

Jump to

Keyboard shortcuts

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