Documentation ¶
Index ¶
- type CreateFilmLogRequest
- type CreatePhotoRequest
- type Service
- func (s *Service) CreateFilmLog(ctx context.Context, req CreateFilmLogRequest) error
- func (s *Service) CreatePhoto(ctx context.Context, req CreatePhotoRequest) error
- func (s *Service) DeleteFilmLog(ctx context.Context, filmLogID uint) error
- func (s *Service) DeletePhoto(ctx context.Context, photoID uint) error
- func (s *Service) GetFilmLog(ctx context.Context, filmLogID uint) (*domain.FilmLog, error)
- func (s *Service) GetPhoto(ctx context.Context, photoID uint) (*domain.Photo, error)
- func (s *Service) UpdateFilmLog(ctx context.Context, req UpdateFilmLogRequest) error
- func (s *Service) UpdatePhoto(ctx context.Context, req UpdatePhotoRequest) error
- type UpdateFilmLogRequest
- type UpdatePhotoRequest
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 ¶
DeleteFilmLog delete a film log
func (*Service) DeletePhoto ¶
DeletePhoto delete a photo
func (*Service) GetFilmLog ¶
GetFilmLog get a film log
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
Click to show internal directories.
Click to hide internal directories.