package com.ema.common.tools.ip2region;

import com.ema.common.domain.vo.IPVo;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * IP2Region服务
 *
 */
@Validated
public interface IP2RegionService {

    /**
     * 批量获取IP地址信息
     *
     * @param ips
     * @return
     */
    List<IPVo> getIPLocation(@Size(min = 1) List<String> ips);

    /**
     * 单个获取IP地址信息
     * @param ip
     * @return
     */
    IPVo getIPLocation(@NotBlank String ip);
}
