Documentation ¶
Index ¶
- Constants
- Variables
- func InviteMemberStatusFrom(v null.Bool, createdAt time.Time, expired null.Uint64) string
- type AbandonArgs
- type AbandonResponse
- type ActOnClassificationArgs
- type ActOnClassificationResponse
- type AddDelegateArgs
- type AdminAlgoCallbacksArgs
- type AdminAlgoCallbacksResponse
- type AmIArgs
- type AmIResponse
- type Appeal
- type AppealBlockListArgs
- type AppealBlockListResponse
- type AppealCloseArgs
- type AppealFileArgs
- type AppealListArgs
- type AppealListResponse
- type AppealRequest
- type AppealStatus
- type Authorization
- type BlockArgs
- type BlockResponse
- type BlockWordArgs
- type BlockWordRespose
- type BlockedChannel
- type BlockedListArgs
- type BlockedListResponse
- type ByIDArgs
- type ByIDResponse
- type ChannelArgs
- type ChannelResponse
- type Client
- func (d *Client) CommentAbandon(args AbandonArgs) (*AbandonResponse, error)
- func (d *Client) CommentByID(args ByIDArgs) (*ByIDResponse, error)
- func (d *Client) CommentCreate(args CreateArgs) (*CreateResponse, error)
- func (d *Client) CommentEdit(args EditArgs) (*EditResponse, error)
- func (d *Client) CommentList(args ListArgs) (*ListResponse, error)
- func (d *Client) GetChannelForComment(args ChannelArgs) (*ChannelResponse, error)
- func (d *Client) ReactionList(args ReactionListArgs) (*ReactionListResponse, error)
- func (d *Client) ReactionReact(args ReactArgs) (*ReactResponse, error)
- func (d *Client) Sign(args interface{}) interface{}
- func (d *Client) WithSigning(export string) *Client
- type CommentItem
- type CommentReaction
- type CreateArgs
- type CreateResponse
- type Delegate
- type EditArgs
- type EditResponse
- type InviteMemberStatus
- type ListArgs
- type ListBlockedWordsArgs
- type ListDelegateResponse
- type ListDelegatesArgs
- type ListResponse
- type ListSettingsArgs
- type ListSettingsResponse
- type MentionedChannel
- type ModAuthorization
- type PinArgs
- type PinResponse
- type ReactArgs
- type ReactResponse
- type ReactionListArgs
- type ReactionListResponse
- type Reactions
- type RemoveDelegateArgs
- type SharedBlockedList
- type SharedBlockedListGetArgs
- type SharedBlockedListGetResponse
- type SharedBlockedListInvitation
- type SharedBlockedListInviteAcceptArgs
- type SharedBlockedListInviteAcceptResponse
- type SharedBlockedListInviteArgs
- type SharedBlockedListInviteResponse
- type SharedBlockedListInvitedMember
- type SharedBlockedListListInvitesArgs
- type SharedBlockedListListInvitesResponse
- type SharedBlockedListRescindArgs
- type SharedBlockedListRescindResponse
- type SharedBlockedListUpdateArgs
- type SignatureArgs
- type SignatureResponse
- type Sort
- type SuperListArgs
- type SuperListResponse
- type UnBlockArgs
- type UnBlockResponse
- type UnBlockWordArgs
- type UpdateSettingsArgs
- type Validator
Constants ¶
const DefaultPort = 5900
DefaultPort the default port that is used for commentron client
const InternalWatcherID = 0
InternalWatcherID is the ID of the internal watcher
Variables ¶
var StickerRE = regexp.MustCompile(`^<stkr>:(?P<sticker>[a-zA-Z0-9_]+):<stkr>$`)
StickerRE is the regex for a valid sticker as a comment.
Functions ¶
func InviteMemberStatusFrom ¶
InviteMemberStatusFrom from a `null.Bool` it provides the functional value
Types ¶
type AbandonArgs ¶
type AbandonArgs struct { ModAuthorization CommentID string `json:"comment_id"` }
AbandonArgs are the arguments passed to comment.Abandon RPC call. If creator args are passed the signing channel of the content of the comment is checked these args and signature verification happens against the creators public key for authorization.
type AbandonResponse ¶
type AbandonResponse struct { *CommentItem Abandoned bool `json:"abandoned"` }
AbandonResponse the response to the abandon call
type ActOnClassificationArgs ¶
type ActOnClassificationArgs struct { // CommentID is the ID of the comment to act on CommentID string `json:"comment_id"` // Confirm is true if the classification should be confirmed, false if it should be ignored (default) Confirm bool `json:"confirm"` // DoDelete is true if the comment should be deleted, false if it should be left alone (default) DoDelete bool `json:"do_delete"` }
ActOnClassificationArgs Arguments to confirm or ignore a comment's classifications
func (ActOnClassificationArgs) Validate ¶
func (a ActOnClassificationArgs) Validate() api.StatusError
Validate validates the data in the ActOnClassificationArgs
type ActOnClassificationResponse ¶
type ActOnClassificationResponse struct {
Status string `json:"status"`
}
ActOnClassificationResponse response for moderation.ActOnClassification
type AddDelegateArgs ¶
type AddDelegateArgs struct { Authorization //This is for backwards compatibility, Authorization parameters should be used, not these! CreatorChannelID string `json:"creator_channel_id"` CreatorChannelName string `json:"creator_channel_name"` //Who is being delegated authority? ModChannelID string `json:"mod_channel_id"` ModChannelName string `json:"mod_channel_name"` }
AddDelegateArgs Arguments to delagate moderation to another channel for your channel.
func (*AddDelegateArgs) Validate ¶
func (ad *AddDelegateArgs) Validate() api.StatusError
Validate validates the data in the AddDelegate args
type AdminAlgoCallbacksArgs ¶
type AdminAlgoCallbacksArgs struct { ChannelID string `json:"channel_id"` WatcherID uint `json:"watcher_id"` Add bool `json:"add"` }
AdminAlgoCallbacksArgs Arguments to modify the algo_callbacks table
func (AdminAlgoCallbacksArgs) Validate ¶
func (a AdminAlgoCallbacksArgs) Validate() api.StatusError
Validate validates the data in the AdminAlgoCallbacksArgs
type AdminAlgoCallbacksResponse ¶
type AdminAlgoCallbacksResponse struct {
Status string `json:"status"`
}
AdminAlgoCallbacksResponse response for moderation.AdminAlgoCallbacks
type AmIArgs ¶
type AmIArgs struct {
Authorization
}
AmIArgs Arguments to check whether a user is a moderator or not
type AmIResponse ¶
type AmIResponse struct { ChannelName string `json:"channel_name"` ChannelID string `json:"channel_id"` Type string `json:"type"` AuthorizedChannels map[string]string `json:"authorized_channels"` }
AmIResponse for the moderation.AmI rpc call
type Appeal ¶
type Appeal struct { BlockedList SharedBlockedList `json:"blocked_list,omitempty"` BlockedChannel BlockedChannel `json:"blocked_channel"` AppealRequest AppealRequest `json:"appeal_request,omitempty"` }
Appeal structure for an appeal
type AppealBlockListArgs ¶
type AppealBlockListArgs struct {
Authorization
}
AppealBlockListArgs arguments
type AppealBlockListResponse ¶
type AppealBlockListResponse struct {
Blocks []Appeal `json:"blocks"`
}
AppealBlockListResponse response
type AppealCloseArgs ¶
type AppealCloseArgs struct { Authorization BlockedChannelID string `json:"blocked_channel_id"` BlockedChannelName string `json:"blocked_channel_name"` AppealStatus AppealStatus `json:"status"` ResponseMessage string `json:"response_message"` }
AppealCloseArgs arguments
type AppealFileArgs ¶
type AppealFileArgs struct { Authorization BlockedByChannelID string `json:"blocked_by_channel_id"` BlockedByChannelName string `json:"blocked_by_channel_name"` AppealMessage string `json:"appeal_message"` TxID string `json:"tx_id,omitempty"` }
AppealFileArgs arguments
type AppealListResponse ¶
type AppealListResponse struct { Appeals []Appeal `json:"appeals"` ModeratedAppeals []Appeal `json:"moderated_appeals"` }
AppealListResponse response
type AppealRequest ¶
type AppealRequest struct { AppealMessage string `json:"appeal_message"` ResponseMessage string `json:"response_message"` AppealStatus AppealStatus `json:"status"` TxID string `json:"tx_id,omitempty"` }
AppealRequest appeal request
type AppealStatus ¶
type AppealStatus int
AppealStatus status of appeal
const ( // AppealPending the default value for all appeals AppealPending AppealStatus = iota // AppealEscalated appeal is escalated to shared block list owner AppealEscalated // AppealAccepted creator who blocked, has accepted the appeal AppealAccepted // AppealRejected creator who blocked, has rejected the appeal AppealRejected )
type Authorization ¶
type Authorization struct { ChannelName string `json:"channel_name"` ChannelID string `json:"channel_id"` Signature string `json:"signature"` SigningTS string `json:"signing_ts"` }
Authorization parameters for calls requiring user authentication
type BlockArgs ¶
type BlockArgs struct { ModAuthorization //Offender being blocked BlockedChannelID string `json:"blocked_channel_id"` BlockedChannelName string `json:"blocked_channel_name"` // ID of comment to remove as part of this block OffendingCommentID string `json:"offending_comment_id"` // Blocks identity from comment universally, requires Admin rights on commentron instance BlockAll bool `json:"block_all"` // Measured in seconds for the amount of time a channel is blocked for. TimeOut uint64 `json:"time_out"` // If true will delete all comments of the offender, requires Admin rights on commentron for universal delete DeleteAll bool `json:"delete_all"` }
BlockArgs Arguments to block identities from commenting for both publisher and moderators
func (BlockArgs) Validate ¶
func (b BlockArgs) Validate() api.StatusError
Validate validates the data in the list args
type BlockResponse ¶
type BlockResponse struct { DeletedCommentIDs []string `json:"deleted_comment_ids"` BannedChannelID string `json:"banned_channel_id"` AllBlocked bool `json:"all_blocked"` //Publisher banned from if not universally banned BannedFrom *string `json:"banned_from"` }
BlockResponse for the moderation.Block rpc call
type BlockWordArgs ¶
type BlockWordArgs struct { Authorization // CSV list of containing words to block comment on content Words string `json:"words"` }
BlockWordArgs arguments passed to settings.BlockWord. Appends to list
func (BlockWordArgs) Validate ¶
func (b BlockWordArgs) Validate() api.StatusError
Validate validates the data in the args
type BlockWordRespose ¶
type BlockWordRespose struct { //If added to list, removed from list, or list all WordList []string `json:"word_list"` Signature string `json:"signature"` SigningTS string `json:"signing_ts"` }
BlockWordRespose result from BlockWord,UnBlockWord, ListBlockedWords. Lists the words added/removed or all.
type BlockedChannel ¶
type BlockedChannel struct { BlockedChannelID string `json:"blocked_channel_id"` BlockedChannelName string `json:"blocked_channel_name"` //In cases of moderation delegation this could be "other than" the creator BlockedByChannelID string `json:"blocked_by_channel_id"` BlockedByChannelName string `json:"blocked_by_channel_name"` BlockedAt time.Time `json:"blocked_at"` BlockedFor time.Duration `json:"banned_for,omitempty"` BlcokRemaining time.Duration `json:"ban_remaining"` }
BlockedChannel contains information about the blockee blocked by the creator
type BlockedListArgs ¶
type BlockedListArgs struct {
ModAuthorization
}
BlockedListArgs Arguments to block identities from commenting for both publisher and moderators
type BlockedListResponse ¶
type BlockedListResponse struct { BlockedChannels []BlockedChannel `json:"blocked_channels"` DelegatedBlockedChannels []BlockedChannel `json:"delegated_blocked_channels"` GloballyBlockedChannels []BlockedChannel `json:"globally_blocked_channels"` }
BlockedListResponse for the moderation.Block rpc call
type ByIDArgs ¶
type ByIDArgs struct { CommentID string `json:"comment_id"` WithAncestors bool `json:"with_ancestors"` }
ByIDArgs arguments for the comment.List rpc call
type ByIDResponse ¶
type ByIDResponse struct { Item CommentItem `json:"items,omitempty"` Ancestors []CommentItem `json:"ancestors,omitempty"` }
ByIDResponse response for the comment.ByID rpc call
type ChannelArgs ¶
type ChannelArgs struct {
CommentID string `json:"comment_id"`
}
ChannelArgs arguments to the comment.GetChannelForCommentID call
type ChannelResponse ¶
type ChannelResponse struct { ChannelID string `json:"channel_id"` ChannelName string `json:"channel_name"` }
ChannelResponse response to the comment.GetChannelForCommentID call
type Client ¶
Client commentron client for apis
func (*Client) CommentAbandon ¶
func (d *Client) CommentAbandon(args AbandonArgs) (*AbandonResponse, error)
CommentAbandon abandons a comment
func (*Client) CommentByID ¶
func (d *Client) CommentByID(args ByIDArgs) (*ByIDResponse, error)
CommentByID returns a comment for id
func (*Client) CommentCreate ¶
func (d *Client) CommentCreate(args CreateArgs) (*CreateResponse, error)
CommentCreate creates a comment
func (*Client) CommentEdit ¶
func (d *Client) CommentEdit(args EditArgs) (*EditResponse, error)
CommentEdit edits a comment
func (*Client) CommentList ¶
func (d *Client) CommentList(args ListArgs) (*ListResponse, error)
CommentList lists comments for a claim or parent comment
func (*Client) GetChannelForComment ¶
func (d *Client) GetChannelForComment(args ChannelArgs) (*ChannelResponse, error)
GetChannelForComment returns the channel information for a particular comment
func (*Client) ReactionList ¶
func (d *Client) ReactionList(args ReactionListArgs) (*ReactionListResponse, error)
ReactionList lists reactions to comments
func (*Client) ReactionReact ¶
func (d *Client) ReactionReact(args ReactArgs) (*ReactResponse, error)
ReactionReact posts a new reaction to a comment
func (*Client) Sign ¶
func (d *Client) Sign(args interface{}) interface{}
Sign will sign arguments if a channel has been loaded into the client to sign with. It will also overwrite channel name and channel claim id argument parameters if they exist with the channel info being signed with.
func (*Client) WithSigning ¶
WithSigning allows for a client to be used with identity privileges handling the signing of APIs requiring user authorization. It requires the channel export string `./lbrynet channel export <channel_id>` as well as an authorized apiKey from the comment server owner.
type CommentItem ¶
type CommentItem struct { Comment string `json:"comment"` CommentID string `json:"comment_id"` ClaimID string `json:"claim_id"` Timestamp int `json:"timestamp"` ParentID string `json:"parent_id,omitempty"` Signature string `json:"signature,omitempty"` SigningTs string `json:"signing_ts,omitempty"` ChannelID string `json:"channel_id,omitempty"` ChannelName string `json:"channel_name,omitempty"` ChannelURL string `json:"channel_url,omitempty"` Currency string `json:"currency"` Replies int `json:"replies,omitempty"` SupportAmount float64 `json:"support_amount"` IsCreator bool `json:"is_creator,omitempty"` IsModerator bool `json:"is_moderator,omitempty"` IsGlobalMod bool `json:"is_global_mod,omitempty"` IsHidden bool `json:"is_hidden"` IsPinned bool `json:"is_pinned"` IsFiat bool `json:"is_fiat"` IsProtected bool `json:"is_protected"` }
CommentItem is the data structure of a comment returned from commentron
type CommentReaction ¶
CommentReaction is a map for representing the reaction and its quantity for a comment
type CreateArgs ¶
type CreateArgs struct { CommentText string `json:"comment"` ClaimID string `json:"claim_id"` ParentID *string `json:"parent_id"` ChannelID string `json:"channel_id"` ChannelName string `json:"channel_name"` Sticker bool `json:"sticker"` SupportTxID *string `json:"support_tx_id"` SupportVout *uint64 `json:"support_vout"` PaymentIntentID *string `json:"payment_intent_id"` Environment *string `json:"environment"` Signature string `json:"signature"` SigningTS string `json:"signing_ts"` MentionedChannels []MentionedChannel `json:"mentioned_channels"` IsProtected bool `json:"is_protected"` }
CreateArgs arguments for the comment.Create rpc call
type CreateResponse ¶
type CreateResponse struct {
*CommentItem
}
CreateResponse response for the comment.Create rpc call
type Delegate ¶
type Delegate struct { ChannelID string `json:"channel_id"` ChannelName string `json:"channel_name"` }
Delegate a particular channel thats delegated moderation capabilities
type EditArgs ¶
type EditArgs struct { Comment string `json:"comment"` CommentID string `json:"comment_id"` Signature string `json:"signature"` SigningTS string `json:"signing_ts"` }
EditArgs arguments for the comment.Edit rpc call
type EditResponse ¶
type EditResponse struct {
*CommentItem
}
EditResponse response for the comment.Edit rpc call
type InviteMemberStatus ¶
type InviteMemberStatus int
InviteMemberStatus status of invited member
const ( // All the defult value for getting all invited members All InviteMemberStatus = iota // Pending invite has not been accepted or rejected Pending // Accepted invited member has accepted and their blocked entries merged into list Accepted // Rejected invited member rejected joining the list and their blocked entries are cleared. Rejected // None does not return any invited members of the list None )
type ListArgs ¶
type ListArgs struct { Authorization RequestorChannelName string `json:"requestor_channel_name"` // Used for Author ID filter authorization Only your comments! RequestorChannelID *string `json:"requestor_channel_id"` // Used for Author ID filter authorization ClaimID *string `json:"claim_id"` // claim id of claim being commented on AuthorClaimID *string `json:"author_claim_id"` // filters comments to just this author ParentID *string `json:"parent_id"` // filters comments to those under this thread Page int `json:"page"` // pagination: which page of results PageSize int `json:"page_size"` // pagination: nr of comments to show in a page (max 200) TopLevel bool `json:"top_level"` // filters to only top level comments Hidden bool `json:"hidden"` // if true will show hidden comments as well SortBy Sort `json:"sort_by"` // can be popularity, controversy, default is time (newest) IsProtected bool `json:"is_protected"` // if true, only return protected when authorized }
ListArgs arguments for the comment.List rpc call
func (*ListArgs) ApplyDefaults ¶
func (c *ListArgs) ApplyDefaults()
ApplyDefaults applies the default values for arguments passed that are different from normal defaults.
func (ListArgs) Validate ¶
func (c ListArgs) Validate() api.StatusError
Validate validates the data in the list args
type ListBlockedWordsArgs ¶
type ListBlockedWordsArgs struct {
Authorization
}
ListBlockedWordsArgs lists all the blocked words for the channel
func (ListBlockedWordsArgs) Validate ¶
func (b ListBlockedWordsArgs) Validate() api.StatusError
Validate validates the data in the args
type ListDelegateResponse ¶
type ListDelegateResponse struct {
Delegates []Delegate
}
ListDelegateResponse response for modifying the delegates
type ListDelegatesArgs ¶
type ListDelegatesArgs struct { Authorization CreatorChannelID string `json:"creator_channel_id"` CreatorChannelName string `json:"creator_channel_name"` }
ListDelegatesArgs Arguments to list delegates
func (*ListDelegatesArgs) Validate ¶
func (ld *ListDelegatesArgs) Validate() api.StatusError
Validate validates the data in the ListDelegates args
type ListResponse ¶
type ListResponse struct { Page int `json:"page"` PageSize int `json:"page_size"` TotalPages int `json:"total_pages"` TotalItems int64 `json:"total_items"` TotalFilteredItems int64 `json:"total_filtered_items"` Items []CommentItem `json:"items,omitempty"` HasHiddenComments bool `json:"has_hidden_comments"` HasProtectedComments bool `json:"has_protected_comments"` }
ListResponse response for the comment.List rpc call
type ListSettingsArgs ¶
type ListSettingsArgs struct {
Authorization
}
ListSettingsArgs arguments passed to settings.List api
type ListSettingsResponse ¶
type ListSettingsResponse struct { // CSV list of containing words to block comment on content Words *string `json:"words,omitempty"` CommentsEnabled *bool `json:"comments_enabled"` MinTipAmountComment *float64 `json:"min_tip_amount_comment"` MinTipAmountSuperChat *float64 `json:"min_tip_amount_super_chat"` SlowModeMinGap *uint64 `json:"slow_mode_min_gap"` CurseJarAmount *uint64 `json:"curse_jar_amount"` FiltersEnabled *bool `json:"filters_enabled,omitempty"` ChatOverlay *bool `json:"chat_overlay"` ChatOverlayPosition *string `json:"chat_overlay_position"` ChatRemoveComment *uint64 `json:"chat_remove_comment"` StickerOverlay *bool `json:"sticker_overlay"` StickerOverlayKeep *bool `json:"sticker_overlay_keep"` StickerOverlayRemove *uint64 `json:"sticker_overlay_remove"` ViewercountOverlay *bool `json:"viewercount_overlay"` ViewercountOverlayPosition *string `json:"viewercount_overlay_position"` ViewercountChatBot *bool `json:"viewercount_chat_bot"` TipgoalOverlay *bool `json:"tipgoal_overlay"` TipgoalAmount *uint64 `json:"tipgoal_amount"` TipgoalOverlayPosition *string `json:"tipgoal_overlay_position"` TipgoalPreviousDonations *bool `json:"tipgoal_previous_donations"` TipgoalCurrency *string `json:"tipgoal_currency"` TimeSinceFirstComment *uint64 `json:"time_since_first_comment"` PublicShowProtected *bool `json:"public_show_protected"` PrivateShowProtected *bool `json:"private_show_protected"` LivestreamChatMembersOnly *bool `json:"livestream_chat_members_only"` CommentsMembersOnly *bool `json:"comments_members_only"` ChannelSections null.JSON `json:"channel_sections,omitempty"` HomepageSettings null.JSON `json:"homepage_settings,omitempty"` }
ListSettingsResponse returns all the settings for creator/user
type MentionedChannel ¶
type MentionedChannel struct { ChannelName string `json:"channel_name"` ChannelID string `json:"channel_id"` }
MentionedChannel channels mentioned in comment
type ModAuthorization ¶
type ModAuthorization struct { //Publisher, Moderator or Commentron Admin ModChannelID string `json:"mod_channel_id"` ModChannelName string `json:"mod_channel_name"` //Creator that Moderator is delegated from. Used for delegated moderation CreatorChannelID string `json:"creator_channel_id"` CreatorChannelName string `json:"creator_channel_name"` Signature string `json:"signature"` SigningTS string `json:"signing_ts"` }
ModAuthorization parameters for calls requiring creator/moderator authentication
type PinArgs ¶
type PinArgs struct { Authorization CommentID string `json:"comment_id"` Remove bool `json:"remove"` }
PinArgs arguments for the comment.Pin rpc call. The comment id must be signed with a timestamp for authentication.
type PinResponse ¶
type PinResponse struct {
Item CommentItem `json:"items,omitempty"`
}
PinResponse response for the comment.Pin rpc call
type ReactArgs ¶
type ReactArgs struct { Authorization CommentIDs string `json:"comment_ids"` Remove bool `json:"remove"` ClearTypes string `json:"clear_types"` Type string `json:"type"` }
ReactArgs are the arguments passed to comment.Abandon RPC call
type ReactResponse ¶
type ReactResponse struct {
Reactions
}
ReactResponse the response to the abandon call
type ReactionListArgs ¶
type ReactionListArgs struct { Authorization CommentIDs string `json:"comment_ids"` Types *string }
ReactionListArgs are the arguments passed to comment.Abandon RPC call
func (ReactionListArgs) Validate ¶
func (rl ReactionListArgs) Validate() api.StatusError
Validate validates the data in the list args
type ReactionListResponse ¶
type ReactionListResponse struct { MyReactions Reactions `json:"my_reactions,omitempty"` OthersReactions Reactions `json:"others_reactions"` }
ReactionListResponse the response to the abandon call
type Reactions ¶
type Reactions map[string]CommentReaction
Reactions a map structure where the key is the comment_id and the value is a CommentReaction
type RemoveDelegateArgs ¶
type RemoveDelegateArgs struct { Authorization //This is for backwards compatibility, Authorization parameters should be used, not these! CreatorChannelID string `json:"creator_channel_id"` CreatorChannelName string `json:"creator_channel_name"` //Who is being removed from delegated authority? ModChannelID string `json:"mod_channel_id"` ModChannelName string `json:"mod_channel_name"` }
RemoveDelegateArgs Arguments to remove a delegated moderator.
func (*RemoveDelegateArgs) Validate ¶
func (rd *RemoveDelegateArgs) Validate() api.StatusError
Validate validates the data in the RemoveDelegate args
type SharedBlockedList ¶
type SharedBlockedList struct { string `json:"name"` // The category of block list this is so others search MemberInviteEnabled *bool `json:"member_invite_enabled"` // Strikes are number of hours a user should be banned for if // part of this blocked list. Strikes 1,2,3 are intended to be // progressively higher. Strike 3 is the highest. InviteExpiration *uint64 `json:"invite_expiration"` // the shared blocked list their appeal is automatically accepted. CurseJarAmount *uint64 `json:"curse_jar_amount"` }Name *
SharedBlockedList default representation of a shared blocked
type SharedBlockedListGetArgs ¶
type SharedBlockedListGetArgs struct {}
SharedBlockedListGetArgs arguments for blocklist.Get
type SharedBlockedListGetResponse ¶
type SharedBlockedListGetResponse struct {}
SharedBlockedListGetResponse response for blocklist.Get
type SharedBlockedListInvitation ¶
type SharedBlockedListInvitation struct {}
SharedBlockedListInvitation represents an invitation to a specific shared blocked list and the status
type SharedBlockedListInviteAcceptArgs ¶
type SharedBlockedListInviteAcceptArgs struct {}
SharedBlockedListInviteAcceptArgs arguments for blocklist.Accept
type SharedBlockedListInviteAcceptResponse ¶
type SharedBlockedListInviteAcceptResponse struct { }
SharedBlockedListInviteAcceptResponse response for blocklist.Accept
type SharedBlockedListInviteArgs ¶
type SharedBlockedListInviteArgs struct {}
SharedBlockedListInviteArgs arguments for blocklist.Invite
type SharedBlockedListInviteResponse ¶
type SharedBlockedListInviteResponse struct { }
SharedBlockedListInviteResponse empty respose for blocklist.Invite
type SharedBlockedListInvitedMember ¶
type SharedBlockedListInvitedMember struct {}
SharedBlockedListInvitedMember representation of an InvitedMember
type SharedBlockedListListInvitesArgs ¶
type SharedBlockedListListInvitesArgs struct {
}SharedBlockedListListInvitesArgs arguments for blocklist.ListInvites
type SharedBlockedListListInvitesResponse ¶
type SharedBlockedListListInvitesResponse struct {
}SharedBlockedListListInvitesResponse response for blocklist.ListInvites
type SharedBlockedListRescindArgs ¶
type SharedBlockedListRescindArgs struct {}
SharedBlockedListRescindArgs arguments for blocklist.Rescind
type SharedBlockedListRescindResponse ¶
type SharedBlockedListRescindResponse struct { }
SharedBlockedListRescindResponse response for blocklist.Rescind
type SharedBlockedListUpdateArgs ¶
type SharedBlockedListUpdateArgs struct {}
SharedBlockedListUpdateArgs use for blockedlist.Update api
func (SharedBlockedListUpdateArgs) Validate ¶
func (a SharedBlockedListUpdateArgs) Validate() api.StatusError
Validate validates the data in the update args
type SignatureArgs ¶
type SignatureArgs struct { //Channel ID claiming to have signed the signature ChannelID string `json:"channel_id"` //Claim ID of the content being validated. This is optional. ClaimID string `json:"claim_id"` //The data payload in Hex that was signed DataHex string `json:"data_hex"` //Signature and timestamp returned from the channel_sign api of LBRY SDK Signature string `json:"signature"` SigningTS string `json:"signing_ts"` }
SignatureArgs Arguments to verify the signature from a LBRY SDK
type SignatureResponse ¶
type SignatureResponse struct {
IsValid bool `json:"is_valid"`
}
SignatureResponse for the verify.Signature call
type Sort ¶
type Sort int
Sort defines the type of sort for the comment.List api
const ( // Newest sorts the comments by newest first Newest Sort = iota // Oldest sorts the comments from first to last Oldest // Controversy sorts the comments by controversy Controversy // Popularity sorts the comments by how popular it is Popularity // NewestNoPins sorts the comments by newest first but removes the presort for pinned comments NewestNoPins )
type SuperListArgs ¶
type SuperListArgs struct { Authorization RequestorChannelName string `json:"requestor_channel_name"` // Used for Author ID filter authorization Only your comments! RequestorChannelID *string `json:"requestor_channel_id"` // Used for Author ID filter authorization ClaimID *string `json:"claim_id"` AuthorClaimID *string `json:"author_claim_id"` ParentID *string `json:"parent_id"` Page int `json:"page"` PageSize int `json:"page_size"` TopLevel bool `json:"top_level"` Hidden bool `json:"hidden"` // Satoshi amount to filter below >= x SuperChatsAmount int `json:"super_chat"` IsProtected bool `json:"is_protected"` }
SuperListArgs arguments for the comment.List rpc call
func (*SuperListArgs) ApplyDefaults ¶
func (c *SuperListArgs) ApplyDefaults()
ApplyDefaults applies the default values for arguments passed that are different from normal defaults.
func (SuperListArgs) Key ¶
func (c SuperListArgs) Key() (string, error)
Key returns the hash of the list args struct for caching
type SuperListResponse ¶
type SuperListResponse struct { Page int `json:"page"` PageSize int `json:"page_size"` TotalPages int `json:"total_pages"` TotalItems int64 `json:"total_items"` TotalAmount float64 `json:"total_amount"` Items []CommentItem `json:"items,omitempty"` HasHiddenComments bool `json:"has_hidden_comments"` HasProtectedComments bool `json:"has_protected_comments"` }
SuperListResponse response for the comment.List rpc call
type UnBlockArgs ¶
type UnBlockArgs struct { ModAuthorization //Offender being unblocked UnBlockedChannelID string `json:"un_blocked_channel_id"` UnBlockedChannelName string `json:"un_blocked_channel_name"` // Unblocks identity from commenting universally, requires Admin rights on commentron instance GlobalUnBlock bool `json:"global_un_block"` }
UnBlockArgs Arguments to un-block identities from commenting for both publisher and moderators
type UnBlockResponse ¶
type UnBlockResponse struct { UnBlockedChannelID string `json:"un_blocked_channel_id"` GlobalUnBlock bool `json:"global_un_block"` //Publisher ban removed from if not universally unblocked UnBlockedFrom *string `json:"un_blocked_from"` }
UnBlockResponse for the moderation.UnBlock rpc call
type UnBlockWordArgs ¶
type UnBlockWordArgs struct { Authorization // CSV list of containing words to block comment on content Words string `json:"words"` }
UnBlockWordArgs arguments passed to settings.UnBlockWord. Removes if exists
func (UnBlockWordArgs) Validate ¶
func (b UnBlockWordArgs) Validate() api.StatusError
Validate validates the data in the args
type UpdateSettingsArgs ¶
type UpdateSettingsArgs struct { Authorization CommentsEnabled *bool `json:"comments_enabled"` MinTipAmountComment *float64 `json:"min_tip_amount_comment"` MinTipAmountSuperChat *float64 `json:"min_tip_amount_super_chat"` SlowModeMinGap *uint64 `json:"slow_mode_min_gap"` CurseJarAmount *uint64 `json:"curse_jar_amount"` FiltersEnabled *bool `json:"filters_enabled"` ChatOverlay *bool `json:"chat_overlay"` ChatOverlayPosition *string `json:"chat_overlay_position"` ChatRemoveComment *uint64 `json:"chat_remove_comment"` StickerOverlay *bool `json:"sticker_overlay"` StickerOverlayKeep *bool `json:"sticker_overlay_keep"` StickerOverlayRemove *uint64 `json:"sticker_overlay_remove"` ViewercountOverlay *bool `json:"viewercount_overlay"` ViewercountOverlayPosition *string `json:"viewercount_overlay_position"` ViewercountChatBot *bool `json:"viewercount_chat_bot"` TipgoalOverlay *bool `json:"tipgoal_overlay"` TipgoalAmount *uint64 `json:"tipgoal_amount"` TipgoalOverlayPosition *string `json:"tipgoal_overlay_position"` TipgoalPreviousDonations *bool `json:"tipgoal_previous_donations"` TipgoalCurrency *string `json:"tipgoal_currency"` // Minutes since first comment when users are allowed to comment on your content/livestream TimeSinceFirstComment *uint64 `json:"time_since_first_comment"` PrivateShowProtected *bool `json:"private_show_protected"` PublicShowProtected *bool `json:"public_show_protected"` LivestreamChatMembersOnly *bool `json:"livestream_chat_members_only"` CommentsMembersOnly *bool `json:"comments_members_only"` ActiveClaimID *string `json:"active_claim_id"` ChannelSections null.JSON `json:"channel_sections,omitempty"` HomepageSettings null.JSON `json:"homepage_settings,omitempty"` }
UpdateSettingsArgs arguments for different settings that could be set
func (UpdateSettingsArgs) Validate ¶
func (u UpdateSettingsArgs) Validate() api.StatusError
Validate validates the data in the args
type Validator ¶
type Validator interface {
Validate() api.StatusError
}
Validator for api arguments that should have some checks applied for every request.