add comman table data,become schema

parent dbf63aa3
......@@ -22,8 +22,27 @@
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/github.com/gongxianghui_auth/gongxianghui.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="579">
<caret line="544" column="21" lean-forward="true" selection-start-line="544" selection-start-column="21" selection-end-line="544" selection-end-column="21" />
<state relative-caret-position="575">
<caret line="399" column="9" lean-forward="true" selection-start-line="399" selection-start-column="9" selection-end-line="399" selection-end-column="9" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file:///usr/local/go/src/testing/testing.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="272">
<caret line="846" selection-start-line="846" selection-end-line="846" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor />
<second_editor />
</state>
</provider>
</entry>
......@@ -32,7 +51,7 @@
<entry file="file:///usr/local/go/src/builtin/builtin.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="664">
<caret line="259" column="5" selection-start-line="259" selection-start-column="5" selection-end-line="259" selection-end-column="5" />
<caret line="188" column="5" selection-start-line="188" selection-start-column="5" selection-end-line="188" selection-end-column="5" />
</state>
</provider>
</entry>
......@@ -40,7 +59,7 @@
<file pinned="false" current-in-tab="false">
<entry file="file:///usr/local/go/src/fmt/errors.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="295">
<state relative-caret-position="448">
<caret line="16" column="5" selection-start-line="16" selection-start-column="5" selection-end-line="16" selection-end-column="5" />
</state>
</provider>
......@@ -58,8 +77,8 @@
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/github.com/gongxianghui_auth/gongxianghui_test.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1175">
<caret line="16" column="26" selection-start-line="16" selection-start-column="26" selection-end-line="16" selection-end-column="26" />
<state relative-caret-position="159">
<caret line="98" column="130" selection-start-line="98" selection-start-column="130" selection-end-line="98" selection-end-column="130" />
</state>
</provider>
</entry>
......@@ -80,6 +99,7 @@
<find>user</find>
<find>stub.GetState</find>
<find>stub.PutState</find>
<find>authorityCheck</find>
</findStrings>
</component>
<component name="GOROOT" path="/usr/local/go" />
......@@ -114,7 +134,6 @@
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<expand>
......@@ -155,6 +174,7 @@
<select />
</subPane>
</pane>
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
......@@ -180,18 +200,7 @@
</list>
</option>
</component>
<component name="RunManager" selected="Go Test.TestGXHDataPutAuth in github.com/hyperledger/chaincode/src/github.com/gongxianghui_auth">
<configuration name="TestGXH in github.com/hyperledger/chaincode/github.com/gongxianghui" type="GoTestRunConfiguration" factoryName="Go Test" temporary="true" nameIsGenerated="true">
<module name="chaincode" />
<working_directory value="$PROJECT_DIR$/github.com/gongxianghui" />
<framework value="gotest" />
<kind value="PACKAGE" />
<package value="github.com/hyperledger/chaincode/github.com/gongxianghui" />
<directory value="$PROJECT_DIR$/" />
<filePath value="$PROJECT_DIR$/" />
<pattern value="^TestGXH$" />
<method v="2" />
</configuration>
<component name="RunManager" selected="Go Test.TestGXHSchemaAuthBytable in github.com/hyperledger/chaincode/src/github.com/gongxianghui_auth">
<configuration name="TestGXHDataPutAuth in github.com/hyperledger/chaincode/github.com/gongxianghui_test" type="GoTestRunConfiguration" factoryName="Go Test" temporary="true" nameIsGenerated="true">
<module name="chaincode" />
<working_directory value="$PROJECT_DIR$/github.com/gongxianghui_test" />
......@@ -236,59 +245,70 @@
<pattern value="^TestGXHSchemaAuth$" />
<method v="2" />
</configuration>
<configuration name="TestGXHSchemaAuthBytable in github.com/hyperledger/chaincode/src/github.com/gongxianghui_auth" type="GoTestRunConfiguration" factoryName="Go Test" temporary="true" nameIsGenerated="true">
<module name="chaincode" />
<working_directory value="$PROJECT_DIR$/src/github.com/gongxianghui_auth" />
<framework value="gotest" />
<kind value="PACKAGE" />
<package value="github.com/hyperledger/chaincode/src/github.com/gongxianghui_auth" />
<directory value="$PROJECT_DIR$/" />
<filePath value="$PROJECT_DIR$/" />
<pattern value="^TestGXHSchemaAuthBytable$" />
<method v="2" />
</configuration>
<recent_temporary>
<list>
<item itemvalue="Go Test.TestGXHDataPutAuth in github.com/hyperledger/chaincode/src/github.com/gongxianghui_auth" />
<item itemvalue="Go Test.TestGXHSchemaAuthBytable in github.com/hyperledger/chaincode/src/github.com/gongxianghui_auth" />
<item itemvalue="Go Test.TestGXHSchemaAuth in github.com/hyperledger/chaincode/src/github.com/gongxianghui_auth" />
<item itemvalue="Go Test.TestGXHDataPutAuth in github.com/hyperledger/chaincode/src/github.com/gongxianghui_auth" />
<item itemvalue="Go Test.TestGXHDataPutAuth in github.com/hyperledger/chaincode/github.com/gongxianghui_test" />
<item itemvalue="Go Test.TestGXHSchemaAuth in github.com/hyperledger/chaincode/github.com/gongxianghui_test" />
<item itemvalue="Go Test.TestGXH in github.com/hyperledger/chaincode/github.com/gongxianghui" />
</list>
</recent_temporary>
</component>
<component name="TestHistory">
<history-entry file="TestGXHSchemaAuth_in_github_com_hyperledger_chaincode_src_github_com_gongxianghui_auth - 2020.02.29 at 22h 08m 13s.xml">
<configuration name="TestGXHSchemaAuth in github.com/hyperledger/chaincode/src/github.com/gongxianghui_auth" configurationId="GoTestRunConfiguration" />
</history-entry>
<history-entry file="TestGXHDataPutAuth_in_github_com_hyperledger_chaincode_src_github_com_gongxianghui_auth - 2020.02.29 at 22h 09m 18s.xml">
<history-entry file="TestGXHDataPutAuth_in_github_com_hyperledger_chaincode_src_github_com_gongxianghui_auth - 2020.02.29 at 22h 50m 19s.xml">
<configuration name="TestGXHDataPutAuth in github.com/hyperledger/chaincode/src/github.com/gongxianghui_auth" configurationId="GoTestRunConfiguration" />
</history-entry>
<history-entry file="TestGXHSchemaAuth_in_github_com_hyperledger_chaincode_src_github_com_gongxianghui_auth - 2020.02.29 at 22h 10m 13s.xml">
<history-entry file="TestGXHSchemaAuth_in_github_com_hyperledger_chaincode_src_github_com_gongxianghui_auth - 2020.03.01 at 18h 51m 18s.xml">
<configuration name="TestGXHSchemaAuth in github.com/hyperledger/chaincode/src/github.com/gongxianghui_auth" configurationId="GoTestRunConfiguration" />
</history-entry>
<history-entry file="TestGXHSchemaAuth_in_github_com_hyperledger_chaincode_src_github_com_gongxianghui_auth - 2020.02.29 at 22h 16m 19s.xml">
<history-entry file="TestGXHSchemaAuth_in_github_com_hyperledger_chaincode_src_github_com_gongxianghui_auth - 2020.03.01 at 18h 54m 15s.xml">
<configuration name="TestGXHSchemaAuth in github.com/hyperledger/chaincode/src/github.com/gongxianghui_auth" configurationId="GoTestRunConfiguration" />
</history-entry>
<history-entry file="TestGXHSchemaAuth_in_github_com_hyperledger_chaincode_src_github_com_gongxianghui_auth - 2020.02.29 at 22h 16m 56s.xml">
<history-entry file="TestGXHSchemaAuth_in_github_com_hyperledger_chaincode_src_github_com_gongxianghui_auth - 2020.03.01 at 18h 55m 53s.xml">
<configuration name="TestGXHSchemaAuth in github.com/hyperledger/chaincode/src/github.com/gongxianghui_auth" configurationId="GoTestRunConfiguration" />
</history-entry>
<history-entry file="TestGXHSchemaAuth_in_github_com_hyperledger_chaincode_src_github_com_gongxianghui_auth - 2020.02.29 at 22h 18m 19s.xml">
<history-entry file="TestGXHSchemaAuth_in_github_com_hyperledger_chaincode_src_github_com_gongxianghui_auth - 2020.03.01 at 18h 56m 42s.xml">
<configuration name="TestGXHSchemaAuth in github.com/hyperledger/chaincode/src/github.com/gongxianghui_auth" configurationId="GoTestRunConfiguration" />
</history-entry>
<history-entry file="TestGXHDataPutAuth_in_github_com_hyperledger_chaincode_src_github_com_gongxianghui_auth - 2020.02.29 at 22h 18m 43s.xml">
<configuration name="TestGXHDataPutAuth in github.com/hyperledger/chaincode/src/github.com/gongxianghui_auth" configurationId="GoTestRunConfiguration" />
<history-entry file="TestGXHSchemaAuth_in_github_com_hyperledger_chaincode_src_github_com_gongxianghui_auth - 2020.03.01 at 18h 58m 06s.xml">
<configuration name="TestGXHSchemaAuth in github.com/hyperledger/chaincode/src/github.com/gongxianghui_auth" configurationId="GoTestRunConfiguration" />
</history-entry>
<history-entry file="TestGXHDataPutAuth_in_github_com_hyperledger_chaincode_src_github_com_gongxianghui_auth - 2020.02.29 at 22h 19m 40s.xml">
<configuration name="TestGXHDataPutAuth in github.com/hyperledger/chaincode/src/github.com/gongxianghui_auth" configurationId="GoTestRunConfiguration" />
<history-entry file="TestGXHSchemaAuth_in_github_com_hyperledger_chaincode_src_github_com_gongxianghui_auth - 2020.03.01 at 18h 58m 53s.xml">
<configuration name="TestGXHSchemaAuth in github.com/hyperledger/chaincode/src/github.com/gongxianghui_auth" configurationId="GoTestRunConfiguration" />
</history-entry>
<history-entry file="TestGXHDataPutAuth_in_github_com_hyperledger_chaincode_src_github_com_gongxianghui_auth - 2020.02.29 at 22h 20m 06s.xml">
<configuration name="TestGXHDataPutAuth in github.com/hyperledger/chaincode/src/github.com/gongxianghui_auth" configurationId="GoTestRunConfiguration" />
<history-entry file="TestGXHSchemaAuth_in_github_com_hyperledger_chaincode_src_github_com_gongxianghui_auth - 2020.03.01 at 19h 00m 11s.xml">
<configuration name="TestGXHSchemaAuth in github.com/hyperledger/chaincode/src/github.com/gongxianghui_auth" configurationId="GoTestRunConfiguration" />
</history-entry>
<history-entry file="TestGXHDataPutAuth_in_github_com_hyperledger_chaincode_src_github_com_gongxianghui_auth - 2020.02.29 at 22h 20m 41s.xml">
<configuration name="TestGXHDataPutAuth in github.com/hyperledger/chaincode/src/github.com/gongxianghui_auth" configurationId="GoTestRunConfiguration" />
<history-entry file="TestGXHSchemaAuth_in_github_com_hyperledger_chaincode_src_github_com_gongxianghui_auth - 2020.03.01 at 19h 02m 07s.xml">
<configuration name="TestGXHSchemaAuth in github.com/hyperledger/chaincode/src/github.com/gongxianghui_auth" configurationId="GoTestRunConfiguration" />
</history-entry>
<history-entry file="TestGXHSchemaAuthBytable_in_github_com_hyperledger_chaincode_src_github_com_gongxianghui_auth - 2020.03.01 at 19h 03m 06s.xml">
<configuration name="TestGXHSchemaAuthBytable in github.com/hyperledger/chaincode/src/github.com/gongxianghui_auth" configurationId="GoTestRunConfiguration" />
</history-entry>
</component>
<component name="ToolWindowManager">
<frame x="71" y="31" width="2489" height="1569" extended-state="6" />
<editor active="true" />
<layout>
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.21701603" />
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.21948212" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Favorites" order="2" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.32909605" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.39986092" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.3997175" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" />
......@@ -296,7 +316,7 @@
<window_info anchor="bottom" id="Version Control" order="8" />
<window_info anchor="bottom" id="Database Changes" order="9" />
<window_info anchor="bottom" id="Statistic" order="10" />
<window_info anchor="bottom" id="Terminal" order="11" weight="0.31223923" />
<window_info anchor="bottom" id="Terminal" order="11" weight="0.3119266" />
<window_info anchor="bottom" id="Event Log" order="12" side_tool="true" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
......@@ -313,9 +333,21 @@
<breakpoints>
<line-breakpoint enabled="true" type="DlvLineBreakpoint">
<url>file://$PROJECT_DIR$/src/github.com/gongxianghui_auth/gongxianghui.go</url>
<line>529</line>
<line>347</line>
<properties />
<option name="timeStamp" value="1" />
</line-breakpoint>
<line-breakpoint enabled="true" type="DlvLineBreakpoint">
<url>file://$PROJECT_DIR$/src/github.com/gongxianghui_auth/gongxianghui.go</url>
<line>558</line>
<properties />
<option name="timeStamp" value="2" />
</line-breakpoint>
<line-breakpoint enabled="true" type="DlvLineBreakpoint">
<url>file://$PROJECT_DIR$/src/github.com/gongxianghui_auth/gongxianghui.go</url>
<line>386</line>
<properties />
<option name="timeStamp" value="22" />
<option name="timeStamp" value="3" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
......@@ -388,6 +420,13 @@
<entry file="file://$PROJECT_DIR$/src/github.com/gongxianghui/gongxianghui.go">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file:///usr/local/go/src/fmt/errors.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="448">
<caret line="16" column="5" selection-start-line="16" selection-start-column="5" selection-end-line="16" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file:///usr/local/go/src/encoding/json/decode.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2352">
......@@ -402,31 +441,39 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/github.com/gongxianghui_auth/gongxianghui_test.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1175">
<caret line="16" column="26" selection-start-line="16" selection-start-column="26" selection-end-line="16" selection-end-column="26" />
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor />
<second_editor />
</state>
</provider>
</entry>
<entry file="file:///usr/local/go/src/builtin/builtin.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="664">
<caret line="259" column="5" selection-start-line="259" selection-start-column="5" selection-end-line="259" selection-end-column="5" />
<caret line="188" column="5" selection-start-line="188" selection-start-column="5" selection-end-line="188" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file:///usr/local/go/src/fmt/errors.go">
<entry file="file:///usr/local/go/src/testing/testing.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="295">
<caret line="16" column="5" selection-start-line="16" selection-start-column="5" selection-end-line="16" selection-end-column="5" />
<state relative-caret-position="272">
<caret line="846" selection-start-line="846" selection-end-line="846" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/github.com/gongxianghui_auth/gongxianghui_test.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="159">
<caret line="98" column="130" selection-start-line="98" selection-start-column="130" selection-end-line="98" selection-end-column="130" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/github.com/gongxianghui_auth/gongxianghui.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="579">
<caret line="544" column="21" lean-forward="true" selection-start-line="544" selection-start-column="21" selection-end-line="544" selection-end-column="21" />
<state relative-caret-position="575">
<caret line="399" column="9" lean-forward="true" selection-start-line="399" selection-start-column="9" selection-end-line="399" selection-end-column="9" />
</state>
</provider>
</entry>
......
......@@ -343,11 +343,11 @@ func (this *Schema) put(args []string, stub shim.ChaincodeStubInterface) (string
if len(args) != 2 {
return "", fmt.Errorf("Expected 2 parameters to function put!")
}
var schema Schema
if err := json.Unmarshal([]byte(args[1]), &schema); err != nil {
var schema *Schema
var err error
if schema ,err = NewSchema(args[1]);err != nil{
return "", fmt.Errorf("parameters Unmarshal fail,args string not json string,err: %s", err)
} else {
}else{
if backupValue, ok := schema.Fields["backup"]; ok {
if _,ok := backupValue.Value.(map[string]interface{}); !ok {
return "", fmt.Errorf("parameters Unmarshal fail,extra string not json string,err: %s", err)
......@@ -359,6 +359,12 @@ func (this *Schema) put(args []string, stub shim.ChaincodeStubInterface) (string
//}
}
}
//if err := json.Unmarshal([]byte(args[1]), &schema); err != nil {
// return "", fmt.Errorf("parameters Unmarshal fail,args string not json string,err: %s", err)
//} else {
//
//}
_, ok := schema.Fields["id"]
if !ok {
return "", fmt.Errorf("The id field must exist ")
......@@ -382,12 +388,12 @@ func (this *Schema) update(args []string, stub shim.ChaincodeStubInterface) (str
if len(args) != 2 {
return "", fmt.Errorf("expected 2 parameters to function put! ")
}
var schema Schema
if err := json.Unmarshal([]byte(args[1]), &schema); err != nil {
var schema *Schema
var err error
if schema ,err = NewSchema(args[1]);err != nil{
return "", fmt.Errorf("parameters Unmarshal fail,args string not json string,err: %s", err)
} else {
if backupValue, ok := schema.Fields["backup"]; ok { //保证backup 对应的参数格式为map[string]interface{}
}else{
if backupValue, ok := schema.Fields["backup"]; ok {
if _,ok := backupValue.Value.(map[string]interface{}); !ok {
return "", fmt.Errorf("parameters Unmarshal fail,extra string not json string,err: %s", err)
}
......@@ -446,6 +452,7 @@ func (this *Schema) getSchema(args string, stub shim.ChaincodeStubInterface)(str
}
func getCertificateCommonName(stub shim.ChaincodeStubInterface) (string, error) {
return "admin",nil
creatorByte, _ := stub.GetCreator()
certStart := bytes.IndexAny(creatorByte, "-----BEGIN")
if certStart == -1 {
......@@ -549,6 +556,30 @@ func authorityCheck(authority AuthGroup, commonName string) (bool,error) {
}
func NewSchema(arg string)(*Schema,error){
schema := &Schema{
Fields:make(map[string]SchemaParameters),
}
var argMap map[string]interface{}
if err := json.Unmarshal([]byte(arg),&argMap);err!=nil{
return nil,err
}
if argMap["fields"] != nil && argMap["schema_auth"] != nil && argMap["auth"] != nil{
if err := json.Unmarshal([]byte(arg),schema);err!=nil{
return nil,err
}
return schema,nil
}
for k,v := range argMap{
schema.Fields[k] = SchemaParameters{
Value:v,
PAuth:Auth{},
}
}
return schema,nil
}
func main() {
err := shim.Start(&GXHCC{})
if err != nil {
......
......@@ -13,7 +13,7 @@ var schema = `{"fields":{"alinkman":{"val":"Alinkman","auth":{"read":{"users":{"
{"admin":1582972202}}}},"atype":{"val":"Atype","auth":{"read":{"users":{"admin":0},"roles":{"admin":1582972202}},"write":{"users":{"admin":0},"roles":
{"admin":1582972202}}}},"backup":{"val":{"aname":"Aname","atype":"Atype"},"auth":{"read":{"users":{"admin":0},"roles":{"admin":1582972202}},"write":{"users":
{"admin":0},"roles":{"admin":1582972202}}}},"id":{"val":"1","auth":{"read":{"users":{"admin":0},"roles":{"admin":1582972202}},"write":{"users":{"admin":0},"roles":
{"admin":1582972202}}}}},"schema_auth":{"read":{"users":null,"roles":null},"write":{"users":{"admin":0},"roles":{"admin":1582972202}}},"auth":{"read":{"users":
{"admin":1582972202}}}}},"schema_auth":{"read":{"users":null,"roles":null},"write":{"users":{"admin":0},"roles":{"admin":0}}},"auth":{"read":{"users":
{"admin":0},"roles":{"admin":0}},"write":{"users":{"admin":0},"roles":{"admin":1582972202}}}}
`
var schema2 = `{"fields":{"alinkman":{"val":"Alinkman","auth":{"read":{"users":{"admin":0},"roles":{"admin":1582972202}},"write":{"users":{"admin":0},"roles":
......@@ -74,7 +74,35 @@ func TestGXHSchemaAuth(t *testing.T){
responseByupdate.Status,responseByupdate.Message,string(responseByupdate.Payload))
}
/*
测试使用table 数据构建 schema
*/
func TestGXHSchemaAuthBytable(t *testing.T){
cc := new(GXHCC)
stub := shim.NewMockStub("GXHCC",cc)
stub.MockInit("init",nil)
fmt.Println()
fmt.Println("========================================invoke schema put============================================")
fmt.Println()
fmt.Println()
responseByPutschema := stub.MockInvoke("invoke1",[][]byte{[]byte("schema"), []byte("put"),[]byte("alibusi"),[]byte(inputUpdate)})
fmt.Printf("Invoke status %d,message %s and payload %s\n",
responseByPutschema.Status,responseByPutschema.Message,string(responseByPutschema.Payload))
fmt.Println()
fmt.Println("========================================invoke schema get============================================")
fmt.Println()
fmt.Println()
responseByget := stub.MockInvoke("invoke1",[][]byte{[]byte("schema"), []byte("get"),[]byte("alibusi")})
fmt.Printf("Invoke status %d,message %s ,and payload %s \n",
responseByget.Status,responseByget.Message,string(responseByget.Payload))
fmt.Println()
fmt.Println("========================================invoke schema update============================================")
fmt.Println()
fmt.Println()
responseByupdate := stub.MockInvoke("invoke1",[][]byte{[]byte("schema"), []byte("update"),[]byte("alibusi"),[]byte(inputUpdate)})
fmt.Printf("Invoke status %d,message %s ,and payload %s \n",
responseByupdate.Status,responseByupdate.Message,string(responseByupdate.Payload))
}
func TestGXHDataPutAuth(t *testing.T){
cc := new(GXHCC)
stub := shim.NewMockStub("GXHCC",cc)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment