github.com/iotexproject/iotex-core@v1.14.1-rc1/ioctl/newcmd/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"
    12  	"github.com/iotexproject/iotex-core/ioctl/config"
    13  )
    14  
    15  // Multi-language support
    16  var (
    17  	_jwtCmdShorts = map[config.Language]string{
    18  		config.English: "Manage Json Web Token on IoTeX blockchain",
    19  		config.Chinese: "管理IoTeX区块链上的JWT",
    20  	}
    21  )
    22  
    23  // NewJwtCmd represents the jwt command
    24  func NewJwtCmd(client ioctl.Client) *cobra.Command {
    25  	short, _ := client.SelectTranslation(_jwtCmdShorts)
    26  	cmd := &cobra.Command{
    27  		Use:   "jwt",
    28  		Short: short,
    29  	}
    30  	cmd.AddCommand(NewJwtSignCmd(client))
    31  	return cmd
    32  }