Documentation ¶
Index ¶
- Constants
- type SQLDataProvider
- func (f *SQLDataProvider) AddStory(story, prompt string, storyType jokegen.StoryType) error
- func (f *SQLDataProvider) Close() error
- func (f *SQLDataProvider) GetMostRecentStory(storyType jokegen.StoryType) (jokegen.StoryResult, error)
- func (f *SQLDataProvider) GetRandomString(dataType jokegen.StoryDataType, storyType jokegen.StoryType) (string, error)
- type StoriesData
- type StoryData
Constants ¶
View Source
const (
StoryDatPath = "stories.json"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SQLDataProvider ¶
type SQLDataProvider struct {
// contains filtered or unexported fields
}
func MakeSQLDataProvider ¶
func MakeSQLDataProvider(connectionString string) *SQLDataProvider
func (*SQLDataProvider) AddStory ¶
func (f *SQLDataProvider) AddStory(story, prompt string, storyType jokegen.StoryType) error
func (*SQLDataProvider) Close ¶
func (f *SQLDataProvider) Close() error
func (*SQLDataProvider) GetMostRecentStory ¶
func (f *SQLDataProvider) GetMostRecentStory(storyType jokegen.StoryType) (jokegen.StoryResult, error)
func (*SQLDataProvider) GetRandomString ¶
func (f *SQLDataProvider) GetRandomString(dataType jokegen.StoryDataType, storyType jokegen.StoryType) (string, error)
type StoriesData ¶
type StoriesData struct {
Stories []*StoryData
}
Click to show internal directories.
Click to hide internal directories.