github.com/iotexproject/iotex-core@v1.14.1-rc1/ioctl/cmd/jwt/jwt.go (about) 1 // Copyright (c) 2022 IoTeX Foundation 2 // This source code is provided 'as is' and no warranties are given as to title or non-infringement, merchantability 3 // or fitness for purpose and, to the extent permitted by law, all liability for your use of the code is disclaimed. 4 // This source code is governed by Apache License 2.0 that can be found in the LICENSE file. 5 6 package jwt 7 8 import ( 9 "github.com/spf13/cobra" 10 11 "github.com/iotexproject/iotex-core/ioctl/cmd/action" 12 "github.com/iotexproject/iotex-core/ioctl/config" 13 "github.com/iotexproject/iotex-core/ioctl/flag" 14 ) 15 16 // Multi-language support 17 var ( 18 _jwtCmdShorts = map[config.Language]string{ 19 config.English: "Manage Json Web Token on IoTeX blockchain", 20 config.Chinese: "管理IoTeX区块链上的JWT", 21 } 22 ) 23 24 // JwtCmd represents the jwt command 25 var JwtCmd = &cobra.Command{ 26 Use: "jwt", 27 Short: config.TranslateInLang(_jwtCmdShorts, config.UILanguage), 28 } 29 30 func init() { 31 JwtCmd.AddCommand(_jwtSignCmd) 32 action.RegisterWriteCommand(_jwtSignCmd) 33 flag.WithArgumentsFlag.RegisterCommand(_jwtSignCmd) 34 }