repository

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound        = errors.New("not found")
	ErrUniqueViolation = errors.New("unique violation")
)
View Source
var ErrPageNotFound = errors.New("page not found")
View Source
var ErrSiteNotFound = errors.New("site not found")

Functions

func LifeSpanConditions

func LifeSpanConditions(alias string, now time.Time) []any

func LifeSpanSort

func LifeSpanSort(alias string) cr.SortBy

Types

type Admin

type Admin interface {
	FindByEmail(ctx context.Context, email string) (model.Admin, error)
	// contains filtered or unexported methods
}

type Configuration

type Configuration interface {
	Load(ctx context.Context) (model.Configuration, error)
	Save(ctx context.Context, m *model.Configuration) error
}
type Menu interface {
	FindByHandle(ctx context.Context, handle string) (model.Menu, error)
	// contains filtered or unexported methods
}

type Node

type Node interface {
	FindWithChildren(ctx context.Context, id int64) ([]model.Node, error)
	// contains filtered or unexported methods
}

type Page

type Page interface {
	FindByParentID(ctx context.Context, parentID int64, now time.Time) ([]model.Page, error)
	FindByPattern(ctx context.Context, siteID int64, pattern string, now time.Time) (model.Page, error)
	FindByAlias(ctx context.Context, siteID int64, alias string, now time.Time) (model.Page, error)
	FindByURL(ctx context.Context, siteID int64, url string, now time.Time) (model.Page, error)
	// contains filtered or unexported methods
}

type Repository

type Repository[M any, ID any] interface {
	FindAndCount(ctx context.Context, criteria *cr.Criteria) ([]M, int, error)
	FindByID(ctx context.Context, id ID) (M, error)
	Delete(ctx context.Context, ids ...ID) error
	Create(ctx context.Context, m *M) error
	Update(ctx context.Context, m *M) error
}

type Site

type Site interface {
	FindByHosts(ctx context.Context, hosts []string, now time.Time) ([]model.Site, error)
	// contains filtered or unexported methods
}

type Template

type Template interface {
	FindByName(ctx context.Context, name string) (model.Template, error)
	// contains filtered or unexported methods
}

Directories

Path Synopsis
sql
pg

Jump to

Keyboard shortcuts

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