repository

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package repository provides the task repository used by the postgres persistence example.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TaskRepository

type TaskRepository struct {
	// contains filtered or unexported fields
}

TaskRepository stores task descriptions in the tasks table.

func NewTaskRepository

func NewTaskRepository(persistor *keelpostgres.Persistor) *TaskRepository

NewTaskRepository returns a TaskRepository backed by persistor.

func (*TaskRepository) Drop

func (r *TaskRepository) Drop(ctx context.Context) error

Drop drops the order_numbers table if it exists.

func (*TaskRepository) Insert

func (r *TaskRepository) Insert(ctx context.Context, description string) error

Insert adds a task with the given description.

func (*TaskRepository) List

func (r *TaskRepository) List(ctx context.Context) (map[int32]string, error)

List returns all task descriptions keyed by ID.

Jump to

Keyboard shortcuts

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