wiki/storage/interface.go

28 lines
783 B
Go
Raw Normal View History

2017-02-10 18:52:07 +01:00
package storage
type Interface interface {
TermInterface
RevisionInterface
2017-02-10 18:52:07 +01:00
}
type TermInterface interface {
2017-02-10 18:52:07 +01:00
CreateTerm(term *Term) error
UpdateTerm(term *Term) error
RemoveTerm(term *Term) error
GetTermByName(name string) (*Term, error)
GetTermBySlug(slug string) (*Term, error)
GetTermByID(id string) (*Term, error)
2017-02-10 22:00:26 +01:00
GetTerms() ([]*Term, error)
2017-02-10 18:52:07 +01:00
}
type RevisionInterface interface {
2017-02-10 22:00:26 +01:00
CreateRevision(revision *Revision) error
RemoveRevision(revision *Revision) error
RemoveRevisionsByTermID(termID string) error
GetRevisionByTermName(termName string) (*Revision, error)
GetRevisionByTermSlug(termSlug string) (*Revision, error)
GetRevisionByTermID(termID string) (*Revision, error)
GetRevisionByID(id string) (*Revision, error)
GetRevisions() ([]*Revision, error)
2017-02-10 18:52:07 +01:00
}