service

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	Repository forum.RepositoryInterface
}

func (Service) Clear

func (s Service) Clear() error

func (Service) CreateForum

func (s Service) CreateForum(nf NewForum) (Forum, error)

func (Service) CreatePosts

func (s Service) CreatePosts(slugOrId string, posts []Post) ([]Post, error)

func (Service) CreateThread

func (s Service) CreateThread(t Thread) (Thread, error)

func (Service) CreateUser

func (s Service) CreateUser(u User) ([]User, error)

func (Service) CreateVote

func (s Service) CreateVote(slugOrID string, v Vote) (Thread, error)

func (Service) GetForum

func (s Service) GetForum(slug string) (Forum, error)

func (Service) GetPostAccount

func (s Service) GetPostAccount(id int64, related []string) (PostAccount, error)

func (Service) GetPosts

func (s Service) GetPosts(slugOrID string, lim int64, since, sort string, desc bool) ([]Post, error)

func (Service) GetThreadById

func (s Service) GetThreadById(id int64) (Thread, error)

func (Service) GetThreadBySlug

func (s Service) GetThreadBySlug(slug string) (Thread, error)

func (Service) GetThreads

func (s Service) GetThreads(forum string, limit int64, since string, desc bool) ([]Thread, error)

func (Service) GetUser

func (s Service) GetUser(nickname string) (User, error)

func (Service) GetUsersByForum

func (s Service) GetUsersByForum(forum string, limit int64, since string, desc bool) ([]User, error)

func (Service) Status

func (s Service) Status() (Status, error)

func (Service) UpdatePost

func (s Service) UpdatePost(id int64, p Post) (Post, error)

func (Service) UpdateThread

func (s Service) UpdateThread(t Thread) (Thread, error)

func (Service) UpdateUser

func (s Service) UpdateUser(u User) (User, error)

Jump to

Keyboard shortcuts

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