hacker-quotes/hacker.go

30 lines
700 B
Go

package hacker
import (
"github.com/zorchenhimer/hacker-quotes/models"
//"github.com/zorchenhimer/hacker-quotes/database"
)
type HackerQuotes interface {
// Random returns a completely randomized quote.
Random() (string, error)
// Format returns a quote in the given format.
Format(format string) (string, error)
// InitData populates the underlying database with data from the given json file.
InitData(filename string) error
}
type Admin interface {
AddNoun(word models.Noun) error
AddVerb(word models.Verb) error
RemoveNoun(word string) error
// Word is the indefinite form.
RemoveVerb(word string) error
GetNouns() ([]models.Noun, error)
GetVerbs() ([]models.Verb, error)
}