Documentation ¶
Index ¶
- Constants
- Variables
- type AchievementInitEvent
- type AchievementInitHandler
- type AchievementRecalculateEvent
- type AchievementRecalculateHandler
- type AchievementType
- type FeedHandler
- type FeedPayload
- type FeedSettingsHandler
- type FeedSettingsPayload
- type PushClickHandler
- type PushClickPayload
- type PushHandler
- type PushPayload
- type PushVersion
- type TimelineAction
- type TimelineItem
- type Type
- type VoteHandler
- type VotePayload
Constants ¶
View Source
const ( SubjectInitAchievement = "inbox.achievement.init" SubjectRecalculateAchievement = "inbox.achievement.recalculate" )
View Source
const ( SubjectFeedUpdated = "inbox.feed.updated" SubjectFeedSettingsUpdated = "inbox.feed.settings.updated" )
View Source
const ( DaoCreated TimelineAction = "dao.created" DaoUpdated TimelineAction = "dao.updated" ProposalCreated TimelineAction = "proposal.created" ProposalUpdated TimelineAction = "proposal.updated" ProposalVotingStartsSoon TimelineAction = "proposal.voting.starts_soon" ProposalVotingEndsSoon TimelineAction = "proposal.voting.ends_soon" ProposalVotingStarted TimelineAction = "proposal.voting.started" ProposalVotingQuorumReached TimelineAction = "proposal.voting.quorum_reached" ProposalVotingEnded TimelineAction = "proposal.voting.ended" DelegateCreateProposal TimelineAction = "delegate.proposal.created" DelegateVotingVoted TimelineAction = "delegate.voting.voted" DelegateVotingSkipVote TimelineAction = "delegate.voting.skip_vote" TypeDao Type = "dao" TypeProposal Type = "proposal" TypeDelegate Type = "delegate" )
View Source
const ( SubjectPushCreated = "inbox.push.created" SubjectPushClicked = "inbox.push.clicked" PushVersionV1 = "v1" PushVersionV2 = "v2" )
View Source
const (
SubjectVoteCreated = "inbox.vote.created"
)
Variables ¶
View Source
var ( ErrUnsupportedPayload = errors.New("unsupported payload") ErrWrongPayload = errors.New("wrong payload") )
Functions ¶
This section is empty.
Types ¶
type AchievementInitEvent ¶ added in v0.2.2
type AchievementInitHandler ¶ added in v0.2.2
type AchievementInitHandler = events.Handler[AchievementInitEvent]
type AchievementRecalculateEvent ¶ added in v0.2.2
type AchievementRecalculateEvent struct { UserID uuid.UUID `json:"user_id"` Type AchievementType `json:"type"` }
type AchievementRecalculateHandler ¶ added in v0.2.2
type AchievementRecalculateHandler = events.Handler[AchievementRecalculateEvent]
type AchievementType ¶ added in v0.2.2
type AchievementType string
const ( AchievementTypeAppInfo AchievementType = "app_info" AchievementTypeVote AchievementType = "vote" )
type FeedHandler ¶
type FeedHandler = events.Handler[FeedPayload]
type FeedPayload ¶
type FeedPayload struct { ID uuid.UUID `json:"id"` DaoID uuid.UUID `json:"dao_id"` ProposalID string `json:"proposal_id,omitempty"` DiscussionID string `json:"discussion_id,omitempty"` Type Type `json:"type"` Action TimelineAction `json:"action"` Snapshot json.RawMessage `json:"snapshot"` Timeline []TimelineItem `json:"timeline"` }
func (*FeedPayload) GetDAO ¶
func (f *FeedPayload) GetDAO() (*core.DaoPayload, error)
func (*FeedPayload) GetProposal ¶
func (f *FeedPayload) GetProposal() (*core.ProposalPayload, error)
type FeedSettingsHandler ¶ added in v0.2.7
type FeedSettingsHandler = events.Handler[FeedSettingsPayload]
type FeedSettingsPayload ¶ added in v0.2.7
type PushClickHandler ¶
type PushClickHandler = events.Handler[PushClickPayload]
type PushClickPayload ¶
type PushHandler ¶
type PushHandler = events.Handler[PushPayload]
type PushPayload ¶
type PushPayload struct { Title string `json:"title"` Body string `json:"body"` ImageURL string `json:"image_url"` UserID uuid.UUID `json:"user_id"` Version PushVersion `json:"version,omitempty"` CustomPayload json.RawMessage `json:"custom_payload,omitempty"` }
type PushVersion ¶
type PushVersion string
type TimelineAction ¶
type TimelineAction string
type TimelineItem ¶
type TimelineItem struct { CreatedAt time.Time `json:"created_at"` Action TimelineAction `json:"action"` }
type VoteHandler ¶ added in v0.2.7
type VoteHandler = events.Handler[VotePayload]
Click to show internal directories.
Click to hide internal directories.