github.com/decred/politeia@v1.4.0/politeiawww/cmd/pictl/userproposalpaywall.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 main
     6  
     7  import "github.com/decred/politeia/politeiawww/cmd/shared"
     8  
     9  // userProposalPaywallCmd gets paywall info for the logged in user.
    10  type userProposalPaywallCmd struct{}
    11  
    12  // Execute executes the userProposalPaywallCmd command.
    13  //
    14  // This function satisfies the go-flags Commander interface.
    15  func (cmd *userProposalPaywallCmd) Execute(args []string) error {
    16  	ppdr, err := client.UserProposalPaywall()
    17  	if err != nil {
    18  		return err
    19  	}
    20  	return shared.PrintJSON(ppdr)
    21  }
    22  
    23  // userProposalPaywallHelpMsg is the output of the help command when
    24  // 'userproposalpaywall' is specified.
    25  const userProposalPaywallHelpMsg = `userproposalpaywall	
    26  
    27  Fetch proposal paywall details.	
    28  
    29  Arguments: None`