film

package
v0.0.0-...-a562f3a Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateFilmLogRequest

type CreateFilmLogRequest struct {
	UserID       uint              `validate:"required"`
	Format       domain.FilmFormat `validate:"required"`
	Negative     *bool
	Brand        *string
	ISO          *int
	PurchaseDate *time.Time
	LoadDate     *time.Time
	Notes        string
}

CreateFilmLogRequest defines a create film log request

type CreatePhotoRequest

type CreatePhotoRequest struct {
	FilmLogID    uint `validate:"required"`
	Aperture     *float64
	ShutterSpeed *string
	Date         *time.Time
	Description  *string
	Tags         []string
	Location     *string
}

CreatePhotoRequest defines a create photo request

type Service

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

Service defines a film service

func NewService

func NewService(userRepo domain.UserRepository, filmRepo domain.FilmRepository) *Service

NewService create a new film service

func (*Service) CreateFilmLog

func (s *Service) CreateFilmLog(ctx context.Context, req CreateFilmLogRequest) error

CreateFilmLog create a new film log

func (*Service) CreatePhoto

func (s *Service) CreatePhoto(ctx context.Context, req CreatePhotoRequest) error

CreatePhoto create a new photo

func (*Service) DeleteFilmLog

func (s *Service) DeleteFilmLog(ctx context.Context, filmLogID uint) error

DeleteFilmLog delete a film log

func (*Service) DeletePhoto

func (s *Service) DeletePhoto(ctx context.Context, photoID uint) error

DeletePhoto delete a photo

func (*Service) GetFilmLog

func (s *Service) GetFilmLog(ctx context.Context, filmLogID uint) (*domain.FilmLog, error)

GetFilmLog get a film log

func (*Service) GetPhoto

func (s *Service) GetPhoto(ctx context.Context, photoID uint) (*domain.Photo, error)

GetPhoto get a photo

func (*Service) UpdateFilmLog

func (s *Service) UpdateFilmLog(ctx context.Context, req UpdateFilmLogRequest) error

UpdateFilmLog update a film log

func (*Service) UpdatePhoto

func (s *Service) UpdatePhoto(ctx context.Context, req UpdatePhotoRequest) error

UpdatePhoto update a photo

type UpdateFilmLogRequest

type UpdateFilmLogRequest struct {
	FilmLogID    uint
	UserID       *uint
	Format       *domain.FilmFormat
	Negative     *bool
	Brand        *string
	ISO          *int
	PurchaseDate *time.Time
	LoadDate     *time.Time
	Notes        *string
}

UpdateFilmLogRequest defines a create film log request

type UpdatePhotoRequest

type UpdatePhotoRequest struct {
	PhotoID      uint
	FilmLogID    *uint
	Aperture     *float64
	ShutterSpeed *string
	Date         *time.Time
	Description  *string
	Tags         []string
	Location     *string
}

UpdatePhotoRequest defines a update photo request

Jump to

Keyboard shortcuts

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