Documentation ¶
Index ¶
- func DeletePlaylists(ctx context.Context, eggsID string, playlistIDs []string) (n int64, err error)
- func GenerateRandomString(s int) (string, error)
- func GetArray(query url.Values, key string) []string
- func GetAuthenticatedUserCount(ctx context.Context) (n int64, err error)
- func GetCachedUserCount(ctx context.Context) (n int64, err error)
- func GetEggsIDByToken(ctx context.Context, token string) (eggsID string, err error)
- func GetFollowCount(ctx context.Context) (n int64, err error)
- func GetIntArray(query url.Values, key string) []int
- func GetLikeCount(ctx context.Context, target string) (n int64, err error)
- func GetPlaylistCount(ctx context.Context) (n int64, err error)
- func GetSongCount(ctx context.Context) (n int64, err error)
- func GetUserCredentials(ctx context.Context, user User) (eggsID string, token string, err error)
- func InsertUser(ctx context.Context, user User, token string) (err error)
- func LikeObjects(ctx context.Context, eggsID string, targets LikeTargetsFixed) (n int64, err error)
- func PostPlaylists(ctx context.Context, eggsID string, playlistInputs []PlaylistInput) (inserted int64, updated int64, err error)
- func PostSongs(ctx context.Context, songData []SongData) (n int64, err error)
- func PostUserStubs(ctx context.Context, users []UserStub) (inserted int64, updated int64, err error)
- func PutFollows(ctx context.Context, followerID string, followeeIDs []string) (delta int64, total int64, err error)
- func PutLikes(ctx context.Context, eggsID string, targets LikeTargetsFixed) (delta int64, total int64, err error)
- func PutPlaylists(ctx context.Context, eggsID string, playlistInputs PlaylistInputs) (delta int64, total int64, err error)
- func RollbackTransaction(tx pgx.Tx)
- func SongExists(ctx context.Context, musicID string) (exists bool, err error)
- func SubmitFollows(ctx context.Context, followerID string, followeeIDs []string) (n int64, err error)
- func ToggleFollow(ctx context.Context, followerID string, followeeID string) (isFollowing bool, err error)
- func ToggleLike(ctx context.Context, eggsID string, target LikeTarget) (isFollowing bool, err error)
- func UNSAFEDeleteUser(ctx context.Context, eggsID string) (err error)
- func UpdateUserDetails(ctx context.Context, user User) (err error)
- func UpdateUserToken(ctx context.Context, user User, token string) (err error)
- type ArtistData
- type Follow
- type Follows
- type Like
- type LikeTarget
- type LikeTargets
- type LikeTargetsFixed
- type Likes
- type Paginator
- type PartialFollow
- type PartialLike
- type PartialPlaylist
- type PlaylistInput
- type PlaylistInputs
- type SearchSongResp
- type SongData
- type StructuredFollow
- type StructuredFollows
- type StructuredLike
- type StructuredLikes
- type StructuredPlaylist
- type StructuredPlaylists
- type TimelineItem
- type User
- type UserRaw
- type UserStub
- type UserStubs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeletePlaylists ¶
func GenerateRandomString ¶
func GetEggsIDByToken ¶
func GetUserCredentials ¶
func LikeObjects ¶
func PostPlaylists ¶
func PostUserStubs ¶
func PutFollows ¶
func PutPlaylists ¶
func RollbackTransaction ¶
func RollbackTransaction(tx pgx.Tx)
func SubmitFollows ¶
func ToggleFollow ¶
func ToggleLike ¶
Types ¶
type ArtistData ¶
type Follows ¶
type Follows []Follow
func (Follows) Contains ¶
func (arr Follows) Contains(b PartialFollow) bool
type LikeTarget ¶
type LikeTarget struct { ID string `json:"id" db:"target_id"` Type string `json:"type" db:"target_type"` }
func (LikeTarget) IsValid ¶
func (a LikeTarget) IsValid() bool
type LikeTargets ¶
type LikeTargets []LikeTarget
func (LikeTargets) IDs ¶
func (arr LikeTargets) IDs() []string
func (LikeTargets) IsValid ¶
func (arr LikeTargets) IsValid() bool
type LikeTargetsFixed ¶
type LikeTargetsFixed struct { Targets []LikeTarget `json:"targets"` Type string `json:"type"` }
func (LikeTargetsFixed) IDs ¶
func (arr LikeTargetsFixed) IDs() []string
func (LikeTargetsFixed) IsValid ¶
func (arr LikeTargetsFixed) IsValid() bool
type Paginator ¶
func InitializePaginator ¶
type PartialFollow ¶
type PartialLike ¶
type PartialPlaylist ¶
type PlaylistInput ¶
type PlaylistInputs ¶
type PlaylistInputs []PlaylistInput
func (PlaylistInputs) PartialPlaylists ¶
func (arr PlaylistInputs) PartialPlaylists(eggsID string) (o []PartialPlaylist)
func (PlaylistInputs) PlaylistIDs ¶
func (arr PlaylistInputs) PlaylistIDs() (o []string)
type SearchSongResp ¶
type SongData ¶
type SongData struct { MusicID string `json:"musicId"` ReleaseDate time.Time `json:"releaseDate"` ArtistData ArtistData `json:"artistData"` }
type StructuredFollow ¶
type StructuredFollows ¶
type StructuredFollows struct { Follows []StructuredFollow `json:"follows"` Total int64 `json:"total"` }
func GetFollows ¶
func (StructuredFollows) ContainsFollowee ¶
func (arr StructuredFollows) ContainsFollowee(b UserStub) bool
func (StructuredFollows) ContainsFolloweeID ¶
func (arr StructuredFollows) ContainsFolloweeID(b string) bool
func (StructuredFollows) ContainsFollower ¶
func (arr StructuredFollows) ContainsFollower(b UserStub) bool
func (StructuredFollows) ContainsFollowerID ¶
func (arr StructuredFollows) ContainsFollowerID(b string) bool
type StructuredLike ¶
type StructuredLikes ¶
type StructuredLikes struct { Likes []StructuredLike `json:"likes"` Total int64 `json:"total"` }
func GetLikedObjects ¶
func (StructuredLikes) Contains ¶
func (arr StructuredLikes) Contains(b PartialLike) bool
type StructuredPlaylist ¶
type StructuredPlaylists ¶
type StructuredPlaylists struct { Playlists []StructuredPlaylist `json:"playlists"` Total int64 `json:"total"` }
func GetPlaylists ¶
func (StructuredPlaylists) Contains ¶
func (arr StructuredPlaylists) Contains(b PartialPlaylist) bool
type TimelineItem ¶
type TimelineItem struct { ID string `json:"id" db:"id"` Type string `json:"type" db:"type"` Target string `json:"target" db:"target"` Timestamp time.Time `json:"timestamp" db:"timestamp"` }
func GetTimeline ¶
type User ¶
type User struct { UserID int `json:"userId" db:"user_id"` EggsID string `json:"userName" db:"eggs_id"` DisplayName string `json:"displayName" db:"display_name"` IsArtist bool `json:"isArtist" db:"is_artist"` ImageDataPath string `json:"imageDataPath" db:"image_data_path"` PrefectureCode int `json:"prefectureCode" db:"prefecture_code"` ProfileText string `json:"profile" db:"profile_text"` }
type UserRaw ¶
type UserRaw struct { Data struct { UserName string `json:"userName"` ArtistName string `json:"artistName"` DisplayName string `json:"displayName"` ArtistID int `json:"artistId"` UserID int `json:"userId"` ImageDataPath string `json:"imageDataPath"` PrefectureCode int `json:"prefectureCode"` ProfileText string `json:"profile"` } `json:"data"` }
type UserStub ¶
type UserStub struct { UserID int `json:"userId" db:"user_id"` EggsID string `json:"userName" db:"eggs_id"` DisplayName string `json:"displayName" db:"display_name"` IsArtist bool `json:"isArtist" db:"is_artist"` ImageDataPath string `json:"imageDataPath" db:"image_data_path"` PrefectureCode int `json:"prefectureCode" db:"prefecture_code"` ProfileText string `json:"profile" db:"profile_text"` }
func GetUserStubFromToken ¶
type UserStubs ¶
type UserStubs []UserStub
func (UserStubs) ContainsID ¶
func (UserStubs) StringSlice ¶
Click to show internal directories.
Click to hide internal directories.