github.com/defanghe/fabric@v2.1.1+incompatible/internal/configtxlator/rest/router.go (about) 1 /* 2 Copyright IBM Corp. 2017 All Rights Reserved. 3 4 SPDX-License-Identifier: Apache-2.0 5 */ 6 7 package rest 8 9 import ( 10 "github.com/gorilla/mux" 11 ) 12 13 func NewRouter() *mux.Router { 14 router := mux.NewRouter().StrictSlash(true) 15 router. 16 HandleFunc("/protolator/encode/{msgName}", Encode). 17 Methods("POST") 18 19 router. 20 HandleFunc("/protolator/decode/{msgName}", Decode). 21 Methods("POST") 22 router. 23 HandleFunc("/configtxlator/compute/update-from-configs", ComputeUpdateFromConfigs). 24 Methods("POST") 25 26 return router 27 }