helpers

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const PhoneNumberSplit = "#:"

Variables

View Source
var (

	// ParseCUCMCDRs
	CMRReg = regexp.MustCompile(`^cmr_.*`)
	CDRReg = regexp.MustCompile(`^cdr_.*`)
)
View Source
var (
	ErrInvalidNTPReferenceAsterisk = errors.New("device has invalid ntp reference as indicated by asterisk (*) prepended to time")
	ErrInvalidNTPReferencePeriod   = errors.New("device has invalid ntp reference as indicated by period (.) prepended to time")
	ErrInvalidTimeFormat           = errors.New("time format is invalid")
)

Functions

func ChangeFileNameToCompleteAndMoveOrDelete

func ChangeFileNameToCompleteAndMoveOrDelete(input string, output string, delete bool) error

func ChangeFileNameToFailedAndMove

func ChangeFileNameToFailedAndMove(input, output string) error

func ContainsInt

func ContainsInt(slice *[]int, i *int) bool

func ContainsString

func ContainsString(slice *[]string, s *string) bool

func ConvertHexadecimalToInt

func ConvertHexadecimalToInt(s *string) *int64

func ConvertStringToFloat64

func ConvertStringToFloat64(s *string) (*float64, error)

func ConvertStringToIPCisco

func ConvertStringToIPCisco(ip *string) (*string, error)

func ConvertStringToInt

func ConvertStringToInt(s *string) (*int, error)

func ConvertStringToInt64

func ConvertStringToInt64(s *string) (*int64, error)

func ConvertStringToKeyValuePairs

func ConvertStringToKeyValuePairs(s *string, d string, e string) map[string]string

Take String, Delimiter, and Equality Charachter and return a map of key value pairs

func ConvertStringToUnixTime

func ConvertStringToUnixTime(s *string, t *time.Location) (*int64, error)

func ExtractPhoneNumberFromString

func ExtractPhoneNumberFromString(s *string) *string

func ExtractTimeLocationFromString

func ExtractTimeLocationFromString(s *string) (*time.Location, error)

func FilenameFriendlyTimeStamp

func FilenameFriendlyTimeStamp() string

func ParseCUCMFilenameTimestamp

func ParseCUCMFilenameTimestamp(input string) (*int64, error)

func RemoveSpaceFromString

func RemoveSpaceFromString(s *string) *string

Types

This section is empty.

Jump to

Keyboard shortcuts

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