Documentation ¶
Index ¶
- func SetClient(c *wwwclient.Client)
- func SetConfig(config *config.Config)
- type ActiveVotesCmd
- type AdminInvoicesCmd
- type AuthorizeVoteCmd
- type CensorCommentCmd
- type ChangePasswordCmd
- type ChangeUsernameCmd
- type Cmds
- type EditInvoiceCmd
- type EditProposalCmd
- type EditUserCmd
- type GeneratePayoutsCmd
- type HelpCmd
- type InventoryCmd
- type InviteNewUserCmd
- type InvoiceCommentsCmd
- type InvoiceDetailsCmd
- type InvoiceExchangeRateCmd
- type LikeCommentCmd
- type LoginCmd
- type LogoutCmd
- type ManageUserCmd
- type MeCmd
- type NewCommentCmd
- type NewInvoiceCmd
- type NewProposalCmd
- type NewUserCmd
- type PayInvoicesCmd
- type PolicyCmd
- type ProposalCommentsCmd
- type ProposalDetailsCmd
- type ProposalPaywallCmd
- type ProposalStatsCmd
- type RegisterUserCmd
- type RescanUserPaymentsCmd
- type ResendVerificationCmd
- type ResetPasswordCmd
- type SecretCmd
- type SendFaucetTxCmd
- type SetInvoiceStatusCmd
- type SetProposalStatusCmd
- type StartVoteCmd
- type SubscribeCmd
- type TallyCmd
- type TestRunCmd
- type TokenInventoryCmd
- type UnvettedProposalsCmd
- type UpdateUserKeyCmd
- type UserDetailsCmd
- type UserInvoicesCmd
- type UserLikeCommentsCmd
- type UserPendingPaymentCmd
- type UserProposalsCmd
- type UsersCmd
- type VerifyUserEmailCmd
- type VerifyUserPaymentCmd
- type VersionCmd
- type VettedProposalsCmd
- type VoteCmd
- type VoteResultsCmd
- type VoteStatusCmd
- type VoteStatusesCmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActiveVotesCmd ¶
type ActiveVotesCmd struct{}
ActiveVotesCmd retreives all proposals that are currently being voted on.
func (*ActiveVotesCmd) Execute ¶
func (cmd *ActiveVotesCmd) Execute(args []string) error
Execute executes the active votes command.
type AdminInvoicesCmd ¶
type AdminInvoicesCmd struct { Args struct { Month int `long:"month"` Year int `long:"year"` Status int `long:"status"` } }
AdminInvoicesCmd gets all invoices by month/year and/or status.
func (*AdminInvoicesCmd) Execute ¶
func (cmd *AdminInvoicesCmd) Execute(args []string) error
Execute executes the admin invoices command.
type AuthorizeVoteCmd ¶
type AuthorizeVoteCmd struct { Args struct { Token string `positional-arg-name:"token" required:"true"` // Censorship token Action string `positional-arg-name:"action"` // Authorize or revoke action } `positional-args:"true"` }
AuthorizeVoteCmd authorizes a proposal vote. The AuthorizeVoteCmd must be sent by the proposal author to be valid.
func (*AuthorizeVoteCmd) Execute ¶
func (cmd *AuthorizeVoteCmd) Execute(args []string) error
Execute executes the authorize vote command.
type CensorCommentCmd ¶
type CensorCommentCmd struct { Args struct { Token string `positional-arg-name:"token"` // Censorship token CommentID string `positional-arg-name:"commentID"` // Comment ID Reason string `positional-arg-name:"reason"` // Reason for censoring } `positional-args:"true" required:"true"` }
CensorCommentCmd censors a proposal comment.
func (*CensorCommentCmd) Execute ¶
func (cmd *CensorCommentCmd) Execute(args []string) error
Execute executes the censor comment command.
type ChangePasswordCmd ¶
type ChangePasswordCmd struct { Args struct { Password string `positional-arg-name:"currentPassword"` // Current password NewPassword string `positional-arg-name:"newPassword"` // New password } `positional-args:"true" required:"true"` }
ChangePasswordCmd changes the password for the logged in user.
func (*ChangePasswordCmd) Execute ¶
func (cmd *ChangePasswordCmd) Execute(args []string) error
Execute executes the change password command.
type ChangeUsernameCmd ¶
type ChangeUsernameCmd struct { Args struct { Password string `positional-arg-name:"password"` // User password NewUsername string `positional-arg-name:"newusername"` // New username } `positional-args:"true" required:"true"` }
ChangeUsernameCmd changes the username for the logged in user.
func (*ChangeUsernameCmd) Execute ¶
func (cmd *ChangeUsernameCmd) Execute(args []string) error
Execute executes the change username command.
type Cmds ¶
type Cmds struct { AdminInvoices AdminInvoicesCmd `command:"admininvoices" description:"(admin) get all invoices (optional by month/year and/or status)"` ActiveVotes ActiveVotesCmd `command:"activevotes" description:"(public) get the proposals that are being voted on"` AuthorizeVote AuthorizeVoteCmd `command:"authorizevote" description:"(user) authorize a proposal vote (must be proposal author)"` CensorComment CensorCommentCmd `command:"censorcomment" description:"(admin) censor a proposal comment"` ChangePassword ChangePasswordCmd `command:"changepassword" description:"(user) change the password for the logged in user"` ChangeUsername ChangeUsernameCmd `command:"changeusername" description:"(user) change the username for the logged in user"` EditInvoice EditInvoiceCmd `command:"editinvoice" description:"(user) edit a invoice"` EditProposal EditProposalCmd `command:"editproposal" description:"(user) edit a proposal"` ManageUser ManageUserCmd `command:"manageuser" description:"(admin) edit certain properties of the specified user"` EditUser EditUserCmd `command:"edituser" description:"(user) edit the preferences of the logged in user"` GeneratePayouts GeneratePayoutsCmd `command:"generatepayouts" description:"(admin) generate a list of payouts with addresses and amounts to pay"` Help HelpCmd `command:"help" description:" print a detailed help message for a specific command"` InvoiceComments InvoiceCommentsCmd `command:"invoicecomments" description:"(user) get the comments for a invoice"` InvoiceExchangeRate InvoiceExchangeRateCmd `command:"invoiceexchangerate" description:"(user) get exchange rate for a given month/year"` Inventory InventoryCmd `command:"inventory" description:"(public) get the proposals that are being voted on"` InviteNewUser InviteNewUserCmd `command:"invite" description:"(admin) invite a new user"` InvoiceDetails InvoiceDetailsCmd `command:"invoicedetails" description:"(public) get the details of a proposal"` LikeComment LikeCommentCmd `command:"likecomment" description:"(user) upvote/downvote a comment"` Login LoginCmd `command:"login" description:"(public) login to Politeia"` Logout LogoutCmd `command:"logout" description:"(public) logout of Politeia"` Me MeCmd `command:"me" description:"(user) get user details for the logged in user"` NewInvoice NewInvoiceCmd `command:"newinvoice" description:"(user) create a new invoice"` NewProposal NewProposalCmd `command:"newproposal" description:"(user) create a new proposal"` NewComment NewCommentCmd `command:"newcomment" description:"(user) create a new proposal comment"` NewUser NewUserCmd `command:"newuser" description:"(public) create a new user"` PayInvoices PayInvoicesCmd `command:"payinvoices" description:"(admin) set all approved invoices to paid"` Policy PolicyCmd `command:"policy" description:"(public) get the server policy"` ProposalComments ProposalCommentsCmd `command:"proposalcomments" description:"(public) get the comments for a proposal"` ProposalDetails ProposalDetailsCmd `command:"proposaldetails" description:"(public) get the details of a proposal"` ProposalPaywall ProposalPaywallCmd `command:"proposalpaywall" description:"(user) get proposal paywall details for the logged in user"` ProposalStats ProposalStatsCmd `command:"proposalstats" description:"(public) get statistics on the proposal inventory"` UnvettedProposals UnvettedProposalsCmd `command:"unvettedproposals" description:"(admin) get a page of unvetted proposals"` VettedProposals VettedProposalsCmd `command:"vettedproposals" description:"(public) get a page of vetted proposals"` RegisterUser RegisterUserCmd `command:"register" description:"(public) register an invited user to cms"` RescanUserPayments RescanUserPaymentsCmd `command:"rescanuserpayments" description:"(admin) rescan a user's payments to check for missed payments"` ResendVerification ResendVerificationCmd `command:"resendverification" description:"(public) resend the user verification email"` ResetPassword ResetPasswordCmd `command:"resetpassword" description:"(public) reset the password for a user that is not logged in"` Secret SecretCmd `command:"secret" description:"(user) ping politeiawww"` SendFaucetTx SendFaucetTxCmd `command:"sendfaucettx" description:" send a FNO transaction using the Fonero testnet faucet"` SetInvoiceStatus SetInvoiceStatusCmd `command:"setinvoicestatus" description:"(admin) set the status of an invoice"` SetProposalStatus SetProposalStatusCmd `command:"setproposalstatus" description:"(admin) set the status of a proposal"` StartVote StartVoteCmd `command:"startvote" description:"(admin) start the voting period on a proposal"` Subscribe SubscribeCmd `command:"subscribe" description:"(public) subscribe to all websocket commands and do not exit tool"` Tally TallyCmd `command:"tally" description:"(public) get the vote tally for a proposal"` TestRun TestRunCmd `command:"testrun" description:" run a series of tests on the politeiawww routes (dev use only)"` TokenInventory TokenInventoryCmd `command:"tokeninventory" description:"(public) get the censorship record tokens of all proposals"` UpdateUserKey UpdateUserKeyCmd `command:"updateuserkey" description:"(user) generate a new identity for the logged in user"` UserDetails UserDetailsCmd `command:"userdetails" description:"(public) get the details of a user profile"` UserLikeComments UserLikeCommentsCmd `command:"userlikecomments" description:"(user) get the logged in user's comment upvotes/downvotes for a proposal"` UserPendingPayment UserPendingPaymentCmd `command:"userpendingpayment" description:"(user) get details for a pending payment for the logged in user"` UserInvoices UserInvoicesCmd `command:"userinvoices" description:"(user) get all invoices submitted by a specific user"` UserProposals UserProposalsCmd `command:"userproposals" description:"(public) get all proposals submitted by a specific user"` Users UsersCmd `command:"users" description:"(admin) get a list of users"` VerifyUserEmail VerifyUserEmailCmd `command:"verifyuseremail" description:"(public) verify a user's email address"` VerifyUserPayment VerifyUserPaymentCmd `command:"verifyuserpayment" description:"(user) check if the logged in user has paid their user registration fee"` Version VersionCmd `command:"version" description:"(public) get server info and CSRF token"` Vote VoteCmd `command:"vote" description:"(public) cast votes for a proposal"` VoteResults VoteResultsCmd `command:"voteresults" description:"(public) get vote results for a proposal"` VoteStatus VoteStatusCmd `command:"votestatus" description:"(public) get the vote status of a proposal"` VoteStatuses VoteStatusesCmd `command:"votestatuses" description:"(public) get the vote status for all public proposals"` }
Cmds is used to represent all of the politeiawwwcli commands.
type EditInvoiceCmd ¶
type EditInvoiceCmd struct { Args struct { Month uint `positional-arg-name:"month" required:"true"` Year uint `positional-arg-name:"year"` Token string `positional-arg-name:"token"` // Censorship token CSV string `positional-arg-name:"csvfile"` // Invoice CSV file Attachments []string `positional-arg-name:"attachmentfiles"` // Invoice attachments } `positional-args:"true" optional:"true"` Name string `long:"name" optional:"true" description:"Full name of the contractor"` Contact string `long:"contact" optional:"true" description:"Email address or contact of the contractor"` Location string `long:"location" optional:"true" description:"Location (e.g. Dallas, TX, USA) of the contractor"` PaymentAddress string `long:"paymentaddress" optional:"true" description:"Payment address for this invoice."` Rate string `long:"rate" optional:"true" description:"Hourly rate for labor."` }
EditInvoiceCmd edits an existing invoice.
func (*EditInvoiceCmd) Execute ¶
func (cmd *EditInvoiceCmd) Execute(args []string) error
Execute executes the edit invoice command.
type EditProposalCmd ¶
type EditProposalCmd struct { Args struct { Token string `positional-arg-name:"token" required:"true"` // Censorship token Markdown string `positional-arg-name:"markdownfile"` // Proposal MD file Attachments []string `positional-arg-name:"attachmentfiles"` // Proposal attachments } `positional-args:"true" optional:"true"` Random bool `long:"random" optional:"true"` // Generate random proposal data }
EditProposalCmd edits an existing proposal.
func (*EditProposalCmd) Execute ¶
func (cmd *EditProposalCmd) Execute(args []string) error
Execute executes the edit proposal command.
type EditUserCmd ¶
type EditUserCmd struct { Args struct { NotifType string `long:"emailnotifications"` // Email notification bit field } `positional-args:"true" required:"true"` }
EditUserCmd edits the preferences of the logged in user.
func (*EditUserCmd) Execute ¶
func (cmd *EditUserCmd) Execute(args []string) error
Execute executes the edit user command.
type GeneratePayoutsCmd ¶
type GeneratePayoutsCmd struct { }
GeneratePayoutsCmd
func (*GeneratePayoutsCmd) Execute ¶
func (cmd *GeneratePayoutsCmd) Execute(args []string) error
Execute executes the generate payouts command.
type HelpCmd ¶
type HelpCmd struct { Args struct { Topic string `positional-arg-name:"topic"` // Topic to print help message for } `positional-args:"true"` }
HelpCmd prints a detailed help message for the specified command.
type InventoryCmd ¶
type InventoryCmd struct{}
InventoryCmd retreives the proposals that are being voted on.
func (*InventoryCmd) Execute ¶
func (cmd *InventoryCmd) Execute(args []string) error
Execute executes the inventory command.
type InviteNewUserCmd ¶
type InviteNewUserCmd struct { Args struct { Email string `positional-arg-name:"email"` } `positional-args:"true" required:"true"` }
InviteNewUserCmd allows administrators to invite contractors to join CMS.
func (*InviteNewUserCmd) Execute ¶
func (cmd *InviteNewUserCmd) Execute(args []string) error
Execute executes the invite new user command.
type InvoiceCommentsCmd ¶
type InvoiceCommentsCmd struct { Args struct { Token string `positional-arg-name:"token"` // Censorship token } `positional-args:"true" required:"true"` }
InvoiceCommentsCmd retreives the comments for the specified invoice.
func (*InvoiceCommentsCmd) Execute ¶
func (cmd *InvoiceCommentsCmd) Execute(args []string) error
Execute executes the invoice comments command.
type InvoiceDetailsCmd ¶
type InvoiceDetailsCmd struct { Args struct { Token string `positional-arg-name:"token" required:"true"` // Censorship token } `positional-args:"true"` }
InvoiceDetailsCmd retrieves the details of a invoice.
func (*InvoiceDetailsCmd) Execute ¶
func (cmd *InvoiceDetailsCmd) Execute(args []string) error
Execute executes the invoice details command.
type InvoiceExchangeRateCmd ¶
type InvoiceExchangeRateCmd struct { Args struct { Month uint `positional-arg-name:"month"` // Invoice Month Year uint `positional-arg-name:"year"` // Invoice Year } `positional-args:"true" optional:"true"` }
NewInvoiceCmd submits a new invoice.
func (*InvoiceExchangeRateCmd) Execute ¶
func (cmd *InvoiceExchangeRateCmd) Execute(args []string) error
Execute executes the new invoice command.
type LikeCommentCmd ¶
type LikeCommentCmd struct { Args struct { Token string `positional-arg-name:"token"` // Censorship token CommentID string `positional-arg-name:"commentID"` // Comment ID Action string `positional-arg-name:"action"` // Upvote/downvote action } `positional-args:"true" required:"true"` }
LikeCommentCmd is used to upvote/downvote a proposal comment using the logged in the user.
func (*LikeCommentCmd) Execute ¶
func (cmd *LikeCommentCmd) Execute(args []string) error
Execute executes the like comment command.
type LoginCmd ¶
type LoginCmd struct { Args struct { Email string `positional-arg-name:"email"` // User email address Password string `positional-arg-name:"password"` // User password } `positional-args:"true" required:"true"` }
LoginCmd logs into Politeia using the specified credentials.
type ManageUserCmd ¶
type ManageUserCmd struct { Args struct { UserID string `positional-arg-name:"userid"` // User ID Action string `positional-arg-name:"action"` // Edit user action Reason string `positional-arg-name:"reason"` // Reason for editing user } `positional-args:"true" required:"true"` }
ManageUserCmd allows an admin to edit certain properties of the specified user.
func (*ManageUserCmd) Execute ¶
func (cmd *ManageUserCmd) Execute(args []string) error
Execute executes the manage user command.
type NewCommentCmd ¶
type NewCommentCmd struct { Args struct { Token string `positional-arg-name:"token" required:"true"` // Censorship token Comment string `positional-arg-name:"comment" required:"true"` // Comment text ParentID string `positional-arg-name:"parentID"` // Comment parent ID } `positional-args:"true"` }
NewCommentCmd submits a new proposal comment.
func (*NewCommentCmd) Execute ¶
func (cmd *NewCommentCmd) Execute(args []string) error
Execute executes the new comment command.
type NewInvoiceCmd ¶
type NewInvoiceCmd struct { Args struct { Month uint `positional-arg-name:"month"` // Invoice Month Year uint `positional-arg-name:"year"` // Invoice Year CSV string `positional-arg-name:"csvfile"` // Invoice CSV file Attachments []string `positional-arg-name:"attachmentfiles"` // Invoice attachment files } `positional-args:"true" optional:"true"` Name string `long:"name" optional:"true" description:"Full name of the contractor"` Contact string `long:"contact" optional:"true" description:"Email address or contact of the contractor"` Location string `long:"location" optional:"true" description:"Location (e.g. Dallas, TX, USA) of the contractor"` PaymentAddress string `long:"paymentaddress" optional:"true" description:"Payment address for this invoice."` Rate string `long:"rate" optional:"true" description:"Hourly rate for labor."` }
NewInvoiceCmd submits a new invoice.
func (*NewInvoiceCmd) Execute ¶
func (cmd *NewInvoiceCmd) Execute(args []string) error
Execute executes the new invoice command.
type NewProposalCmd ¶
type NewProposalCmd struct { Args struct { Markdown string `positional-arg-name:"markdownfile"` // Proposal MD file Attachments []string `positional-arg-name:"attachmentfiles"` // Proposal attachment files } `positional-args:"true" optional:"true"` Random bool `long:"random" optional:"true"` // Generate random proposal data }
NewProposalCmd submits a new proposal.
func (*NewProposalCmd) Execute ¶
func (cmd *NewProposalCmd) Execute(args []string) error
Execute executes the new proposal command.
type NewUserCmd ¶
type NewUserCmd struct { Args struct { Email string `positional-arg-name:"email"` // Email address Username string `positional-arg-name:"username"` // Username Password string `positional-arg-name:"password"` // Password } `positional-args:"true"` Random bool `long:"random" optional:"true"` // Generate random user credentials Paywall bool `long:"paywall" optional:"true"` // Use faucet to pay paywall (tesnet only) Verify bool `long:"verify" optional:"true"` // Verify user email address (testnet only) NoSave bool `long:"nosave" optional:"true"` // Don't save user identity to disk }
NewUserCmd creates a new politeia user.
func (*NewUserCmd) Execute ¶
func (cmd *NewUserCmd) Execute(args []string) error
Execute executes the new user command.
type PayInvoicesCmd ¶
type PayInvoicesCmd struct { }
PayInvoicesCmd
func (*PayInvoicesCmd) Execute ¶
func (cmd *PayInvoicesCmd) Execute(args []string) error
Execute executes the generate payouts command.
type ProposalCommentsCmd ¶
type ProposalCommentsCmd struct { Args struct { Token string `positional-arg-name:"token"` // Censorship token } `positional-args:"true" required:"true"` }
ProposalCommentsCmd retreives the comments for the specified proposal.
func (*ProposalCommentsCmd) Execute ¶
func (cmd *ProposalCommentsCmd) Execute(args []string) error
Execute executes the proposal comments command.
type ProposalDetailsCmd ¶
type ProposalDetailsCmd struct { Args struct { Token string `positional-arg-name:"token" required:"true"` // Censorship token Version string `positional-arg-name:"version"` // Proposal version } `positional-args:"true"` }
ProposalDetailsCmd retrieves the details of a proposal.
func (*ProposalDetailsCmd) Execute ¶
func (cmd *ProposalDetailsCmd) Execute(args []string) error
Execute executes the proposal details command.
type ProposalPaywallCmd ¶
type ProposalPaywallCmd struct{}
ProposalPaywallCmd gets paywall info for the logged in user.
func (*ProposalPaywallCmd) Execute ¶
func (cmd *ProposalPaywallCmd) Execute(args []string) error
Execute executes the proposal paywall command.
type ProposalStatsCmd ¶
type ProposalStatsCmd struct{}
ProposalStatsCmd retrieves statistics on the proposal inventory.
func (*ProposalStatsCmd) Execute ¶
func (cmd *ProposalStatsCmd) Execute(args []string) error
Execute executes the proposal stats command.
type RegisterUserCmd ¶
type RegisterUserCmd struct { Args struct { Email string `positional-arg-name:"email"` Token string `positional-arg-name:"token"` } `positional-args:"true" required:"true"` Username string `long:"username" optional:"true" description:"Username"` Password string `long:"password" optional:"true" description:"Password"` }
RegisterUserCmd allows invited contractors to complete the registration process and will allow them to login and submit invoices to receive payment.
func (*RegisterUserCmd) Execute ¶
func (cmd *RegisterUserCmd) Execute(args []string) error
Execute executes the register user command
type RescanUserPaymentsCmd ¶
type RescanUserPaymentsCmd struct { Args struct { UserID string `positional-arg-name:"userid"` // User ID } `positional-args:"true" required:"true"` }
RescanUserPaymentsCmd rescans the logged in user's paywall address and makes sure that all payments have been credited to the user's account.
func (*RescanUserPaymentsCmd) Execute ¶
func (cmd *RescanUserPaymentsCmd) Execute(args []string) error
Execute executes the rescan user payments command.
type ResendVerificationCmd ¶
type ResendVerificationCmd struct { Args struct { Email string `positional-arg-name:"email"` // User email PublicKey string `positional-arg-name:"publickey"` // User public key } `positional-args:"true" required:"true"` }
ResendVerificationCmd re-sends the user verification email for an unverified user.
func (*ResendVerificationCmd) Execute ¶
func (cmd *ResendVerificationCmd) Execute(args []string) error
Execute executes the resend verification command.
type ResetPasswordCmd ¶
type ResetPasswordCmd struct { Args struct { Email string `positional-arg-name:"email"` // User email address NewPassword string `positional-arg-name:"newpassword"` // New password } `positional-args:"true" required:"true"` }
ResetPasswordCmd resets the password of the specified user.
func (*ResetPasswordCmd) Execute ¶
func (cmd *ResetPasswordCmd) Execute(args []string) error
Execute executes the reset password command.
type SendFaucetTxCmd ¶
type SendFaucetTxCmd struct { Args struct { Address string `positional-arg-name:"address" required:"true"` // FNO address Amount uint64 `positional-arg-name:"amount" required:"true"` // Amount in atoms OverrideToken string `positional-arg-name:"overridetoken"` // Faucet override token } `positional-args:"true"` }
SendFaucetTxCmd uses the Fonero testnet faucet to send the specified amount of FNO (in atoms) to the specified address.
func (*SendFaucetTxCmd) Execute ¶
func (cmd *SendFaucetTxCmd) Execute(args []string) error
Execute executes the send faucet tx command.
type SetInvoiceStatusCmd ¶
type SetInvoiceStatusCmd struct { Args struct { Version string `positional-arg-name:"version"` Token string `positional-arg-name:"token"` Status string `positional-arg-name:"status"` Reason string `positional-arg-name:"reason"` } `positional-args:"true" optional:"true"` }
func (*SetInvoiceStatusCmd) Execute ¶
func (cmd *SetInvoiceStatusCmd) Execute(args []string) error
type SetProposalStatusCmd ¶
type SetProposalStatusCmd struct { Args struct { Token string `positional-arg-name:"token" required:"true"` // Censorship token Status string `positional-arg-name:"status" required:"true"` // New status Message string `positional-arg-name:"message"` // Change message } `positional-args:"true"` }
SetProposalStatusCmd sets the status of a proposal.
func (*SetProposalStatusCmd) Execute ¶
func (cmd *SetProposalStatusCmd) Execute(args []string) error
Execute executes the set proposal status command.
type StartVoteCmd ¶
type StartVoteCmd struct { Args struct { Token string `positional-arg-name:"token" required:"true"` // Censorship token Duration string `positional-arg-name:"duration"` // Vote duration QuorumPercentage string `positional-arg-name:"quorumpercentage"` // Quorum percentage PassPercentage string `positional-arg-name:"passpercentage"` // Pass percentage } `positional-args:"true"` }
StartVoteCmd starts the voting period on the specified proposal.
func (*StartVoteCmd) Execute ¶
func (cmd *StartVoteCmd) Execute(args []string) error
Execute executes the start vote command.
type SubscribeCmd ¶
type SubscribeCmd struct {
Close bool `long:"close" optional:"true"` // Do not keep connetion alive
}
SubscribeCmd opens a websocket connect to politeiawww.
func (*SubscribeCmd) Execute ¶
func (cmd *SubscribeCmd) Execute(args []string) error
Execute executes the subscribe command.
type TallyCmd ¶
type TallyCmd struct { Args struct { Token string `positional-arg-name:"token"` // Censorship token } `positional-args:"true" required:"true"` }
TallyCmd retrieves all of the cast votes for a proposal, tallies the votes, and displays the result.
type TestRunCmd ¶
type TestRunCmd struct { Args struct { AdminEmail string `positional-arg-name:"adminemail"` // Admin email AdminPassword string `positional-arg-name:"adminpassword"` // Admin password } `positional-args:"true" required:"true"` }
TestRunCmd performs a test run of all the politeiawww routes.
func (*TestRunCmd) Execute ¶
func (cmd *TestRunCmd) Execute(args []string) error
Execute executes the test run command.
type TokenInventoryCmd ¶
type TokenInventoryCmd struct{}
TokenInventory retrieves the censorship record tokens of all proposals in the inventory.
func (*TokenInventoryCmd) Execute ¶
func (cmd *TokenInventoryCmd) Execute(args []string) error
Execute executes the token inventory command.
type UnvettedProposalsCmd ¶
type UnvettedProposalsCmd struct { Before string `long:"before"` // Before censorship token filter After string `long:"after"` // After censorship token filter }
UnvettedProposalsCmd retrieves a page of unvetted proposals.
func (*UnvettedProposalsCmd) Execute ¶
func (cmd *UnvettedProposalsCmd) Execute(args []string) error
Execute executes the proposals unvetted command.
type UpdateUserKeyCmd ¶
type UpdateUserKeyCmd struct {
NoSave bool `long:"nosave"` // Don't save new identity to disk
}
UpdateUserKeyCmd creates a new identity for the logged in user.
func (*UpdateUserKeyCmd) Execute ¶
func (cmd *UpdateUserKeyCmd) Execute(args []string) error
Execute executes the update user key command.
type UserDetailsCmd ¶
type UserDetailsCmd struct { Args struct { UserID string `positional-arg-name:"userid"` // User ID } `positional-args:"true" required:"true"` }
UserDetailsCmd gets the user details for the specified user.
func (*UserDetailsCmd) Execute ¶
func (cmd *UserDetailsCmd) Execute(args []string) error
Execute executes the user details command.
type UserInvoicesCmd ¶
type UserInvoicesCmd struct {
Args struct {
} `positional-args:"true" required:"true"`
}
UserInvoicesCmd gets the invoices for the specified user.
func (*UserInvoicesCmd) Execute ¶
func (cmd *UserInvoicesCmd) Execute(args []string) error
Execute executes the user invoices command.
type UserLikeCommentsCmd ¶
type UserLikeCommentsCmd struct { Args struct { Token string `positional-arg-name:"token"` // Censorship token } `positional-args:"true" required:"true"` }
UserLikeCommentsCmd retreives the logged in user's like comment objects for the specified proposal.
func (*UserLikeCommentsCmd) Execute ¶
func (cmd *UserLikeCommentsCmd) Execute(args []string) error
Execute executes the user comment likes command.
type UserPendingPaymentCmd ¶
type UserPendingPaymentCmd struct{}
UserPendingPaymentCmd sretrieve the payment details for a pending payment, if one exists, for the logged in user.
func (*UserPendingPaymentCmd) Execute ¶
func (cmd *UserPendingPaymentCmd) Execute(args []string) error
Execute executes the user pending payment command.
type UserProposalsCmd ¶
type UserProposalsCmd struct { Args struct { UserID string `positional-arg-name:"userID"` // User ID } `positional-args:"true" required:"true"` }
UserProposalsCmd gets the proposals for the specified user.
func (*UserProposalsCmd) Execute ¶
func (cmd *UserProposalsCmd) Execute(args []string) error
Execute executes the user proposals command.
type UsersCmd ¶
type UsersCmd struct { Email string `long:"email"` // Email filter Username string `long:"username"` // Username filter PublicKey string `long:"pubkey"` // Username filter }
UsersCmd retreives a list of users that have been filtered using the specified filtering params.
type VerifyUserEmailCmd ¶
type VerifyUserEmailCmd struct { Args struct { Email string `positional-arg-name:"email"` // User email address Token string `positional-arg-name:"token"` // Verification token } `positional-args:"true" required:"true"` }
VerifyUserEmailCmd is used to verify a user's email address.
func (*VerifyUserEmailCmd) Execute ¶
func (cmd *VerifyUserEmailCmd) Execute(args []string) error
Execute executes the verify user email command.
type VerifyUserPaymentCmd ¶
type VerifyUserPaymentCmd struct{}
VerifyUserPaymentCmd checks on the status of the logged in user's registration payment.
func (*VerifyUserPaymentCmd) Execute ¶
func (cmd *VerifyUserPaymentCmd) Execute(args []string) error
Execute executes the verify user payment command.
type VersionCmd ¶
type VersionCmd struct{}
VersionCmd retrieves server version information and CSRF token.
func (*VersionCmd) Execute ¶
func (cmd *VersionCmd) Execute(args []string) error
Execute executes the version command.
type VettedProposalsCmd ¶
type VettedProposalsCmd struct { Before string `long:"before"` // Before censorship token After string `long:"after"` // After censorship token }
VettedProposalsCmd retreives a page of vetted proposals.
func (*VettedProposalsCmd) Execute ¶
func (cmd *VettedProposalsCmd) Execute(args []string) error
Execute executs the vetted proposals command.
type VoteCmd ¶
type VoteCmd struct { Args struct { Token string `positional-arg-name:"token"` // Censorship token VoteID string `positional-arg-name:"voteid"` // Vote choice ID } `positional-args:"true" required:"true"` }
VoteCmd casts a proposal ballot for the specified proposal.
type VoteResultsCmd ¶
type VoteResultsCmd struct { Args struct { Token string `positional-arg-name:"token"` // Censorship token } `positional-args:"true" required:"true"` }
VoteResultsCmd gets the votes that have been cast for the specified proposal.
func (*VoteResultsCmd) Execute ¶
func (cmd *VoteResultsCmd) Execute(args []string) error
Execute executes the proposal votes command.
type VoteStatusCmd ¶
type VoteStatusCmd struct { Args struct { Token string `positional-arg-name:"token"` // Censorship token } `positional-args:"true" required:"true"` }
VoteStatusCmd gets the vote status of the specified proposal.
func (*VoteStatusCmd) Execute ¶
func (cmd *VoteStatusCmd) Execute(args []string) error
Execute executes the vote status command.
type VoteStatusesCmd ¶
type VoteStatusesCmd struct{}
VoteStatusesCmd retreives the vote status of all public proposals.
func (*VoteStatusesCmd) Execute ¶
func (cmd *VoteStatusesCmd) Execute(args []string) error
Execute executes the vote statuses command.
Source Files ¶
- activevotes.go
- admininvoices.go
- authorizevote.go
- censorcomment.go
- changepassword.go
- changeusername.go
- commands.go
- editinvoice.go
- editproposal.go
- edituser.go
- generatepayouts.go
- help.go
- inventory.go
- invitenewuser.go
- invoicecomments.go
- invoicedetails.go
- invoiceexchangerate.go
- likecomment.go
- login.go
- logout.go
- manageuser.go
- me.go
- newcomment.go
- newinvoice.go
- newproposal.go
- newuser.go
- payinvoices.go
- policy.go
- proposalcomments.go
- proposaldetails.go
- proposalpaywall.go
- proposalstats.go
- register.go
- rescanuserpayments.go
- resendverification.go
- resetpassword.go
- secret.go
- sendfaucettx.go
- setinvoicestatus.go
- setproposalstatus.go
- startvote.go
- subscribe.go
- tally.go
- testrun.go
- tokeninventory.go
- unvettedproposals.go
- updateuserkey.go
- userdetails.go
- userinvoices.go
- userlikecomments.go
- userpendingpayment.go
- userproposals.go
- users.go
- verifyuseremail.go
- verifyuserpayment.go
- version.go
- vettedproposals.go
- vote.go
- voteresults.go
- votestatus.go
- votestatuses.go