database

package
v0.0.0-...-dc1404f Latest Latest
Warning

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

Go to latest
Published: Jun 1, 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 string, description string) (Category, error)

func (*Category) FindAll

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

func (*Category) FindByCourseID

func (c *Category) FindByCourseID(courseID 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