generateTimeTags<T> abstract method

List<T> generateTimeTags<T>({
  1. required List<T> messages,
  2. required DateTime getMsgTime(
    1. T
  3. required T onCreateTimeTag(
    1. DateTime time
  4. required List<String> timeTagPolicies,

Generate time tag amount messages if timeTagPolicies is "5m", "20m", "1h", "3h", is mean create a tag in 5min, 20min, 1hour and 3 hour, timeTagPolicies support {s,m,h,d} after that 3hours, create a time tag each 3 hours


List<T> generateTimeTags<T>(
    {required List<T> messages,
    required DateTime Function(T) getMsgTime,
    required T Function(DateTime time) onCreateTimeTag,
    required List<String> timeTagPolicies});