Documentation ¶
Index ¶
- func BindValidate(c echo.Context, data any) error
- func DirWithSlash(id string) string
- func GenPathByDigest(digest digest.Digest) string
- func GetContentLength(req *http.Request) (int64, error)
- func GetUserFromCtx(c echo.Context) (*models.User, error)
- func Inject(target any, source any) error
- func IsDir(dir string) bool
- func IsExist(path string) bool
- func IsFile(filePath string) bool
- func MustMarshal(in any) []byte
- func NormalizePagination(in types.Pagination) types.Pagination
- func PanicIf(err error)
- func StringsJoin[T stringsJoin](strs []T, sep string) string
- func TrimHTTP(in string) string
- func UnwrapJoinedErrors(err error) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindValidate ¶
BindValidate binds and validates the request body
func GenPathByDigest ¶
func GenPathByDigest(digest digest.Digest) string
GenPathByDigest generates the path by the digest.
func GetContentLength ¶
GetContentLength returns the content length of the request.
func GetUserFromCtx ¶ added in v1.2.0
GetUserFromCtx ...
func IsDir ¶
IsDir returns true if given path is a directory, or returns false when it's a file or does not exist.
func IsExist ¶
IsExist checks whether a file or directory exists. It returns false when the file or directory does not exist.
func IsFile ¶
IsFile returns true if given path is a file, or returns false when it's a directory or does not exist.
func NormalizePagination ¶
func NormalizePagination(in types.Pagination) types.Pagination
NormalizePagination normalizes the pagination
func UnwrapJoinedErrors ¶ added in v1.1.0
UnwrapJoinedErrors ...
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.