helper

package
v0.0.0-...-b696ed4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TimeNowJakarta = time.Now().In(jakartaLoc)
)

Functions

func BuildOrderByQuery

func BuildOrderByQuery(order_by string) bool

func BuildSortByQuery

func BuildSortByQuery(sort_by string) string

func FormatTimeArticleResponse

func FormatTimeArticleResponse(article entity.ArticleResponse) entity.ArticleResponse

func FormattedTime

func FormattedTime(ts string) string

func GenerateRandomPassword

func GenerateRandomPassword(length int) string

func GenerateUUIDString

func GenerateUUIDString() string

func GetContext

func GetContext() (context.Context, context.CancelFunc)

func HashPassword

func HashPassword(password string) (string, error)

func IsValidSlug

func IsValidSlug(s string) bool

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL