Documentation ¶
Index ¶
- Constants
- type AirtableModerationStore
- func (s *AirtableModerationStore) Get(ctx context.Context, moderationStatus string) ([]RecipeModerationInstance, error)
- func (s *AirtableModerationStore) GetApproved(ctx context.Context) ([]RecipeModerationInstance, error)
- func (s *AirtableModerationStore) Save(ctx context.Context, recipes []*recipe.Recipe) error
- type Config
- type ModerationStore
- type RecipeModerationInstance
Constants ¶
View Source
const ( // Airtable schema Name = "Name" Description = "Description" Text = "Text" Lang = "Lang" Servings = "Servings" Time = "Time" Tags = "Tags" Ingredients = "Ingredients" Equipment = "Equipment" Rating = "Rating" Ideas = "Ideas" Sources = "Sources" Instructions = "Instructions" Nutrition = "Nutrition" Moderation = "Moderation" Error = "Error" Meta = "Meta" BaseSource = "Source" )
View Source
const ( // Moderation statuses // NB: for moderation statuses that are supposed to be queried by the store // a view with the same name should be created in the Airtable base ModerationStatusPending = "pending" ModerationStatusApproved = "approved" ModerationStatusRejected = "rejected" ModerationStatusNeedsChange = "needsChange" ModerationStatusFinished = "finished" ModerationStatusErrored = "errored" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AirtableModerationStore ¶
type AirtableModerationStore struct {
// contains filtered or unexported fields
}
func NewAirtableModerationStore ¶
func NewAirtableModerationStore(cfg Config, log logger.Logger) (*AirtableModerationStore, error)
func (*AirtableModerationStore) Get ¶
func (s *AirtableModerationStore) Get( ctx context.Context, moderationStatus string, ) ([]RecipeModerationInstance, error)
func (*AirtableModerationStore) GetApproved ¶
func (s *AirtableModerationStore) GetApproved(ctx context.Context) ([]RecipeModerationInstance, error)
type ModerationStore ¶
Click to show internal directories.
Click to hide internal directories.