Documentation ¶
Index ¶
- func RunWebServer(opts *ReefOpts)
- type BackendOpts
- type BasicAuthHandler
- type BindAddress
- type CommandEntry
- type Controller
- type Database
- func (db *Database) AddSession(projectId, duration, date uint64) error
- func (db *Database) AddTask(projectId uint64, title, description string, priority uint64) error
- func (db *Database) CreateProject(title, description string, tags []uint64) (uint64, error)
- func (db *Database) CreateTag(name string, color string) (uint64, error)
- func (db *Database) DeleteProject(id uint64) ([]uint64, error)
- func (db *Database) DeleteSession(id uint64) (uint64, error)
- func (db *Database) DeleteTag(id uint64) ([]uint64, error)
- func (db *Database) DeleteTask(id uint64) (uint64, error)
- func (db *Database) EditProject(id uint64, title, description string, tags []uint64) ([]uint64, error)
- func (db *Database) EditTag(id uint64, newName, newColor string) error
- func (db *Database) EditTask(id uint64, title, description string, priority uint64) (uint64, error)
- func (db *Database) GetAllTagIds() ([]uint64, error)
- func (db *Database) GetProjectById(id uint64) (Project, error)
- func (db *Database) GetProjectCompleteness(id uint64) (float32, error)
- func (db *Database) GetProjectIdsByTagId(id uint64) ([]uint64, error)
- func (db *Database) GetProjectSessions(projectId uint64) (SessionsInfo, error)
- func (db *Database) GetProjectTasks(id uint64) ([]Task, error)
- func (db *Database) GetProjectsByTag(tagId uint64) ([]uint64, error)
- func (db *Database) GetSummaryById(id uint64) (Summary, error)
- func (db *Database) GetSummaryList() ([]Summary, error)
- func (db *Database) GetTagById(id uint64) (Tag, error)
- func (db *Database) GetTagIdsByProjectId(id uint64) ([]uint64, error)
- func (db *Database) GetTagList() ([]Tag, error)
- func (db *Database) ToggleTask(id uint64) (uint64, error)
- type HttpsOpts
- type Link
- type Project
- type ProjectEditParams
- type ProjectNewParams
- type ReefOpts
- type Request
- type Response
- type Session
- type SessionNewParams
- type SessionsInfo
- type Summary
- type Tag
- type TagEditParams
- type TagNewParams
- type Task
- type TaskEditParams
- type TaskNewParams
- type WebOpts
- type WebSocketHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunWebServer ¶
func RunWebServer(opts *ReefOpts)
Types ¶
type BackendOpts ¶
type BackendOpts struct {
DatabaseDirectory string // Directory for the database files
}
type BasicAuthHandler ¶
type BasicAuthHandler struct {
// contains filtered or unexported fields
}
func NewBasicAuthHandler ¶
func NewBasicAuthHandler(userMap map[string]string, handler http.Handler) BasicAuthHandler
func (BasicAuthHandler) ServeHTTP ¶
func (handler BasicAuthHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type BindAddress ¶
type CommandEntry ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(db *Database) *Controller
func (*Controller) GetLink ¶
func (c *Controller) GetLink() *Link
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func NewDatabase ¶
func (*Database) AddSession ¶
func (*Database) CreateProject ¶
func (*Database) EditProject ¶
func (*Database) GetAllTagIds ¶
func (*Database) GetProjectCompleteness ¶
func (*Database) GetProjectIdsByTagId ¶
func (*Database) GetProjectSessions ¶
func (db *Database) GetProjectSessions(projectId uint64) (SessionsInfo, error)
func (*Database) GetProjectsByTag ¶
func (*Database) GetSummaryList ¶
func (*Database) GetTagIdsByProjectId ¶
func (*Database) GetTagList ¶
type Project ¶
type Project struct { Id uint64 `json:"id"` Title string `json:"title"` Description string `json:"description"` Tags []uint64 `json:"tags"` DurationTotal uint64 `json:"durationTotal"` DurationMonth uint64 `json:"durationMonth"` DurationWeek uint64 `json:"durationWeek"` Completeness float32 `json:"completeness"` Tasks []Task `json:"tasks"` Sessions []Session `json:"sessions"` }
type ProjectEditParams ¶
type ProjectNewParams ¶
type ReefOpts ¶
type ReefOpts struct { Web WebOpts // Web server configuration Backend BackendOpts // Backend data store configuration }
func NewReefOpts ¶
func NewReefOpts() (opts *ReefOpts)
Create a ReefOpts object with default settings filled in
type Request ¶
type Request struct { Id string `json:"id"` Type string `json:"type"` Action string `json:"action"` TagNewParams TagNewParams `json:"tagNewParams"` TagDeleteParams uint64 `json:"tagDeleteParams"` TagEditParams TagEditParams `json:"tagEditParams"` ProjectNewParams ProjectNewParams `json:"projectNewParams"` ProjectGetParams uint64 `json:"projectGetParams"` ProjectDeleteParams uint64 `json:"projectDeleteParams"` ProjectEditParams ProjectEditParams `json:"projectEditParams"` TaskNewParams TaskNewParams `json:"taskNewParams"` TaskDeleteParams uint64 `json:"taskDeleteParams"` TaskToggleParams uint64 `json:"taskToggleParams"` TaskEditParams TaskEditParams `json:"taskEditParams"` SessionNewParams SessionNewParams `json:"sessionNewParams"` SessionDeleteParams uint64 `json:"sessionDeleteParams"` }
type SessionNewParams ¶
type SessionsInfo ¶
type TagEditParams ¶
type TagNewParams ¶
type TaskEditParams ¶
type TaskNewParams ¶
type WebOpts ¶
type WebOpts struct { BindAddresses []BindAddress // List of addresses the server should bind to Https HttpsOpts // Https configuration EnableAuth bool // Enable basic HTTP auth HtpasswdFile string // path to the htpasswd file }
type WebSocketHandler ¶
type WebSocketHandler struct {
// contains filtered or unexported fields
}
func NewWebSocketHandler ¶
func NewWebSocketHandler(db *Database) WebSocketHandler
func (WebSocketHandler) ServeHTTP ¶
func (handler WebSocketHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.