Versions in this module Expand all Collapse all v0 v0.8.0 Nov 17, 2024 v0.7.2 May 9, 2024 v0.7.1 May 6, 2024 Changes in this version type Queries + func (q *Queries) RemoveUnusedSpotifyCache(ctx context.Context) (int64, error) + func (q *Queries) RemoveUnusedYoutubeCache(ctx context.Context) (int64, error) v0.7.0 May 1, 2024 Changes in this version type CreatePostParams + Private int64 + type GetPostPageParams struct + ID int64 + P int64 type Post + Private int64 type Queries + func (q *Queries) GetPostLatest(ctx context.Context) (Post, error) + func (q *Queries) ListPublicPosts(ctx context.Context) ([]Post, error) type UpdatePostParams + Private int64 v0.6.1 Apr 19, 2024 Changes in this version + const PostsPerPage + type CreateMediafileParams struct + FileExtention string + FileName string + FilePath string + FileType string + Thumbnail []byte + type CreatePostParams struct + Content string + Tags sql.NullString + type CreateSpotifyCacheParams struct + ArtistID string + ArtistName string + AudioPreviewUrl string + CoverArtUrl string + TrackID string + TrackName string + type CreateYoutubebCacheParams struct + Author string + AuthorUrl string + Thumb string + Title string + YtID string + type DBTX interface + ExecContext func(context.Context, string, ...interface{}) (sql.Result, error) + PrepareContext func(context.Context, string) (*sql.Stmt, error) + QueryContext func(context.Context, string, ...interface{}) (*sql.Rows, error) + QueryRowContext func(context.Context, string, ...interface{}) *sql.Row + type GetAllTagsRow struct + Tag interface{} + TagCount int64 + type Mediafile struct + FileExtention string + FileName string + FilePath string + FileType string + ID int64 + Thumbnail []byte + UploadedAt time.Time + type Post struct + Content string + CreatedAt int64 + ID int64 + Tags sql.NullString + type Queries struct + func New(db DBTX) *Queries + func NewQueries(databaseSource string) *Queries + func (q *Queries) Backup(ctx context.Context) (string, error) + func (q *Queries) CreateMediafile(ctx context.Context, arg CreateMediafileParams) (Mediafile, error) + func (q *Queries) CreatePost(ctx context.Context, arg CreatePostParams) (Post, error) + func (q *Queries) CreateSpotifyCache(ctx context.Context, arg CreateSpotifyCacheParams) (SpotifyCache, error) + func (q *Queries) CreateYoutubebCache(ctx context.Context, arg CreateYoutubebCacheParams) (YoutubeCache, error) + func (q *Queries) DeleteMediafile(ctx context.Context, id int64) error + func (q *Queries) DeletePost(ctx context.Context, createdAt int64) error + func (q *Queries) GetAllTags(ctx context.Context) ([]GetAllTagsRow, error) + func (q *Queries) GetMediaThunbnail(ctx context.Context, filePath string) ([]byte, error) + func (q *Queries) GetMediafile(ctx context.Context, id int64) (Mediafile, error) + func (q *Queries) GetPost(ctx context.Context, createdAt int64) (Post, error) + func (q *Queries) GetPostCount(ctx context.Context) (int64, error) + func (q *Queries) GetPostPage(ctx context.Context, id int64) (int64, error) + func (q *Queries) GetSpotifyCache(ctx context.Context, trackID string) (SpotifyCache, error) + func (q *Queries) GetTagsCount(ctx context.Context) (int64, error) + func (q *Queries) GetYoutubeCache(ctx context.Context, ytID string) (YoutubeCache, error) + func (q *Queries) ListMediafiles(ctx context.Context) ([]Mediafile, error) + func (q *Queries) ListPosts(ctx context.Context) ([]Post, error) + func (q *Queries) QueryPost(ctx context.Context, tags []string, search string, page int) ([]Post, int, error) + func (q *Queries) UpdateMedia(ctx context.Context, arg UpdateMediaParams) error + func (q *Queries) UpdatePost(ctx context.Context, arg UpdatePostParams) error + func (q *Queries) WithTx(tx *sql.Tx) *Queries + type SpotifyCache struct + ArtistID string + ArtistName string + AudioPreviewUrl string + CoverArtUrl string + ID int64 + TrackID string + TrackName string + type UpdateMediaParams struct + FileName string + ID int64 + type UpdatePostParams struct + Content string + CreatedAt int64 + Tags sql.NullString + type YoutubeCache struct + Author string + AuthorUrl string + ID int64 + Thumb string + Title string + YtID string