Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPicture ¶
NewPicture creates a new Picture object
Types ¶
type Image ¶
type Image interface { ID() string // UUID of this picture info group Name() string // "Really cool picture 800x600" Tags() []string // tags for this picture, e.g. "cat", "dog" AddPicture(pic Picture) error // Append new picture to image Pictures() []Picture // Slice of of PictureInfo with the same image }
Group of PictureInfo with the same image. For example it can be same image with different resolution.
type ImageJSON ¶
type ImageJSON struct { ID string `json:"id"` Name string `json:"name"` Tags []string `json:"tags"` Pictures []PictureJSON `json:"pictures"` }
func NewImageJSON ¶
type ImageRepo ¶
type ImageRepo interface { // Put stores a Image into repository. Put(ctx context.Context, img Image) error Get(ctx context.Context, reqImg Image) (Image, error) }
ImageRepo is an interface for a repository of Image.
type ImageRepoLog ¶
type ImageRepoLog struct { }
func NewImageRepoLog ¶
func NewImageRepoLog() *ImageRepoLog
type Picture ¶
type Picture interface { ID() string // UUID of this picture info URL() string // "http://www.example.com/image800x600.jpg" Resolution() string // original resolution of the picture in pixels, e.g. "1024x768", "640x480" Image() Image // Parent image for this picture info SetImage(img Image) error }
Picture is an interface for a picture information.
Click to show internal directories.
Click to hide internal directories.