filtered

package
v1.18.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Service

func Service[T settings.Settings](service settings.CRUDService[T], f Filter[T]) settings.CRUDService[T]

Types

type Filter

type Filter[T settings.Settings] interface {
	Filter(v T) (bool, error)
	Suffix() string
}

type FilterService

type FilterService[T settings.Settings] struct {
	Service settings.CRUDService[T]
	Filter  Filter[T]
}

func (*FilterService[T]) Create

func (me *FilterService[T]) Create(v T) (*settings.Stub, error)

func (*FilterService[T]) Delete

func (me *FilterService[T]) Delete(id string) error

func (*FilterService[T]) Get

func (me *FilterService[T]) Get(id string, v T) error

func (*FilterService[T]) List

func (me *FilterService[T]) List() (settings.Stubs, error)

func (*FilterService[T]) NoCache

func (me *FilterService[T]) NoCache() bool

func (*FilterService[T]) SchemaID

func (me *FilterService[T]) SchemaID() string

func (*FilterService[T]) Update

func (me *FilterService[T]) Update(id string, v T) error

func (*FilterService[T]) Validate

func (me *FilterService[T]) Validate(v T) error

Jump to

Keyboard shortcuts

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