models

package
v1.0.0-alpha5 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Private    RoomType = "private"
	Group      RoomType = "group"
	SuperGroup RoomType = "supergroup"
	Channel    RoomType = "channel"

	BeEdited           RoomPermission = "be_edited"
	ManageChat         RoomPermission = "manage_chat"
	PostMessages       RoomPermission = "post_messages"
	EditMessages       RoomPermission = "edit_messages"
	DeleteMessages     RoomPermission = "delete_messages"
	ManageVoiceChats   RoomPermission = "manage_voice_chats"
	RestrictMembers    RoomPermission = "restrict_members"
	PromoteMembers     RoomPermission = "promote_members"
	ChangeInfo         RoomPermission = "change_info"
	InviteUsers        RoomPermission = "invite_users"
	PinMessages        RoomPermission = "pin_messages"
	SendMessages       RoomPermission = "send_messages"
	SendMediaMessages  RoomPermission = "send_media_messages"
	SendPolls          RoomPermission = "send_polls"
	SendOtherMessages  RoomPermission = "send_other_messages"
	AddWebPagePreviews RoomPermission = "add_web_page_previews"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Feed

type Feed struct {
	Id        string    `json:"id,omitempty" bson:"_id,omitempty"`
	By        int64     `json:"by,omitempty" bson:"by,omitempty"`
	Languages []string  `json:"languages,omitempty" bson:"languages,omitempty"`
	Host      string    `json:"host,omitempty" bson:"host,omitempty"`
	Title     string    `json:"title,omitempty" bson:"title,omitempty"`
	Link      string    `json:"link,omitempty" bson:"link,omitempty"`
	Enabled   *bool     `json:"enabled,omitempty" bson:"enabled,omitempty"`
	CreatedAt time.Time `json:"created_at,omitempty" bson:"created_at,omitempty"`
	UpdatedAt time.Time `json:"updated_at,omitempty" bson:"updated_at,omitempty"`
}

func (*Feed) SetEnabled

func (r *Feed) SetEnabled(enabled bool) *Feed
func (r *Feed) SetLink(link string) *Feed

type FeedItem

type FeedItem struct {
	Id         string    `json:"id,omitempty" bson:"_id,omitempty"`
	FeedId     string    `json:"feed_id,omitempty" bson:"feed_id,omitempty"`
	Title      string    `json:"title,omitempty" bson:"title,omitempty"`
	Desc       *string   `json:"desc,omitempty" bson:"desc,omitempty"`
	Link       string    `json:"link,omitempty" bson:"link,omitempty"`
	Guid       string    `json:"guid,omitempty" bson:"guid,omitempty"`
	PubDate    time.Time `json:"pub_date,omitempty" bson:"pub_date,omitempty"`
	CreatedAt  time.Time `json:"created_at,omitempty" bson:"created_at,omitempty"`
	UpdatedAt  time.Time `json:"updated_at,omitempty" bson:"updated_at,omitempty"`
	Authors    []string  `json:"authors,omitempty" bson:"authors,omitempty"`
	Categories []string  `json:"categories,omitempty" bson:"categories,omitempty"`
}

func (*FeedItem) Domain

func (i *FeedItem) Domain() string

func (*FeedItem) SetDesc

func (i *FeedItem) SetDesc(desc string) *FeedItem

type Room

type Room struct {
	Id          int64             `json:"id,omitempty" bson:"_id,omitempty"`
	Type        RoomType          `json:"type,omitempty" bson:"type,omitempty"`
	Title       string            `json:"title,omitempty" bson:"title,omitempty"`
	UserName    string            `json:"username,omitempty" bson:"username,omitempty"`
	FirstName   string            `json:"first_name,omitempty" bson:"first_name,omitempty"`
	LastName    string            `json:"last_name,omitempty" bson:"last_name,omitempty"`
	Broadcast   *[]string         `json:"broadcast,omitempty" bson:"broadcast,omitempty"`
	Permissions *[]RoomPermission `json:"permissions,omitempty" bson:"permissions,omitempty"`
	Deleted     *bool             `json:"deleted,omitempty" bson:"deleted,omitempty"`
	CreatedAt   time.Time         `json:"created_at,omitempty" bson:"created_at,omitempty"`
	UpdatedAt   time.Time         `json:"updated_at,omitempty" bson:"updated_at,omitempty"`
}

func (*Room) IsDeleted

func (r *Room) IsDeleted() bool

func (*Room) SetBroadcast

func (r *Room) SetBroadcast(broadcast []string) *Room

func (*Room) SetDeleted

func (r *Room) SetDeleted(deleted bool) *Room

func (*Room) SetPermissions

func (r *Room) SetPermissions(permissions []RoomPermission) *Room

type RoomPermission

type RoomPermission string

type RoomType

type RoomType string

Jump to

Keyboard shortcuts

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