...

Package session

import "github.com/Diarkis/diarkis/proto/go/session"
Overview
Index

Overview ▾

Code generated by Diarkis Puffer module: DO NOT EDIT.

Auto-generated by Diarkis Version 1.0.0

- Maximum length of a string is 65535 bytes - Maximum length of a byte array is 65535 bytes - Maximum length of any array is 65535 elements

Code generated by Diarkis Puffer module: DO NOT EDIT.

Auto-generated by Diarkis Version 1.0.0

- Maximum length of a string is 65535 bytes - Maximum length of a byte array is 65535 bytes - Maximum length of any array is 65535 elements

Code generated by Diarkis Puffer module: DO NOT EDIT.

Auto-generated by Diarkis Version 1.0.0

- Maximum length of a string is 65535 bytes - Maximum length of a byte array is 65535 bytes - Maximum length of any array is 65535 elements

Code generated by Diarkis Puffer module: DO NOT EDIT.

Auto-generated by Diarkis Version 1.0.0

- Maximum length of a string is 65535 bytes - Maximum length of a byte array is 65535 bytes - Maximum length of any array is 65535 elements

Code generated by Diarkis Puffer module: DO NOT EDIT.

Auto-generated by Diarkis Version 1.0.0

- Maximum length of a string is 65535 bytes - Maximum length of a byte array is 65535 bytes - Maximum length of any array is 65535 elements

Code generated by Diarkis Puffer module: DO NOT EDIT.

Auto-generated by Diarkis Version 1.0.0

- Maximum length of a string is 65535 bytes - Maximum length of a byte array is 65535 bytes - Maximum length of any array is 65535 elements

Code generated by Diarkis Puffer module: DO NOT EDIT.

Auto-generated by Diarkis Version 1.0.0

- Maximum length of a string is 65535 bytes - Maximum length of a byte array is 65535 bytes - Maximum length of any array is 65535 elements

Code generated by Diarkis Puffer module: DO NOT EDIT.

Auto-generated by Diarkis Version 1.0.0

- Maximum length of a string is 65535 bytes - Maximum length of a byte array is 65535 bytes - Maximum length of any array is 65535 elements

Code generated by Diarkis Puffer module: DO NOT EDIT.

Auto-generated by Diarkis Version 1.0.0

- Maximum length of a string is 65535 bytes - Maximum length of a byte array is 65535 bytes - Maximum length of any array is 65535 elements

Code generated by Diarkis Puffer module: DO NOT EDIT.

Auto-generated by Diarkis Version 1.0.0

- Maximum length of a string is 65535 bytes - Maximum length of a byte array is 65535 bytes - Maximum length of any array is 65535 elements

Code generated by Diarkis Puffer module: DO NOT EDIT.

Auto-generated by Diarkis Version 1.0.0

- Maximum length of a string is 65535 bytes - Maximum length of a byte array is 65535 bytes - Maximum length of any array is 65535 elements

Code generated by Diarkis Puffer module: DO NOT EDIT.

Auto-generated by Diarkis Version 1.0.0

- Maximum length of a string is 65535 bytes - Maximum length of a byte array is 65535 bytes - Maximum length of any array is 65535 elements

Index ▾

Constants
type Broadcast
    func NewBroadcast() *Broadcast
    func (proto *Broadcast) GetCmd() uint16
    func (proto *Broadcast) GetVer() uint8
    func (proto *Broadcast) Pack() []byte
    func (proto *Broadcast) String() string
    func (proto *Broadcast) Unpack(bytes []byte) error
type Create
    func NewCreate() *Create
    func (proto *Create) GetCmd() uint16
    func (proto *Create) GetVer() uint8
    func (proto *Create) Pack() []byte
    func (proto *Create) String() string
    func (proto *Create) Unpack(bytes []byte) error
type CreateResponsePayload
    func NewCreateResponsePayload() *CreateResponsePayload
    func (proto *CreateResponsePayload) GetCmd() uint16
    func (proto *CreateResponsePayload) GetVer() uint8
    func (proto *CreateResponsePayload) Pack() []byte
    func (proto *CreateResponsePayload) String() string
    func (proto *CreateResponsePayload) Unpack(bytes []byte) error
type GetSessionInfoBySessionID
    func NewGetSessionInfoBySessionID() *GetSessionInfoBySessionID
    func (proto *GetSessionInfoBySessionID) GetCmd() uint16
    func (proto *GetSessionInfoBySessionID) GetVer() uint8
    func (proto *GetSessionInfoBySessionID) Pack() []byte
    func (proto *GetSessionInfoBySessionID) String() string
    func (proto *GetSessionInfoBySessionID) Unpack(bytes []byte) error
type GetSessionInfoBySessionType
    func NewGetSessionInfoBySessionType() *GetSessionInfoBySessionType
    func (proto *GetSessionInfoBySessionType) GetCmd() uint16
    func (proto *GetSessionInfoBySessionType) GetVer() uint8
    func (proto *GetSessionInfoBySessionType) Pack() []byte
    func (proto *GetSessionInfoBySessionType) String() string
    func (proto *GetSessionInfoBySessionType) Unpack(bytes []byte) error
type GetSessionInfoResponsePayload
    func NewGetSessionInfoResponsePayload() *GetSessionInfoResponsePayload
    func (proto *GetSessionInfoResponsePayload) GetCmd() uint16
    func (proto *GetSessionInfoResponsePayload) GetVer() uint8
    func (proto *GetSessionInfoResponsePayload) Pack() []byte
    func (proto *GetSessionInfoResponsePayload) String() string
    func (proto *GetSessionInfoResponsePayload) Unpack(bytes []byte) error
type Invite
    func NewInvite() *Invite
    func (proto *Invite) GetCmd() uint16
    func (proto *Invite) GetVer() uint8
    func (proto *Invite) Pack() []byte
    func (proto *Invite) String() string
    func (proto *Invite) Unpack(bytes []byte) error
type Join
    func NewJoin() *Join
    func (proto *Join) GetCmd() uint16
    func (proto *Join) GetVer() uint8
    func (proto *Join) Pack() []byte
    func (proto *Join) String() string
    func (proto *Join) Unpack(bytes []byte) error
type Kick
    func NewKick() *Kick
    func (proto *Kick) GetCmd() uint16
    func (proto *Kick) GetVer() uint8
    func (proto *Kick) Pack() []byte
    func (proto *Kick) String() string
    func (proto *Kick) Unpack(bytes []byte) error
type Leave
    func NewLeave() *Leave
    func (proto *Leave) GetCmd() uint16
    func (proto *Leave) GetVer() uint8
    func (proto *Leave) Pack() []byte
    func (proto *Leave) String() string
    func (proto *Leave) Unpack(bytes []byte) error
type MessageTo
    func NewMessageTo() *MessageTo
    func (proto *MessageTo) GetCmd() uint16
    func (proto *MessageTo) GetVer() uint8
    func (proto *MessageTo) Pack() []byte
    func (proto *MessageTo) String() string
    func (proto *MessageTo) Unpack(bytes []byte) error
type MessageToMessagePayload
    func NewMessageToMessagePayload() *MessageToMessagePayload
    func (proto *MessageToMessagePayload) GetCmd() uint16
    func (proto *MessageToMessagePayload) GetVer() uint8
    func (proto *MessageToMessagePayload) Pack() []byte
    func (proto *MessageToMessagePayload) String() string
    func (proto *MessageToMessagePayload) Unpack(bytes []byte) error

Constants

BroadcastCmd represents the command ID of the protocol's command ID.

[NOTE] The value is optional and if cmd is not given in the definition JSON, it will be 0.
const BroadcastCmd uint16 = 800

BroadcastVer represents the ver of the protocol's command.

[NOTE] The value is optional and if ver is not given in the definition JSON, it will be 0.
const BroadcastVer uint8 = 1

CreateCmd represents the command ID of the protocol's command ID.

[NOTE] The value is optional and if cmd is not given in the definition JSON, it will be 0.
const CreateCmd uint16 = 801

CreateResponsePayloadCmd represents the command ID of the protocol's command ID.

[NOTE] The value is optional and if cmd is not given in the definition JSON, it will be 0.
const CreateResponsePayloadCmd uint16 = 0

CreateResponsePayloadVer represents the ver of the protocol's command.

[NOTE] The value is optional and if ver is not given in the definition JSON, it will be 0.
const CreateResponsePayloadVer uint8 = 0

CreateVer represents the ver of the protocol's command.

[NOTE] The value is optional and if ver is not given in the definition JSON, it will be 0.
const CreateVer uint8 = 1

GetSessionInfoBySessionIDCmd represents the command ID of the protocol's command ID.

[NOTE] The value is optional and if cmd is not given in the definition JSON, it will be 0.
const GetSessionInfoBySessionIDCmd uint16 = 809

GetSessionInfoBySessionIDVer represents the ver of the protocol's command.

[NOTE] The value is optional and if ver is not given in the definition JSON, it will be 0.
const GetSessionInfoBySessionIDVer uint8 = 1

GetSessionInfoBySessionTypeCmd represents the command ID of the protocol's command ID.

[NOTE] The value is optional and if cmd is not given in the definition JSON, it will be 0.
const GetSessionInfoBySessionTypeCmd uint16 = 808

GetSessionInfoBySessionTypeVer represents the ver of the protocol's command.

[NOTE] The value is optional and if ver is not given in the definition JSON, it will be 0.
const GetSessionInfoBySessionTypeVer uint8 = 1

GetSessionInfoResponsePayloadCmd represents the command ID of the protocol's command ID.

[NOTE] The value is optional and if cmd is not given in the definition JSON, it will be 0.
const GetSessionInfoResponsePayloadCmd uint16 = 0

GetSessionInfoResponsePayloadVer represents the ver of the protocol's command.

[NOTE] The value is optional and if ver is not given in the definition JSON, it will be 0.
const GetSessionInfoResponsePayloadVer uint8 = 0

InviteCmd represents the command ID of the protocol's command ID.

[NOTE] The value is optional and if cmd is not given in the definition JSON, it will be 0.
const InviteCmd uint16 = 802

InviteVer represents the ver of the protocol's command.

[NOTE] The value is optional and if ver is not given in the definition JSON, it will be 0.
const InviteVer uint8 = 1

JoinCmd represents the command ID of the protocol's command ID.

[NOTE] The value is optional and if cmd is not given in the definition JSON, it will be 0.
const JoinCmd uint16 = 804

JoinVer represents the ver of the protocol's command.

[NOTE] The value is optional and if ver is not given in the definition JSON, it will be 0.
const JoinVer uint8 = 1

KickCmd represents the command ID of the protocol's command ID.

[NOTE] The value is optional and if cmd is not given in the definition JSON, it will be 0.
const KickCmd uint16 = 806

KickVer represents the ver of the protocol's command.

[NOTE] The value is optional and if ver is not given in the definition JSON, it will be 0.
const KickVer uint8 = 1

LeaveCmd represents the command ID of the protocol's command ID.

[NOTE] The value is optional and if cmd is not given in the definition JSON, it will be 0.
const LeaveCmd uint16 = 805

LeaveVer represents the ver of the protocol's command.

[NOTE] The value is optional and if ver is not given in the definition JSON, it will be 0.
const LeaveVer uint8 = 1

MessageToCmd represents the command ID of the protocol's command ID.

[NOTE] The value is optional and if cmd is not given in the definition JSON, it will be 0.
const MessageToCmd uint16 = 807

MessageToMessagePayloadCmd represents the command ID of the protocol's command ID.

[NOTE] The value is optional and if cmd is not given in the definition JSON, it will be 0.
const MessageToMessagePayloadCmd uint16 = 0

MessageToMessagePayloadVer represents the ver of the protocol's command.

[NOTE] The value is optional and if ver is not given in the definition JSON, it will be 0.
const MessageToMessagePayloadVer uint8 = 0

MessageToVer represents the ver of the protocol's command.

[NOTE] The value is optional and if ver is not given in the definition JSON, it will be 0.
const MessageToVer uint8 = 1

type Broadcast

Broadcast represents the command protocol data structure.

type Broadcast struct {
    // Command version of the protocol
    Ver uint8
    // Command ID of the protocol
    Cmd uint16
    // Message
    Message string
    // Session Type
    SessionType uint8
}

func NewBroadcast

func NewBroadcast() *Broadcast

NewBroadcast creates a new instance of Broadcast struct.

func (*Broadcast) GetCmd

func (proto *Broadcast) GetCmd() uint16

func (*Broadcast) GetVer

func (proto *Broadcast) GetVer() uint8

func (*Broadcast) Pack

func (proto *Broadcast) Pack() []byte

Pack encodes Broadcast struct to a byte array to be delivered over the command.

func (*Broadcast) String

func (proto *Broadcast) String() string

func (*Broadcast) Unpack

func (proto *Broadcast) Unpack(bytes []byte) error

Unpack decodes the command payload byte array to Broadcast struct.

type Create

Create represents the command protocol data structure.

type Create struct {
    // Command version of the protocol
    Ver uint8
    // Command ID of the protocol
    Cmd uint16
    // Maximum number of members in the session
    MaxMembers uint16
    // Session Type
    SessionType uint8
    // TTL of the session when it becomes empty (no members) in seconds.
    Ttl uint16
}

func NewCreate

func NewCreate() *Create

NewCreate creates a new instance of Create struct.

func (*Create) GetCmd

func (proto *Create) GetCmd() uint16

func (*Create) GetVer

func (proto *Create) GetVer() uint8

func (*Create) Pack

func (proto *Create) Pack() []byte

Pack encodes Create struct to a byte array to be delivered over the command.

func (*Create) String

func (proto *Create) String() string

func (*Create) Unpack

func (proto *Create) Unpack(bytes []byte) error

Unpack decodes the command payload byte array to Create struct.

type CreateResponsePayload

CreateResponsePayload represents the command protocol data structure.

type CreateResponsePayload struct {
    // Command version of the protocol
    Ver uint8
    // Command ID of the protocol
    Cmd uint16
    // Session ID
    SessionID string
    // Session Type
    SessionType uint8
}

func NewCreateResponsePayload

func NewCreateResponsePayload() *CreateResponsePayload

NewCreateResponsePayload creates a new instance of CreateResponsePayload struct.

func (*CreateResponsePayload) GetCmd

func (proto *CreateResponsePayload) GetCmd() uint16

func (*CreateResponsePayload) GetVer

func (proto *CreateResponsePayload) GetVer() uint8

func (*CreateResponsePayload) Pack

func (proto *CreateResponsePayload) Pack() []byte

Pack encodes CreateResponsePayload struct to a byte array to be delivered over the command.

func (*CreateResponsePayload) String

func (proto *CreateResponsePayload) String() string

func (*CreateResponsePayload) Unpack

func (proto *CreateResponsePayload) Unpack(bytes []byte) error

Unpack decodes the command payload byte array to CreateResponsePayload struct.

type GetSessionInfoBySessionID

GetSessionInfoBySessionID represents the command protocol data structure.

type GetSessionInfoBySessionID struct {
    // Command version of the protocol
    Ver uint8
    // Command ID of the protocol
    Cmd uint16
    // Session ID
    SessionID string
}

func NewGetSessionInfoBySessionID

func NewGetSessionInfoBySessionID() *GetSessionInfoBySessionID

NewGetSessionInfoBySessionID creates a new instance of GetSessionInfoBySessionID struct.

func (*GetSessionInfoBySessionID) GetCmd

func (proto *GetSessionInfoBySessionID) GetCmd() uint16

func (*GetSessionInfoBySessionID) GetVer

func (proto *GetSessionInfoBySessionID) GetVer() uint8

func (*GetSessionInfoBySessionID) Pack

func (proto *GetSessionInfoBySessionID) Pack() []byte

Pack encodes GetSessionInfoBySessionID struct to a byte array to be delivered over the command.

func (*GetSessionInfoBySessionID) String

func (proto *GetSessionInfoBySessionID) String() string

func (*GetSessionInfoBySessionID) Unpack

func (proto *GetSessionInfoBySessionID) Unpack(bytes []byte) error

Unpack decodes the command payload byte array to GetSessionInfoBySessionID struct.

type GetSessionInfoBySessionType

GetSessionInfoBySessionType represents the command protocol data structure.

type GetSessionInfoBySessionType struct {
    // Command version of the protocol
    Ver uint8
    // Command ID of the protocol
    Cmd uint16
    // Session Type
    SessionType uint8
}

func NewGetSessionInfoBySessionType

func NewGetSessionInfoBySessionType() *GetSessionInfoBySessionType

NewGetSessionInfoBySessionType creates a new instance of GetSessionInfoBySessionType struct.

func (*GetSessionInfoBySessionType) GetCmd

func (proto *GetSessionInfoBySessionType) GetCmd() uint16

func (*GetSessionInfoBySessionType) GetVer

func (proto *GetSessionInfoBySessionType) GetVer() uint8

func (*GetSessionInfoBySessionType) Pack

func (proto *GetSessionInfoBySessionType) Pack() []byte

Pack encodes GetSessionInfoBySessionType struct to a byte array to be delivered over the command.

func (*GetSessionInfoBySessionType) String

func (proto *GetSessionInfoBySessionType) String() string

func (*GetSessionInfoBySessionType) Unpack

func (proto *GetSessionInfoBySessionType) Unpack(bytes []byte) error

Unpack decodes the command payload byte array to GetSessionInfoBySessionType struct.

type GetSessionInfoResponsePayload

GetSessionInfoResponsePayload represents the command protocol data structure.

type GetSessionInfoResponsePayload struct {
    // Command version of the protocol
    Ver uint8
    // Command ID of the protocol
    Cmd uint16
    // Current number of members in the session
    CurrentMembers uint16
    // Maximum number of members in the session
    MaxMembers uint16
    // member IDs
    MemberIDs []string
    // owner ID
    OwnerID string
    // Session ID
    SessionID string
    // Session Type
    SessionType uint8
}

func NewGetSessionInfoResponsePayload

func NewGetSessionInfoResponsePayload() *GetSessionInfoResponsePayload

NewGetSessionInfoResponsePayload creates a new instance of GetSessionInfoResponsePayload struct.

func (*GetSessionInfoResponsePayload) GetCmd

func (proto *GetSessionInfoResponsePayload) GetCmd() uint16

func (*GetSessionInfoResponsePayload) GetVer

func (proto *GetSessionInfoResponsePayload) GetVer() uint8

func (*GetSessionInfoResponsePayload) Pack

func (proto *GetSessionInfoResponsePayload) Pack() []byte

Pack encodes GetSessionInfoResponsePayload struct to a byte array to be delivered over the command.

func (*GetSessionInfoResponsePayload) String

func (proto *GetSessionInfoResponsePayload) String() string

func (*GetSessionInfoResponsePayload) Unpack

func (proto *GetSessionInfoResponsePayload) Unpack(bytes []byte) error

Unpack decodes the command payload byte array to GetSessionInfoResponsePayload struct.

type Invite

Invite represents the command protocol data structure.

type Invite struct {
    // Command version of the protocol
    Ver uint8
    // Command ID of the protocol
    Cmd uint16
    // Message
    Message string
    // Session Type
    SessionType uint8
    // UIDs to invite
    TargetUIDs []string
}

func NewInvite

func NewInvite() *Invite

NewInvite creates a new instance of Invite struct.

func (*Invite) GetCmd

func (proto *Invite) GetCmd() uint16

func (*Invite) GetVer

func (proto *Invite) GetVer() uint8

func (*Invite) Pack

func (proto *Invite) Pack() []byte

Pack encodes Invite struct to a byte array to be delivered over the command.

func (*Invite) String

func (proto *Invite) String() string

func (*Invite) Unpack

func (proto *Invite) Unpack(bytes []byte) error

Unpack decodes the command payload byte array to Invite struct.

type Join

Join represents the command protocol data structure.

type Join struct {
    // Command version of the protocol
    Ver uint8
    // Command ID of the protocol
    Cmd uint16
    // Session ID
    SessionID string
    // Session Type
    SessionType uint8
}

func NewJoin

func NewJoin() *Join

NewJoin creates a new instance of Join struct.

func (*Join) GetCmd

func (proto *Join) GetCmd() uint16

func (*Join) GetVer

func (proto *Join) GetVer() uint8

func (*Join) Pack

func (proto *Join) Pack() []byte

Pack encodes Join struct to a byte array to be delivered over the command.

func (*Join) String

func (proto *Join) String() string

func (*Join) Unpack

func (proto *Join) Unpack(bytes []byte) error

Unpack decodes the command payload byte array to Join struct.

type Kick

Kick represents the command protocol data structure.

type Kick struct {
    // Command version of the protocol
    Ver uint8
    // Command ID of the protocol
    Cmd uint16
    // Session Type
    SessionType uint8
    // UID to kick from session
    TargetUID string
}

func NewKick

func NewKick() *Kick

NewKick creates a new instance of Kick struct.

func (*Kick) GetCmd

func (proto *Kick) GetCmd() uint16

func (*Kick) GetVer

func (proto *Kick) GetVer() uint8

func (*Kick) Pack

func (proto *Kick) Pack() []byte

Pack encodes Kick struct to a byte array to be delivered over the command.

func (*Kick) String

func (proto *Kick) String() string

func (*Kick) Unpack

func (proto *Kick) Unpack(bytes []byte) error

Unpack decodes the command payload byte array to Kick struct.

type Leave

Leave represents the command protocol data structure.

type Leave struct {
    // Command version of the protocol
    Ver uint8
    // Command ID of the protocol
    Cmd uint16
    // Session Type
    SessionType uint8
}

func NewLeave

func NewLeave() *Leave

NewLeave creates a new instance of Leave struct.

func (*Leave) GetCmd

func (proto *Leave) GetCmd() uint16

func (*Leave) GetVer

func (proto *Leave) GetVer() uint8

func (*Leave) Pack

func (proto *Leave) Pack() []byte

Pack encodes Leave struct to a byte array to be delivered over the command.

func (*Leave) String

func (proto *Leave) String() string

func (*Leave) Unpack

func (proto *Leave) Unpack(bytes []byte) error

Unpack decodes the command payload byte array to Leave struct.

type MessageTo

MessageTo represents the command protocol data structure.

type MessageTo struct {
    // Command version of the protocol
    Ver uint8
    // Command ID of the protocol
    Cmd uint16
    // Message
    Message string
    // UIDs to receive message
    RecipientUIDs []string
    // Session Type
    SessionType uint8
}

func NewMessageTo

func NewMessageTo() *MessageTo

NewMessageTo creates a new instance of MessageTo struct.

func (*MessageTo) GetCmd

func (proto *MessageTo) GetCmd() uint16

func (*MessageTo) GetVer

func (proto *MessageTo) GetVer() uint8

func (*MessageTo) Pack

func (proto *MessageTo) Pack() []byte

Pack encodes MessageTo struct to a byte array to be delivered over the command.

func (*MessageTo) String

func (proto *MessageTo) String() string

func (*MessageTo) Unpack

func (proto *MessageTo) Unpack(bytes []byte) error

Unpack decodes the command payload byte array to MessageTo struct.

type MessageToMessagePayload

MessageToMessagePayload represents the command protocol data structure.

type MessageToMessagePayload struct {
    // Command version of the protocol
    Ver uint8
    // Command ID of the protocol
    Cmd uint16
    // Message
    Message string
    // Session Type
    SessionType uint8
}

func NewMessageToMessagePayload

func NewMessageToMessagePayload() *MessageToMessagePayload

NewMessageToMessagePayload creates a new instance of MessageToMessagePayload struct.

func (*MessageToMessagePayload) GetCmd

func (proto *MessageToMessagePayload) GetCmd() uint16

func (*MessageToMessagePayload) GetVer

func (proto *MessageToMessagePayload) GetVer() uint8

func (*MessageToMessagePayload) Pack

func (proto *MessageToMessagePayload) Pack() []byte

Pack encodes MessageToMessagePayload struct to a byte array to be delivered over the command.

func (*MessageToMessagePayload) String

func (proto *MessageToMessagePayload) String() string

func (*MessageToMessagePayload) Unpack

func (proto *MessageToMessagePayload) Unpack(bytes []byte) error

Unpack decodes the command payload byte array to MessageToMessagePayload struct.