database

package
v0.0.0-...-46ccc21 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(ctx context.Context, uri string) (*mongo.Client, error)

Types

type VideoEntity

type VideoEntity struct {
	Id   primitive.ObjectID `bson:"_id"`
	Path string
}

type VideoRepository

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

func NewVideoRepository

func NewVideoRepository(ctx context.Context, client *mongo.Client, dbName string) *VideoRepository

func (*VideoRepository) Find

func (vr *VideoRepository) Find(filter interface{}) (*mongo.Cursor, error)

func (*VideoRepository) FindById

func (vr *VideoRepository) FindById(id string) (video *VideoEntity, err error)

Jump to

Keyboard shortcuts

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