Documentation
¶
Index ¶
- Variables
- func BuildOrderByQuery(order_by string) bool
- func BuildSortByQuery(sort_by string) string
- func FormatTimeArticleResponse(article entity.ArticleResponse) entity.ArticleResponse
- func FormattedTime(ts string) string
- func GeArticleRequestValidation(req entity.GetArticlesRequest) entity.GetArticlesRequest
- func GenerateRandomPassword(length int) string
- func GenerateUUIDString() string
- func GetContext() (context.Context, context.CancelFunc)
- func HashPassword(password string) (string, error)
- func IsValidSlug(s string) bool
- func UseCustomValidatorHandler(c *echo.Echo)
- func WriteResponse(c echo.Context, req models.StandardResponseReq) error
- type CustomValidator
Constants ¶
This section is empty.
Variables ¶
View Source
var (
TimeNowJakarta = time.Now().In(jakartaLoc)
)
Functions ¶
func BuildOrderByQuery ¶
func BuildSortByQuery ¶
func FormatTimeArticleResponse ¶
func FormatTimeArticleResponse(article entity.ArticleResponse) entity.ArticleResponse
func FormattedTime ¶
func GeArticleRequestValidation ¶
func GeArticleRequestValidation(req entity.GetArticlesRequest) entity.GetArticlesRequest
func GenerateRandomPassword ¶
func GenerateUUIDString ¶
func GenerateUUIDString() string
func GetContext ¶
func GetContext() (context.Context, context.CancelFunc)
func HashPassword ¶
func IsValidSlug ¶
func UseCustomValidatorHandler ¶
func UseCustomValidatorHandler(c *echo.Echo)
func WriteResponse ¶
func WriteResponse(c echo.Context, req models.StandardResponseReq) error
Types ¶
type CustomValidator ¶
type CustomValidator struct {
// contains filtered or unexported fields
}
func (*CustomValidator) Validate ¶
func (cv *CustomValidator) Validate(i interface{}) error
Click to show internal directories.
Click to hide internal directories.