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

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