2018-10-17 18:04:55 +00:00
|
|
|
// Copyright © 2018 NAME HERE <EMAIL ADDRESS>
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
|
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
2018-11-21 04:47:01 +00:00
|
|
|
log "github.com/sirupsen/logrus"
|
2018-10-17 18:04:55 +00:00
|
|
|
"github.com/spf13/cobra"
|
2018-11-08 15:14:35 +00:00
|
|
|
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
2018-10-17 18:04:55 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// getSignaturesCmd represents the getSignatures command
|
|
|
|
var getSignaturesCmd = &cobra.Command{
|
|
|
|
Use: "getSignatures",
|
|
|
|
Short: "A command to see transformer method and event signatures",
|
|
|
|
Long: `A convenience command to see method/event signatures for Maker transformers
|
|
|
|
vulcanizedb getSignatures`,
|
2018-10-18 19:19:56 +00:00
|
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
|
|
getSignatures()
|
|
|
|
},
|
2018-10-17 18:04:55 +00:00
|
|
|
}
|
|
|
|
|
2018-10-18 19:19:56 +00:00
|
|
|
func getSignatures() {
|
2018-10-17 18:04:55 +00:00
|
|
|
signatures := make(map[string]string)
|
2018-11-08 15:14:35 +00:00
|
|
|
signatures["BiteSignature"] = constants.BiteSignature
|
|
|
|
signatures["CatFileChopLumpSignature"] = constants.CatFileChopLumpSignature
|
|
|
|
signatures["CatFileFlipSignature"] = constants.CatFileFlipSignature
|
|
|
|
signatures["CatFilePitVowSignature"] = constants.CatFilePitVowSignature
|
2018-11-08 17:14:52 +00:00
|
|
|
signatures["DealSignature"] = constants.DealSignature
|
2018-11-08 15:14:35 +00:00
|
|
|
signatures["DentFunctionSignature"] = constants.DentFunctionSignature
|
|
|
|
signatures["DripDripSignature"] = constants.DripDripSignature
|
|
|
|
signatures["DripFileIlkSignature"] = constants.DripFileIlkSignature
|
|
|
|
signatures["DripFileRepoSignature"] = constants.DripFileRepoSignature
|
|
|
|
signatures["DripFileVowSignature"] = constants.DripFileVowSignature
|
2018-11-08 17:14:52 +00:00
|
|
|
signatures["FlapKickSignature"] = constants.FlapKickSignature
|
2018-11-08 15:14:35 +00:00
|
|
|
signatures["FlipKickSignature"] = constants.FlipKickSignature
|
|
|
|
signatures["FlopKickSignature"] = constants.FlopKickSignature
|
|
|
|
signatures["FrobSignature"] = constants.FrobSignature
|
|
|
|
signatures["LogValueSignature"] = constants.LogValueSignature
|
|
|
|
signatures["PitFileDebtCeilingSignature"] = constants.PitFileDebtCeilingSignature
|
|
|
|
signatures["PitFileIlkSignature"] = constants.PitFileIlkSignature
|
|
|
|
signatures["TendFunctionSignature"] = constants.TendFunctionSignature
|
|
|
|
signatures["VatFluxSignature"] = constants.VatFluxSignature
|
|
|
|
signatures["VatFoldSignature"] = constants.VatFoldSignature
|
2018-11-08 17:14:52 +00:00
|
|
|
signatures["VatGrabSignature"] = constants.VatGrabSignature
|
|
|
|
signatures["VatHealSignature"] = constants.VatHealSignature
|
|
|
|
signatures["VatInitSignature"] = constants.VatInitSignature
|
2018-11-08 15:14:35 +00:00
|
|
|
signatures["VatMoveSignature"] = constants.VatMoveSignature
|
|
|
|
signatures["VatSlipSignature"] = constants.VatSlipSignature
|
|
|
|
signatures["VatTollSignature"] = constants.VatTollSignature
|
|
|
|
signatures["VatTuneSignature"] = constants.VatTuneSignature
|
2018-11-08 17:14:52 +00:00
|
|
|
signatures["VowFlogSignature"] = constants.VowFlogSignature
|
2018-10-17 18:04:55 +00:00
|
|
|
|
|
|
|
for name, sig := range signatures {
|
|
|
|
log.Println(name, ": ", sig)
|
|
|
|
}
|
|
|
|
}
|
2018-10-18 19:19:56 +00:00
|
|
|
|
|
|
|
func init() {
|
|
|
|
rootCmd.AddCommand(getSignaturesCmd)
|
|
|
|
}
|