Documentation ¶
Index ¶
- type Client
- func (c *Client) ActiveVotes() (*v1.ActiveVoteReply, error)
- func (c *Client) AdminInvoices(ai *cms.AdminInvoices) (*cms.AdminInvoicesReply, error)
- func (c *Client) AuthorizeVote(av *v1.AuthorizeVote) (*v1.AuthorizeVoteReply, error)
- func (c *Client) CastVotes(b *v1.Ballot) (*v1.BallotReply, error)
- func (c *Client) CensorComment(cc *v1.CensorComment) (*v1.CensorCommentReply, error)
- func (c *Client) ChangePassword(cp *v1.ChangePassword) (*v1.ChangePasswordReply, error)
- func (c *Client) ChangeUsername(cu *v1.ChangeUsername) (*v1.ChangeUsernameReply, error)
- func (c *Client) Close()
- func (c *Client) CommittedTickets(ct *walletrpc.CommittedTicketsRequest) (*walletrpc.CommittedTicketsResponse, error)
- func (c *Client) EditInvoice(ei *cms.EditInvoice) (*cms.EditInvoiceReply, error)
- func (c *Client) EditProposal(ep *v1.EditProposal) (*v1.EditProposalReply, error)
- func (c *Client) EditUser(eu *v1.EditUser) (*v1.EditUserReply, error)
- func (c *Client) GeneratePayouts(gp *cms.GeneratePayouts) (*cms.GeneratePayoutsReply, error)
- func (c *Client) GetAllUnvetted(gau *v1.GetAllUnvetted) (*v1.GetAllUnvettedReply, error)
- func (c *Client) GetAllVetted(gav *v1.GetAllVetted) (*v1.GetAllVettedReply, error)
- func (c *Client) GetAllVoteStatus() (*v1.GetAllVoteStatusReply, error)
- func (c *Client) GetComments(token string) (*v1.GetCommentsReply, error)
- func (c *Client) InviteNewUser(inu *cms.InviteNewUser) (*cms.InviteNewUserReply, error)
- func (c *Client) InvoiceComments(token string) (*v1.GetCommentsReply, error)
- func (c *Client) InvoiceDetails(token string) (*cms.InvoiceDetailsReply, error)
- func (c *Client) InvoiceExchangeRate(ier *cms.InvoiceExchangeRate) (*cms.InvoiceExchangeRateReply, error)
- func (c *Client) LikeComment(lc *v1.LikeComment) (*v1.LikeCommentReply, error)
- func (c *Client) LoadWalletClient() error
- func (c *Client) Login(l *v1.Login) (*v1.LoginReply, error)
- func (c *Client) Logout() (*v1.LogoutReply, error)
- func (c *Client) ManageUser(mu *v1.ManageUser) (*v1.ManageUserReply, error)
- func (c *Client) Me() (*v1.LoginReply, error)
- func (c *Client) NewComment(nc *v1.NewComment) (*v1.NewCommentReply, error)
- func (c *Client) NewInvoice(ni *cms.NewInvoice) (*cms.NewInvoiceReply, error)
- func (c *Client) NewProposal(np *v1.NewProposal) (*v1.NewProposalReply, error)
- func (c *Client) NewUser(nu *v1.NewUser) (*v1.NewUserReply, error)
- func (c *Client) PayInvoices(pi *cms.PayInvoices) (*cms.PayInvoicesReply, error)
- func (c *Client) Policy() (*v1.PolicyReply, error)
- func (c *Client) ProposalDetails(token string, pd *v1.ProposalsDetails) (*v1.ProposalDetailsReply, error)
- func (c *Client) ProposalPaywallDetails() (*v1.ProposalPaywallDetailsReply, error)
- func (c *Client) ProposalPaywallPayment() (*v1.ProposalPaywallPaymentReply, error)
- func (c *Client) ProposalsStats() (*v1.ProposalsStatsReply, error)
- func (c *Client) RegisterUser(ru *cms.RegisterUser) (*cms.RegisterUserReply, error)
- func (c *Client) ResendVerification(rv v1.ResendVerification) (*v1.ResendVerificationReply, error)
- func (c *Client) ResetPassword(rp *v1.ResetPassword) (*v1.ResetPasswordReply, error)
- func (c *Client) Secret() (*v1.UserError, error)
- func (c *Client) SetInvoiceStatus(sis *cms.SetInvoiceStatus) (*cms.SetInvoiceStatusReply, error)
- func (c *Client) SetProposalStatus(sps *v1.SetProposalStatus) (*v1.SetProposalStatusReply, error)
- func (c *Client) SignMessages(sm *walletrpc.SignMessagesRequest) (*walletrpc.SignMessagesResponse, error)
- func (c *Client) StartVote(sv *v1.StartVote) (*v1.StartVoteReply, error)
- func (c *Client) TokenInventory() (*v1.TokenInventoryReply, error)
- func (c *Client) UpdateUserKey(uuk *v1.UpdateUserKey) (*v1.UpdateUserKeyReply, error)
- func (c *Client) UserCommentsLikes(token string) (*v1.UserCommentsLikesReply, error)
- func (c *Client) UserDetails(userID string) (*v1.UserDetailsReply, error)
- func (c *Client) UserInvoices(up *cms.UserInvoices) (*cms.UserInvoicesReply, error)
- func (c *Client) UserPaymentsRescan(upr *v1.UserPaymentsRescan) (*v1.UserPaymentsRescanReply, error)
- func (c *Client) UserProposalCredits() (*v1.UserProposalCreditsReply, error)
- func (c *Client) UserProposals(up *v1.UserProposals) (*v1.UserProposalsReply, error)
- func (c *Client) Users(u *v1.Users) (*v1.UsersReply, error)
- func (c *Client) VerifyNewUser(vnu *v1.VerifyNewUser) (*v1.VerifyNewUserReply, error)
- func (c *Client) VerifyUpdateUserKey(vuuk *v1.VerifyUpdateUserKey) (*v1.VerifyUpdateUserKeyReply, error)
- func (c *Client) VerifyUserPayment() (*v1.VerifyUserPaymentReply, error)
- func (c *Client) Version() (*v1.VersionReply, error)
- func (c *Client) VoteResults(token string) (*v1.VoteResultsReply, error)
- func (c *Client) VoteStatus(token string) (*v1.VoteStatusReply, error)
- func (c *Client) WalletAccounts() (*walletrpc.AccountsResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a politeiawww client.
func (*Client) ActiveVotes ¶
func (c *Client) ActiveVotes() (*v1.ActiveVoteReply, error)
ActiveVotes retreives all proposals that are currently being voted on.
func (*Client) AdminInvoices ¶
func (c *Client) AdminInvoices(ai *cms.AdminInvoices) (*cms.AdminInvoicesReply, error)
AdminInvoices retrieves invoices base on possible field set in the request month/year and/or status
func (*Client) AuthorizeVote ¶
func (c *Client) AuthorizeVote(av *v1.AuthorizeVote) (*v1.AuthorizeVoteReply, error)
AuthorizeVote authorizes the voting period for the specified proposal using the logged in user.
func (*Client) CensorComment ¶
func (c *Client) CensorComment(cc *v1.CensorComment) (*v1.CensorCommentReply, error)
CensorComment censors the specified proposal comment.
func (*Client) ChangePassword ¶
func (c *Client) ChangePassword(cp *v1.ChangePassword) (*v1.ChangePasswordReply, error)
ChangePassword changes the password for the logged in user.
func (*Client) ChangeUsername ¶
func (c *Client) ChangeUsername(cu *v1.ChangeUsername) (*v1.ChangeUsernameReply, error)
ChangeUsername changes the username of the logged in user.
func (*Client) CommittedTickets ¶
func (c *Client) CommittedTickets(ct *walletrpc.CommittedTicketsRequest) (*walletrpc.CommittedTicketsResponse, error)
CommittedTickets returns the committed tickets that belong to the fnowallet instance out of the the specified list of tickets.
func (*Client) EditInvoice ¶
func (c *Client) EditInvoice(ei *cms.EditInvoice) (*cms.EditInvoiceReply, error)
EditInvoice edits the specified invoice with the logged in user.
func (*Client) EditProposal ¶
func (c *Client) EditProposal(ep *v1.EditProposal) (*v1.EditProposalReply, error)
EditProposal edits the specified proposal with the logged in user.
func (*Client) GeneratePayouts ¶
func (c *Client) GeneratePayouts(gp *cms.GeneratePayouts) (*cms.GeneratePayoutsReply, error)
GeneratePayouts generates a list of payouts for all approved invoices that contain an address and amount for an admin to the process
func (*Client) GetAllUnvetted ¶
func (c *Client) GetAllUnvetted(gau *v1.GetAllUnvetted) (*v1.GetAllUnvettedReply, error)
GetAllUnvetted retrieves a page of unvetted proposals.
func (*Client) GetAllVetted ¶
func (c *Client) GetAllVetted(gav *v1.GetAllVetted) (*v1.GetAllVettedReply, error)
GetAllVetted retrieves a page of vetted proposals.
func (*Client) GetAllVoteStatus ¶
func (c *Client) GetAllVoteStatus() (*v1.GetAllVoteStatusReply, error)
GetAllVoteStatus retreives the vote status of all public proposals.
func (*Client) GetComments ¶
func (c *Client) GetComments(token string) (*v1.GetCommentsReply, error)
GetComments retrieves the comments for the specified proposal.
func (*Client) InviteNewUser ¶
func (c *Client) InviteNewUser(inu *cms.InviteNewUser) (*cms.InviteNewUserReply, error)
InviteNewUser creates a new cmswww user.
func (*Client) InvoiceComments ¶
func (c *Client) InvoiceComments(token string) (*v1.GetCommentsReply, error)
GetComments retrieves the comments for the specified proposal.
func (*Client) InvoiceDetails ¶
func (c *Client) InvoiceDetails(token string) (*cms.InvoiceDetailsReply, error)
InvoiceDetails retrieves the specified invoice.
func (*Client) InvoiceExchangeRate ¶
func (c *Client) InvoiceExchangeRate(ier *cms.InvoiceExchangeRate) (*cms.InvoiceExchangeRateReply, error)
InvoiceExchangeRate changes the status of the specified invoice.
func (*Client) LikeComment ¶
func (c *Client) LikeComment(lc *v1.LikeComment) (*v1.LikeCommentReply, error)
LikeComment casts a like comment action (upvote/downvote) for the logged in user.
func (*Client) LoadWalletClient ¶
LoadWalletClient connects to a fnowallet instance.
func (*Client) Logout ¶
func (c *Client) Logout() (*v1.LogoutReply, error)
Logout logs out a user from politeiawww.
func (*Client) ManageUser ¶
func (c *Client) ManageUser(mu *v1.ManageUser) (*v1.ManageUserReply, error)
ManageUser allows an admin to edit certain attributes of the specified user.
func (*Client) Me ¶
func (c *Client) Me() (*v1.LoginReply, error)
Me returns user details for the logged in user.
func (*Client) NewComment ¶
func (c *Client) NewComment(nc *v1.NewComment) (*v1.NewCommentReply, error)
NewComment submits a new proposal comment for the logged in user.
func (*Client) NewInvoice ¶
func (c *Client) NewInvoice(ni *cms.NewInvoice) (*cms.NewInvoiceReply, error)
NewInvoice submits the specified invoice to politeiawww for the logged in user.
func (*Client) NewProposal ¶
func (c *Client) NewProposal(np *v1.NewProposal) (*v1.NewProposalReply, error)
NewProposal submits the specified proposal to politeiawww for the logged in user.
func (*Client) PayInvoices ¶
func (c *Client) PayInvoices(pi *cms.PayInvoices) (*cms.PayInvoicesReply, error)
PayInvoices is a temporary command that allows an administrator to set all approved invoices to the paid status. This will be removed once the address watching for payment is complete and working.
func (*Client) Policy ¶
func (c *Client) Policy() (*v1.PolicyReply, error)
Policy returns the politeiawww policy information.
func (*Client) ProposalDetails ¶
func (c *Client) ProposalDetails(token string, pd *v1.ProposalsDetails) (*v1.ProposalDetailsReply, error)
ProposalDetails retrieves the specified proposal.
func (*Client) ProposalPaywallDetails ¶
func (c *Client) ProposalPaywallDetails() (*v1.ProposalPaywallDetailsReply, error)
ProposalPaywallDetails retrieves proposal credit paywall information for the logged in user.
func (*Client) ProposalPaywallPayment ¶
func (c *Client) ProposalPaywallPayment() (*v1.ProposalPaywallPaymentReply, error)
ProposalPaywallPayment retrieves payment details of any pending proposal credit payment from the logged in user.
func (*Client) ProposalsStats ¶
func (c *Client) ProposalsStats() (*v1.ProposalsStatsReply, error)
ProposalsStats retrieves summary statistics for the politeiawww proposal inventory.
func (*Client) RegisterUser ¶
func (c *Client) RegisterUser(ru *cms.RegisterUser) (*cms.RegisterUserReply, error)
RegisterUser finalizes the signup process for a new cmswww user.
func (*Client) ResendVerification ¶
func (c *Client) ResendVerification(rv v1.ResendVerification) (*v1.ResendVerificationReply, error)
ResendVerification re-sends the user verification email for an unverified user.
func (*Client) ResetPassword ¶
func (c *Client) ResetPassword(rp *v1.ResetPassword) (*v1.ResetPasswordReply, error)
ResetPassword resets the password of the specified user.
func (*Client) SetInvoiceStatus ¶
func (c *Client) SetInvoiceStatus(sis *cms.SetInvoiceStatus) (*cms.SetInvoiceStatusReply, error)
SetInvoiceStatus changes the status of the specified invoice.
func (*Client) SetProposalStatus ¶
func (c *Client) SetProposalStatus(sps *v1.SetProposalStatus) (*v1.SetProposalStatusReply, error)
SetProposalStatus changes the status of the specified proposal.
func (*Client) SignMessages ¶
func (c *Client) SignMessages(sm *walletrpc.SignMessagesRequest) (*walletrpc.SignMessagesResponse, error)
SignMessages signs the passed in messages using the private keys from the specified addresses.
func (*Client) TokenInventory ¶
func (c *Client) TokenInventory() (*v1.TokenInventoryReply, error)
TokenInventory retrieves the censorship record tokens of all proposals in the inventory.
func (*Client) UpdateUserKey ¶
func (c *Client) UpdateUserKey(uuk *v1.UpdateUserKey) (*v1.UpdateUserKeyReply, error)
UpdateUserKey updates the identity of the logged in user.
func (*Client) UserCommentsLikes ¶
func (c *Client) UserCommentsLikes(token string) (*v1.UserCommentsLikesReply, error)
UserCommentsLikes retrieves the comment likes (upvotes/downvotes) for the specified proposal that are from the logged in user.
func (*Client) UserDetails ¶
func (c *Client) UserDetails(userID string) (*v1.UserDetailsReply, error)
UserDetails retrieves the user details for the specified user.
func (*Client) UserInvoices ¶
func (c *Client) UserInvoices(up *cms.UserInvoices) (*cms.UserInvoicesReply, error)
UserInvoices retrieves the proposals that have been submitted by the specified user.
func (*Client) UserPaymentsRescan ¶
func (c *Client) UserPaymentsRescan(upr *v1.UserPaymentsRescan) (*v1.UserPaymentsRescanReply, error)
UserPaymentsRescan scans the specified user's paywall address and makes sure that the user's account has been properly credited with all payments.
func (*Client) UserProposalCredits ¶
func (c *Client) UserProposalCredits() (*v1.UserProposalCreditsReply, error)
UserProposalCredits retrieves the proposal credit history for the logged in user.
func (*Client) UserProposals ¶
func (c *Client) UserProposals(up *v1.UserProposals) (*v1.UserProposalsReply, error)
UserProposals retrieves the proposals that have been submitted by the specified user.
func (*Client) Users ¶
Users retrieves a list of users that adhere to the specified filtering parameters.
func (*Client) VerifyNewUser ¶
func (c *Client) VerifyNewUser(vnu *v1.VerifyNewUser) (*v1.VerifyNewUserReply, error)
VerifyNewUser verifies a user's email address.
func (*Client) VerifyUpdateUserKey ¶
func (c *Client) VerifyUpdateUserKey(vuuk *v1.VerifyUpdateUserKey) (*v1.VerifyUpdateUserKeyReply, error)
VerifyUpdateUserKey is used to verify a new user identity.
func (*Client) VerifyUserPayment ¶
func (c *Client) VerifyUserPayment() (*v1.VerifyUserPaymentReply, error)
VerifyUserPayment checks whether the logged in user has paid their user registration fee.
func (*Client) Version ¶
func (c *Client) Version() (*v1.VersionReply, error)
Version returns the version information for the politeiawww instance.
func (*Client) VoteResults ¶
func (c *Client) VoteResults(token string) (*v1.VoteResultsReply, error)
VoteResults retrieves the vote results for the specified proposal.
func (*Client) VoteStatus ¶
func (c *Client) VoteStatus(token string) (*v1.VoteStatusReply, error)
VoteStatus retrieves the vote status for the specified proposal.
func (*Client) WalletAccounts ¶
func (c *Client) WalletAccounts() (*walletrpc.AccountsResponse, error)
WalletAccounts retrieves the walletprc accounts.