service

package
v0.0.0-...-3910e7f Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter = db.ImageFilter

type Item

type Item = db.Image

type Repository

type Repository interface {
	Get(context.Context, *Filter) (*Item, error)
	List(context.Context, *Filter) (*map[uuid.UUID]Item, error)
	Create(context.Context, *Item) (*uuid.UUID, error)
	Update(context.Context, *Item) error
	Patch(context.Context, *uuid.UUID, *map[string]interface{}) error
	UpdatedAt(context.Context, *uuid.UUID) (*time.Time, error)
	TableIndexCount(context.Context) (*uint64, error)
	MaxSortOrder(context.Context) (*uint64, error)
	Delete(context.Context, *uuid.UUID) error
}

type Service

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

func NewService

func NewService(repository *model.Model) *Service

func (*Service) Compression

func (s *Service) Compression(ctx context.Context, param *db.ImageCompression) error

func (*Service) Create

func (s *Service) Create(ctx context.Context, item *Item) (*uuid.UUID, error)

func (*Service) Delete

func (s *Service) Delete(ctx context.Context, id *uuid.UUID) error

func (*Service) Get

func (s *Service) Get(ctx context.Context, filter *Filter) (*Item, error)

func (*Service) List

func (s *Service) List(ctx context.Context, filter *Filter) (*map[uuid.UUID]Item, error)

func (*Service) MaxSortOrder

func (s *Service) MaxSortOrder(ctx context.Context) (*uint64, error)

func (*Service) Patch

func (s *Service) Patch(ctx context.Context, id *uuid.UUID, fields *map[string]interface{}) error

func (*Service) TableIndexCount

func (s *Service) TableIndexCount(ctx context.Context) (*uint64, error)

func (*Service) Update

func (s *Service) Update(ctx context.Context, item *Item) error

func (*Service) UpdatedAt

func (s *Service) UpdatedAt(ctx context.Context, id *uuid.UUID) (*time.Time, error)

Jump to

Keyboard shortcuts

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