utils

package
v0.0.0-...-e0ac650 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccountBind

func AccountBind(props *BindAccountProps) (bool, string, error)

func AccountOnChainPause

func AccountOnChainPause(account *models.Account, message string)

func AccountOnChainResume

func AccountOnChainResume(account *models.Account)

func AccountUnbind

func AccountUnbind(props *UnbindAccountProps) (bool, string, error)

func CheckAndTerminateIfNeed

func CheckAndTerminateIfNeed(account *models.Account) bool

func CheckOnChainData

func CheckOnChainData(crossbellCharacterID string) (bool, []commonTypes.Account, error)

func CreateOrRecoverCharacter

func CreateOrRecoverCharacter(crossbellCharacterID string) (*models.Character, error)

func FeedOnChainDispatchWork

func FeedOnChainDispatchWork(account *models.Account, feeds []models.Feed)

func IsAccountOnChainPaused

func IsAccountOnChainPaused(account *models.Account) bool

func IsInConnectedAccounts

func IsInConnectedAccounts(platform string, username string, connectedAccounts []commonTypes.Account) bool

func OneFeedOnChain

func OneFeedOnChain(account *models.Account, feed *models.Feed) (string, string, int64, int64, error, bool)

func TerminateAccount

func TerminateAccount(account *models.Account)

func TerminateCharacter

func TerminateCharacter(characterId string)

func ValidateAccount

func ValidateAccount(crossbellCharacterID string, platform string, username string) (bool, error)

Types

type BindAccountProps

type BindAccountProps struct {
	// Basic information
	CrossbellCharacterID string
	Platform             string
	Username             string

	// Advanced options
	StartFrom time.Time
	IsInherit bool
}

type UnbindAccountProps

type UnbindAccountProps struct {
	// Basic information
	CrossbellCharacterID string
	Platform             string
	Username             string
}

Jump to

Keyboard shortcuts

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