internal

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DateFormat   = "02-01-2006 15:04:05"
	ToDateFormat = "Monday, January 02, 2006 3:04:05 PM"
)
View Source
const B32_CHARACTERS = "0123456789ABCDEFGHJKMNPQRSTVWXYZ"
View Source
const (
	MaxLength = 2048
)

Variables

This section is empty.

Functions

func CompareText added in v0.0.2

func CompareText(txt1 string, txt2 string, checkLines bool) string

func DecodeFromBase64

func DecodeFromBase64(input string) string

func DecodeURL

func DecodeURL(s string) (string, error)

func EncodeJWT added in v0.0.2

func EncodeJWT(headers map[string]interface{}, claims map[string]interface{}, signature string) (string, error)

func EncodeToBase64

func EncodeToBase64(input string) string

encodeToBase64 encodes a string to base64

func EncodeURL

func EncodeURL(s string) string

func GeneratePassword

func GeneratePassword(length int, enableSpecialChars bool, enableNumeric bool, enableCapital bool) string

func GenerateULID

func GenerateULID() string

func GenerateUUID added in v0.0.2

func GenerateUUID() string

func HashString

func HashString(str string, algorithm string) (string, error)

func IndentJSON

func IndentJSON(input string) (string, error)

func Json2Yaml

func Json2Yaml(json string) (string, error)

func MinifyJSON

func MinifyJSON(input string) (string, error)

func ParseFormat added in v0.0.2

func ParseFormat(format string) string

func Properties2Yaml added in v0.0.2

func Properties2Yaml(propertiesData string) (string, error)

func ULIDtoUUID added in v0.0.2

func ULIDtoUUID(ulidStr string) (string, error)

func UUIDtoULID added in v0.0.2

func UUIDtoULID(uuidStr string) (string, error)

func Yaml2Json

func Yaml2Json(yamlString string) (string, error)

func Yaml2Properties added in v0.0.2

func Yaml2Properties(yamlData string) (string, error)

Types

type JWT

type JWT struct {
	Header  string
	Claims  string
	Expires *time.Time
}

func DecodeJWT

func DecodeJWT(jwtToken string) (JWT, error)

type Time added in v0.0.2

type Time struct {
	UTC          string `json:"utc"`
	YourTimezone string `json:"your_timezone"`
	Epoch        int64  `json:"epoch"`
}

func ConvertTimeFromEpoch added in v0.0.2

func ConvertTimeFromEpoch(epoch int64, format string, timeZone *string) Time

func ConvertTimeFromFormat added in v0.0.2

func ConvertTimeFromFormat(datetime string, fromFormat string, toFormat string, timeZone *string) (Time, error)

func Now added in v0.0.2

func Now(format string, timeZone *string) (Time, error)

func (Time) String added in v0.0.2

func (t Time) String() string

Jump to

Keyboard shortcuts

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