db

package
v0.0.0-...-fa6276c Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTable

func CreateTable()

func Delete

func Delete(id string)

func DeleteAssets

func DeleteAssets()

func DropTable

func DropTable()

func GetCategoryAsString

func GetCategoryAsString(category Category) string

func Insert

func Insert(content string)

func OpenDatabase

func OpenDatabase()

func ToInt

func ToInt(value *string) int

Types

type Asset

type Asset struct {
	Id        int
	Content   string
	Category  Category
	CreatedAt int
	UpdatedAt int
}

func GetAll

func GetAll() []*Asset

func GetAssetsBy

func GetAssetsBy(id *string) []*Asset

func GetBy

func GetBy(id int) *Asset

func Update

func Update(id int, content string) []*Asset

type Category

type Category int
const (
	Inbox Category = iota
	Project
	Area
	Resource
	Archive
)

Jump to

Keyboard shortcuts

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