package com.eshore.gringotts.forest.service;

import com.dtflys.forest.annotation.BaseRequest;
import com.dtflys.forest.annotation.Body;
import com.dtflys.forest.annotation.BodyType;
import com.dtflys.forest.annotation.JSONBody;
import com.dtflys.forest.annotation.Query;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * 区块链服务
 *
 * @author lanyuanxiaoyao
 * @date 2024-11-15
 */
@BaseRequest(baseURL = "http://gringotts-chain")
public interface ChainService {
    @GetMapping("/kv_datasource/create")
    String create();

    @PostMapping("/kv_datasource/set")
    @BodyType("text")
    String set(@Query("address")String address, @Query("key") String key, @Body String json);

    @GetMapping("/kv_datasource/get")
    String get(@Query("address")String address, @Query("key") String key);
}
