package payload

import "github.com/Diarkis/diarkis/client/go/test/payload"

Index

Functions

func PackMMAdd

func PackMMAdd(mmID, uniqueID string, props map[string]int, metadata []byte, ttl uint64) []byte

PackMMAdd encodes the given parameters into byte array

func PackMMRemove

func PackMMRemove(mmID string, uniqueIDs []string) []byte

PackMMRemove encodes the given parameters into a byte array

func PackMMSearch

func PackMMSearch(mmIDs []string, props map[string]int) []byte

PackMMSearch encodes the given parameters into a byte array

Types

type MMAdd

type MMAdd struct {
	TTL      int64
	ID       string
	UID      string
	Props    map[string]int
	Metadata []byte
}

MMAdd represents MatchMaker add data

func UnpackMMAdd

func UnpackMMAdd(bytes []byte) *MMAdd

UnpackMMAdd decodes the given byte array into an instance of MMAdd

type MMRemove

type MMRemove struct {
	ID   string
	UIDs []string
}

MMRemove represents MatchMaker remove data

func UnpackMMRemove

func UnpackMMRemove(bytes []byte) *MMRemove

UnpackMMRemove decodes the given byte array to an instance of MMRemove

type MMSearch

type MMSearch struct {
	IDs   []string
	Props map[string]int
}

MMSearch represents MatchMaker search data

func UnpackMMSearch

func UnpackMMSearch(bytes []byte) *MMSearch

UnpackMMSearch decodes the given byte array into an instance of MMSearch