community

package
v0.172.5 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventCommmunityDataUpdated walletevent.EventType = "wallet-community-data-updated"
)

These events are used to notify the UI of state changes

Variables

This section is empty.

Functions

This section is empty.

Types

type Data added in v0.171.39

type Data struct {
	ID    string `json:"id"`
	Name  string `json:"name"`
	Color string `json:"color"`
	Image string `json:"image,omitempty"`
}

type DataDB

type DataDB struct {
	// contains filtered or unexported fields
}

func NewDataDB

func NewDataDB(sqlDb *sql.DB) *DataDB

func (*DataDB) GetCommunityInfo

func (o *DataDB) GetCommunityInfo(id string) (*thirdparty.CommunityInfo, *InfoState, error)

func (*DataDB) SetCommunityInfo

func (o *DataDB) SetCommunityInfo(id string, c *thirdparty.CommunityInfo) (err error)

type InfoState added in v0.171.21

type InfoState struct {
	LastUpdateTimestamp uint64
	LastUpdateSuccesful bool
}

type Manager added in v0.171.34

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager added in v0.171.34

func NewManager(db *sql.DB, mediaServer *server.MediaServer, feed *event.Feed) *Manager

func (*Manager) FetchCommunityInfo added in v0.171.34

func (cm *Manager) FetchCommunityInfo(communityID string) (*thirdparty.CommunityInfo, error)

func (*Manager) FetchCommunityMetadata added in v0.172.1

func (cm *Manager) FetchCommunityMetadata(communityID string) (*thirdparty.CommunityInfo, error)

func (*Manager) FetchCommunityMetadataAsync added in v0.171.39

func (cm *Manager) FetchCommunityMetadataAsync(communityID string)

func (*Manager) FillCollectibleMetadata added in v0.171.34

func (cm *Manager) FillCollectibleMetadata(c *thirdparty.FullCollectibleData) error

func (*Manager) GetCommunityID added in v0.171.34

func (cm *Manager) GetCommunityID(tokenURI string) string

func (*Manager) GetCommunityImageURL added in v0.172.1

func (cm *Manager) GetCommunityImageURL(communityID string) string

func (*Manager) GetCommunityInfo added in v0.171.34

func (cm *Manager) GetCommunityInfo(id string) (*thirdparty.CommunityInfo, *InfoState, error)

func (*Manager) SetCommunityInfoProvider added in v0.171.34

func (cm *Manager) SetCommunityInfoProvider(communityInfoProvider thirdparty.CommunityInfoProvider)

Used to break circular dependency, call once as soon as possible after initialization

Jump to

Keyboard shortcuts

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