filtered

package
v1.66.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: Apache-2.0 Imports: 4 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(ctx context.Context, v T) (*api.Stub, error)

func (*FilterService[T]) Delete

func (me *FilterService[T]) Delete(ctx context.Context, id string) error

func (*FilterService[T]) Get

func (me *FilterService[T]) Get(ctx context.Context, id string, v T) error

func (*FilterService[T]) List

func (me *FilterService[T]) List(ctx context.Context) (api.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(ctx context.Context, 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