utils

package
v0.0.0-...-4831141 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Limit int64 = 25
	Skip  int64 = 0
)
View Source
const (
	HttpStatusContinue                      int = 100
	HttpStatusSwitchingProtocols            int = 101
	HttpStatusProcessing                    int = 102
	HttpStatusEarlyHints                    int = 103
	HttpStatusOK                            int = 200
	HttpStatusCreated                       int = 201
	HttpStatusAccepted                      int = 202
	HttpStatusNonAuthoritativeInfo          int = 203
	HttpStatusNoContent                     int = 204
	HttpStatusResetContent                  int = 205
	HttpStatusPartialContent                int = 206
	HttpStatusMultiStatus                   int = 207
	HttpStatusAlreadyReported               int = 208
	HttpStatusIMUsed                        int = 226
	HttpStatusMultipleChoices               int = 300
	HttpStatusMovedPermanently              int = 301
	HttpStatusFound                         int = 302
	HttpStatusSeeOther                      int = 303
	HttpStatusNotModified                   int = 304
	HttpStatusUseProxy                      int = 305
	HttpStatusTemporaryRedirect             int = 307
	HttpStatusPermanentRedirect             int = 308
	HttpStatusBadRequest                    int = 400
	HttpStatusUnauthorized                  int = 401
	HttpStatusPaymentRequired               int = 402
	HttpStatusForbidden                     int = 403
	HttpStatusNotFound                      int = 404
	HttpStatusMethodNotAllowed              int = 405
	HttpStatusNotAcceptable                 int = 406
	HttpStatusProxyAuthRequired             int = 407
	HttpStatusRequestTimeout                int = 408
	HttpStatusConflict                      int = 409
	HttpStatusGone                          int = 410
	HttpStatusLengthRequired                int = 411
	HttpStatusPreconditionFailed            int = 412
	HttpStatusRequestEntityTooLarge         int = 413
	HttpStatusRequestURITooLong             int = 414
	HttpStatusUnsupportedMediaType          int = 415
	HttpStatusRequestedRangeNotSatisfiable  int = 416
	HttpStatusExpectationFailed             int = 417
	HttpStatusTeapot                        int = 418
	HttpStatusMisdirectedRequest            int = 421
	HttpStatusUnprocessableEntity           int = 422
	HttpStatusLocked                        int = 423
	HttpStatusFailedDependency              int = 424
	HttpStatusTooEarly                      int = 425
	HttpStatusUpgradeRequired               int = 426
	HttpStatusPreconditionRequired          int = 428
	HttpStatusTooManyRequests               int = 429
	HttpStatusRequestHeaderFieldsTooLarge   int = 431
	HttpStatusUnavailableForLegalReasons    int = 451
	HttpStatusInternalServerError           int = 500
	HttpStatusNotImplemented                int = 501
	HttpStatusBadGateway                    int = 502
	HttpStatusServiceUnavailable            int = 503
	HttpStatusGatewayTimeout                int = 504
	HttpStatusHTTPVersionNotSupported       int = 505
	HttpStatusVariantAlsoNegotiates         int = 506
	HttpStatusInsufficientStorage           int = 507
	HttpStatusLoopDetected                  int = 508
	HttpStatusNotExtended                   int = 510
	HttpStatusNetworkAuthenticationRequired int = 511
)

Variables

This section is empty.

Functions

func CreateIndex

func CreateIndex(e core.Entity, indexKey string) error

func HashPassword

func HashPassword(password string) (string, error)

func IsArray

func IsArray(v interface{}) bool

func IsBool

func IsBool(v interface{}) bool

func IsFloat

func IsFloat(v interface{}) bool

func IsInt

func IsInt(v interface{}) bool

func IsMap

func IsMap(v interface{}) bool

func IsNil

func IsNil(v interface{}) bool

func IsPast

func IsPast(t time.Time) bool

func IsSlice

func IsSlice(v interface{}) bool

func IsString

func IsString(v interface{}) bool

func IsStruct

func IsStruct(v interface{}) bool

func IsUUID

func IsUUID(v interface{}) bool

func IsZero

func IsZero(v interface{}) bool

func IsZeroOrNil

func IsZeroOrNil(v interface{}) bool

func SanitizeString

func SanitizeString(str string) string

func VerifyPassword

func VerifyPassword(hashedPassword string, candidatePassword string) error

func VerifyUUIDs

func VerifyUUIDs(uuid1Str, uuid2Str interface{}) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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