event_calc

package
v0.0.0-...-957e36a Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CTX_KEY_ADDR = "oct_user_addr"
)

Variables

This section is empty.

Functions

func Table

func Table(ctx *swe.Context, users []*UserData, pickers []Picker) [][]string

Types

type AddrMap

type AddrMap map[int64]*utils.RewardUserAddress

type Filter

type Filter interface {
	OK(user *UserData, strip *UserStrip) bool
}

func BuildFilter

func BuildFilter(cond *bs.EventCondition) Filter

type Picker

type Picker interface {
	Pick(ctx *swe.Context, user *UserData) string
	Header(ctx *swe.Context) string
}

func BuildPickers

func BuildPickers(ctx *swe.Context, validatedCondition *bs.EventCondition) []Picker

type UserData

type UserData struct {
	UID    int64
	SendTs int64
	Name   string

	Gift   []*db.GiftRecord
	SC     []*db.SuperChatRecord
	Member []*db.MembershipRecord
	// contains filtered or unexported fields
}

func EventUserfromDB

func EventUserfromDB(item *db.RewardUser) (*UserData, error)

func NewEventUser

func NewEventUser(uid int64) *UserData

func (*UserData) Column

func (user *UserData) Column() string

func (*UserData) Strip

func (user *UserData) Strip(strip *UserStrip) *UserData

type UserStrip

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

func NewEventUserStrip

func NewEventUserStrip() *UserStrip

Jump to

Keyboard shortcuts

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