github.com/decred/politeia@v1.4.0/politeiawww/cmd/pictl/userregistrationpayment.go (about)

     1  // Copyright (c) 2020 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  // userRegistrationPaymentCmd checks on the status of the logged in user's
    10  // registration payment.
    11  type userRegistrationPaymentCmd struct{}
    12  
    13  // Execute executes the userRegistrationPaymentCmd command.
    14  //
    15  // This function satisfies the go-flags Commander interface.
    16  func (cmd *userRegistrationPaymentCmd) Execute(args []string) error {
    17  	vupr, err := client.UserRegistrationPayment()
    18  	if err != nil {
    19  		return err
    20  	}
    21  	return shared.PrintJSON(vupr)
    22  }
    23  
    24  // userRegistrationPaymentHelpMsg is the output of the help command when
    25  // 'userregistrationpayment' is specified.
    26  var userRegistrationPaymentHelpMsg = `userregistrationpayment 
    27  
    28  Check if the currently logged in user has paid their user registration fee.
    29  
    30  Arguments: None`