impl

package
v1.0.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2019 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRepositoryImpl

func NewRepositoryImpl(db *gorm.DB, fs storage.FileStorage, hub *hub.Hub) (repository.Repository, error)

NewRepositoryImpl リポジトリ実装を初期化して生成します

Types

type RepositoryImpl

type RepositoryImpl struct {
	// contains filtered or unexported fields
}

RepositoryImpl リポジトリ実装

func (*RepositoryImpl) AddPrivateChannelMember

func (repo *RepositoryImpl) AddPrivateChannelMember(channelID, userID uuid.UUID) error

AddPrivateChannelMember プライベートチャンネルにメンバーを追加します

func (*RepositoryImpl) AddStampToMessage

func (repo *RepositoryImpl) AddStampToMessage(messageID, stampID, userID uuid.UUID) (ms *model.MessageStamp, err error)

AddStampToMessage メッセージにスタンプを追加します

func (*RepositoryImpl) AddStar

func (repo *RepositoryImpl) AddStar(userID, channelID uuid.UUID) error

AddStar チャンネルをお気に入り登録します

func (*RepositoryImpl) AddUserTag

func (repo *RepositoryImpl) AddUserTag(userID, tagID uuid.UUID) error

AddUserTag ユーザーにタグを付与します

func (*RepositoryImpl) AddUserToGroup

func (repo *RepositoryImpl) AddUserToGroup(userID, groupID uuid.UUID) error

AddUserToGroup グループにユーザーを追加します

func (*RepositoryImpl) ChangeChannelName

func (repo *RepositoryImpl) ChangeChannelName(channelID uuid.UUID, name string) error

ChangeChannelName チャンネル名を変更します TODO トランザクション

func (*RepositoryImpl) ChangeChannelParent

func (repo *RepositoryImpl) ChangeChannelParent(channelID uuid.UUID, parent uuid.UUID) error

ChangeChannelParent チャンネルの親を変更します TODO トランザクション

func (*RepositoryImpl) ChangeClipFolder

func (repo *RepositoryImpl) ChangeClipFolder(clipID, folderID uuid.UUID) error

ChangeClipFolder クリップのフォルダを変更します

func (*RepositoryImpl) ChangeTagRestrict

func (repo *RepositoryImpl) ChangeTagRestrict(id uuid.UUID, restrict bool) error

ChangeTagRestrict タグの制限を変更します

func (*RepositoryImpl) ChangeTagType

func (repo *RepositoryImpl) ChangeTagType(id uuid.UUID, tagType string) error

ChangeTagType タグの種類を変更します

func (*RepositoryImpl) ChangeUserAccountStatus

func (repo *RepositoryImpl) ChangeUserAccountStatus(id uuid.UUID, status model.UserAccountStatus) error

ChangeUserAccountStatus ユーザーのアカウント状態を変更します

func (*RepositoryImpl) ChangeUserDisplayName

func (repo *RepositoryImpl) ChangeUserDisplayName(id uuid.UUID, displayName string) error

ChangeUserDisplayName ユーザーの表示名を変更します

func (*RepositoryImpl) ChangeUserIcon

func (repo *RepositoryImpl) ChangeUserIcon(id, fileID uuid.UUID) error

ChangeUserIcon ユーザーのアイコンを変更します

func (*RepositoryImpl) ChangeUserPassword

func (repo *RepositoryImpl) ChangeUserPassword(id uuid.UUID, password string) error

ChangeUserPassword ユーザーのパスワードを変更します

func (*RepositoryImpl) ChangeUserTagLock

func (repo *RepositoryImpl) ChangeUserTagLock(userID, tagID uuid.UUID, locked bool) error

ChangeUserTagLock ユーザーのタグのロック状態を変更します

func (*RepositoryImpl) ChangeUserTwitterID

func (repo *RepositoryImpl) ChangeUserTwitterID(id uuid.UUID, twitterID string) error

ChangeUserTwitterID ユーザーのTwitterIDを変更します

func (*RepositoryImpl) CreateChildChannel

func (repo *RepositoryImpl) CreateChildChannel(name string, parentID, creatorID uuid.UUID) (*model.Channel, error)

CreateChildChannel 子チャンネルを作成します TODO トランザクション

func (*RepositoryImpl) CreateClip

func (repo *RepositoryImpl) CreateClip(messageID, folderID, userID uuid.UUID) (*model.Clip, error)

CreateClip クリップを作成します

func (*RepositoryImpl) CreateClipFolder

func (repo *RepositoryImpl) CreateClipFolder(userID uuid.UUID, name string) (*model.ClipFolder, error)

CreateClipFolder クリップフォルダを作成します

func (*RepositoryImpl) CreateMessage

func (repo *RepositoryImpl) CreateMessage(userID, channelID uuid.UUID, text string) (*model.Message, error)

CreateMessage メッセージを作成します

func (*RepositoryImpl) CreateMessageReport

func (repo *RepositoryImpl) CreateMessageReport(messageID, reporterID uuid.UUID, reason string) error

CreateMessageReport 指定したメッセージの通報を登録します

func (*RepositoryImpl) CreatePin

func (repo *RepositoryImpl) CreatePin(messageID, userID uuid.UUID) (uuid.UUID, error)

CreatePin ピン留めを作成する

func (*RepositoryImpl) CreatePrivateChannel

func (repo *RepositoryImpl) CreatePrivateChannel(name string, creatorID uuid.UUID, members []uuid.UUID) (*model.Channel, error)

CreatePrivateChannel プライベートチャンネルを作成します

func (*RepositoryImpl) CreatePublicChannel

func (repo *RepositoryImpl) CreatePublicChannel(name string, parent, creatorID uuid.UUID) (*model.Channel, error)

CreatePublicChannel パブリックチャンネルを作成します

func (*RepositoryImpl) CreateStamp

func (repo *RepositoryImpl) CreateStamp(name string, fileID, userID uuid.UUID) (s *model.Stamp, err error)

CreateStamp スタンプを作成します

func (*RepositoryImpl) CreateTag

func (repo *RepositoryImpl) CreateTag(name string, restricted bool, tagType string) (*model.Tag, error)

CreateTag タグを作成します

func (*RepositoryImpl) CreateUser

func (repo *RepositoryImpl) CreateUser(name, password string, role gorbac.Role) (*model.User, error)

CreateUser ユーザーを作成します

func (*RepositoryImpl) CreateUserGroup

func (repo *RepositoryImpl) CreateUserGroup(name, description string, adminID uuid.UUID) (*model.UserGroup, error)

CreateUserGroup ユーザーグループを作成します

func (*RepositoryImpl) CreateWebhook

func (repo *RepositoryImpl) CreateWebhook(name, description string, channelID, creatorID, iconFileID uuid.UUID) (model.Webhook, error)

CreateWebhook Webhookを作成します

func (*RepositoryImpl) DeleteChannel

func (repo *RepositoryImpl) DeleteChannel(channelID uuid.UUID) error

DeleteChannel 子孫チャンネルを含めてチャンネルを削除します

func (*RepositoryImpl) DeleteClip

func (repo *RepositoryImpl) DeleteClip(id uuid.UUID) error

DeleteClip クリップを削除します

func (*RepositoryImpl) DeleteClipFolder

func (repo *RepositoryImpl) DeleteClipFolder(id uuid.UUID) error

DeleteClipFolder クリップフォルダを削除します

func (*RepositoryImpl) DeleteFile

func (repo *RepositoryImpl) DeleteFile(fileID uuid.UUID) error

DeleteFile ファイルを削除します

func (*RepositoryImpl) DeleteMessage

func (repo *RepositoryImpl) DeleteMessage(messageID uuid.UUID) error

DeleteMessage メッセージを削除します

func (*RepositoryImpl) DeletePin

func (repo *RepositoryImpl) DeletePin(id uuid.UUID) error

DeletePin ピン留めを削除する

func (*RepositoryImpl) DeleteStamp

func (repo *RepositoryImpl) DeleteStamp(id uuid.UUID) (err error)

DeleteStamp 指定したIDのスタンプを削除します

func (*RepositoryImpl) DeleteUnreadsByChannelID

func (repo *RepositoryImpl) DeleteUnreadsByChannelID(channelID, userID uuid.UUID) error

DeleteUnreadsByChannelID 指定したチャンネルIDに存在する、指定したユーザーIDの未読レコードをすべて削除

func (*RepositoryImpl) DeleteUnreadsByMessageID

func (repo *RepositoryImpl) DeleteUnreadsByMessageID(messageID uuid.UUID) error

DeleteUnreadsByMessageID 指定したメッセージIDの未読レコードを全て削除

func (*RepositoryImpl) DeleteUserGroup

func (repo *RepositoryImpl) DeleteUserGroup(id uuid.UUID) error

DeleteUserGroup ユーザーグループを削除します

func (*RepositoryImpl) DeleteUserTag

func (repo *RepositoryImpl) DeleteUserTag(userID, tagID uuid.UUID) error

DeleteUserTag ユーザーからタグを削除します

func (*RepositoryImpl) DeleteWebhook

func (repo *RepositoryImpl) DeleteWebhook(id uuid.UUID) error

DeleteWebhook Webhookをdbから削除

func (*RepositoryImpl) GenerateIconFile

func (repo *RepositoryImpl) GenerateIconFile(salt string) (uuid.UUID, error)

GenerateIconFile アイコンファイルを生成します

func (*RepositoryImpl) GetAllChannels

func (repo *RepositoryImpl) GetAllChannels() (channels []*model.Channel, err error)

GetAllChannels 全てのチャンネルを取得する

func (*RepositoryImpl) GetAllDeviceTokens

func (repo *RepositoryImpl) GetAllDeviceTokens() (result []string, err error)

GetAllDeviceIDs 全ユーザーの全デバイストークンを取得

func (*RepositoryImpl) GetAllDevices

func (repo *RepositoryImpl) GetAllDevices() (result []*model.Device, err error)

GetAllDevices 全ユーザーの全デバイスを取得

func (*RepositoryImpl) GetAllStamps

func (repo *RepositoryImpl) GetAllStamps() (stamps []*model.Stamp, err error)

GetAllStamps 全てのスタンプを取得します

func (*RepositoryImpl) GetAllTags

func (repo *RepositoryImpl) GetAllTags() (result []*model.Tag, err error)

GetAllTags 全てのタグを取得します

func (*RepositoryImpl) GetAllUserGroups

func (repo *RepositoryImpl) GetAllUserGroups() ([]*model.UserGroup, error)

GetAllUserGroups 全てのグループを取得します

func (*RepositoryImpl) GetAllWebhooks

func (repo *RepositoryImpl) GetAllWebhooks() (arr []model.Webhook, err error)

GetAllWebhooks Webhookを全て取得

func (*RepositoryImpl) GetAscendantChannelIDs

func (repo *RepositoryImpl) GetAscendantChannelIDs(channelID uuid.UUID) ([]uuid.UUID, error)

GetAscendantChannelIDs 祖先チャンネルのIDを取得する

func (*RepositoryImpl) GetChannel

func (repo *RepositoryImpl) GetChannel(channelID uuid.UUID) (*model.Channel, error)

GetChannel チャンネルを取得する

func (*RepositoryImpl) GetChannelByMessageID

func (repo *RepositoryImpl) GetChannelByMessageID(messageID uuid.UUID) (*model.Channel, error)

GetChannelByMessageID メッセージIDによってチャンネルを取得

func (*RepositoryImpl) GetChannelDepth

func (repo *RepositoryImpl) GetChannelDepth(id uuid.UUID) (int, error)

GetChannelDepth 指定したチャンネル木の深さを取得する

func (*RepositoryImpl) GetChannelLatestMessagesByUserID

func (repo *RepositoryImpl) GetChannelLatestMessagesByUserID(userID uuid.UUID, limit int, subscribeOnly bool) ([]*model.Message, error)

GetChannelLatestMessagesByUserID 指定したユーザーが閲覧可能な全てのチャンネルの最新のメッセージの一覧を取得します

func (*RepositoryImpl) GetChannelPath

func (repo *RepositoryImpl) GetChannelPath(id uuid.UUID) (string, error)

GetChannelPath チャンネルのパス文字列を取得する

func (*RepositoryImpl) GetChannelsByUserID

func (repo *RepositoryImpl) GetChannelsByUserID(userID uuid.UUID) (channels []*model.Channel, err error)

GetChannelsByUserID ユーザーから見えるチャンネルの一覧を取得する

func (*RepositoryImpl) GetChildrenChannelIDs

func (repo *RepositoryImpl) GetChildrenChannelIDs(channelID uuid.UUID) (children []uuid.UUID, err error)

GetChildrenChannelIDs 子チャンネルのIDを取得する

func (*RepositoryImpl) GetClipFolder

func (repo *RepositoryImpl) GetClipFolder(id uuid.UUID) (*model.ClipFolder, error)

GetClipFolder 指定したIDのクリップフォルダを取得します

func (*RepositoryImpl) GetClipFolders

func (repo *RepositoryImpl) GetClipFolders(userID uuid.UUID) (res []*model.ClipFolder, err error)

GetClipFolders 指定したユーザーのクリップフォルダを全て取得します

func (*RepositoryImpl) GetClipMessage

func (repo *RepositoryImpl) GetClipMessage(id uuid.UUID) (*model.Clip, error)

GetClipMessage 指定したIDのクリップを取得します

func (*RepositoryImpl) GetClipMessages

func (repo *RepositoryImpl) GetClipMessages(folderID uuid.UUID) (res []*model.Clip, err error)

GetClipMessages 指定したフォルダのクリップを全て取得します

func (*RepositoryImpl) GetClipMessagesByUser

func (repo *RepositoryImpl) GetClipMessagesByUser(userID uuid.UUID) (res []*model.Clip, err error)

GetClipMessagesByUser 指定したユーザーのクリップを全て取得します

func (*RepositoryImpl) GetDescendantChannelIDs

func (repo *RepositoryImpl) GetDescendantChannelIDs(channelID uuid.UUID) ([]uuid.UUID, error)

GetDescendantChannelIDs 子孫チャンネルのIDを取得する

func (*RepositoryImpl) GetDeviceTokensByUserID

func (repo *RepositoryImpl) GetDeviceTokensByUserID(user uuid.UUID) (result []string, err error)

GetDeviceTokensByUserID ユーザーの全デバイストークンを取得

func (*RepositoryImpl) GetDevicesByUserID

func (repo *RepositoryImpl) GetDevicesByUserID(user uuid.UUID) (result []*model.Device, err error)

GetDevicesByUserID ユーザーのデバイスを取得

func (*RepositoryImpl) GetDirectMessageChannel

func (repo *RepositoryImpl) GetDirectMessageChannel(user1, user2 uuid.UUID) (*model.Channel, error)

GetOrCreateDirectMessageChannel DMチャンネル取得する

func (*RepositoryImpl) GetFS

func (repo *RepositoryImpl) GetFS() storage.FileStorage

GetFS ファイルストレージを取得します

func (*RepositoryImpl) GetFileMeta

func (repo *RepositoryImpl) GetFileMeta(fileID uuid.UUID) (*model.File, error)

GetFileMeta ファイルのメタデータを取得します

func (*RepositoryImpl) GetHeartbeatStatus

func (repo *RepositoryImpl) GetHeartbeatStatus(channelID uuid.UUID) (model.HeartbeatStatus, bool)

GetHeartbeatStatus channelIDで指定したHeartbeatStatusを取得する

func (*RepositoryImpl) GetMessageByID

func (repo *RepositoryImpl) GetMessageByID(messageID uuid.UUID) (*model.Message, error)

GetMessageByID messageIDで指定されたメッセージを取得します

func (*RepositoryImpl) GetMessageReports

func (repo *RepositoryImpl) GetMessageReports(offset, limit int) (arr []*model.MessageReport, err error)

GetMessageReports メッセージ通報を通報日時の昇順で取得します

func (*RepositoryImpl) GetMessageReportsByMessageID

func (repo *RepositoryImpl) GetMessageReportsByMessageID(messageID uuid.UUID) (arr []*model.MessageReport, err error)

GetMessageReportsByMessageID メッセージ通報を取得します

func (*RepositoryImpl) GetMessageReportsByReporterID

func (repo *RepositoryImpl) GetMessageReportsByReporterID(reporterID uuid.UUID) (arr []*model.MessageReport, err error)

GetMessageReportsByReporterID メッセージ通報を取得します

func (*RepositoryImpl) GetMessageStamps

func (repo *RepositoryImpl) GetMessageStamps(messageID uuid.UUID) (stamps []*model.MessageStamp, err error)

GetMessageStamps メッセージのスタンプを取得します

func (*RepositoryImpl) GetMessagesByChannelID

func (repo *RepositoryImpl) GetMessagesByChannelID(channelID uuid.UUID, limit, offset int) (arr []*model.Message, err error)

GetMessagesByChannelID 指定されたチャンネルのメッセージを取得します

func (*RepositoryImpl) GetMuteUserIDs

func (repo *RepositoryImpl) GetMuteUserIDs(channelID uuid.UUID) (ids []uuid.UUID, err error)

GetMuteUserIDs ミュートしているユーザーのIDの配列を取得します

func (*RepositoryImpl) GetMutedChannelIDs

func (repo *RepositoryImpl) GetMutedChannelIDs(userID uuid.UUID) (ids []uuid.UUID, err error)

GetMutedChannelIDs ミュートしているチャンネルのIDの配列を取得します

func (*RepositoryImpl) GetOrCreateTagByName

func (repo *RepositoryImpl) GetOrCreateTagByName(name string) (*model.Tag, error)

GetOrCreateTagByName 引数のタグを取得するか、生成したものを返します。

func (*RepositoryImpl) GetParentChannel

func (repo *RepositoryImpl) GetParentChannel(channelID uuid.UUID) (*model.Channel, error)

GetParentChannel 親のチャンネルを取得する

func (*RepositoryImpl) GetPin

func (repo *RepositoryImpl) GetPin(id uuid.UUID) (p *model.Pin, err error)

GetPin ピン留めを取得する

func (*RepositoryImpl) GetPinsByChannelID

func (repo *RepositoryImpl) GetPinsByChannelID(channelID uuid.UUID) (pins []*model.Pin, err error)

GetPinsByChannelID チャンネルのピン留めを全て取得する

func (*RepositoryImpl) GetPrivateChannelMemberIDs

func (repo *RepositoryImpl) GetPrivateChannelMemberIDs(channelID uuid.UUID) (users []uuid.UUID, err error)

GetPrivateChannelMemberIDs プライベートチャンネルのメンバーの配列を取得する

func (*RepositoryImpl) GetStamp

func (repo *RepositoryImpl) GetStamp(id uuid.UUID) (s *model.Stamp, err error)

GetStamp 指定したIDのスタンプを取得します

func (*RepositoryImpl) GetStaredChannels

func (repo *RepositoryImpl) GetStaredChannels(userID uuid.UUID) (ids []uuid.UUID, err error)

GetStaredChannels ユーザーがお気に入りをしているチャンネルIDを取得する

func (*RepositoryImpl) GetSubscribedChannelIDs

func (repo *RepositoryImpl) GetSubscribedChannelIDs(userID uuid.UUID) (channels []uuid.UUID, err error)

GetSubscribedChannelIDs ユーザーが購読しているチャンネルを取得する

func (*RepositoryImpl) GetSubscribingUserIDs

func (repo *RepositoryImpl) GetSubscribingUserIDs(channelID uuid.UUID) (users []uuid.UUID, err error)

GetSubscribingUserIDs 指定したチャンネルを購読しているユーザーを取得

func (*RepositoryImpl) GetTagByID

func (repo *RepositoryImpl) GetTagByID(id uuid.UUID) (*model.Tag, error)

GetTagByID タグを取得します

func (*RepositoryImpl) GetTagByName

func (repo *RepositoryImpl) GetTagByName(name string) (*model.Tag, error)

GetTagByName タグを取得します

func (*RepositoryImpl) GetUnreadMessagesByUserID

func (repo *RepositoryImpl) GetUnreadMessagesByUserID(userID uuid.UUID) (unreads []*model.Message, err error)

GetUnreadMessagesByUserID あるユーザーの未読メッセージをすべて取得

func (*RepositoryImpl) GetUser

func (repo *RepositoryImpl) GetUser(id uuid.UUID) (*model.User, error)

GetUser ユーザーを取得する

func (*RepositoryImpl) GetUserBelongingGroupIDs

func (repo *RepositoryImpl) GetUserBelongingGroupIDs(userID uuid.UUID) ([]uuid.UUID, error)

GetUserBelongingGroupIDs ユーザーが所属しているグループのUUIDを取得します

func (*RepositoryImpl) GetUserByName

func (repo *RepositoryImpl) GetUserByName(name string) (*model.User, error)

GetUserByName ユーザーを取得する

func (*RepositoryImpl) GetUserGroup

func (repo *RepositoryImpl) GetUserGroup(id uuid.UUID) (*model.UserGroup, error)

GetUserGroup ユーザーグループを取得します

func (*RepositoryImpl) GetUserGroupByName

func (repo *RepositoryImpl) GetUserGroupByName(name string) (*model.UserGroup, error)

GetUserGroupByName ユーザーグループを取得します

func (*RepositoryImpl) GetUserGroupMemberIDs

func (repo *RepositoryImpl) GetUserGroupMemberIDs(groupID uuid.UUID) ([]uuid.UUID, error)

GetUserGroupMemberIDs グループのメンバーのUUIDを取得します

func (*RepositoryImpl) GetUserIDsByTag

func (repo *RepositoryImpl) GetUserIDsByTag(tag string) (arr []uuid.UUID, err error)

GetUserIDsByTag 指定したタグを持った全ユーザーのUUIDを取得します

func (*RepositoryImpl) GetUserIDsByTagID

func (repo *RepositoryImpl) GetUserIDsByTagID(tagID uuid.UUID) (arr []uuid.UUID, err error)

GetUserIDsByTagID 指定したタグを持った全ユーザーのUUIDを取得します

func (*RepositoryImpl) GetUserLastOnline

func (repo *RepositoryImpl) GetUserLastOnline(id uuid.UUID) (time.Time, error)

GetUserLastOnline ユーザーの最終オンライン日時を取得します

func (*RepositoryImpl) GetUserStampHistory

func (repo *RepositoryImpl) GetUserStampHistory(userID uuid.UUID) (h []*model.UserStampHistory, err error)

GetUserStampHistory ユーザーのスタンプ履歴を最大50件取得します。

func (*RepositoryImpl) GetUserTag

func (repo *RepositoryImpl) GetUserTag(userID, tagID uuid.UUID) (*model.UsersTag, error)

GetUserTag ユーザータグを取得します

func (*RepositoryImpl) GetUserTagsByUserID

func (repo *RepositoryImpl) GetUserTagsByUserID(userID uuid.UUID) (tags []*model.UsersTag, err error)

GetUserTagsByUserID ユーザーに付与されているタグを取得します

func (*RepositoryImpl) GetUsers

func (repo *RepositoryImpl) GetUsers() (users []*model.User, err error)

GetUsers 全ユーザーの取得

func (*RepositoryImpl) GetUsersByTag

func (repo *RepositoryImpl) GetUsersByTag(tag string) (arr []*model.User, err error)

GetUsersByTag 指定したタグを持った全ユーザーを取得します

func (*RepositoryImpl) GetWebhook

func (repo *RepositoryImpl) GetWebhook(id uuid.UUID) (model.Webhook, error)

GetWebhook Webhookを取得

func (*RepositoryImpl) GetWebhooksByCreator

func (repo *RepositoryImpl) GetWebhooksByCreator(creatorID uuid.UUID) (arr []model.Webhook, err error)

GetWebhooksByCreator 指定した制作者のWebhookを全て取得

func (*RepositoryImpl) IsChannelAccessibleToUser

func (repo *RepositoryImpl) IsChannelAccessibleToUser(userID, channelID uuid.UUID) (bool, error)

IsChannelAccessibleToUser 指定したチャンネルが指定したユーザーからアクセス可能かどうか

func (*RepositoryImpl) IsChannelMuted

func (repo *RepositoryImpl) IsChannelMuted(userID, channelID uuid.UUID) (bool, error)

IsChannelMuted 指定したユーザーが指定したチャンネルをミュートしているかどうかを返します

func (*RepositoryImpl) IsChannelPresent

func (repo *RepositoryImpl) IsChannelPresent(name string, parent uuid.UUID) (bool, error)

IsChannelPresent チャンネル名が同階層に既に存在するか

func (*RepositoryImpl) IsFileAccessible

func (repo *RepositoryImpl) IsFileAccessible(fileID, userID uuid.UUID) (bool, error)

IsFileAccessible ユーザーがファイルにアクセス可能かどうか

func (*RepositoryImpl) IsPinned

func (repo *RepositoryImpl) IsPinned(messageID uuid.UUID) (bool, error)

IsPinned 指定したメッセージがピン留めされているかを取得する

func (*RepositoryImpl) IsStampNameDuplicate

func (repo *RepositoryImpl) IsStampNameDuplicate(name string) (bool, error)

IsStampNameDuplicate 指定した名前のスタンプが存在するかどうか

func (*RepositoryImpl) IsUserOnline

func (repo *RepositoryImpl) IsUserOnline(id uuid.UUID) bool

IsUserOnline ユーザーがオンラインかどうかを返します。

func (*RepositoryImpl) IsUserPrivateChannelMember

func (repo *RepositoryImpl) IsUserPrivateChannelMember(channelID, userID uuid.UUID) (bool, error)

IsUserPrivateChannelMember ユーザーがプライベートチャンネルのメンバーかどうかを確認します

func (*RepositoryImpl) MuteChannel

func (repo *RepositoryImpl) MuteChannel(userID, channelID uuid.UUID) error

MuteChannel 指定したチャンネルをミュートします

func (*RepositoryImpl) OpenFile

func (repo *RepositoryImpl) OpenFile(fileID uuid.UUID) (*model.File, io.ReadCloser, error)

OpenFile ファイルを開きます

func (*RepositoryImpl) OpenThumbnailFile

func (repo *RepositoryImpl) OpenThumbnailFile(fileID uuid.UUID) (*model.File, io.ReadCloser, error)

OpenThumbnailFile サムネイルファイルを開きます

func (*RepositoryImpl) RegenerateThumbnail

func (repo *RepositoryImpl) RegenerateThumbnail(fileID uuid.UUID) (bool, error)

RegenerateThumbnail サムネイル画像を再生成します

func (*RepositoryImpl) RegisterDevice

func (repo *RepositoryImpl) RegisterDevice(userID uuid.UUID, token string) (*model.Device, error)

RegisterDevice FCMデバイスを登録

func (*RepositoryImpl) RemoveStampFromMessage

func (repo *RepositoryImpl) RemoveStampFromMessage(messageID, stampID, userID uuid.UUID) (err error)

RemoveStampFromMessage メッセージからスタンプを削除します

func (*RepositoryImpl) RemoveStar

func (repo *RepositoryImpl) RemoveStar(userID, channelID uuid.UUID) error

RemoveStar チャンネルのお気に入りを解除します

func (*RepositoryImpl) RemoveUserFromGroup

func (repo *RepositoryImpl) RemoveUserFromGroup(userID, groupID uuid.UUID) error

RemoveUserFromGroup グループからユーザーを削除します

func (*RepositoryImpl) SaveFile

func (repo *RepositoryImpl) SaveFile(name string, src io.Reader, size int64, mimeType string, fType string, creatorID uuid.UUID) (*model.File, error)

SaveFile ファイルを保存します。mimeが指定されていない場合はnameの拡張子によって決まります

func (*RepositoryImpl) SaveFileWithACL

func (repo *RepositoryImpl) SaveFileWithACL(name string, src io.Reader, size int64, mimeType string, fType string, creatorID uuid.UUID, read repository.ACL) (*model.File, error)

SaveFileWithACL ファイルを保存します。mimeが指定されていない場合はnameの拡張子によって決まります

func (*RepositoryImpl) SetMessageUnread

func (repo *RepositoryImpl) SetMessageUnread(userID, messageID uuid.UUID) error

SetMessageUnread 指定したメッセージを未読にします

func (*RepositoryImpl) StampExists

func (repo *RepositoryImpl) StampExists(id uuid.UUID) (bool, error)

StampExists 指定したIDのスタンプが存在するかどうか

func (*RepositoryImpl) SubscribeChannel

func (repo *RepositoryImpl) SubscribeChannel(userID, channelID uuid.UUID) error

SubscribeChannel 指定したチャンネルを購読します

func (*RepositoryImpl) Sync

func (repo *RepositoryImpl) Sync() (bool, error)

Sync DBと同期します

func (*RepositoryImpl) UnmuteChannel

func (repo *RepositoryImpl) UnmuteChannel(userID, channelID uuid.UUID) error

UnmuteChannel 指定したチャンネルをアンミュートします

func (*RepositoryImpl) UnregisterDevice

func (repo *RepositoryImpl) UnregisterDevice(token string) (err error)

UnregisterDevice FCMデバイスを削除

func (*RepositoryImpl) UnsubscribeChannel

func (repo *RepositoryImpl) UnsubscribeChannel(userID, channelID uuid.UUID) error

UnsubscribeChannel 指定したチャンネルの購読を解除します

func (*RepositoryImpl) UpdateChannelAttributes

func (repo *RepositoryImpl) UpdateChannelAttributes(channelID uuid.UUID, visibility, forced *bool) error

UpdateChannelAttributes チャンネルの属性を変更します

func (*RepositoryImpl) UpdateChannelTopic

func (repo *RepositoryImpl) UpdateChannelTopic(channelID uuid.UUID, topic string, updaterID uuid.UUID) error

UpdateChannelTopic チャンネルトピックを更新します

func (*RepositoryImpl) UpdateClipFolderName

func (repo *RepositoryImpl) UpdateClipFolderName(id uuid.UUID, name string) error

UpdateClipFolderName クリップフォルダ名を更新します

func (*RepositoryImpl) UpdateHeartbeatStatus

func (repo *RepositoryImpl) UpdateHeartbeatStatus(userID, channelID uuid.UUID, status string)

UpdateHeartbeatStatus UserIDで指定されたUserのHeartbeatの更新を行う

func (*RepositoryImpl) UpdateMessage

func (repo *RepositoryImpl) UpdateMessage(messageID uuid.UUID, text string) error

UpdateMessage メッセージを更新します

func (*RepositoryImpl) UpdateStamp

func (repo *RepositoryImpl) UpdateStamp(id uuid.UUID, name string, fileID uuid.UUID) error

UpdateStamp スタンプの情報を更新します

func (*RepositoryImpl) UpdateUserGroup

func (repo *RepositoryImpl) UpdateUserGroup(id uuid.UUID, args repository.UpdateUserGroupNameArgs) error

UpdateUserGroup ユーザーグループを更新します

func (*RepositoryImpl) UpdateUserLastOnline

func (repo *RepositoryImpl) UpdateUserLastOnline(id uuid.UUID, time time.Time) (err error)

UpdateUserLastOnline ユーザーの最終オンライン日時を更新します

func (*RepositoryImpl) UpdateWebhook

func (repo *RepositoryImpl) UpdateWebhook(id uuid.UUID, name, description *string, channelID uuid.UUID) error

UpdateWebhook Webhookを更新します

func (*RepositoryImpl) UserExists

func (repo *RepositoryImpl) UserExists(id uuid.UUID) (bool, error)

UserExists 指定したIDのユーザーが存在するかどうか

type WebhookBot

type WebhookBot struct {
	ID          uuid.UUID  `gorm:"type:char(36);not null;primary_key"`
	BotUserID   uuid.UUID  `gorm:"type:char(36);not null;unique"`
	BotUser     model.User `gorm:"foreignkey:BotUserID"`
	Description string     `gorm:"type:text;not null"`
	ChannelID   uuid.UUID  `gorm:"type:char(36);not null"`
	CreatorID   uuid.UUID  `gorm:"type:char(36);not null"`
	CreatedAt   time.Time  `gorm:"precision:6"`
	UpdatedAt   time.Time  `gorm:"precision:6"`
	DeletedAt   *time.Time `gorm:"precision:6"`
}

WebhookBot DB用WebhookBot構造体

func (*WebhookBot) GetBotUserID

func (w *WebhookBot) GetBotUserID() uuid.UUID

GetBotUserID WebhookUserのIDを返します

func (*WebhookBot) GetChannelID

func (w *WebhookBot) GetChannelID() uuid.UUID

GetChannelID Webhookのデフォルト投稿チャンネルのIDを返します

func (*WebhookBot) GetCreatedAt

func (w *WebhookBot) GetCreatedAt() time.Time

GetCreatedAt Webhookの作成日時を返します

func (*WebhookBot) GetCreatorID

func (w *WebhookBot) GetCreatorID() uuid.UUID

GetCreatorID Webhookの製作者IDを返します

func (*WebhookBot) GetDescription

func (w *WebhookBot) GetDescription() string

GetDescription Webhookの説明を返します

func (*WebhookBot) GetID

func (w *WebhookBot) GetID() uuid.UUID

GetID WebhookIDを返します

func (*WebhookBot) GetName

func (w *WebhookBot) GetName() string

GetName Webhookの名前を返します

func (*WebhookBot) GetUpdatedAt

func (w *WebhookBot) GetUpdatedAt() time.Time

GetUpdatedAt Webhookの更新日時を返します

func (*WebhookBot) TableName

func (*WebhookBot) TableName() string

TableName Webhookのテーブル名

Jump to

Keyboard shortcuts

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