database

package
v0.0.0-...-c55a17e Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	ID          string
	Name        string
	Description string
	// contains filtered or unexported fields
}

func NewCategory

func NewCategory(db *sql.DB) *Category

func (*Category) Create

func (c *Category) Create(name, description string) (Category, error)

func (*Category) FindAll

func (c *Category) FindAll() ([]Category, error)

func (*Category) FindByID

func (c *Category) FindByID(categoryID string) (Category, error)

type Course

type Course struct {
	ID          string
	Name        string
	Description string
	CategoryID  string
	// contains filtered or unexported fields
}

func NewCourse

func NewCourse(db *sql.DB) *Course

func (*Course) Create

func (c *Course) Create(name, description, categoryID string) (Course, error)

func (*Course) FindAll

func (c *Course) FindAll() ([]Course, error)

func (*Course) FindByCategoryID

func (c *Course) FindByCategoryID(categoryID string) ([]Course, error)

Jump to

Keyboard shortcuts

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