store

package
v0.0.0-...-dec19c8 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Logger *zap.Logger
	DSN    string
}

type Store

type Store struct {
	*store.Database
}

func New

func New(ctx context.Context, cfg *Config) (*Store, error)

func (*Store) Create

func (s *Store) Create(ctx context.Context, vi *model.Video) error

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, id, userID string) error

func (*Store) DeleteUploadedParts

func (s *Store) DeleteUploadedParts(ctx context.Context, vid string) error

func (*Store) Get

func (s *Store) Get(ctx context.Context, id, userID string) (*model.Video, error)

func (*Store) GetAll

func (s *Store) GetAll(ctx context.Context, userID string) ([]*model.Video, error)

func (*Store) GetListByStatus

func (s *Store) GetListByStatus(ctx context.Context, status model.Status) ([]*model.Video, error)

func (*Store) Update

func (s *Store) Update(ctx context.Context, vi *model.Video) error

func (*Store) UpdatePart

func (s *Store) UpdatePart(ctx context.Context, vid string, part *model.Part) error

func (*Store) UpdateStatus

func (s *Store) UpdateStatus(ctx context.Context, vi *model.Video) error

func (*Store) Usage

func (s *Store) Usage(ctx context.Context, userID string) (*model.UserUsage, error)

Jump to

Keyboard shortcuts

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