package
2024.65.20
Repository: https://github.com/sty-holdings/sharedservices.git
Documentation: pkg.go.dev

# README

Helpers is the lowest level package for STY-Holdings.

Restrictions:

Helpers can not call out to any other package because it may create a circular reference. This means that code can be duplicated in the package that also resides in another package.

# Functions

Base64Decode - will decode a base64 string to a string.
Base64Encode - will encode a string to a base64 string Customer Messages: None Errors: None Verifications: None.
CheckLengthGTZero - validates that the value length is greater than zero.
CheckPointerNotNil - validates that the pointer is not nil.
CheckValueNotEmpty - validates that the value is not empty.
ConvertDateTimeToTimestamp - converts a date and time string (2024-01-01 00:00:00 or 2024-01-01 00:00 or 2024-01-01) to timestamp.
ConvertMapAnyToMapString Customer Messages: None Errors: None Verifications: None.
ConvertMapStringToMapAny Customer Messages: None Errors: None Verifications: None.
ConvertSliceToSliceOfPtrs - takes a slice and returns a slice of pointers to the items in the slice.
ConvertStructToMap - converts a given struct to a map by marshaling it into JSON and then unmarshaling it into a map.
CreateAndRedirectLogOutput - will create the fully qualified config file log directory.
DetermineStartEndTime - will set the start and end time based on the analyzed question output.
DetermineTimeRangeStartEndTime - will set the start and end time for a point in time type based on today.
DoesFieldExist - tests the struct for the field name.
FloatToPennies - multiples the value by 100.
GenerateUUIDType1 - provides the high level of uniqueness for UUIDs.
GenerateUUIDType4 - generates a 128-bit random UUID.
GetAWSTimestamp - gets date/time in AWS format (Mon Jan _2 15:04:05 MST 2006) Customer Messages: None Errors: None Verifications: None.
GetFieldsNames - will return a list fields in a struct Customer Messages: None Errors: None Verifications: None.
GetJSONFile - reads and unmarshal the fully qualified file into the object pointer.
GetUnixTimestamp - gets date/time in unix format (Mon Jan _2 15:04:05 MST 2006) Customer Messages: None Errors: None Verifications: None.
GetUnixTimestampByte - gets date/time in unix format (Mon Jan _2 15:04:05 MST 2006) as []byte Customer Messages: None Errors: None Verifications: None.
IsDirectoryFullyQualified - checks to see if the directory starts and ends with a slash.
PenniesToFloat Customer Messages: None Errors: None Verifications: None.
PrependWorkingDirectory - will add the working directory.
PrependWorkingDirectoryWithEndingSlash - will add the working directory, a slash, the directory provided, and an ending slash.
RedirectLogOutput - will redirect log output based on the redirectTo value, [MODE_OUTPUT_LOG | MODE_OUTPUT_LOG_DISPLAY].
RemoveFile - removes a file for the file system.
RemovePidFile - removes the pid file for the running instance Customer Messages: None Errors: None Verifications: None.
WriteFile - will create and write to a fully qualified file.
WritePidFile - will create and write the server pid file.

# Constants

goland:noinspection GoSnakeCaseUsage.
goland:noinspection GoSnakeCaseUsage.
goland:noinspection GoSnakeCaseUsage.
goland:noinspection GoSnakeCaseUsage.
goland:noinspection GoSnakeCaseUsage.
goland:noinspection GoSnakeCaseUsage.
goland:noinspection GoSnakeCaseUsage.
goland:noinspection GoSnakeCaseUsage.
goland:noinspection GoSnakeCaseUsage.
goland:noinspection GoSnakeCaseUsage.

# Variables

Do not delete.