repository

package
v0.0.0-...-ef30428 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository struct {
	DbConn *sqlx.DB
}

func (*Repository) Clear

func (r *Repository) Clear() error

func (*Repository) CreateForum

func (r *Repository) CreateForum(nf NewForum) error

func (*Repository) CreatePostsByPacket

func (r *Repository) CreatePostsByPacket(threadId int64, forumSLug string, posts []Post, created time.Time) ([]Post, error)

func (*Repository) CreateThread

func (r *Repository) CreateThread(t Thread) (Thread, error)

func (*Repository) CreateUser

func (r *Repository) CreateUser(u User) error

func (*Repository) CreateVote

func (r *Repository) CreateVote(id int64, v Vote) error

func (*Repository) FindUsers

func (r *Repository) FindUsers(nickname string, email string) ([]User, error)

func (*Repository) GetForum

func (r *Repository) GetForum(slug string) (Forum, error)

func (*Repository) GetPostById

func (r *Repository) GetPostById(id int64) (Post, error)

func (*Repository) GetPosts

func (r *Repository) GetPosts(threadID, limit int64, since string, sort string, desc bool) ([]Post, error)

func (*Repository) GetThreadById

func (r *Repository) GetThreadById(id int64) (Thread, error)

func (*Repository) GetThreadBySlug

func (r *Repository) GetThreadBySlug(slug string) (Thread, error)

func (*Repository) GetThreadForumSlug

func (r *Repository) GetThreadForumSlug(threadId int64) (string, error)

func (*Repository) GetThreadId

func (r *Repository) GetThreadId(slugOrId string) (int64, error)

func (*Repository) GetThreads

func (r *Repository) GetThreads(forum string, limit int64, since string, desc bool) ([]Thread, error)

func (*Repository) GetUserByEmail

func (r *Repository) GetUserByEmail(email string) (User, error)

func (*Repository) GetUserByNickname

func (r *Repository) GetUserByNickname(nickname string) (User, error)

func (*Repository) GetUsersByForum

func (r *Repository) GetUsersByForum(forum string, limit int64, since string, desc bool) ([]User, error)

func (*Repository) InitDBSQL

func (Rep *Repository) InitDBSQL() error

func (*Repository) InsertUsersToUsersInForum

func (r *Repository) InsertUsersToUsersInForum(users map[string]bool, forum string) error

func (*Repository) Status

func (r *Repository) Status() (Status, error)

func (*Repository) UpdateForumPosts

func (r *Repository) UpdateForumPosts(forum string, numPosts int) error

func (*Repository) UpdatePost

func (r *Repository) UpdatePost(id int64, p Post) (Post, error)

func (*Repository) UpdateThread

func (r *Repository) UpdateThread(t Thread) (Thread, error)

func (*Repository) UpdateUser

func (r *Repository) UpdateUser(u User) (User, error)

type Sync

type Sync struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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