UNPKG

@zuiwoxing/posisi

Version:

一款基于typescript 前端控制组件,包括(IOC,AOP,Feign,Logger,Util等)

65 lines (64 loc) 1.35 kB
import { ParamType, RequestMethod } from "../enums"; /** *@desc 服务元信息 *@author liudejian *@date 2020-02-06 16:17 **/ export declare class ClassMeta { /** * 名称 */ name?: string; /** * 服务基础地址 (example:http(s)://localhost:8080) */ serverUrl: string; /** * 前缀URI(example: /user/getName) */ uri: string; /** * 描述 */ desc?: string; } /** *@desc *@author liudejian *@date 2020-03-20 21:13 **/ export declare class MethodMeta { name?: string; uri: string; method: RequestMethod; params?: Array<ParamMeta>; desc?: string; } /** * 参数元信息 */ export declare class ParamMeta { index: number; name: string; require: boolean; type: ParamType; } export declare class ReqInfo { uri: string; method: RequestMethod; bodyData?: object; paramData?: Map<string, object>; headerData?: Map<string, string>; setUri(uri: string): this; setMethod(method: RequestMethod): this; setBodyData(bodyData: object): this; addParam(key: string, value: object): this; addHeader(key: string, value: string): this; removeHeader(key: string): this; /** * 构建 * @param uri * @param method */ static build(uri: string, method: RequestMethod): ReqInfo; }