core

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Core

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

func New

func New(db db.DB) Core

func (Core) AddKarma

func (c Core) AddKarma(ctx context.Context, guildID, userID string) (models.KarmaCount, error)

AddKarma increments the karma for a user

func (Core) GetKarma

func (c Core) GetKarma(ctx context.Context, guildID, userID string) (models.KarmaCount, error)

func (Core) GetTopCounts added in v1.2.0

func (c Core) GetTopCounts(ctx context.Context, guildID string, top int) ([]models.KarmaCount, error)

Directories

Path Synopsis
Package models provides the structs exposed by the core package, but put in an independent package to break the dependency cycle between `core` and `db`
Package models provides the structs exposed by the core package, but put in an independent package to break the dependency cycle between `core` and `db`

Jump to

Keyboard shortcuts

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