dao

package
v0.0.0-...-18a3956 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBeatNotFound = errors.New("beat not found")
View Source
var ErrPlotPointNotFound = errors.New("plot point not found")

Functions

This section is empty.

Types

type BatchDeleteBeats

type BatchDeleteBeats interface {
	Exec(ctx context.Context, ids uuid.UUIDs, creatorID string) ([]*entities.Beat, error)
}

func NewBatchDeleteBeats

func NewBatchDeleteBeats(database bun.IDB) BatchDeleteBeats

type BatchDeletePlotPoints

type BatchDeletePlotPoints interface {
	Exec(ctx context.Context, ids uuid.UUIDs, creatorID string) ([]*entities.PlotPoint, error)
}

func NewBatchDeletePlotPoints

func NewBatchDeletePlotPoints(database bun.IDB) BatchDeletePlotPoints

type CreateBeat

type CreateBeat interface {
	Exec(ctx context.Context, id uuid.UUID, now time.Time, data *CreateBeatRequest) (*entities.Beat, error)
}

func NewCreateBeat

func NewCreateBeat(database bun.IDB) CreateBeat

type CreateBeatRequest

type CreateBeatRequest struct {
	Name      string
	Prompt    string
	CreatorID string
}

type CreatePlotPoint

type CreatePlotPoint interface {
	Exec(ctx context.Context, id uuid.UUID, now time.Time, data *CreatePlotPointRequest) (*entities.PlotPoint, error)
}

func NewCreatePlotPoint

func NewCreatePlotPoint(database bun.IDB) CreatePlotPoint

type CreatePlotPointRequest

type CreatePlotPointRequest struct {
	Name      string
	Prompt    string
	CreatorID string
}

type DeleteBeat

type DeleteBeat interface {
	Exec(ctx context.Context, id uuid.UUID, creatorID string) (*entities.Beat, error)
}

func NewDeleteBeat

func NewDeleteBeat(database bun.IDB) DeleteBeat

type DeletePlotPoint

type DeletePlotPoint interface {
	Exec(ctx context.Context, id uuid.UUID, creatorID string) (*entities.PlotPoint, error)
}

func NewDeletePlotPoint

func NewDeletePlotPoint(database bun.IDB) DeletePlotPoint

type GetBeat

type GetBeat interface {
	Exec(ctx context.Context, id uuid.UUID) (*entities.Beat, error)
}

func NewGetBeat

func NewGetBeat(database bun.IDB) GetBeat

type GetPlotPoint

type GetPlotPoint interface {
	Exec(ctx context.Context, id uuid.UUID) (*entities.PlotPoint, error)
}

func NewGetPlotPoint

func NewGetPlotPoint(database bun.IDB) GetPlotPoint

type ListBeats

type ListBeats interface {
	Exec(ctx context.Context, ids []uuid.UUID) ([]*entities.Beat, error)
}

func NewListBeats

func NewListBeats(database bun.IDB) ListBeats

type ListPlotPoints

type ListPlotPoints interface {
	Exec(ctx context.Context, ids []uuid.UUID) ([]*entities.PlotPoint, error)
}

func NewListPlotPoints

func NewListPlotPoints(database bun.IDB) ListPlotPoints

type SearchBeats

type SearchBeats interface {
	Exec(ctx context.Context, request *SearchBeatsRequest) (uuid.UUIDs, error)
}

func NewSearchBeats

func NewSearchBeats(database bun.IDB) SearchBeats

type SearchBeatsRequest

type SearchBeatsRequest struct {
	Limit         int
	Offset        int
	Sort          entities.SortBeat
	SortDirection database.SortDirection
	CreatorIDs    []string
}

type SearchPlotPoints

type SearchPlotPoints interface {
	Exec(ctx context.Context, request *SearchPlotPointsRequest) (uuid.UUIDs, error)
}

func NewSearchPlotPoints

func NewSearchPlotPoints(database bun.IDB) SearchPlotPoints

type SearchPlotPointsRequest

type SearchPlotPointsRequest struct {
	Limit         int
	Offset        int
	Sort          entities.SortPlotPoint
	SortDirection database.SortDirection
	CreatorIDs    []string
}

type UpdateBeat

type UpdateBeat interface {
	Exec(ctx context.Context, id uuid.UUID, now time.Time, data *UpdateBeatRequest) (*entities.Beat, error)
}

func NewUpdateBeat

func NewUpdateBeat(database bun.IDB) UpdateBeat

type UpdateBeatRequest

type UpdateBeatRequest struct {
	Name      string
	Prompt    string
	CreatorID string
}

type UpdatePlotPoint

type UpdatePlotPoint interface {
	Exec(ctx context.Context, id uuid.UUID, now time.Time, data *UpdatePlotPointRequest) (*entities.PlotPoint, error)
}

func NewUpdatePlotPoint

func NewUpdatePlotPoint(database bun.IDB) UpdatePlotPoint

type UpdatePlotPointRequest

type UpdatePlotPointRequest struct {
	Name      string
	Prompt    string
	CreatorID string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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