added file level comments
This commit is contained in:
parent
5b60435ee0
commit
e7b6055693
|
@ -1,3 +1,10 @@
|
||||||
|
/*
|
||||||
|
Configuration package is used to read the configuration file
|
||||||
|
config.json which stores the server port for current implementation
|
||||||
|
{
|
||||||
|
"ServerPort": ":8081"
|
||||||
|
}
|
||||||
|
*/
|
||||||
package config
|
package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
package db
|
package db
|
||||||
|
|
||||||
|
/*
|
||||||
|
stores the functions related to file IO
|
||||||
|
*/
|
||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
package db
|
package db
|
||||||
|
|
||||||
|
/*
|
||||||
|
Stores the database functions related to tasks like
|
||||||
|
GetTaskByID(id int)
|
||||||
|
GetTasks(status string)
|
||||||
|
DeleteAll()
|
||||||
|
*/
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"log"
|
"log"
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
package types
|
package types
|
||||||
|
|
||||||
|
/*
|
||||||
|
Package types is used to store the context struct which
|
||||||
|
is passed while templates are executed.
|
||||||
|
*/
|
||||||
//Task is the struct used to identify tasks
|
//Task is the struct used to identify tasks
|
||||||
type Task struct {
|
type Task struct {
|
||||||
Id int
|
Id int
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
package views
|
package views
|
||||||
|
|
||||||
|
/*
|
||||||
|
Holds the insert task related view handlers, includes the one for file upload
|
||||||
|
*/
|
||||||
import (
|
import (
|
||||||
"crypto/md5"
|
"crypto/md5"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
package views
|
package views
|
||||||
|
|
||||||
|
/*
|
||||||
|
Holds the delete related view handlers
|
||||||
|
*/
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
package views
|
package views
|
||||||
|
|
||||||
|
/*
|
||||||
|
Holds the non insert/update/delete related view handlers
|
||||||
|
*/
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
|
|
Loading…
Reference in New Issue