repository

package
v0.0.0-...-18a9005 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2023 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const BookDiversityTagsTableName = "zula_book_diversity_tags"
View Source
const BookTableName = "zula_books"
View Source
const DiversityAndInclusionCatalogueTableName = "zula_diversity_and_inclusion_catalogue"
View Source
const PageTableName = "zula_pages"
View Source
const SessionTableName = "zula_sessions"
View Source
const TranslationTableName = "zula_translations"
View Source
const UserTableName = "zula_users"

Variables

This section is empty.

Functions

This section is empty.

Types

type BookDiversityTagsRepository

type BookDiversityTagsRepository interface {
	GetBookDiversityTag(ctx context.Context, id string) (dbmodel.BookDiversityTags, error)
	CreateBookDiversityTag(ctx context.Context, newBookDiversityTags dbmodel.BookDiversityTags) error
	ListBookDiversityTags(ctx context.Context) ([]dbmodel.BookDiversityTags, error)
	DeleteBookDiversityTag(ctx context.Context, id string) error
}

func NewBookDiversityTagsRepository

func NewBookDiversityTagsRepository() BookDiversityTagsRepository

type BookRepository

type BookRepository interface {
	GetBook(ctx context.Context, id idx.BookID) (dbmodel.Book, error)
	CreateBook(ctx context.Context, newBook dbmodel.Book) (dbmodel.Book, error)
	ListBooks(ctx context.Context) ([]dbmodel.Book, error)
	UpdateBook(ctx context.Context, updatedBook dbmodel.Book) error
	DeleteBook(ctx context.Context, id idx.BookID) error
}

func NewBookRepository

func NewBookRepository() BookRepository

type DiversityAndInclusionCatalogueRepository

type DiversityAndInclusionCatalogueRepository interface {
	GetDiversityAndInclusionCatalogueItem(ctx context.Context, id idx.DiversityAndInclusionID) (dbmodel.DiversityAndInclusionCatalogue, error)
	CreateDiversityAndInclusionCatalogueItem(ctx context.Context, newDiversityAndInclusionCatalogue dbmodel.DiversityAndInclusionCatalogue) error
	ListDiversityAndInclusionCatalogueItems(ctx context.Context) ([]dbmodel.DiversityAndInclusionCatalogue, error)
	UpdateDiversityAndInclusionCatalogueItem(ctx context.Context, updatedDiversityAndInclusionCatalogue dbmodel.DiversityAndInclusionCatalogue) error
	DeleteDiversityAndInclusionCatalogueItem(ctx context.Context, id idx.DiversityAndInclusionID) error
}

func NewDiversityAndInclusionCatalogueRepository

func NewDiversityAndInclusionCatalogueRepository() DiversityAndInclusionCatalogueRepository

type LanguageRepository

type LanguageRepository interface {
	ListLanguages() ([]dbmodel.Language, error)
}

func NewLanguageRepository

func NewLanguageRepository() LanguageRepository

type PageRepository

type PageRepository interface {
	GetPage(ctx context.Context, id idx.PageID) (dbmodel.Page, error)
	CreatePage(ctx context.Context, newPage dbmodel.Page) (dbmodel.Page, error)
	ListPages(ctx context.Context) ([]dbmodel.Page, error)
	ListPagesByTranslationID(ctx context.Context, translationID idx.TranslationID) ([]dbmodel.Page, error)
	UpdatePage(ctx context.Context, updatedPage dbmodel.Page) error
	DeletePage(ctx context.Context, id idx.PageID) error
}

func NewPageRepository

func NewPageRepository() PageRepository

type SessionRepository

type SessionRepository interface {
	GetSession(ctx context.Context, key idx.SessionID) (dbmodel.Session, error)
	CreateSession(ctx context.Context, newSession dbmodel.Session) error
	ListSessions(ctx context.Context) ([]dbmodel.Session, error)
	UpdateSession(ctx context.Context, updatedSession dbmodel.Session) error
	DeleteSession(ctx context.Context, key idx.SessionID) error
}

func NewSessionRepository

func NewSessionRepository() SessionRepository

type TranslationRepository

type TranslationRepository interface {
	GetTranslation(ctx context.Context, id idx.TranslationID) (dbmodel.Translation, error)
	CreateTranslation(ctx context.Context, newTranslation dbmodel.Translation) (dbmodel.Translation, error)
	ListTranslations(ctx context.Context) ([]dbmodel.Translation, error)
	ListTranslationsByBookID(ctx context.Context, bookID idx.BookID) ([]dbmodel.Translation, error)
	UpdateTranslation(ctx context.Context, updatedTranslation dbmodel.Translation) error
	DeleteTranslation(ctx context.Context, id idx.TranslationID) error
}

func NewTranslationRepository

func NewTranslationRepository() TranslationRepository

type UserRepository

type UserRepository interface {
	GetUser(ctx context.Context, id idx.UserID) (dbmodel.User, error)
	GetUserByEmailAddress(ctx context.Context, emailAddress string) (dbmodel.User, error)
	ListUsersByCode(ctx context.Context, code string) ([]dbmodel.User, error)
	CreateUser(ctx context.Context, newUser dbmodel.User) error
	ListUsers(ctx context.Context) ([]dbmodel.User, error)
	UpdateUser(ctx context.Context, updatedUser dbmodel.User) error
	DeleteUser(ctx context.Context, id idx.UserID) error
}

func NewUserRepository

func NewUserRepository() UserRepository

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL