Tasks: github.com/thewhitetulip/Tasks/types Index | Files

package types

import "github.com/thewhitetulip/Tasks/types"


Package Files


type Categories Uses

type Categories []Category

Categories will show

type Category Uses

type Category struct {
    ID      int    `json:"category_id"`
    Name    string `json:"category_name"`
    Created string `json:"created_date"`

Category is the structure of the category table

type CategoryCount Uses

type CategoryCount struct {
    Name  string
    Count int

CategoryCount is the struct used to populate the sidebar which contains the category name and the count of the tasks in each category

type Comment Uses

type Comment struct {
    ID       int    `json:"id"`
    Content  string `json:"content"`
    Created  string `json:"created_date"`
    Username string `json:"username"`

Comment is the struct used to populate comments per tasks

type Context Uses

type Context struct {
    Tasks      []Task
    Navigation string
    Search     string
    Message    string
    CSRFToken  string
    Categories []CategoryCount
    Referer    string

Context is the struct passed to templates

type Status Uses

type Status struct {
    StatusCode int    `json:"status_code"`
    Message    string `json:"message"`

Status is the JSON struct to be returned

type Task Uses

type Task struct {
    Id           int           `json:"id"`
    Title        string        `json:"title"`
    Content      string        `json:"content"`
    ContentHTML  template.HTML `json:"content_html"`
    Created      string        `json:"created"`
    Priority     string        `json:"priority"`
    Category     string        `json:"category"`
    Referer      string        `json:"referer,omitempty"`
    Comments     []Comment     `json:"comments,omitempty"`
    IsOverdue    bool          `json:"isoverdue,omitempty"`
    IsHidden     int           `json:"ishidden,omitempty`
    CompletedMsg string        `json:"ishidden,omitempty"`

Package types is used to store the context struct which is passed while templates are executed.

Task is the struct used to identify tasks

type Tasks Uses

type Tasks []Task

Package types imports 1 packages (graph) and is imported by 2 packages. Updated 2018-10-13. Refresh now. Tools for package owners.