Documentation ¶
Index ¶
- type AssetReader
- type AssetService
- type AssetWriter
- type RecipeService
- func (s *RecipeService) Create(ctx context.Context, content []byte) (xid.ID, error)
- func (s *RecipeService) Delete(ctx context.Context, id xid.ID) error
- func (s *RecipeService) ImageWriter(ctx context.Context, id xid.ID, filename, mediaType string) (*AssetWriter, error)
- func (s *RecipeService) List(ctx context.Context) ([]models.ListRecipeMetadataRow, error)
- func (s *RecipeService) ListImages(ctx context.Context, id xid.ID) ([]models.Asset, error)
- func (s *RecipeService) Read(ctx context.Context, id xid.ID) ([]byte, error)
- func (s *RecipeService) Update(ctx context.Context, id xid.ID, content []byte) error
- type ThumbnailSize
- type TransactionService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssetReader ¶
type AssetReader struct { models.ReadAssetRow // contains filtered or unexported fields }
type AssetService ¶
type AssetService struct {
// contains filtered or unexported fields
}
func NewAssetService ¶
func NewAssetService(transactions *TransactionService) *AssetService
func (*AssetService) Reader ¶
func (s *AssetService) Reader(ctx context.Context, id xid.ID) (*AssetReader, error)
func (*AssetService) ThumbnailReader ¶
func (s *AssetService) ThumbnailReader(ctx context.Context, id xid.ID, size ThumbnailSize) (*AssetReader, error)
func (*AssetService) Writer ¶
func (s *AssetService) Writer(ctx context.Context, filename, mediaTyp string) (*AssetWriter, error)
type AssetWriter ¶
func (*AssetWriter) Close ¶
func (w *AssetWriter) Close() error
type RecipeService ¶
type RecipeService struct {
// contains filtered or unexported fields
}
func NewRecipeService ¶
func NewRecipeService( transactions *TransactionService, assets *AssetService, parser *parser.RecipeParser, ) *RecipeService
func (*RecipeService) ImageWriter ¶
func (s *RecipeService) ImageWriter(ctx context.Context, id xid.ID, filename, mediaType string) (*AssetWriter, error)
func (*RecipeService) List ¶
func (s *RecipeService) List(ctx context.Context) ([]models.ListRecipeMetadataRow, error)
func (*RecipeService) ListImages ¶
type ThumbnailSize ¶
type ThumbnailSize uint8
const ( ThumbnailUnknown ThumbnailSize = iota ThumbnailTile ThumbnailBanner )
func (ThumbnailSize) String ¶
func (s ThumbnailSize) String() string
func (*ThumbnailSize) UnmarshalText ¶
func (s *ThumbnailSize) UnmarshalText(text []byte) error
type TransactionService ¶
type TransactionService struct {
// contains filtered or unexported fields
}
func NewTransactionService ¶
func NewTransactionService(db *sql.DB) *TransactionService
func (*TransactionService) Querier ¶
func (s *TransactionService) Querier(ctx context.Context) models.Querier
func (*TransactionService) Transactional ¶
Click to show internal directories.
Click to hide internal directories.