Documentation ¶
Index ¶
- Constants
- Variables
- func AuthEdgeUser(ctx context.Context, w http.ResponseWriter, r *http.Request) context.Context
- func GetAllTask(ctx context.Context) []*task.Task
- func GetAllTaskData(ctx context.Context) []icarus.TaskData
- func GetHandle(ctx context.Context) client.Client
- func GetHandleName(ctx context.Context) string
- func GetJSONKey(ctx context.Context, key string) (json.RawMessage, bool)
- func GetJSONKeyAs(ctx context.Context, key string, v interface{}) error
- func GetTask(ctx context.Context) *task.Task
- func GetTaskID(ctx context.Context) int
- func GetUser(ctx context.Context) icarus.User
- func GetUserData(ctx context.Context) icarus.UserData
- func InitHandler()
- func ParseAllTask(ctx context.Context, w http.ResponseWriter, r *http.Request) context.Context
- func ParseAllTaskData(ctx context.Context, w http.ResponseWriter, r *http.Request) context.Context
- func ParseHandle(allowEmpty bool) kami.Middleware
- func ParseJSON(ctx context.Context, w http.ResponseWriter, r *http.Request) context.Context
- func ParseTaskID(ctx context.Context, w http.ResponseWriter, r *http.Request) context.Context
- func ParseUser(ctx context.Context, w http.ResponseWriter, r *http.Request) context.Context
- func WriteError(w http.ResponseWriter, code int, msg string) error
- func WriteJSON(w http.ResponseWriter, code int, v interface{}) error
- type M
Constants ¶
View Source
const SessionName = "icarus-session"
Variables ¶
View Source
var ( OK = M{"okay": true} Forbidden = M{"error": "forbidden"} NotFound = M{"error": "not found"} InternalError = M{"error": "internal error"} BadJSON = M{"error": "failed to parse JSON"} UnknownHandle = M{"error": "unknown handle"} BadField = func(field string) M { return M{ "error": fmt.Sprintf("failed to parse field `%s`", field), } } BadMake = func(element string) M { return M{ "error": fmt.Sprintf("failed to make %s", element), } } )
Functions ¶
func AuthEdgeUser ¶
func GetHandleName ¶
func GetJSONKey ¶
func InitHandler ¶
func InitHandler()
func ParseAllTask ¶
func ParseAllTaskData ¶
func ParseTaskID ¶
func WriteError ¶
func WriteError(w http.ResponseWriter, code int, msg string) error
Types ¶
Click to show internal directories.
Click to hide internal directories.