models

package
v0.0.56 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: GPL-3.0 Imports: 6 Imported by: 4

Documentation

Index

Constants

View Source
const (
	IdForVirtualUserSubscriptionsRecord = -1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AddSubscriptionParams

type AddSubscriptionParams struct {
	cmr.CommonParams
	ThreadId cmb.Id `json:"threadId"`
	UserId   cmb.Id `json:"userId"`
}

type AddSubscriptionResult

type AddSubscriptionResult = cmr.CommonResultWithSuccess

type ClearThreadSubscriptionsSParams

type ClearThreadSubscriptionsSParams struct {
	cmr.CommonParams
	cmr.DKeyParams
	ThreadId cmb.Id `json:"threadId"`
}

type ClearThreadSubscriptionsSResult

type ClearThreadSubscriptionsSResult = cmr.CommonResultWithSuccess

type CountSelfSubscriptionsParams added in v0.0.52

type CountSelfSubscriptionsParams struct {
	cmr.CommonParams
}

type CountSelfSubscriptionsResult added in v0.0.52

type CountSelfSubscriptionsResult struct {
	cmr.CommonResult
	UserSubscriptionsCount cmb.Count `json:"userSubscriptionsCount"`
}

type DeleteSelfSubscriptionParams added in v0.0.48

type DeleteSelfSubscriptionParams struct {
	cmr.CommonParams
	ThreadId cmb.Id `json:"threadId"`
}

type DeleteSelfSubscriptionResult added in v0.0.48

type DeleteSelfSubscriptionResult = cmr.CommonResultWithSuccess

type DeleteSubscriptionParams

type DeleteSubscriptionParams struct {
	cmr.CommonParams
	ThreadId cmb.Id `json:"threadId"`
	UserId   cmb.Id `json:"userId"`
}

type DeleteSubscriptionResult

type DeleteSubscriptionResult = cmr.CommonResultWithSuccess

type DeleteSubscriptionSParams

type DeleteSubscriptionSParams struct {
	cmr.CommonParams
	cmr.DKeyParams
	ThreadId cmb.Id `json:"threadId"`
	UserId   cmb.Id `json:"userId"`
}

type DeleteSubscriptionSResult

type DeleteSubscriptionSResult = cmr.CommonResultWithSuccess

type GetDKeyParams

type GetDKeyParams struct {
	cmr.CommonParams
}

type GetDKeyResult

type GetDKeyResult struct {
	cmr.CommonResult
	DKey cmb.Text `json:"dKey"`
}

type GetSelfSubscriptionsOnPageParams added in v0.0.51

type GetSelfSubscriptionsOnPageParams struct {
	cmr.CommonParams
	Page cmb.Count `json:"page"`
}

type GetSelfSubscriptionsOnPageResult added in v0.0.51

type GetSelfSubscriptionsOnPageResult struct {
	cmr.CommonResult
	UserSubscriptions *UserSubscriptions `json:"userSubscriptions"`
}

type GetSelfSubscriptionsParams added in v0.0.47

type GetSelfSubscriptionsParams struct {
	cmr.CommonParams
}

type GetSelfSubscriptionsResult added in v0.0.47

type GetSelfSubscriptionsResult struct {
	cmr.CommonResult
	UserSubscriptions *UserSubscriptions `json:"userSubscriptions"`
}

type GetThreadSubscribersSParams

type GetThreadSubscribersSParams struct {
	cmr.CommonParams
	cmr.DKeyParams
	ThreadId cmb.Id `json:"threadId"`
}

type GetThreadSubscribersSResult

type GetThreadSubscribersSResult struct {
	cmr.CommonResult
	ThreadSubscriptions *ThreadSubscriptionsRecord `json:"threadSubscriptions"`
}

type GetUserSubscriptionsOnPageParams added in v0.0.54

type GetUserSubscriptionsOnPageParams struct {
	cmr.CommonParams
	UserId cmb.Id    `json:"userId"`
	Page   cmb.Count `json:"page"`
}

type GetUserSubscriptionsOnPageResult added in v0.0.54

type GetUserSubscriptionsOnPageResult struct {
	cmr.CommonResult
	UserSubscriptions *UserSubscriptions `json:"userSubscriptions"`
}

type GetUserSubscriptionsParams

type GetUserSubscriptionsParams struct {
	cmr.CommonParams
	UserId cmb.Id `json:"userId"`
}

type GetUserSubscriptionsResult

type GetUserSubscriptionsResult struct {
	cmr.CommonResult
	UserSubscriptions *UserSubscriptions `json:"userSubscriptions"`
}

type IsSelfSubscribedParams added in v0.0.49

type IsSelfSubscribedParams struct {
	cmr.CommonParams
	ThreadId cmb.Id `json:"threadId"`
}

type IsSelfSubscribedResult added in v0.0.49

type IsSelfSubscribedResult struct {
	cmr.CommonResult
	UserId       cmb.Id   `json:"userId"`
	ThreadId     cmb.Id   `json:"threadId"`
	IsSubscribed cmb.Flag `json:"isSubscribed"`
}

type IsUserSubscribedParams added in v0.0.49

type IsUserSubscribedParams struct {
	cmr.CommonParams
	UserId   cmb.Id `json:"userId"`
	ThreadId cmb.Id `json:"threadId"`
}

type IsUserSubscribedResult added in v0.0.49

type IsUserSubscribedResult struct {
	cmr.CommonResult
	UserId       cmb.Id   `json:"userId"`
	ThreadId     cmb.Id   `json:"threadId"`
	IsSubscribed cmb.Flag `json:"isSubscribed"`
}

type PingParams

type PingParams = cmr.PingParams

type PingResult

type PingResult = cmr.PingResult

type ShowDiagnosticDataParams

type ShowDiagnosticDataParams struct{}

type ShowDiagnosticDataResult

type ShowDiagnosticDataResult struct {
	cmr.CommonResult
	cmr.RequestsCount
}

type Subscription

type Subscription struct {
	// ID of a thread to which a user is subscribed.
	ThreadId cmb.Id `json:"threadId"`

	// ID of a subscribed user.
	UserId cmb.Id `json:"userId"`
}

type TestParams

type TestParams struct {
	N uint `json:"n"`
}

type TestResult

type TestResult struct {
	cmr.CommonResult
}

type ThreadSubscriptionsRecord added in v0.0.54

type ThreadSubscriptionsRecord struct {
	Id       cmb.Id      `json:"id"`
	ThreadId cmb.Id      `json:"threadId"`
	Users    *ul.UidList `json:"userIds"`
}

func NewThreadSubscriptionsListFromScannableSource added in v0.0.55

func NewThreadSubscriptionsListFromScannableSource(rows cm.IScannableSequence) (tsrs []ThreadSubscriptionsRecord, err error)

func NewThreadSubscriptionsRecord added in v0.0.55

func NewThreadSubscriptionsRecord() (tsr *ThreadSubscriptionsRecord)

func NewThreadSubscriptionsRecordFromScannableSource added in v0.0.55

func NewThreadSubscriptionsRecordFromScannableSource(src cm.IScannable) (tsr *ThreadSubscriptionsRecord, err error)

type UserSubscriptions

type UserSubscriptions struct {

	// Subscriber is an ID of a user. This is equivalent to UserId.
	Subscriber cmb.Id `json:"subscriber"`

	// Subscriptions is an array of IDs of threads to which a user is
	// subscribed. This is equivalent to ThreadIds.
	Subscriptions []cmb.Id `json:"subscriptions"`

	PageData *cmr.PageData `json:"pageData,omitempty"`
}

func NewUserSubscriptions

func NewUserSubscriptions(userId cmb.Id, allThreadIds *ul.UidList, pageNumber cmb.Count, pageSize cmb.Count) (us *UserSubscriptions)

NewUserSubscriptions is a constructor of UserSubscriptions. When pagination is not needed, pag number must be zero. When page number is positive, pagination is enabled.

type UserSubscriptionsRecord added in v0.0.54

type UserSubscriptionsRecord struct {
	Id      cmb.Id      `json:"id"`
	UserId  cmb.Id      `json:"userId"`
	Threads *ul.UidList `json:"threadIds"`
}

func NewUserSubscriptionsListFromScannableSource added in v0.0.55

func NewUserSubscriptionsListFromScannableSource(rows cm.IScannableSequence) (usrs []UserSubscriptionsRecord, err error)

func NewUserSubscriptionsRecord added in v0.0.54

func NewUserSubscriptionsRecord() (usr *UserSubscriptionsRecord)

func NewUserSubscriptionsRecordFromScannableSource added in v0.0.54

func NewUserSubscriptionsRecordFromScannableSource(src cm.IScannable) (usr *UserSubscriptionsRecord, err error)

Jump to

Keyboard shortcuts

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