Documentation ¶
Index ¶
- Variables
- func HandleActivitiesGet(w http.ResponseWriter, r *http.Request)
- func HandleActivityDelete(w http.ResponseWriter, r *http.Request)
- func HandleActivityGet(w http.ResponseWriter, r *http.Request)
- func HandleActivityLogDelete(w http.ResponseWriter, r *http.Request)
- func HandleActivityLogGet(w http.ResponseWriter, r *http.Request)
- func HandleActivityLogPost(w http.ResponseWriter, r *http.Request)
- func HandleActivityLogPut(w http.ResponseWriter, r *http.Request)
- func HandleActivityLogsGet(w http.ResponseWriter, r *http.Request)
- func HandleActivityPost(w http.ResponseWriter, r *http.Request)
- func HandleActivityPut(w http.ResponseWriter, r *http.Request)
- func HandleGoalDelete(w http.ResponseWriter, r *http.Request)
- func HandleGoalGet(w http.ResponseWriter, r *http.Request)
- func HandleGoalPost(w http.ResponseWriter, r *http.Request)
- func HandleGoalPut(w http.ResponseWriter, r *http.Request)
- func HandleGoalsGet(w http.ResponseWriter, r *http.Request)
- func Handlers() *mux.Router
- func StringKey(s string) string
- func WriteResponse(w http.ResponseWriter, statusCode int, contentType string, body interface{})
- type Activities
- type Activity
- type ActivityLog
- type ActivityLogSimple
- type ActivityLogSimpleNoTime
- type ActivityLogs
- type ActivitySimple
- type CommonSystemFields
- type ErrorResponse
- type Goal
- type GoalSimple
- type Goals
Constants ¶
This section is empty.
Variables ¶
var ErrorNoMatch = errors.New("No Matching Record")
var PageSize = 10 // default page size
Functions ¶
func HandleActivitiesGet ¶
func HandleActivitiesGet(w http.ResponseWriter, r *http.Request)
func HandleActivityDelete ¶
func HandleActivityDelete(w http.ResponseWriter, r *http.Request)
func HandleActivityGet ¶
func HandleActivityGet(w http.ResponseWriter, r *http.Request)
func HandleActivityLogDelete ¶
func HandleActivityLogDelete(w http.ResponseWriter, r *http.Request)
func HandleActivityLogGet ¶
func HandleActivityLogGet(w http.ResponseWriter, r *http.Request)
func HandleActivityLogPost ¶
func HandleActivityLogPost(w http.ResponseWriter, r *http.Request)
func HandleActivityLogPut ¶
func HandleActivityLogPut(w http.ResponseWriter, r *http.Request)
func HandleActivityLogsGet ¶
func HandleActivityLogsGet(w http.ResponseWriter, r *http.Request)
func HandleActivityPost ¶
func HandleActivityPost(w http.ResponseWriter, r *http.Request)
func HandleActivityPut ¶
func HandleActivityPut(w http.ResponseWriter, r *http.Request)
func HandleGoalDelete ¶
func HandleGoalDelete(w http.ResponseWriter, r *http.Request)
func HandleGoalGet ¶
func HandleGoalGet(w http.ResponseWriter, r *http.Request)
func HandleGoalPost ¶
func HandleGoalPost(w http.ResponseWriter, r *http.Request)
func HandleGoalPut ¶
func HandleGoalPut(w http.ResponseWriter, r *http.Request)
HandleGoalPut handles the PUT operation on the Goal entity type. Pass the goal string key in the URI And pass the json body with all the fields of goal struct. Pass all the fields. if a field is not changed, pass the unchanged value. Any missing fields will result in updating the database with the respective zero value, so Make sure you pass all the fields, even though the value is not changed.
func HandleGoalsGet ¶
func HandleGoalsGet(w http.ResponseWriter, r *http.Request)
func StringKey ¶
GetStringKey replaces the spaces in the given string with '-' inorder to prepare the string URL friendly
func WriteResponse ¶
func WriteResponse(w http.ResponseWriter, statusCode int, contentType string, body interface{})
Types ¶
type Activities ¶
type Activities []Activity
TODO: need to add json tags for column names and to ignore blank fields
type Activity ¶
type Activity struct { ActivitySimple CommonSystemFields }
TODO: need to add json tags for column names and to ignore blank fields
func (*Activity) SetDefaults ¶
func (a *Activity) SetDefaults()
type ActivityLog ¶
type ActivityLog struct { ActivityLogSimple CommonSystemFields }
TODO: need to add json tags for column names and to ignore blank fields
func (*ActivityLog) SetDefaults ¶
func (a *ActivityLog) SetDefaults()
type ActivityLogSimple ¶
type ActivityLogSimple struct { Name string Notes string `json:"Notes,omitempty"` StartTime time.Time EndTime time.Time }
TODO: need to add json tags for column names and to ignore blank fields
type ActivityLogSimpleNoTime ¶
TODO: need to add json tags for column names and to ignore blank fields
type ActivityLogs ¶
type ActivityLogs []ActivityLog
TODO: need to add json tags for column names and to ignore blank fields
func (*ActivityLogs) Get ¶
func (als *ActivityLogs) Get(c context.Context, filter ActivityLog, offset int, limit int) (err error)
type ActivitySimple ¶
TODO: need to add json tags for column names and to ignore blank fields
type CommonSystemFields ¶
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
type Goal ¶
type Goal struct { GoalSimple CommonSystemFields }