db

package
v0.0.0-...-b6312d7 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: Apache-2.0 Imports: 9 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 {
	Host     string
	User     string
	Password string
	Dbname   string
	Port     string
}

func GetConf

func GetConf() *Config

type Handler

type Handler struct {
	DB *gorm.DB
}

func GetHandler

func GetHandler(dbClient *gorm.DB) *Handler

func (*Handler) Create

func (h *Handler) Create(ctx context.Context, videos []*models.Videos) error

func (*Handler) GetById

func (h *Handler) GetById(ctx context.Context, id string) (*models.Videos, error)

func (*Handler) GetBySearchKey

func (h *Handler) GetBySearchKey(ctx context.Context, searchKey string) ([]models.Videos, error)

func (*Handler) GetByToken

func (h *Handler) GetByToken(ctx context.Context, token string) ([]models.Videos, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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