Documentation ¶
Index ¶
- Variables
- func NewMemberRepository(mongo *db.MongoInstance, config *configs.Config) member.MemberRepository
- func NewMemoRepository(i *db.MongoInstance) memos.Repository
- func NewMusicRepository(c *configs.Config, cc cache.Cache, yc clients.YoutubeClient) musics.MusicRepository
- func NewTagRepository() tag.TagRepository
- type MemoData
- type MemoMongoRepository
- func (r *MemoMongoRepository) AddMemo(deviceToken string, videoID string, body string, tags []string) (string, error)
- func (r *MemoMongoRepository) DeleteMemo(id string) error
- func (r *MemoMongoRepository) GetMemo(id string) (*memos.Memo, error)
- func (r *MemoMongoRepository) GetMemoByUniqueKey(memoOrVideoID, deviceToken string) (*memos.Memo, error)
- func (r *MemoMongoRepository) GetMemoByVideoID(id string) (*memos.Memo, error)
- func (r *MemoMongoRepository) GetMemos(deviceToken string) (memos.Memos, error)
- func (r *MemoMongoRepository) UpdateBody(id string, body string) error
- type MusicRepository
- func (m *MusicRepository) GetMusic(videoID string) (*musics.Music, error)
- func (m *MusicRepository) GetMusicList(q, pageToken string) (musicListResponse *musics.MusicListDto, isCached bool, err error)
- func (m *MusicRepository) GetMusicsByIDs(videoIDs []string) (musics.Musics, error)
- func (m *MusicRepository) GetPlayListBy(order, pageToken string) (musicListResponse *musics.MusicListDto, err error)
- func (m *MusicRepository) SaveMusicList(key string, musicList []byte) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func NewMemberRepository ¶
func NewMemberRepository(mongo *db.MongoInstance, config *configs.Config) member.MemberRepository
func NewMemoRepository ¶
func NewMemoRepository(i *db.MongoInstance) memos.Repository
func NewMusicRepository ¶
func NewMusicRepository(c *configs.Config, cc cache.Cache, yc clients.YoutubeClient) musics.MusicRepository
func NewTagRepository ¶
func NewTagRepository() tag.TagRepository
Types ¶
type MemoData ¶
type MemoData struct { ID primitive.ObjectID `json:"id" bson:"_id"` DeviceToken string `bson:"deviceToken"` YoutubeVideoID string `bson:"youtubeVideoId"` Body string `bson:"body"` Tags []string `bson:"tags"` CreatedAt primitive.Timestamp `bson:"createdAt"` UpdatedAt primitive.Timestamp `bson:"updatedAt"` }
type MemoMongoRepository ¶
type MemoMongoRepository struct {
// contains filtered or unexported fields
}
func (*MemoMongoRepository) DeleteMemo ¶
func (r *MemoMongoRepository) DeleteMemo(id string) error
func (*MemoMongoRepository) GetMemo ¶
func (r *MemoMongoRepository) GetMemo(id string) (*memos.Memo, error)
func (*MemoMongoRepository) GetMemoByUniqueKey ¶
func (r *MemoMongoRepository) GetMemoByUniqueKey(memoOrVideoID, deviceToken string) (*memos.Memo, error)
GetMemoByUniqueKey returns member's memo with (memoID or youtubeVideoID) and deviceToken
func (*MemoMongoRepository) GetMemoByVideoID ¶
func (r *MemoMongoRepository) GetMemoByVideoID(id string) (*memos.Memo, error)
func (*MemoMongoRepository) GetMemos ¶
func (r *MemoMongoRepository) GetMemos(deviceToken string) (memos.Memos, error)
func (*MemoMongoRepository) UpdateBody ¶
func (r *MemoMongoRepository) UpdateBody(id string, body string) error
type MusicRepository ¶
type MusicRepository struct {
// contains filtered or unexported fields
}
func (*MusicRepository) GetMusic ¶
func (m *MusicRepository) GetMusic(videoID string) (*musics.Music, error)
func (*MusicRepository) GetMusicList ¶
func (m *MusicRepository) GetMusicList(q, pageToken string) (musicListResponse *musics.MusicListDto, isCached bool, err error)
func (*MusicRepository) GetMusicsByIDs ¶
func (m *MusicRepository) GetMusicsByIDs(videoIDs []string) (musics.Musics, error)
func (*MusicRepository) GetPlayListBy ¶
func (m *MusicRepository) GetPlayListBy(order, pageToken string) (musicListResponse *musics.MusicListDto, err error)
func (*MusicRepository) SaveMusicList ¶
func (m *MusicRepository) SaveMusicList(key string, musicList []byte) error
Click to show internal directories.
Click to hide internal directories.