Documentation
¶
Overview ¶
Copyright 2019 Septian Wibisono
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func ErrHandler(err error)
- func LoadDatabase(libpath string, d ty.Dbconf) ty.Database
- func LoadSo(path string) *plugin.Plugin
- func ReadRuntime() ty.Runtime
- func SendHttpError(c *gin.Context, errType uint, err error)
- func WriteRuntime(rt ty.Runtime)
- type Exception
- type TryCatchBlock
Constants ¶
const DATABASE_EXEC_FAIL_CODE = 2200
const FORBIDDEN_CODE = 2103
const INPUT_VALIDATION_FAIL_CODE = 2110
const MODULE_OPERATION_FAIL_CODE = 2102
const NOT_ACCEPTABLE_CODE = 2112
const PAGE_NOT_FOUND_CODE = 2100
const RECORD_NOT_FOUND_CODE = 2230
const UNKNOWN_ERROR_CODE = 2101
Variables ¶
var NOT_ACCEPTABLE = gin.H{"code": NOT_ACCEPTABLE_CODE, "message": "You are trying to request something not acceptible here."}
var PAGE_NOT_FOUND = gin.H{"code": PAGE_NOT_FOUND_CODE, "message": "You are find something we can't found it here."}
var RECORD_NOT_FOUND = gin.H{"code": RECORD_NOT_FOUND_CODE, "message": "You are find something we can't found it here."}
Functions ¶
func ErrHandler ¶
func ErrHandler(err error)
func LoadSo ¶
This function will load *.so library without parsing its function. After load library with this function you need to lookup your function.
func ReadRuntime ¶
FIXME: affected by issue [#16](https://github.com/septianw/jas/issues/16)
func WriteRuntime ¶
FIXME: affected by issue [#16](https://github.com/septianw/jas/issues/16)
Types ¶
type TryCatchBlock ¶
type TryCatchBlock struct { Try func() Catch func(Exception) Finally func() }
func (TryCatchBlock) Do ¶
func (tc TryCatchBlock) Do()