Documentation ¶
Index ¶
- Constants
- Variables
- func AddHandler(pattern string, handlerFunc func(http.ResponseWriter, *http.Request))
- func CheckStaticResources(path string, suffix ...string) bool
- func CommonSave(r interface{}, name string) error
- func CommonToJsonStr(r interface{}) string
- func ConvertString(i reflect.Value) string
- func FormatString(buf bytes.Buffer, indent int) string
- func GenerateJsonStr(val map[string]string) string
- func GenerateSql(val map[string]string, name string) string
- func HandLerAddItem(resp http.ResponseWriter, req *http.Request)
- func HandLerAddRecord(resp http.ResponseWriter, req *http.Request)
- func HandLerDelItem(resp http.ResponseWriter, req *http.Request)
- func HandLerUpdateItem(resp http.ResponseWriter, req *http.Request)
- func HandlerApiHome(resp http.ResponseWriter, req *http.Request)
- func HandlerList(resp http.ResponseWriter, req *http.Request)
- func HomePageHandler(resp http.ResponseWriter, req *http.Request)
- func Init()
- func Interface2map(r interface{}) map[string]string
- func PackToCol(key string) string
- func ParseRowsToCreditList(row *sql.Rows, c_list *[]Credit)
- func ParserCreditsToJson(cl *[]Credit) *simplejson.Json
- func ReInitDb() *sql.DB
- func SaveId(x interface{}, id int64)
- func Start()
- type Alarm
- type Bill
- type Credit
- type Record
Constants ¶
View Source
const VERSION = "v0.1"
Variables ¶
View Source
var Context = Alarm{}
Functions ¶
func AddHandler ¶
func AddHandler(pattern string, handlerFunc func(http.ResponseWriter, *http.Request))
func CheckStaticResources ¶
func CommonSave ¶
func CommonToJsonStr ¶
func CommonToJsonStr(r interface{}) string
func ConvertString ¶
func GenerateJsonStr ¶
func HandLerAddItem ¶
func HandLerAddItem(resp http.ResponseWriter, req *http.Request)
func HandLerAddRecord ¶
func HandLerAddRecord(resp http.ResponseWriter, req *http.Request)
func HandLerDelItem ¶
func HandLerDelItem(resp http.ResponseWriter, req *http.Request)
func HandLerUpdateItem ¶
func HandLerUpdateItem(resp http.ResponseWriter, req *http.Request)
func HandlerApiHome ¶
func HandlerApiHome(resp http.ResponseWriter, req *http.Request)
func HandlerList ¶
func HandlerList(resp http.ResponseWriter, req *http.Request)
func HomePageHandler ¶
func HomePageHandler(resp http.ResponseWriter, req *http.Request)
func Interface2map ¶
func ParseRowsToCreditList ¶
func ParserCreditsToJson ¶
func ParserCreditsToJson(cl *[]Credit) *simplejson.Json
Types ¶
type Bill ¶
type Bill struct { Id int64 CreditId int64 Year int Month int Day int Amount float64 Balance float64 `show total balance` Credit float64 `This month of credit` }
func (*Bill) ToJsonString ¶
type Credit ¶
type Credit struct { Name string Icon string Credit float64 Debit float64 Balance float64 Account_date int8 Repayment_date int8 Id int64 }
func (*Credit) ConvertFromJson ¶
func (c *Credit) ConvertFromJson(js *simplejson.Json)
func (*Credit) ToJsonString ¶
Click to show internal directories.
Click to hide internal directories.