models

package
v0.0.0-...-454992d Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminMessage

type AdminMessage struct {
	// DateCreated string       `json:"dateCreated"`
	SessionID  string `json:"sessionID"`
	IssueTitle string `json:"issueTitle"`
	// Users [] connectedUsers
	StoryPoints   int          `json:"storyPoints,omitempty"` // represents story point values for a giv
	Estimations   []Estimation `json:"estimations"`
	SelectedIssue string       `json:"SelectedIssue"`
	FinalPoints   int          `json:"FinalPoints"`
	IssueID       string       `json:"issueID"`
}

type Estimation

type Estimation struct {
	Value   int    `json:"value"`
	IssueID string `json:"issueID"`
}

Estimation represents Estimation record

func (Estimation) OK

func (s Estimation) OK() error

type EstimationsMap

type EstimationsMap = map[string]int

e.g. {[userName]: point total}

type Issue

type Issue struct {
	IssueTitle  string         `json:"issueTitle"`
	IssueID     string         `json:"issueID"`
	Estimations EstimationsMap `json:"estimations"` // userID: 123
}

type Session

type Session struct {
	AdminID       string  `json:"adminID,omitempty"`
	DateCreated   string  `json:"dateCreated"`
	ID            string  `json:"ID"`
	StoryPoints   []int   `json:"storyPoints"`
	Issues        []Issue `json:"issues"`
	SelectedIssue string  `json:"selectedIssue"`
}

func (Session) OK

func (s Session) OK() error

func (Session) Public

func (s Session) Public() Session

Session that is sanitized of private data

func (Session) Response

func (s Session) Response(adminID string) SessionResponse

Session API response for admins and non-admins alike

type SessionResponse

type SessionResponse struct {
	Session Session `json:"session"`
	IsAdmin bool    `json:"isAdmin"`
}

type UserMessageEstimation

type UserMessageEstimation struct {
	Username        string `json:"username"`
	SessionID       string `json:"sessionID"`
	IssueID         string `json:"issueID"`
	EstimationValue int    `json:"estimationValue"`
}

should

func (UserMessageEstimation) OK

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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