primitives

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message added in v0.1.0

type Message struct {
	Type        string            `json:"type"`
	SenderID    string            `json:"senderId"`
	Information map[string]string `json:"info"`
}

func NewMessage added in v0.1.0

func NewMessage(messageType string, senderId string) *Message

func (*Message) GetBool added in v0.1.0

func (message *Message) GetBool(key string) (bool, error)

func (*Message) GetFloat added in v0.1.0

func (message *Message) GetFloat(key string) (float64, error)

func (*Message) GetInteger added in v0.1.0

func (message *Message) GetInteger(key string) (int, error)

func (*Message) GetString added in v0.1.0

func (message *Message) GetString(key string) (string, error)

func (*Message) HasKey added in v0.1.0

func (message *Message) HasKey(key string) bool

func (*Message) SetBool added in v0.1.0

func (message *Message) SetBool(key string, value bool)

func (*Message) SetFloat added in v0.1.0

func (message *Message) SetFloat(key string, value float64)

func (*Message) SetInteger added in v0.1.0

func (message *Message) SetInteger(key string, value int)

func (*Message) SetString added in v0.1.0

func (message *Message) SetString(key string, value string)

func (*Message) ToJson added in v0.1.0

func (message *Message) ToJson() []byte

func (*Message) ToString added in v0.1.0

func (message *Message) ToString() string

Jump to

Keyboard shortcuts

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