Documentation ¶
Index ¶
- Constants
- func CheckAuth(tokenString string) (string, error)
- func CreateDBConnection() (*gorm.DB, error)
- func CreateNATSConnection() (*nats.Conn, error)
- func GetAPIKey(tokenString string) (string, error)
- func GetLogger() gokitlog.Logger
- func PostNotificationToHttpBin(logger log.Logger, url string, jsonStr map[string]string, chJob chan string, ...)
- func ValidateJWTToken(tokenString string, tokenSecret string) (*jwt.Token, error)
- type CommonService
- func (c CommonService) ErrorResponseHelper(w http.ResponseWriter, errorCode string, errorMessage string, httpStatus int)
- func (c CommonService) GetUserClientFromToken(r *http.Request) (string, error)
- func (c CommonService) MockTestServer(method string, url string, jsonInput []byte) (*httptest.ResponseRecorder, *http.Request)
- func (c CommonService) SuccessResponseHelper(w http.ResponseWriter, class interface{}, httpStatus int)
- func (c CommonService) SuccessResponseList(w http.ResponseWriter, class interface{}, offset string, limit string, ...)
- func (c CommonService) ValidateId(id string, fieldName string) error
- func (c CommonService) ValidateInputParameters(r *http.Request, paramConf map[string]models.ParamConf, ...) (map[string]string, map[string]interface{}, string, error)
- func (c CommonService) ValidateQueryString(r *http.Request, defaultLimit string, defaultOffset string, ...) (string, string, string, string, error)
Constants ¶
View Source
const ( SUCCESS = "success" FAILURE = "failure" BATCH_TASK_PENDING = "1" BATCH_TASK_COMPLETE = "2" SIGNING_KEY = "wYu8P1UBnyI7QhGXg2YNqY" ERROR_UNEXPECTED = "Unexpected Error." STRING_SMALL = "STRING_SMALL" STRING_LARGE = "STRING_LARGE" STRING_MID = "STRING_MID" STRING_BIG = "STRING_BIG" STRING_NAME = "STRING_NAME" STRING_EMAIL = "STRING_EMAIL" STRING_PASSWORD = "STRING_PASSWORD" STRING_ACTION_NAME = "STRING_ACTION_NAME" INT = "INT" INT_ACCESS_LEVEL = "INT_ACCESS_LEVEL" INT_BOOLEAN = "INT_BOOLEAN" ID = "ID" EMAIL = "EMAIL" PASSWORD = "PASSWORD" )
Variables ¶
This section is empty.
Functions ¶
func CreateDBConnection ¶
func CreateNATSConnection ¶
Types ¶
type CommonService ¶
func (CommonService) ErrorResponseHelper ¶
func (c CommonService) ErrorResponseHelper(w http.ResponseWriter, errorCode string, errorMessage string, httpStatus int)
func (CommonService) GetUserClientFromToken ¶
func (c CommonService) GetUserClientFromToken(r *http.Request) (string, error)
func (CommonService) MockTestServer ¶
func (c CommonService) MockTestServer(method string, url string, jsonInput []byte) (*httptest.ResponseRecorder, *http.Request)
func (CommonService) SuccessResponseHelper ¶
func (c CommonService) SuccessResponseHelper(w http.ResponseWriter, class interface{}, httpStatus int)
func (CommonService) SuccessResponseList ¶
func (c CommonService) SuccessResponseList(w http.ResponseWriter, class interface{}, offset string, limit string, count string)
func (CommonService) ValidateId ¶
func (c CommonService) ValidateId(id string, fieldName string) error
func (CommonService) ValidateInputParameters ¶
Click to show internal directories.
Click to hide internal directories.