helpers

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeBase64ToUint

func DecodeBase64ToUint(encoded string) (uint, error)

DecodeBase64ToUint decodes a Base64 string to a uint

func DecodeFromBase64

func DecodeFromBase64(s string) (string, error)

DecodeFromBase64 decodes a Base64-encoded string

func EncodeToBase64

func EncodeToBase64(s string) string

EncodeToBase64 encodes a string to Base64

func EncodeUintToBase64

func EncodeUintToBase64(value uint) string

EncodeUintToBase64 encodes a uint to a Base64 string

func Hash

func Hash(s string) string

Hash generates a SHA-256 hash for the given string

func RespondWithJSON

func RespondWithJSON(c *gin.Context, code int, status string, data interface{})

func SaveFileLocal

func SaveFileLocal(fileHeader *multipart.FileHeader, dst string) error

Save the uploaded file to the specified destination

func ValidateFileType

func ValidateFileType(fileHeader *multipart.FileHeader, expectedType string) bool

ValidateFileType checks if the file matches the expected type

Types

This section is empty.

Jump to

Keyboard shortcuts

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