Documentation ¶
Index ¶
- Constants
- type AddForumParams
- type AddForumResult
- type AddMessageParams
- type AddMessageResult
- type AddSectionParams
- type AddSectionResult
- type AddThreadParams
- type AddThreadResult
- type ChangeForumNameParams
- type ChangeForumNameResult
- type ChangeForumSectionParams
- type ChangeForumSectionResult
- type ChangeMessageTextParams
- type ChangeMessageTextResult
- type ChangeMessageThreadParams
- type ChangeMessageThreadResult
- type ChangeSectionNameParams
- type ChangeSectionNameResult
- type ChangeSectionParentParams
- type ChangeSectionParentResult
- type ChangeThreadForumParams
- type ChangeThreadForumResult
- type ChangeThreadNameParams
- type ChangeThreadNameResult
- type DeleteForumParams
- type DeleteForumResult
- type DeleteMessageParams
- type DeleteMessageResult
- type DeleteSectionParams
- type DeleteSectionResult
- type DeleteThreadParams
- type DeleteThreadResult
- type EventData
- type EventParameters
- type Forum
- type ForumAndThreads
- type GetForumParams
- type GetForumResult
- type GetMessageParams
- type GetMessageResult
- type GetSectionParams
- type GetSectionResult
- type GetThreadParams
- type GetThreadResult
- type ListForumAndThreadsOnPageParams
- type ListForumAndThreadsOnPageResult
- type ListForumAndThreadsParams
- type ListForumAndThreadsResult
- type ListSectionsAndForumsParams
- type ListSectionsAndForumsResult
- type ListThreadAndMessagesOnPageParams
- type ListThreadAndMessagesOnPageResult
- type ListThreadAndMessagesParams
- type ListThreadAndMessagesResult
- type Message
- type OptionalEventParameters
- type PingParams
- type PingResult
- type Section
- type SectionsAndForums
- type ShowDiagnosticDataParams
- type ShowDiagnosticDataResult
- type TestParams
- type TestResult
- type Thread
- type ThreadAndMessages
Constants ¶
View Source
const ( ChildTypeNone = 0 ChildTypeSection = 1 ChildTypeForum = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddForumParams ¶
type AddForumParams struct { cmr.CommonParams // Identifier of a section containing this forum. SectionId uint `json:"sectionId"` // Name of this forum. Name string `json:"name"` }
type AddForumResult ¶
type AddForumResult struct { cmr.CommonResult // ID of the created forum. ForumId uint `json:"forumId"` }
type AddMessageParams ¶
type AddMessageParams struct { cmr.CommonParams // ID of a thread containing this message. ThreadId uint `json:"threadId"` // Message text. Text string `json:"text"` }
type AddMessageResult ¶
type AddMessageResult struct { cmr.CommonResult // ID of the created message. MessageId uint `json:"messageId"` }
type AddSectionParams ¶
type AddSectionParams struct { cmr.CommonParams // Identifier of a parent section containing this section. // Null means that this section is a root section. // Only a single root section can exist. Parent *uint `json:"parent"` // Name of this section. Name string `json:"name"` }
type AddSectionResult ¶
type AddSectionResult struct { cmr.CommonResult // ID of the created section. SectionId uint `json:"sectionId"` }
type AddThreadParams ¶
type AddThreadParams struct { cmr.CommonParams // ID of a forum containing this thread. ForumId uint `json:"forumId"` // Thread name. Name string `json:"name"` }
type AddThreadResult ¶
type AddThreadResult struct { cmr.CommonResult // ID of the created forum. ThreadId uint `json:"threadId"` }
type ChangeForumNameParams ¶
type ChangeForumNameParams struct { cmr.CommonParams ForumId uint `json:"forumId"` // New name. Name string `json:"name"` }
type ChangeForumNameResult ¶
type ChangeForumNameResult struct { cmr.CommonResult OK bool `json:"ok"` }
type ChangeForumSectionParams ¶
type ChangeForumSectionParams struct { cmr.CommonParams // Identifier of this forum. ForumId uint `json:"forumId"` // Identifier of a section containing this forum. SectionId uint `json:"sectionId"` }
type ChangeForumSectionResult ¶
type ChangeForumSectionResult struct { cmr.CommonResult OK bool `json:"ok"` }
type ChangeMessageTextParams ¶
type ChangeMessageTextParams struct { cmr.CommonParams MessageId uint `json:"messageId"` // New text. Text string `json:"text"` }
type ChangeMessageTextResult ¶
type ChangeMessageTextResult struct { cmr.CommonResult OK bool `json:"ok"` }
type ChangeMessageThreadParams ¶
type ChangeMessageThreadParams struct { cmr.CommonParams MessageId uint `json:"messageId"` // ID of a new parent thread. ThreadId uint `json:"threadId"` }
type ChangeMessageThreadResult ¶
type ChangeMessageThreadResult struct { cmr.CommonResult OK bool `json:"ok"` }
type ChangeSectionNameParams ¶
type ChangeSectionNameParams struct { cmr.CommonParams // Identifier of a section. SectionId uint `json:"sectionId"` // Name of this section. Name string `json:"name"` }
type ChangeSectionNameResult ¶
type ChangeSectionNameResult struct { cmr.CommonResult OK bool `json:"ok"` }
type ChangeSectionParentParams ¶
type ChangeSectionParentParams struct { cmr.CommonParams // Identifier of a section. SectionId uint `json:"sectionId"` // Identifier of a parent section containing this section. Parent uint `json:"parent"` }
type ChangeSectionParentResult ¶
type ChangeSectionParentResult struct { cmr.CommonResult OK bool `json:"ok"` }
type ChangeThreadForumParams ¶
type ChangeThreadForumParams struct { cmr.CommonParams ThreadId uint `json:"threadId"` // ID of a new parent forum. ForumId uint `json:"forumId"` }
type ChangeThreadForumResult ¶
type ChangeThreadForumResult struct { cmr.CommonResult OK bool `json:"ok"` }
type ChangeThreadNameParams ¶
type ChangeThreadNameParams struct { cmr.CommonParams ThreadId uint `json:"threadId"` // New name. Name string `json:"name"` }
type ChangeThreadNameResult ¶
type ChangeThreadNameResult struct { cmr.CommonResult OK bool `json:"ok"` }
type DeleteForumParams ¶
type DeleteForumParams struct { cmr.CommonParams ForumId uint `json:"forumId"` }
type DeleteForumResult ¶
type DeleteForumResult struct { cmr.CommonResult OK bool `json:"ok"` }
type DeleteMessageParams ¶
type DeleteMessageParams struct { cmr.CommonParams MessageId uint `json:"messageId"` }
type DeleteMessageResult ¶
type DeleteMessageResult struct { cmr.CommonResult OK bool `json:"ok"` }
type DeleteSectionParams ¶
type DeleteSectionParams struct { cmr.CommonParams SectionId uint `json:"sectionId"` }
type DeleteSectionResult ¶
type DeleteSectionResult struct { cmr.CommonResult OK bool `json:"ok"` }
type DeleteThreadParams ¶
type DeleteThreadParams struct { cmr.CommonParams ThreadId uint `json:"threadId"` }
type DeleteThreadResult ¶
type DeleteThreadResult struct { cmr.CommonResult OK bool `json:"ok"` }
type EventData ¶
type EventData struct { // Parameters of creation. Creator *EventParameters `json:"creator"` // Parameters of the last edit. Editor *OptionalEventParameters `json:"editor"` }
type EventParameters ¶
type Forum ¶
type Forum struct { // Identifier of this forum. Id uint `json:"id"` // Identifier of a section containing this forum. SectionId uint `json:"sectionId"` // Name of this forum. Name string `json:"name"` // List of identifiers of threads of this forum. Threads *ul.UidList `json:"threads"` // Forum meta-data. EventData }
func NewForumFromScannableSource ¶
func NewForumFromScannableSource(src cm.IScannable) (forum *Forum, err error)
type ForumAndThreads ¶
type ForumAndThreads struct { // Forum parameters. ForumId uint `json:"forumId"` ForumSectionId uint `json:"forumSectionId"` ForumName string `json:"forumName"` EventData // Thread parameters. If pagination is used, these lists contain // information after the application of pagination. ThreadIds *ul.UidList `json:"threadIds"` Threads []Thread `json:"threads"` // Number of the current page of threads. Page *uint `json:"page,omitempty"` // Total number of available pages of threads. TotalPages *uint `json:"totalPages,omitempty"` // Total number of available threads. TotalThreads *uint `json:"totalThreads,omitempty"` }
func NewForumAndThreads ¶
func NewForumAndThreads(forum *Forum) (fat *ForumAndThreads)
type GetForumParams ¶
type GetForumParams struct { cmr.CommonParams ForumId uint `json:"forumId"` }
type GetForumResult ¶
type GetForumResult struct { cmr.CommonResult Forum *Forum `json:"forum"` }
type GetMessageParams ¶
type GetMessageParams struct { cmr.CommonParams MessageId uint `json:"messageId"` }
type GetMessageResult ¶
type GetMessageResult struct { cmr.CommonResult Message *Message `json:"message"` }
type GetSectionParams ¶
type GetSectionParams struct { cmr.CommonParams SectionId uint `json:"sectionId"` }
type GetSectionResult ¶
type GetSectionResult struct { cmr.CommonResult Section *Section `json:"section"` }
type GetThreadParams ¶
type GetThreadParams struct { cmr.CommonParams ThreadId uint `json:"threadId"` }
type GetThreadResult ¶
type GetThreadResult struct { cmr.CommonResult Thread *Thread `json:"thread"` }
type ListForumAndThreadsOnPageParams ¶
type ListForumAndThreadsOnPageParams struct { cmr.CommonParams ForumId uint `json:"forumId"` Page uint `json:"page"` }
type ListForumAndThreadsOnPageResult ¶
type ListForumAndThreadsOnPageResult struct { cmr.CommonResult ForumAndThreadsOnPage *ForumAndThreads `json:"fatop"` }
type ListForumAndThreadsParams ¶
type ListForumAndThreadsParams struct { cmr.CommonParams ForumId uint `json:"forumId"` }
type ListForumAndThreadsResult ¶
type ListForumAndThreadsResult struct { cmr.CommonResult ForumAndThreads *ForumAndThreads `json:"fat"` }
type ListSectionsAndForumsParams ¶
type ListSectionsAndForumsParams struct {
cmr.CommonParams
}
type ListSectionsAndForumsResult ¶
type ListSectionsAndForumsResult struct { cmr.CommonResult SectionsAndForums *SectionsAndForums `json:"saf"` }
type ListThreadAndMessagesOnPageParams ¶
type ListThreadAndMessagesOnPageParams struct { cmr.CommonParams ThreadId uint `json:"threadId"` Page uint `json:"page"` }
type ListThreadAndMessagesOnPageResult ¶
type ListThreadAndMessagesOnPageResult struct { cmr.CommonResult ThreadAndMessagesOnPage *ThreadAndMessages `json:"tamop"` }
type ListThreadAndMessagesParams ¶
type ListThreadAndMessagesParams struct { cmr.CommonParams ThreadId uint `json:"threadId"` }
type ListThreadAndMessagesResult ¶
type ListThreadAndMessagesResult struct { cmr.CommonResult ThreadAndMessages *ThreadAndMessages `json:"tam"` }
type Message ¶
type Message struct { // Identifier of this message. Id uint `json:"id"` // Identifier of a thread containing this message. ThreadId uint `json:"threadId"` // Textual information of this message. Text string `json:"text"` // Check sum of the Text field. TextChecksum uint32 `json:"textChecksum"` // Message meta-data. EventData }
func NewMessage ¶
func NewMessage() (msg *Message)
func NewMessageFromScannableSource ¶
func NewMessageFromScannableSource(src cm.IScannable) (msg *Message, err error)
type OptionalEventParameters ¶
type PingParams ¶
type PingParams = cmr.PingParams
type PingResult ¶
type PingResult = cmr.PingResult
type Section ¶
type Section struct { // Identifier of a section. Id uint `json:"id"` // Identifier of a parent section containing this section. // Null means that this section is a root section. // Only a single root section can exist. Parent *uint `json:"parent"` // Type of child elements: either sub-sections or forums. ChildType byte `json:"childType"` // List of IDs of child elements (either sub-sections or forums). // Null means that this section has no children. Children *ul.UidList `json:"children"` // Name of this section. Name string `json:"name"` // Section meta-data. EventData }
func NewSection ¶
func NewSection() (sec *Section)
func NewSectionFromScannableSource ¶
func NewSectionFromScannableSource(src cm.IScannable) (sec *Section, err error)
type SectionsAndForums ¶
type SectionsAndForums struct { Sections []Section `json:"sections"` Forums []Forum `json:"forums"` }
func NewSectionsAndForums ¶
func NewSectionsAndForums() (saf *SectionsAndForums)
type ShowDiagnosticDataParams ¶
type ShowDiagnosticDataParams struct{}
type ShowDiagnosticDataResult ¶
type ShowDiagnosticDataResult struct { cmr.CommonResult cmr.RequestsCount }
type TestParams ¶
type TestParams struct {
N uint `json:"n"`
}
type TestResult ¶
type TestResult struct {
cmr.CommonResult
}
type Thread ¶
type Thread struct { // Identifier of this thread. Id uint `json:"id"` // Identifier of a forum containing this thread. ForumId uint `json:"forumId"` // Name of this thread. Name string `json:"name"` // List of identifiers of messages of this thread. Messages *ul.UidList `json:"messages"` // Thread meta-data. EventData }
func NewThreadFromScannableSource ¶
func NewThreadFromScannableSource(src cm.IScannable) (thr *Thread, err error)
type ThreadAndMessages ¶
type ThreadAndMessages struct { // Thread parameters. ThreadId uint `json:"threadId"` ThreadForumId uint `json:"threadForumId"` ThreadName string `json:"threadName"` EventData // Message parameters. If pagination is used, these lists contain // information after the application of pagination. MessageIds *ul.UidList `json:"messageIds"` Messages []Message `json:"messages"` // Number of the current page of messages. Page *uint `json:"page,omitempty"` // Total number of available pages of messages. TotalPages *uint `json:"totalPages,omitempty"` // Total number of available messages. TotalMessages *uint `json:"totalMessages,omitempty"` }
func NewThreadAndMessages ¶
func NewThreadAndMessages(thread *Thread) (tam *ThreadAndMessages)
Click to show internal directories.
Click to hide internal directories.