models

package
v0.0.0-...-401ff63 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoRecord = errors.New("models: no matching record found")

Functions

This section is empty.

Types

type List

type List struct {
	Name string
	Body string
}

type ListModel

type ListModel struct {
	DB *sql.DB
}

func (*ListModel) Get

func (m *ListModel) Get(name string) (*List, error)

This will return a specific list based on its name.

func (*ListModel) Insert

func (m *ListModel) Insert(name string, body string) error

This will insert a new list into the database.

func (*ListModel) Update

func (m *ListModel) Update(name string, body string) error

This will update a list in the database.

Jump to

Keyboard shortcuts

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