badgecount

package
v1.10.11 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadgeCountNotFound = errors.New("badge count not found")
)

Functions

This section is empty.

Types

type Record

type Record struct {
	Id uint64

	Owner      string
	BadgeCount uint32

	LastUpdatedAt time.Time
	CreatedAt     time.Time
}

func (*Record) Clone

func (r *Record) Clone() Record

func (*Record) CopyTo

func (r *Record) CopyTo(dst *Record)

func (*Record) Validate

func (r *Record) Validate() error

type Store

type Store interface {
	// Add adds to the owner account's badge count
	Add(ctx context.Context, owner string, amount uint32) error

	// Reset resets the badge count for an owner account to zero
	Reset(ctx context.Context, owner string) error

	// Get gets a badge count record for an owner
	Get(ctx context.Context, owner string) (*Record, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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