Documentation
¶
Index ¶
- func Amount2Decimal(s float64) float64
- func DateStrToUnixNano(value string, layout ...string) int64
- func DateStrToUnixNanoStrict(value string, layout ...string) (int64, error)
- func DeleteCache(instance *cache.Cache, ck string) error
- func GetCache(instance *cache.Cache, ck string, wanted interface{}) error
- func InArray(v interface{}, in interface{}) (ok bool)
- func MapToProtobufStruct(m map[string]interface{}) (*structpb.Struct, error)
- func NewPBStruct(v map[string]interface{}) (map[string]*structpb.Value, error)
- func PBStructToMap(s *structpb.Struct) (*string, error)
- func SetCache(instance *cache.Cache, ck string, val interface{}, ttl ...time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Amount2Decimal ¶
Amount2Decimal return amount only 2 decima places.
func DateStrToUnixNano ¶
DateStrToUnixNano convert date string formated to epoch unix nano seconds.
func DateStrToUnixNanoStrict ¶
DateStrToUnixNanoStrict same like DateStrToUnixNano, but will return error if got any error.
func MapToProtobufStruct ¶
convert map[string]interface{} to *structpb.Struct
func NewPBStruct ¶
NewPBStruct constructs a Struct from a general-purpose Go map. The map keys must be valid UTF-8. The map values are converted using NewValue.
func PBStructToMap ¶
convert *structpb.Struct to map[string]interface{}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.