service

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2024 License: LGPL-2.1 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectClient

func ConnectClient(message []byte, protocol constants.Protocol, client interface{}) (*entities.ClientHandshake, error)

func HandleNewPubSubAuthEvent

func HandleNewPubSubAuthEvent(event *entities.Event, ctx *context.Context)

func HandleNewPubSubMessageEvent

func HandleNewPubSubMessageEvent(event *entities.Event, ctx *context.Context)

func HandleNewPubSubSubnetEvent

func HandleNewPubSubSubnetEvent(event *entities.Event, ctx *context.Context)

func HandleNewPubSubSubscriptionEvent

func HandleNewPubSubSubscriptionEvent(event *entities.Event, ctx *context.Context)

func HandleNewPubSubTopicEvent

func HandleNewPubSubTopicEvent(event *entities.Event, ctx *context.Context)

func HandleNewPubSubWalletEvent

func HandleNewPubSubWalletEvent(event *entities.Event, ctx *context.Context)

func IsMoreRecent

func IsMoreRecent(
	currenStatetEventId string,
	currenStatetHash string,
	currentStateEventTimestamp int,
	eventHash string,
	eventPayloadTimestamp int,
	markedAsSynced bool,
) (isMoreRecent bool, markAsSynced bool)

func ValidateAuthData

func ValidateAuthData(auth *entities.Authorization, addressPrefix string) (prevAuthState *models.AuthorizationState, grantorAuthState *models.AuthorizationState, err error)

func ValidateEvent

func ValidateEvent(event interface{}) error

func ValidateMessageClient

func ValidateMessageClient(
	ctx *context.Context,
	clientHandshake *entities.ClientHandshake,
) error

func ValidateMessageData

func ValidateMessageData(message *entities.Message, payload *entities.ClientPayload) (currentMessageState *models.MessageState, err error)

Validate an agent authorization

func ValidateSubnetData

func ValidateSubnetData(subnet *entities.Subnet, addressPrefix string) (currentSubnetState *models.SubnetState, err error)

Validate an agent authorization

func ValidateSubscriptionData

func ValidateSubscriptionData(subscription *entities.Subscription, payload *entities.ClientPayload) (currentSubscriptionState *models.SubscriptionState, err error)

Validate an agent authorization

func ValidateTopicData

func ValidateTopicData(topic *entities.Topic) (currentTopicState *models.TopicState, err error)

Validate an agent authorization

func ValidateWalletData

func ValidateWalletData(Wallet *entities.Wallet) (currentWalletState *models.WalletState, err error)

Validate an agent authorization

Types

This section is empty.

Jump to

Keyboard shortcuts

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