database

package
v0.0.0-...-871226d Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBConn

func DBConn() (*pg.DB, error)

Types

type EmojiStore

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

func NewEmojiStore

func NewEmojiStore(db *pg.DB) *EmojiStore

func (*EmojiStore) Get

func (s *EmojiStore) Get(id int64) (*models.Emoji, error)

func (*EmojiStore) GetAll

func (s *EmojiStore) GetAll(animated bool, days int) ([]*Resp, error)

func (*EmojiStore) GetTop

func (s *EmojiStore) GetTop(emojiId int64, days int) ([]*models.Emoji, error)

type Resp

type Resp struct {
	EmojiId    int64
	EmojiName  string
	EmojiCount int
}

func (*Resp) Render

func (rd *Resp) Render(w http.ResponseWriter, r *http.Request) error

Jump to

Keyboard shortcuts

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