service

package
v0.6.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DaemonService

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

func NewDaemonService

func NewDaemonService(c PhotoServiceCaller) DaemonService

func (*DaemonService) ById added in v0.3.0

func (s *DaemonService) ById(id uuid.UUID) (*model.Daemon, error)

func (*DaemonService) ExistsById added in v0.4.0

func (s *DaemonService) ExistsById(id uuid.UUID) bool

func (*DaemonService) HeartBeat

func (s *DaemonService) HeartBeat(daemon *model.Daemon) error

func (*DaemonService) List added in v0.3.0

func (s *DaemonService) List(owner string) []*model.Daemon

func (*DaemonService) Register

func (s *DaemonService) Register(newDaemon *model.Daemon) (uuid.UUID, uint32, error)

func (*DaemonService) Watch

func (s *DaemonService) Watch()

type PhotoService

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

func NewPhotoService

func NewPhotoService(c PhotoServiceCaller) PhotoService

func (*PhotoService) ContentByHash

func (s *PhotoService) ContentByHash(ctx context.Context, daemon *model.Daemon, hash string) ([]byte, string, error)

func (*PhotoService) List

func (s *PhotoService) List(ctx context.Context, daemon *model.Daemon, offset uint32, limit uint32) ([]*model.Photo, uint32, error)

func (*PhotoService) ThumbnailByHash added in v0.4.0

func (s *PhotoService) ThumbnailByHash(ctx context.Context, daemon *model.Daemon, hash string, width uint32, height uint32) ([]byte, string, error)

type PhotoServiceCaller

type PhotoServiceCaller interface {
	List(ctx context.Context, d *model.Daemon, page uint32, pageSize uint32) ([]*model.Photo, uint32, error)
	Exists(ctx context.Context, d *model.Daemon, hash string) (bool, error)
	ContentByHash(ctx context.Context, d *model.Daemon, hash string) ([]byte, string, error)
	ThumbnailByHash(ctx context.Context, d *model.Daemon, hash string, width uint32, height uint32) ([]byte, string, error)
}

Jump to

Keyboard shortcuts

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