Documentation
¶
Index ¶
- Constants
- Variables
- func ConvertFromMarkdown(src string) (template.HTML, error)
- func HMS(d time.Duration) string
- func Incr(num int) int
- func IsCorrect(answer *models.Answer, response *models.Response) bool
- func IsZeroDuration(d time.Duration) bool
- func Now() time.Time
- func TimeInterval(timezone string, dateFormat string, timeFormat string) func(start, end time.Time) string
- func ValidateJwtCookie(r *http.Request) (*jwt.Token, error)
- type Claims
- type GitSync
- type PageData
- type Store
- func (s *Store) CreateUpdateResponse(response *models.Response, dir string) (*models.Response, bool, error)
- func (s *Store) GetResponsePath(response *models.Response) string
- func (s *Store) GetScores(sessionId string) ([][]interface{}, error)
- func (s *Store) GetSessionPath(session *models.Session) string
- func (s *Store) ReadAllSessions() []*models.Session
- func (s *Store) ReadResponse(sessionId, participantId string) (*models.Response, error)
- func (s *Store) ReadSession(uuid string) (*models.Session, error)
- type StoreHandler
- type Storer
Constants ¶
View Source
const JWTDuration = time.Hour + 30*time.Minute
Variables ¶
View Source
var (
JWTKey = []byte(viper.GetString("jwt_key"))
)
Functions ¶
func IsZeroDuration ¶
func TimeInterval ¶
Types ¶
type GitSync ¶
type GitSync struct {
Dir string
Url string
Branch string
Token string
// contains filtered or unexported fields
}
func NewGitSync ¶
type Store ¶
func (*Store) CreateUpdateResponse ¶
func (*Store) ReadAllSessions ¶
func (*Store) ReadResponse ¶
type StoreHandler ¶
type StoreHandler struct {
// contains filtered or unexported fields
}
func NewStoreHandler ¶
func NewStoreHandler(store Storer, funcs template.FuncMap, templatePaths ...string) *StoreHandler
type Storer ¶
type Storer interface {
ReadSession(uuid string) (*models.Session, error)
ReadAllSessions() []*models.Session
CreateUpdateResponse(response *models.Response, dir string) (*models.Response, bool, error)
ReadResponse(sessionId, participantId string) (*models.Response, error)
GetSessionPath(session *models.Session) string
GetResponsePath(response *models.Response) string
GetScores(sessionId string) ([][]interface{}, error)
}
Click to show internal directories.
Click to hide internal directories.