Documentation ¶
Index ¶
- Constants
- func Assert(cond bool)
- func AssertError(err error)
- func Contains(in interface{}, elem interface{}) bool
- func Copy(dst, src interface{})
- func GenerateWriteKey(payload WriteKeyPayloadT) string
- func GetKassetteEventMap(kassetteEvent interface{}) (map[string]interface{}, bool)
- func GetKassetteEventUserID(eventList []interface{}) (string, bool)
- func GetKassetteEventVal(key string, kassetteEvent interface{}) (interface{}, bool)
- func GetMD5UUID(str string) (uuid.UUID, error)
- func GetStringifiedData(data interface{}) string
- func GetTagName(id string, names ...string) string
- func MapLookup(mapToLookup map[string]interface{}, keys ...string) interface{}
- func ParseKassetteEventBatch(eventPayload json.RawMessage) ([]interface{}, bool)
- func TailTruncateStr(str string, count int) string
- func TruncateStr(str string, limit int) string
- func UploadFile(DestDirPath string, file *multipart.FileHeader) (string, error)
- type WriteKeyPayloadT
Constants ¶
View Source
const ( // RFC3339Milli with milli sec precision RFC3339Milli = "2006-01-02T15:04:05.000Z07:00" NOTIMEZONEFORMATPARSE = "2006-01-02T15:04:05" )
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains(in interface{}, elem interface{}) bool
Contains returns true if an element is present in a iteratee. https://github.com/thoas/go-funk
func Copy ¶
func Copy(dst, src interface{})
Copy copies the exported fields from src to dest Used for copying the default transport
func GenerateWriteKey ¶ added in v1.1.0
func GenerateWriteKey(payload WriteKeyPayloadT) string
Generate a jwt token
func GetKassetteEventMap ¶
GetKassetteEventMap returns the event structure from the client payload
func GetKassetteEventUserID ¶
func GetKassetteEventVal ¶
returns the value corresponding to the key in the message structure
func GetMD5UUID ¶
GetMD5UUID hashes the given string into md5 and returns it as auuid
func GetStringifiedData ¶
func GetStringifiedData(data interface{}) string
func GetTagName ¶
func ParseKassetteEventBatch ¶
func ParseKassetteEventBatch(eventPayload json.RawMessage) ([]interface{}, bool)
ParseKassetteEventBatch looks for the batch structure inside event
func TailTruncateStr ¶
func TruncateStr ¶
func UploadFile ¶ added in v1.1.0
func UploadFile(DestDirPath string, file *multipart.FileHeader) (string, error)
Upload a file
Types ¶
type WriteKeyPayloadT ¶ added in v1.1.0
type WriteKeyPayloadT struct { CustomerName string `json:"customer_name"` SecretKey string `json:"secret_key"` }
func GetWriteKeyPayload ¶ added in v1.1.0
func GetWriteKeyPayload(writeKey string) (WriteKeyPayloadT, error)
func (WriteKeyPayloadT) Combine ¶ added in v1.1.0
func (wk WriteKeyPayloadT) Combine() string
Click to show internal directories.
Click to hide internal directories.