pgsql

package
v0.0.0-...-c60e208 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2019 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAlreadyExists = echo.NewHTTPError(http.StatusInternalServerError, "Topic name  already exists.")
)

Custom errors

Functions

This section is empty.

Types

type Topic

type Topic struct{}

Topic represents the client for topic table

func NewTopic

func NewTopic() *Topic

NewTopic returns a new topic database instance

func (*Topic) Create

func (self *Topic) Create(db orm.DB, topicModel model.Topic) (*model.Topic, error)

Create creates a new topic on database

func (*Topic) Delete

func (self *Topic) Delete(db orm.DB, topic *model.Topic) error

Delete sets deleted_at for a topic

func (*Topic) List

func (self *Topic) List(db orm.DB, qp *model.FilterQuery, p *model.Pagination) ([]model.Topic, int, error)

List returns list of all topics retrievable for the current topic, depending on role

func (*Topic) Update

func (self *Topic) Update(db orm.DB, topic *model.Topic) error

Update updates topic's contact info

func (*Topic) View

func (self *Topic) View(db orm.DB, qp *model.FilterQuery) (*model.Topic, error)

View returns single topic by ID

Jump to

Keyboard shortcuts

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