protocol

package
v1.0.58 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: AGPL-3.0 Imports: 4 Imported by: 7

Documentation

Overview

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Package protocol implements the DataStore protocol

Index

Constants

View Source
const (
	// ProtocolID is the protocol ID for the DataStore protocol
	ProtocolID = 0x73

	// MethodPrepareGetObjectV1 is the method ID for the method PrepareGetObjectV1
	MethodPrepareGetObjectV1 = 0x1

	// MethodPreparePostObjectV1 is the method ID for the method PreparePostObjectV1
	MethodPreparePostObjectV1 = 0x2

	// MethodCompletePostObjectV1 is the method ID for the method CompletePostObjectV1
	MethodCompletePostObjectV1 = 0x3

	// MethodDeleteObject is the method ID for the method DeleteObject
	MethodDeleteObject = 0x4

	// MethodDeleteObjects is the method ID for the method DeleteObjects
	MethodDeleteObjects = 0x5

	// MethodChangeMetaV1 is the method ID for the method ChangeMetaV1
	MethodChangeMetaV1 = 0x6

	// MethodChangeMetasV1 is the method ID for the method ChangeMetasV1
	MethodChangeMetasV1 = 0x7

	// MethodGetMeta is the method ID for the method GetMeta
	MethodGetMeta = 0x8

	// MethodGetMetas is the method ID for the method GetMetas
	MethodGetMetas = 0x9

	// MethodPrepareUpdateObject is the method ID for the method PrepareUpdateObject
	MethodPrepareUpdateObject = 0xA

	// MethodCompleteUpdateObject is the method ID for the method CompleteUpdateObject
	MethodCompleteUpdateObject = 0xB

	// MethodSearchObject is the method ID for the method SearchObject
	MethodSearchObject = 0xC

	// MethodGetNotificationURL is the method ID for the method GetNotificationURL
	MethodGetNotificationURL = 0xD

	// MethodGetNewArrivedNotificationsV1 is the method ID for the method GetNewArrivedNotificationsV1
	MethodGetNewArrivedNotificationsV1 = 0xE

	// MethodRateObject is the method ID for the method RateObject
	MethodRateObject = 0xF

	// MethodGetRating is the method ID for the method GetRating
	MethodGetRating = 0x10

	// MethodGetRatings is the method ID for the method GetRatings
	MethodGetRatings = 0x11

	// MethodResetRating is the method ID for the method ResetRating
	MethodResetRating = 0x12

	// MethodResetRatings is the method ID for the method ResetRatings
	MethodResetRatings = 0x13

	// MethodGetSpecificMetaV1 is the method ID for the method GetSpecificMetaV1
	MethodGetSpecificMetaV1 = 0x14

	// MethodPostMetaBinary is the method ID for the method PostMetaBinary
	MethodPostMetaBinary = 0x15

	// MethodTouchObject is the method ID for the method TouchObject
	MethodTouchObject = 0x16

	// MethodGetRatingWithLog is the method ID for the method GetRatingWithLog
	MethodGetRatingWithLog = 0x17

	// MethodPreparePostObject is the method ID for the method PreparePostObject
	MethodPreparePostObject = 0x18

	// MethodPrepareGetObject is the method ID for the method PrepareGetObject
	MethodPrepareGetObject = 0x19

	// MethodCompletePostObject is the method ID for the method CompletePostObject
	MethodCompletePostObject = 0x1A

	// MethodGetNewArrivedNotifications is the method ID for the method GetNewArrivedNotifications
	MethodGetNewArrivedNotifications = 0x1B

	// MethodGetSpecificMeta is the method ID for the method GetSpecificMeta
	MethodGetSpecificMeta = 0x1C

	// MethodGetPersistenceInfo is the method ID for the method GetPersistenceInfo
	MethodGetPersistenceInfo = 0x1D

	// MethodGetPersistenceInfos is the method ID for the method GetPersistenceInfos
	MethodGetPersistenceInfos = 0x1E

	// MethodPerpetuateObject is the method ID for the method PerpetuateObject
	MethodPerpetuateObject = 0x1F

	// MethodUnperpetuateObject is the method ID for the method UnperpetuateObject
	MethodUnperpetuateObject = 0x20

	// MethodPrepareGetObjectOrMetaBinary is the method ID for the method PrepareGetObjectOrMetaBinary
	MethodPrepareGetObjectOrMetaBinary = 0x21

	// MethodGetPasswordInfo is the method ID for the method GetPasswordInfo
	MethodGetPasswordInfo = 0x22

	// MethodGetPasswordInfos is the method ID for the method GetPasswordInfos
	MethodGetPasswordInfos = 0x23

	// MethodGetMetasMultipleParam is the method ID for the method GetMetasMultipleParam
	MethodGetMetasMultipleParam = 0x24

	// MethodCompletePostObjects is the method ID for the method CompletePostObjects
	MethodCompletePostObjects = 0x25

	// MethodChangeMeta is the method ID for the method ChangeMeta
	MethodChangeMeta = 0x26

	// MethodChangeMetas is the method ID for the method ChangeMetas
	MethodChangeMetas = 0x27

	// MethodRateObjects is the method ID for the method RateObjects
	MethodRateObjects = 0x28

	// MethodPostMetaBinaryWithDataID is the method ID for the method PostMetaBinaryWithDataID
	MethodPostMetaBinaryWithDataID = 0x29

	// MethodPostMetaBinariesWithDataID is the method ID for the method PostMetaBinariesWithDataID
	MethodPostMetaBinariesWithDataID = 0x2A

	// MethodRateObjectWithPosting is the method ID for the method RateObjectWithPosting
	MethodRateObjectWithPosting = 0x2B

	// MethodRateObjectsWithPosting is the method ID for the method RateObjectsWithPosting
	MethodRateObjectsWithPosting = 0x2C

	// MethodGetObjectInfos is the method ID for the method GetObjectInfos
	MethodGetObjectInfos = 0x2D

	// MethodSearchObjectLight is the method ID for the method SearchObjectLight
	MethodSearchObjectLight = 0x2E
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Protocol added in v1.0.45

type Protocol struct {
	Server *nex.Server
	// contains filtered or unexported fields
}

Protocol stores all the RMC method handlers for the DataStore protocol and listens for requests

func NewProtocol added in v1.0.45

func NewProtocol(server *nex.Server) *Protocol

NewProtocol returns a new DataStore protocol

func (*Protocol) ChangeMeta added in v1.0.45

func (protocol *Protocol) ChangeMeta(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_types.DataStoreChangeMetaParam) uint32)

ChangeMeta sets the ChangeMeta handler function

func (*Protocol) ChangeMetaV1 added in v1.0.46

func (protocol *Protocol) ChangeMetaV1(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_types.DataStoreChangeMetaParamV1) uint32)

ChangeMetaV1 sets the ChangeMetaV1 handler function

func (*Protocol) ChangeMetas added in v1.0.46

func (protocol *Protocol) ChangeMetas(handler func(err error, packet nex.PacketInterface, callID uint32, dataIDs []uint64, params []*datastore_types.DataStoreChangeMetaParam, transactional bool) uint32)

ChangeMetas sets the ChangeMetas handler function

func (*Protocol) ChangeMetasV1 added in v1.0.46

func (protocol *Protocol) ChangeMetasV1(handler func(err error, packet nex.PacketInterface, callID uint32, dataIDs []uint64, params []*datastore_types.DataStoreChangeMetaParamV1, transactional bool) uint32)

ChangeMetasV1 sets the ChangeMetasV1 handler function

func (*Protocol) CompletePostObject added in v1.0.45

func (protocol *Protocol) CompletePostObject(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_types.DataStoreCompletePostParam) uint32)

CompletePostObject sets the CompletePostObject handler function

func (*Protocol) CompletePostObjectV1 added in v1.0.45

func (protocol *Protocol) CompletePostObjectV1(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_types.DataStoreCompletePostParamV1) uint32)

CompletePostObjectV1 sets the CompletePostObjectV1 handler function

func (*Protocol) CompletePostObjects added in v1.0.45

func (protocol *Protocol) CompletePostObjects(handler func(err error, packet nex.PacketInterface, callID uint32, dataIDs []uint64) uint32)

CompletePostObjects sets the CompletePostObjects handler function

func (*Protocol) CompleteUpdateObject added in v1.0.45

func (protocol *Protocol) CompleteUpdateObject(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_types.DataStoreCompleteUpdateParam) uint32)

CompleteUpdateObject sets the CompleteUpdateObject handler function

func (*Protocol) DeleteObject added in v1.0.45

func (protocol *Protocol) DeleteObject(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_types.DataStoreDeleteParam) uint32)

DeleteObject sets the DeleteObject handler function

func (*Protocol) DeleteObjects added in v1.0.46

func (protocol *Protocol) DeleteObjects(handler func(err error, packet nex.PacketInterface, callID uint32, params []*datastore_types.DataStoreDeleteParam, transactional bool) uint32)

DeleteObjects sets the DeleteObjects handler function

func (*Protocol) GetMeta added in v1.0.45

func (protocol *Protocol) GetMeta(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_types.DataStoreGetMetaParam) uint32)

GetMeta sets the GetMeta handler function

func (*Protocol) GetMetas added in v1.0.45

func (protocol *Protocol) GetMetas(handler func(err error, packet nex.PacketInterface, callID uint32, dataIDs []uint64, param *datastore_types.DataStoreGetMetaParam) uint32)

GetMetas sets the GetMetas handler function

func (*Protocol) GetMetasMultipleParam added in v1.0.45

func (protocol *Protocol) GetMetasMultipleParam(handler func(err error, packet nex.PacketInterface, callID uint32, params []*datastore_types.DataStoreGetMetaParam) uint32)

GetMetasMultipleParam sets the GetMetasMultipleParam handler function

func (*Protocol) GetNewArrivedNotifications added in v1.0.45

func (protocol *Protocol) GetNewArrivedNotifications(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_types.DataStoreGetNewArrivedNotificationsParam) uint32)

GetNewArrivedNotifications sets the GetNewArrivedNotifications handler function

func (*Protocol) GetNewArrivedNotificationsV1 added in v1.0.45

func (protocol *Protocol) GetNewArrivedNotificationsV1(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_types.DataStoreGetNewArrivedNotificationsParam) uint32)

GetNewArrivedNotificationsV1 sets the GetNewArrivedNotificationsV1 handler function

func (*Protocol) GetNotificationURL added in v1.0.45

func (protocol *Protocol) GetNotificationURL(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_types.DataStoreGetNotificationURLParam) uint32)

GetNotificationURL sets the GetNotificationURL handler function

func (*Protocol) GetObjectInfos added in v1.0.46

func (protocol *Protocol) GetObjectInfos(handler func(err error, packet nex.PacketInterface, callID uint32, dataIDs uint64) uint32)

GetObjectInfos sets the GetObjectInfos handler function

func (*Protocol) GetPasswordInfo added in v1.0.46

func (protocol *Protocol) GetPasswordInfo(handler func(err error, packet nex.PacketInterface, callID uint32, dataID uint64) uint32)

GetPasswordInfo sets the GetPasswordInfo handler function

func (*Protocol) GetPasswordInfos added in v1.0.46

func (protocol *Protocol) GetPasswordInfos(handler func(err error, packet nex.PacketInterface, callID uint32, dataIDs []uint64) uint32)

GetPasswordInfos sets the GetPasswordInfos handler function

func (*Protocol) GetPersistenceInfo added in v1.0.45

func (protocol *Protocol) GetPersistenceInfo(handler func(err error, packet nex.PacketInterface, callID uint32, ownerID uint32, persistenceSlotID uint16) uint32)

GetPersistenceInfo sets the GetPersistenceInfo handler function

func (*Protocol) GetPersistenceInfos added in v1.0.46

func (protocol *Protocol) GetPersistenceInfos(handler func(err error, packet nex.PacketInterface, callID uint32, ownerID uint32, persistenceSlotIDs []uint16) uint32)

GetPersistenceInfos sets the GetPersistenceInfos handler function

func (*Protocol) GetRating added in v1.0.46

func (protocol *Protocol) GetRating(handler func(err error, packet nex.PacketInterface, callID uint32, target *datastore_types.DataStoreRatingTarget, accessPassword uint64) uint32)

GetRating sets the GetRating handler function

func (*Protocol) GetRatingWithLog added in v1.0.46

func (protocol *Protocol) GetRatingWithLog(handler func(err error, packet nex.PacketInterface, callID uint32, target *datastore_types.DataStoreRatingTarget, accessPassword uint64) uint32)

GetRatingWithLog sets the GetRatingWithLog handler function

func (*Protocol) GetRatings added in v1.0.46

func (protocol *Protocol) GetRatings(handler func(err error, packet nex.PacketInterface, callID uint32, dataIDs []uint64, accessPassword uint64) uint32)

GetRatings sets the GetRatings handler function

func (*Protocol) GetSpecificMeta added in v1.0.45

func (protocol *Protocol) GetSpecificMeta(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_types.DataStoreGetSpecificMetaParam) uint32)

GetSpecificMeta sets the GetSpecificMeta handler function

func (*Protocol) GetSpecificMetaV1 added in v1.0.45

func (protocol *Protocol) GetSpecificMetaV1(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_types.DataStoreGetSpecificMetaParamV1) uint32)

GetSpecificMetaV1 sets the GetSpecificMetaV1 handler function

func (*Protocol) HandlePacket added in v1.0.45

func (protocol *Protocol) HandlePacket(packet nex.PacketInterface)

HandlePacket sends the packet to the correct RMC method handler

func (*Protocol) PerpetuateObject added in v1.0.46

func (protocol *Protocol) PerpetuateObject(handler func(err error, packet nex.PacketInterface, callID uint32, persistenceSlotID uint16, dataID uint64, deleteLastObject bool) uint32)

PerpetuateObject sets the PerpetuateObject handler function

func (*Protocol) PostMetaBinariesWithDataID added in v1.0.46

func (protocol *Protocol) PostMetaBinariesWithDataID(handler func(err error, packet nex.PacketInterface, callID uint32, dataIDs []uint64, params []*datastore_types.DataStorePreparePostParam, transactional bool) uint32)

PostMetaBinariesWithDataID sets the PostMetaBinariesWithDataID handler function

func (*Protocol) PostMetaBinary added in v1.0.45

func (protocol *Protocol) PostMetaBinary(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_types.DataStorePreparePostParam) uint32)

PostMetaBinary sets the PostMetaBinary handler function

func (*Protocol) PostMetaBinaryWithDataID added in v1.0.46

func (protocol *Protocol) PostMetaBinaryWithDataID(handler func(err error, packet nex.PacketInterface, callID uint32, dataID uint64, param *datastore_types.DataStorePreparePostParam) uint32)

PostMetaBinaryWithDataID sets the PostMetaBinaryWithDataID handler function

func (*Protocol) PrepareGetObject added in v1.0.45

func (protocol *Protocol) PrepareGetObject(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_types.DataStorePrepareGetParam) uint32)

PrepareGetObject sets the PrepareGetObject handler function

func (*Protocol) PrepareGetObjectOrMetaBinary added in v1.0.46

func (protocol *Protocol) PrepareGetObjectOrMetaBinary(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_types.DataStorePrepareGetParam) uint32)

PrepareGetObjectOrMetaBinary sets the PrepareGetObjectOrMetaBinary handler function

func (*Protocol) PrepareGetObjectV1 added in v1.0.45

func (protocol *Protocol) PrepareGetObjectV1(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_types.DataStorePrepareGetParamV1) uint32)

PrepareGetObjectV1 sets the PrepareGetObjectV1 handler function

func (*Protocol) PreparePostObject added in v1.0.45

func (protocol *Protocol) PreparePostObject(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_types.DataStorePreparePostParam) uint32)

PreparePostObject sets the PreparePostObject handler function

func (*Protocol) PreparePostObjectV1 added in v1.0.45

func (protocol *Protocol) PreparePostObjectV1(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_types.DataStorePreparePostParamV1) uint32)

PreparePostObjectV1 sets the PreparePostObjectV1 handler function

func (*Protocol) PrepareUpdateObject added in v1.0.45

func (protocol *Protocol) PrepareUpdateObject(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_types.DataStorePrepareUpdateParam) uint32)

PrepareUpdateObject sets the PrepareUpdateObject handler function

func (*Protocol) RateObject added in v1.0.45

func (protocol *Protocol) RateObject(handler func(err error, packet nex.PacketInterface, callID uint32, target *datastore_types.DataStoreRatingTarget, param *datastore_types.DataStoreRateObjectParam, fetchRatings bool) uint32)

RateObject sets the RateObject handler function

func (*Protocol) RateObjectWithPosting added in v1.0.46

func (protocol *Protocol) RateObjectWithPosting(handler func(err error, packet nex.PacketInterface, callID uint32, target *datastore_types.DataStoreRatingTarget, rateParam *datastore_types.DataStoreRateObjectParam, postParam *datastore_types.DataStorePreparePostParam, fetchRatings bool) uint32)

RateObjectWithPosting sets the RateObjectWithPosting handler function

func (*Protocol) RateObjects added in v1.0.45

func (protocol *Protocol) RateObjects(handler func(err error, packet nex.PacketInterface, callID uint32, targets []*datastore_types.DataStoreRatingTarget, params []*datastore_types.DataStoreRateObjectParam, transactional bool, fetchRatings bool) uint32)

RateObjects sets the RateObjects handler function

func (*Protocol) RateObjectsWithPosting added in v1.0.46

func (protocol *Protocol) RateObjectsWithPosting(handler func(err error, packet nex.PacketInterface, callID uint32, targets []*datastore_types.DataStoreRatingTarget, rateParams []*datastore_types.DataStoreRateObjectParam, postParams []*datastore_types.DataStorePreparePostParam, transactional bool, fetchRatings bool) uint32)

RateObjectsWithPosting sets the RateObjectsWithPosting handler function

func (*Protocol) ResetRating added in v1.0.46

func (protocol *Protocol) ResetRating(handler func(err error, packet nex.PacketInterface, callID uint32, target *datastore_types.DataStoreRatingTarget, accessPassword uint64) uint32)

ResetRating sets the ResetRating handler function

func (*Protocol) ResetRatings added in v1.0.46

func (protocol *Protocol) ResetRatings(handler func(err error, packet nex.PacketInterface, callID uint32, target *datastore_types.DataStoreRatingTarget, transactional bool) uint32)

ResetRatings sets the ResetRatings handler function

func (*Protocol) SearchObject added in v1.0.45

func (protocol *Protocol) SearchObject(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_types.DataStoreSearchParam) uint32)

SearchObject sets the SearchObject handler function

func (*Protocol) SearchObjectLight added in v1.0.45

func (protocol *Protocol) SearchObjectLight(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_types.DataStoreSearchParam) uint32)

SearchObjectLight sets the SearchObjectLight handler function

func (*Protocol) Setup added in v1.0.45

func (protocol *Protocol) Setup()

Setup initializes the protocol

func (*Protocol) TouchObject added in v1.0.46

func (protocol *Protocol) TouchObject(handler func(err error, packet nex.PacketInterface, callID uint32, param *datastore_types.DataStoreTouchObjectParam) uint32)

TouchObject sets the TouchObject handler function

func (*Protocol) UnperpetuateObject added in v1.0.46

func (protocol *Protocol) UnperpetuateObject(handler func(err error, packet nex.PacketInterface, callID uint32, persistenceSlotID uint16, deleteLastObject bool) uint32)

UnperpetuateObject sets the UnperpetuateObject handler function

Directories

Path Synopsis
Package protocol implements the Nintendo Badge Arcade DataStore protocol
Package protocol implements the Nintendo Badge Arcade DataStore protocol
types
Package types implements all the types used by the DataStore Nintendo Badge Arcade protocol
Package types implements all the types used by the DataStore Nintendo Badge Arcade protocol
Package protocol implements the DataStorePokemonBank protocol
Package protocol implements the DataStorePokemonBank protocol
types
Package types implements all the types used by the DataStore (Pokemon Bank) protocol
Package types implements all the types used by the DataStore (Pokemon Bank) protocol
Package protocol implements the DataStorePokemonGen6 protocol
Package protocol implements the DataStorePokemonGen6 protocol
types
Package types implements all the types used by the DataStore (Pokemon Gen6) protocol
Package types implements all the types used by the DataStore (Pokemon Gen6) protocol
Package protocol implements the DataStoreSuperMarioMaker protocol
Package protocol implements the DataStoreSuperMarioMaker protocol
types
Package types implements all the types used by the DataStore (Super Mario Maker) protocol
Package types implements all the types used by the DataStore (Super Mario Maker) protocol
Package protocol implements the Super Smash Bros.
Package protocol implements the Super Smash Bros.
types
Package types implements all the types used by the DataStore Super Smash Bros.
Package types implements all the types used by the DataStore Super Smash Bros.
Package types implements all the types used by the DataStore protocol
Package types implements all the types used by the DataStore protocol

Jump to

Keyboard shortcuts

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