ws

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangesetReq added in v0.0.2

type ChangesetReq struct {
	Event string `json:"event"`
	Data  struct {
		Component string `json:"component"`
		Type      string `json:"type"`
		PadId     string `json:"padId"`
		Token     string `json:"token"`
		Data      struct {
			Start       int `json:"start"`
			Granularity int `json:"granularity"`
			RequestID   int `json:"requestID"`
		} `json:"data"`
	} `json:"data"`
}

type ChatBroadCastMessage added in v0.0.2

type ChatBroadCastMessage struct {
	Type string `json:"type"`
	Data struct {
		Type    string               `json:"type"`
		Message ChatMessageSendEvent `json:"message"`
	} `json:"data"`
}

type ChatMessage added in v0.0.2

type ChatMessage struct {
	Event string `json:"event"`
	Data  struct {
		Type      string `json:"type"`
		Component string `json:"component"`
		Data      struct {
			Type    string          `json:"type"`
			Message ChatMessageData `json:"message"`
		}
	}
}

type ChatMessageData added in v0.0.2

type ChatMessageData struct {
	Text        string  `json:"text"`
	Time        *int64  `json:"time,omitempty"`
	UserId      *string `json:"userId,omitempty"`
	AuthorId    *string `json:"authorId,omitempty"`
	DisplayName *string `json:"displayName,omitempty"`
	UserName    *string `json:"userName,omitempty"`
}

func FromObject added in v0.0.2

func FromObject(original ChatMessageData) ChatMessageData

type ChatMessageSendData added in v0.0.2

type ChatMessageSendData struct {
	Text     string  `json:"text"`
	Time     *int64  `json:"time,omitempty"`
	UserId   *string `json:"userId,omitempty"`
	UserName *string `json:"userName,omitempty"`
}

type ChatMessageSendEvent added in v0.0.2

type ChatMessageSendEvent struct {
	Text     string  `json:"text"`
	Time     *int64  `json:"time,omitempty"`
	UserId   *string `json:"userId,omitempty"`
	UserName *string `json:"userName"`
}

type ClientReady

type ClientReady struct {
	Event string `json:"event"`
	Data  struct {
		Component string `json:"component"`
		Type      string `json:"type"`
		PadID     string `json:"padId"`
		Token     string `json:"token"`
		UserInfo  struct {
			ColorId *string `json:"colorId"`
			Name    *string `json:"name"`
		} `json:"userInfo"`
		Reconnect *bool `json:"reconnect"`
		ClientRev *int  `json:"client_rev"`
	} `json:"data"`
}

type GetChatMessages added in v0.0.2

type GetChatMessages struct {
	Event string `json:"event"`
	Data  struct {
		Type      string `json:"type"`
		Component string `json:"component"`
		Data      struct {
			Type  string `json:"type"`
			Start int    `json:"start"`
			End   int    `json:"end"`
		} `json:"data"`
	}
}

type GetChatMessagesResponse added in v0.0.2

type GetChatMessagesResponse struct {
	Type string `json:"type"`
	Data struct {
		Type     string                `json:"type"`
		Messages []ChatMessageSendData `json:"messages"`
	} `json:"data"`
}

type Session

type Session struct {
	Author        string
	Auth          *SessionAuth
	Revision      int
	PadId         string
	ReadOnlyPadId string
	ReadOnly      bool
	Time          int64
}

type SessionAuth

type SessionAuth struct {
	PadId     string
	Token     string
	SessionId string
}

type UserChange

type UserChange struct {
	Event string `json:"event"`
	Data  struct {
		Component string `json:"component"`
		Data      struct {
			Apool struct {
				NumToAttrib map[int][]string `json:"numToAttrib"`
				NextNum     int              `json:"nextNum"`
			} `json:"apool"`
			BaseRev   int    `json:"baseRev"`
			Changeset string `json:"changeset"`
		} `json:"data"`
		Type string `json:"type"`
	} `json:"data"`
}

type UserLeaveData added in v0.0.2

type UserLeaveData struct {
	Type string `json:"type"`
	Data struct {
		Type     string `json:"type"`
		UserInfo struct {
			ColorId string `json:"colorId"`
			UserId  string `json:"userId"`
		} `json:"userInfo"`
	} `json:"data"`
}

type UserNewInfo

type UserNewInfo struct {
	Type string          `json:"type"`
	Data UserNewInfoData `json:"data"`
}

type UserNewInfoDat

type UserNewInfoDat struct {
	UserId  string  `json:"userId"`
	Name    *string `json:"name"`
	ColorId string  `json:"colorId"`
}

type UserNewInfoData

type UserNewInfoData struct {
	Type     string         `json:"type"`
	UserInfo UserNewInfoDat `json:"userInfo"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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