database

package
v0.0.0-...-2bca508 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DbHandler

type DbHandler interface {
	Get(dest interface{}, query string, args ...interface{}) error
	Select(dest interface{}, query string, args ...interface{}) error
	Exec(query string, args ...interface{}) (Result, error)
}

type Result

type Result interface {
	LastInsertId() (int64, error)
	RowsAffected() (int64, error)
}

type TagListRepository

type TagListRepository struct {
	DbHandler
}

func (*TagListRepository) Delete

func (repo *TagListRepository) Delete(tagID uuid.UUID) error

func (*TagListRepository) FindAll

func (repo *TagListRepository) FindAll() (domain.TagLists, error)

func (*TagListRepository) FindByName

func (repo *TagListRepository) FindByName(name string) (domain.Texts, error)

func (*TagListRepository) FindByTagID

func (repo *TagListRepository) FindByTagID(tagID uuid.UUID) (domain.TagLists, error)

func (*TagListRepository) FindByTextID

func (repo *TagListRepository) FindByTextID(textID uuid.UUID) (domain.TagLists, error)

func (*TagListRepository) Store

func (repo *TagListRepository) Store(tagList domain.TagList) (domain.TagList, error)

func (*TagListRepository) Update

func (repo *TagListRepository) Update(tagList domain.TagList) (domain.TagList, error)

type TagRepository

type TagRepository struct {
	DbHandler
}

func (*TagRepository) FindAll

func (repo *TagRepository) FindAll() (domain.Tags, error)

func (*TagRepository) FindByID

func (repo *TagRepository) FindByID(id uuid.UUID) (domain.Tag, error)

func (*TagRepository) Store

func (repo *TagRepository) Store(tag domain.Tag) (domain.Tag, error)

type TextRepository

type TextRepository struct {
	DbHandler
}

func (*TextRepository) DeleteByID

func (repo *TextRepository) DeleteByID(id uuid.UUID) error

func (*TextRepository) FindAll

func (repo *TextRepository) FindAll() (domain.Texts, error)

func (*TextRepository) FindByID

func (repo *TextRepository) FindByID(id uuid.UUID) (domain.Text, error)

func (*TextRepository) Store

func (repo *TextRepository) Store(text domain.Text) (domain.Text, error)

func (*TextRepository) Update

func (repo *TextRepository) Update(text domain.Text) error

type UserCreateRepository

type UserCreateRepository struct {
	DbHandler
}

func (*UserCreateRepository) Delete

func (repo *UserCreateRepository) Delete(u domain.UserCreate) error

func (*UserCreateRepository) DeleteByTextID

func (repo *UserCreateRepository) DeleteByTextID(textID uuid.UUID) error

func (*UserCreateRepository) DeleteByUserID

func (repo *UserCreateRepository) DeleteByUserID(userID uuid.UUID) error

func (*UserCreateRepository) FindAll

func (repo *UserCreateRepository) FindAll() (domain.UserCreates, error)

func (*UserCreateRepository) FindByTextID

func (repo *UserCreateRepository) FindByTextID(textID uuid.UUID) (domain.UserCreate, error)

func (*UserCreateRepository) FindByUserID

func (repo *UserCreateRepository) FindByUserID(userID uuid.UUID) (domain.Texts, error)

func (*UserCreateRepository) Store

func (repo *UserCreateRepository) Store(userCreate domain.UserCreate) (domain.UserCreate, error)

func (*UserCreateRepository) Update

func (repo *UserCreateRepository) Update(userCreate domain.UserCreate) error

type UserLikeRepository

type UserLikeRepository struct {
	DbHandler
}

func (*UserLikeRepository) CheckLikeUser

func (repo *UserLikeRepository) CheckLikeUser(userLike domain.UserLike) (bool, error)

func (*UserLikeRepository) Delete

func (repo *UserLikeRepository) Delete(u domain.UserLike) error

func (*UserLikeRepository) DeleteByTextID

func (repo *UserLikeRepository) DeleteByTextID(textID uuid.UUID) error

func (*UserLikeRepository) DeleteByUserID

func (repo *UserLikeRepository) DeleteByUserID(userID uuid.UUID) error

func (*UserLikeRepository) FindAll

func (repo *UserLikeRepository) FindAll() (domain.UserLikes, error)

func (*UserLikeRepository) FindByTextID

func (repo *UserLikeRepository) FindByTextID(textID uuid.UUID) (domain.UserLike, error)

func (*UserLikeRepository) FindByUserID

func (repo *UserLikeRepository) FindByUserID(userID uuid.UUID) (domain.Texts, error)

func (*UserLikeRepository) Store

func (repo *UserLikeRepository) Store(userLike domain.UserLike) (domain.UserLike, error)

func (*UserLikeRepository) Update

func (repo *UserLikeRepository) Update(userLike domain.UserLike) error

type UserRepository

type UserRepository struct {
	DbHandler
}

func (*UserRepository) FindAll

func (repo *UserRepository) FindAll() (domain.Users, error)

func (*UserRepository) FindByID

func (repo *UserRepository) FindByID(id uuid.UUID) (domain.User, error)

func (*UserRepository) Store

func (repo *UserRepository) Store(user domain.User) (domain.User, error)

Jump to

Keyboard shortcuts

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