github.com/decred/politeia@v1.4.0/politeiawww/cmd/shared/tokeninventory.go (about)

     1  // Copyright (c) 2017-2019 The Decred developers
     2  // Use of this source code is governed by an ISC
     3  // license that can be found in the LICENSE file.
     4  
     5  package shared
     6  
     7  // TokenInventoryCmd retrieves the censorship record tokens of all proposals in
     8  // the inventory.
     9  type TokenInventoryCmd struct{}
    10  
    11  // Execute executes the token inventory command.
    12  func (cmd *TokenInventoryCmd) Execute(args []string) error {
    13  	reply, err := client.TokenInventory()
    14  	if err != nil {
    15  		return err
    16  	}
    17  
    18  	return PrintJSON(reply)
    19  }