QNDnsCacheInfo.h 790 B

123456789101112131415161718192021222324252627282930313233343536
  1. //
  2. // QNDnsCacheKey.h
  3. // QnDNS
  4. //
  5. // Created by yangsen on 2020/3/26.
  6. // Copyright © 2020 com.qiniu. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. @interface QNDnsCacheInfo : NSObject
  11. /// 缓存时间戳
  12. @property(nonatomic, copy, readonly)NSString *currentTime;
  13. /// 缓存时本地IP
  14. @property(nonatomic, copy, readonly)NSString *localIp;
  15. /// 缓存信息
  16. @property(nonatomic, copy, readonly)NSDictionary *info;
  17. //MARK: -- 构造方法
  18. /// 根据json构造对象
  19. + (instancetype)dnsCacheInfo:(NSData *)jsonData;
  20. + (instancetype)dnsCacheInfo:(NSString *)currentTime
  21. localIp:(NSString *)localIp
  22. info:(NSDictionary *)info;
  23. /// 转化Json数据
  24. - (NSData *)jsonData;
  25. @end
  26. NS_ASSUME_NONNULL_END