Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidFilmFormat = errors.New("not a valid FilmFormat")
Functions ¶
This section is empty.
Types ¶
type FilmFormat ¶
type FilmFormat string
FilmFormat is the type of film. ENUM(45, 110, 120, 127, 135, 810, other)
const ( // FilmFormat45 is a FilmFormat of type 45. FilmFormat45 FilmFormat = "45" // FilmFormat110 is a FilmFormat of type 110. FilmFormat110 FilmFormat = "110" // FilmFormat120 is a FilmFormat of type 120. FilmFormat120 FilmFormat = "120" // FilmFormat127 is a FilmFormat of type 127. FilmFormat127 FilmFormat = "127" // FilmFormat135 is a FilmFormat of type 135. FilmFormat135 FilmFormat = "135" // FilmFormat810 is a FilmFormat of type 810. FilmFormat810 FilmFormat = "810" // FilmFormatOther is a FilmFormat of type other. FilmFormatOther FilmFormat = "other" )
func ParseFilmFormat ¶
func ParseFilmFormat(name string) (FilmFormat, error)
ParseFilmFormat attempts to convert a string to a FilmFormat.
func (FilmFormat) IsValid ¶
func (x FilmFormat) IsValid() bool
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (FilmFormat) String ¶
func (x FilmFormat) String() string
String implements the Stringer interface.
type FilmLog ¶
type FilmLog struct { ID uint UserID uint Format FilmFormat Negative *bool Brand *string ISO *int PurchaseDate *time.Time LoadDate *time.Time Notes string }
FilmLog recode one film information.
type FilmRepository ¶
type FilmRepository interface { CreateFilmLog(ctx context.Context, filmLog *FilmLog) error ListFilmLogs(ctx context.Context) ([]*FilmLog, error) GetFilmLog(ctx context.Context, filmLogID uint) (*FilmLog, error) UpdateFilmLog(ctx context.Context, filmLog *FilmLog) error DeleteFilmLog(ctx context.Context, filmLogID uint) error CreatePhoto(ctx context.Context, photo *Photo) error ListPhotos(ctx context.Context, filmLogID uint) ([]*Photo, error) GetPhoto(ctx context.Context, photoID uint) (*Photo, error) UpdatePhoto(ctx context.Context, photo *Photo) error DeletePhoto(ctx context.Context, photoID uint) error }
FilmRepository defines a film repository
type Photo ¶
type Photo struct { ID uint FilmLogID uint Aperture *float64 ShutterSpeed *string Date *time.Time Description *string Tags []string Location *string }
Photo is the smallest unit.
Click to show internal directories.
Click to hide internal directories.