types

package
v2.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NotificationTypeKey    = "type"
	TransactionHashKey     = "tx_hash"
	TransactionErrorKey    = "tx_error"
	RecipientKey           = "recipient"
	SubspaceIDKey          = "subspace_id"
	RelationshipCreatorKey = "relationship_creator"
	PostIDKey              = "post_id"
	PostAuthorKey          = "post_author"
	RepostIDKey            = "repost_id"
	RepostAuthorKey        = "repost_author"
	CommentIDKey           = "comment_id"
	CommentAuthorKey       = "comment_author"
	ReplyIDKey             = "reply_id"
	ReplyAuthorKey         = "reply_author"
	QuoteIDKey             = "quote_id"
	QuoteAuthorKey         = "quote_author"
	ReactionIDKey          = "reaction_id"
	ReactionAuthorKey      = "reaction_author"

	ClickActionKey   = "click_action"
	ClickActionValue = "open"

	NotificationActionKey = "action"
	ActionOpenPost        = "open_post"
	ActionOpenProfile     = "open_profile"

	TypeTransactionSuccess = "transaction_success"
	TypeTransactionFailed  = "transaction_fail"
	TypeFollow             = "follow"
	TypeReply              = "reply"
	TypeComment            = "comment"
	TypeRepost             = "repost"
	TypeQuote              = "quote"
	TypeMention            = "mention"
	TypeReaction           = "reaction"
)
View Source
const (
	ContractTypeTips = "tips"
)
View Source
const (
	Year = time.Hour * 24 * 365
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationLink struct {
	profilestypes.ApplicationLink
	Height int64
}
func NewApplicationLink(link profilestypes.ApplicationLink, height int64) ApplicationLink

type ApplicationLinkInfo

type ApplicationLinkInfo struct {
	User        string
	Application string
	Username    string
}

func NewApplicationInfo

func NewApplicationInfo(user, application, username string) ApplicationLinkInfo

type AuthzGrant

type AuthzGrant struct {
	Granter       string
	Grantee       string
	Authorization authz.Authorization
	Expiration    *time.Time
	Height        int64
}

func NewAuthzGrant

func NewAuthzGrant(granter, grantee string, authorization authz.Authorization, expiration *time.Time, height int64) AuthzGrant

type Blockage

type Blockage struct {
	relationshipstypes.UserBlock
	Height int64
}

func NewBlockage

func NewBlockage(blockage relationshipstypes.UserBlock, height int64) Blockage
type ChainLink struct {
	profilestypes.ChainLink
	Height int64
}
func NewChainLink(link profilestypes.ChainLink, height int64) ChainLink

type Contract

type Contract struct {
	Address  string
	Type     string
	ConfigBz []byte
	Height   int64
}

func NewContract

func NewContract(address string, contractType string, contactConfigBz []byte, height int64) Contract

type DTagTransferRequest

type DTagTransferRequest struct {
	profilestypes.DTagTransferRequest
	Height int64
}

func NewDTagTransferRequest

func NewDTagTransferRequest(request profilestypes.DTagTransferRequest, height int64) DTagTransferRequest

type FeeGrant

type FeeGrant struct {
	Granter   string
	Grantee   string
	Allowance feegrant.FeeAllowanceI
	Height    int64
}

func NewFeeGrant

func NewFeeGrant(granter string, grantee string, allowance feegrant.FeeAllowanceI, height int64) FeeGrant

func (FeeGrant) GetExpirationDate

func (grant FeeGrant) GetExpirationDate() (*time.Time, error)

func (FeeGrant) GetSpendLimit

func (grant FeeGrant) GetSpendLimit() (sdk.Coins, error)

type MsgSendTip

type MsgSendTip struct {
	Amount sdk.Coins         `json:"amount"`
	Target *MsgSendTipTarget `json:"target"`
}

type MsgSendTipTarget

type MsgSendTipTarget struct {
	User    *TargetUser    `json:"user_target"`
	Content *TargetContent `json:"content_target"`
}

func (*MsgSendTipTarget) Equal

func (t *MsgSendTipTarget) Equal(u *MsgSendTipTarget) bool

type MultiNotificationMessage

type MultiNotificationMessage struct {
	*messaging.MulticastMessage
}

func NewMultiNotificationMessage

func NewMultiNotificationMessage(message *messaging.MulticastMessage) *MultiNotificationMessage

type Notification

type Notification struct {
	Recipient NotificationRecipient
	Type      string
	Data      map[string]string
	Timestamp time.Time
}

func NewNotification

func NewNotification(recipient NotificationRecipient, notificationType string, data map[string]string, timestamp time.Time) Notification

type NotificationData

type NotificationData interface {
	GetType() string
	GetNotification() *messaging.Notification
	GetAdditionalData() map[string]string
}

type NotificationDataWithConfig

type NotificationDataWithConfig interface {
	NotificationData
	GetAndroidConfig() *messaging.AndroidConfig
	GetAPNSConfig() *messaging.APNSConfig
	GetWebpushConfig() *messaging.WebpushConfig
}

type NotificationMessage

type NotificationMessage interface {
	// contains filtered or unexported methods
}

type NotificationRecipient

type NotificationRecipient interface {
	GetValue() string
	String() string
}

NotificationRecipient represents a generic Firebase message recipient

func NewNotificationTopicRecipient

func NewNotificationTopicRecipient(topic string) NotificationRecipient

func NewNotificationUserRecipient

func NewNotificationUserRecipient(address string) NotificationRecipient

type NotificationToken

type NotificationToken struct {
	UserAddress string
	Token       string
	Timestamp   time.Time
}

func NewNotificationToken

func NewNotificationToken(userAddress string, token string, timestamp time.Time) NotificationToken

type NotificationTopicRecipient

type NotificationTopicRecipient struct {
	Topic string
}

NotificationTopicRecipient represents a topic Firebase message recipient. Once this type if used, all the applications subscribed to the specified topic will receive the notification

func (*NotificationTopicRecipient) GetValue

func (recipient *NotificationTopicRecipient) GetValue() string

func (*NotificationTopicRecipient) String

func (recipient *NotificationTopicRecipient) String() string

type NotificationUserRecipient

type NotificationUserRecipient struct {
	Address string
}

NotificationUserRecipient represents a single user Firebase message recipient. Once this type is used as the recipient of a notification, the user will receive a notification on all and only their personal devices

func (*NotificationUserRecipient) GetValue

func (recipient *NotificationUserRecipient) GetValue() string

func (*NotificationUserRecipient) String

func (recipient *NotificationUserRecipient) String() string

type PollAnswer

type PollAnswer struct {
	poststypes.UserAnswer
	Height int64
}

func NewPollAnswer

func NewPollAnswer(answer poststypes.UserAnswer, height int64) PollAnswer

type Post

type Post struct {
	poststypes.Post
	Height int64
}

func NewPost

func NewPost(post poststypes.Post, height int64) Post

type PostAttachment

type PostAttachment struct {
	poststypes.Attachment
	Height int64
}

func NewPostAttachment

func NewPostAttachment(attachment poststypes.Attachment, height int64) PostAttachment

type PostTarget

type PostTarget struct {
	PostID uint64
}

func NewPostTarget

func NewPostTarget(postID uint64) PostTarget

type PostTransaction

type PostTransaction struct {
	SubspaceID uint64
	PostID     uint64
	Hash       string
}

func NewPostTransaction

func NewPostTransaction(subspaceID uint64, postID uint64, txHash string) PostTransaction

type PostsParams

type PostsParams struct {
	poststypes.Params
	Height int64
}

func NewPostsParams

func NewPostsParams(params poststypes.Params, height int64) PostsParams

type Profile

type Profile struct {
	*profilestypes.Profile
	Height int64
}

func NewProfile

func NewProfile(profile *profilestypes.Profile, height int64) *Profile

type ProfileScore

type ProfileScore struct {
	DesmosAddress string
	Application   string
	Username      string
	Details       ProfileScoreDetails
	Timestamp     time.Time
}

func NewApplicationLinkScore

func NewApplicationLinkScore(address string, application string, username string, details ProfileScoreDetails, timestamp time.Time) *ProfileScore

type ProfileScoreDetails

type ProfileScoreDetails interface {
	GetScore() uint64
}

type ProfilesParams

type ProfilesParams struct {
	profilestypes.Params
	Height int64
}

func NewProfilesParams

func NewProfilesParams(params profilestypes.Params, height int64) ProfilesParams

type Reaction

type Reaction struct {
	reactionstypes.Reaction
	Height int64
}

func NewReaction

func NewReaction(reaction reactionstypes.Reaction, height int64) Reaction

type ReactionParams

type ReactionParams struct {
	reactionstypes.SubspaceReactionsParams
	Height int64
}

func NewReactionParams

func NewReactionParams(params reactionstypes.SubspaceReactionsParams, height int64) ReactionParams

type Reason

type Reason struct {
	reportstypes.Reason
	Height int64
}

func NewReason

func NewReason(reason reportstypes.Reason, height int64) Reason

type RegisteredReaction

type RegisteredReaction struct {
	reactionstypes.RegisteredReaction
	Height int64
}

func NewRegisteredReaction

func NewRegisteredReaction(reaction reactionstypes.RegisteredReaction, height int64) RegisteredReaction

type Relationship

type Relationship struct {
	relationshipstypes.Relationship
	Height int64
}

func NewRelationship

func NewRelationship(relationship relationshipstypes.Relationship, height int64) Relationship

type Report

type Report struct {
	reportstypes.Report
	Height int64
}

func NewReport

func NewReport(report reportstypes.Report, height int64) Report

type ReportsParams

type ReportsParams struct {
	reportstypes.Params
	Height int64
}

func NewReportsParams

func NewReportsParams(params reportstypes.Params, height int64) ReportsParams

type Section

type Section struct {
	subspacestypes.Section
	Height int64
}

func NewSection

func NewSection(section subspacestypes.Section, height int64) Section

type SingleNotificationMessage

type SingleNotificationMessage struct {
	*messaging.Message
}

func NewSingleNotificationMessage

func NewSingleNotificationMessage(message *messaging.Message) *SingleNotificationMessage

type StdNotificationDataWithConfig

type StdNotificationDataWithConfig struct {
	Type         string
	Data         map[string]string
	Notification *messaging.Notification
	Android      *messaging.AndroidConfig
	APNS         *messaging.APNSConfig
	Webpush      *messaging.WebpushConfig
	Timestamp    time.Time
}

func NewStdNotificationDataWithConfig

func NewStdNotificationDataWithConfig(notification *messaging.Notification, data map[string]string) *StdNotificationDataWithConfig

func (StdNotificationDataWithConfig) GetAPNSConfig

func (StdNotificationDataWithConfig) GetAdditionalData

func (s StdNotificationDataWithConfig) GetAdditionalData() map[string]string

func (StdNotificationDataWithConfig) GetAndroidConfig

func (StdNotificationDataWithConfig) GetNotification

func (StdNotificationDataWithConfig) GetType

func (StdNotificationDataWithConfig) GetWebpushConfig

func (StdNotificationDataWithConfig) WithAPNSConfig

func (StdNotificationDataWithConfig) WithAndroidConfig

func (StdNotificationDataWithConfig) WithWebpushConfig

type Subspace

type Subspace struct {
	subspacestypes.Subspace
	Height int64
}

func NewSubspace

func NewSubspace(subspace subspacestypes.Subspace, height int64) Subspace

type Target

type Target interface {
	// contains filtered or unexported methods
}

type TargetContent

type TargetContent struct {
	PostID string `json:"post_id"`
}

type TargetUser

type TargetUser struct {
	Receiver string `json:"receiver"`
}

type Tip

type Tip struct {
	SubspaceID uint64
	Sender     string
	Target     Target
	Amount     sdk.Coins
	Height     int64
}

func NewTip

func NewTip(subspaceID uint64, sender string, target Target, amount sdk.Coins, height int64) Tip

type TipMsg

type TipMsg struct {
	SendTip *MsgSendTip `json:"send_tip,omitempty"`
}

type UserGroup

type UserGroup struct {
	subspacestypes.UserGroup
	Height int64
}

func NewUserGroup

func NewUserGroup(group subspacestypes.UserGroup, height int64) UserGroup

type UserGroupMember

type UserGroupMember struct {
	SubspaceID uint64
	GroupID    uint32
	Member     string
	Height     int64
}

func NewUserGroupMember

func NewUserGroupMember(subspaceID uint64, groupID uint32, member string, height int64) UserGroupMember

type UserPermission

type UserPermission struct {
	subspacestypes.UserPermission
	Height int64
}

func NewUserPermission

func NewUserPermission(permission subspacestypes.UserPermission, height int64) UserPermission

type UserTarget

type UserTarget struct {
	Address string
}

func NewUserTarget

func NewUserTarget(address string) UserTarget

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL