Documentation ¶
Index ¶
- func Cache(key string, data interface{}, meta interface{}) (err error)
- func ConverSliceToString(slice []string, delimiter string) string
- func ConvertStringToTime(ts *string) time.Time
- func ConvertTimeToString(t time.Time) *string
- func ESAggregate(aggs interface{}) *domain.MetaAggregations
- func GetAuthenticatedUser(c echo.Context) *domain.JwtCustomClaims
- func GetCache(c echo.Context) (memcached string)
- func GetCurrentURI(c echo.Context) string
- func GetESTotalCount(mapResp map[string]interface{}) float64
- func GetInBind(binds *[]interface{}, arr []string) string
- func GetMetaDataImage(link string) (meta domain.DetailMetaDataImage, err error)
- func GetObjectFromString(str string, obj interface{}) error
- func GetRequestParams(c echo.Context) domain.Request
- func GetRoleInfo(r domain.Role) domain.RoleInfo
- func GetStatusCode(err error) int
- func GetStringFromObject(obj interface{}) string
- func GetUnitInfo(u domain.Unit) domain.UnitInfo
- func GoogleTranslateText(text, sourceLang, targetLang string) (string, error)
- func InArray(needle interface{}, haystack interface{}) (exists bool, index int)
- func IsAdminOPD(au *domain.JwtCustomClaims) bool
- func IsCompletedDocumentArchive(body *domain.DocumentArchiveRequest) bool
- func IsDisallowed(input string, disallowedKeywords []string) bool
- func IsInvitationTokenValid(regInvitation domain.RegistrationInvitation, token string) error
- func IsSuperAdmin(au *domain.JwtCustomClaims) bool
- func IsValidMailAddress(address string) (string, bool)
- func MakeExcerpt(str string, forExcerptLength int) string
- func MakeSlug(title string, newsID int64) string
- func MapLog(c echo.Context) *_goLog.LoggerData
- func MapUserInfo(u domain.User) *domain.UserInfo
- func MapValue(arrMap []interface{}, key string) (value float64)
- func Paginate(c echo.Context, data interface{}, total int64, params domain.Request) *domain.ResultsData
- func ParseESDate(strDateTime string) time.Time
- func ParseESPointerDate(strDateTime string) *time.Time
- func RedisCache() *redis.Client
- func RegexCustomReplaceString(c echo.Context, str string, repl string) string
- func RegexKeywordReplaceString(c echo.Context, str string, repl string) string
- func RegexReplaceSlug(str string) string
- func RegexReplaceString(c echo.Context, str string, repl string) string
- func ReplaceBodyParams(body string, params []string) string
- func SendEmail(to string, template domain.Template, params []string) (err error)
- func SetCache(key string, value interface{}, ttl time.Duration) error
- func SetPointerInt64(val int64) *int64
- func SetPointerString(val string) *string
- func SetPropLiveNews(newsRequest *domain.StoreNewsRequest)
- func SlugGenerator(str string, identifier int64) string
- func Substr(s string, n int) string
- type RangeLastWeek
- type ResponseError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConverSliceToString ¶
ConvertSliceToString ...
func GetAuthenticatedUser ¶
func GetAuthenticatedUser(c echo.Context) *domain.JwtCustomClaims
GetAuthenticatedUser ...
func GetESTotalCount ¶
func GetMetaDataImage ¶
func GetMetaDataImage(link string) (meta domain.DetailMetaDataImage, err error)
func GetObjectFromString ¶
GetObjectFromString ...
func GoogleTranslateText ¶
GoogleTranslateText function performs the actual translation using an google translation API.
func IsAdminOPD ¶
func IsAdminOPD(au *domain.JwtCustomClaims) bool
func IsCompletedDocumentArchive ¶
func IsCompletedDocumentArchive(body *domain.DocumentArchiveRequest) bool
func IsDisallowed ¶
func IsInvitationTokenValid ¶
func IsInvitationTokenValid(regInvitation domain.RegistrationInvitation, token string) error
func IsSuperAdmin ¶
func IsSuperAdmin(au *domain.JwtCustomClaims) bool
func IsValidMailAddress ¶
func MakeExcerpt ¶
func Paginate ¶
func Paginate(c echo.Context, data interface{}, total int64, params domain.Request) *domain.ResultsData
Paginate ...
func ParseESDate ¶
func ParseESPointerDate ¶
func RegexReplaceSlug ¶
Sanity slug text with standard regex rules
func RegexReplaceString ¶
func ReplaceBodyParams ¶
func SetPropLiveNews ¶
func SetPropLiveNews(newsRequest *domain.StoreNewsRequest)
SetPropLiveNews ...
Types ¶
type RangeLastWeek ¶
RangeLastWeek represent today and the day last of last week
func GetRangeLastWeek ¶
func GetRangeLastWeek() RangeLastWeek
GetRangeLastWeek for get date within a week range ...
type ResponseError ¶
type ResponseError struct {
Message string `json:"message"`
}
ResponseError represent the response error struct
Click to show internal directories.
Click to hide internal directories.