39 lines
847 B
Go
39 lines
847 B
Go
package lib
|
|
|
|
import (
|
|
"math/big"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
type Date struct {
|
|
DaysSinceEpoch uint64
|
|
}
|
|
|
|
type PluginData struct {
|
|
Name string
|
|
CanReturnPoints bool
|
|
CanAddPoints bool
|
|
CanCheckMod bool
|
|
OnDataReturn string
|
|
CanAcceptArbitraryPointAmount bool
|
|
RecommendedPoints *big.Int
|
|
PluginHTML string
|
|
PluginScript string
|
|
ApiCode func(*gin.Context, ApiInput) (*big.Int, error)
|
|
HasExtraAPI bool
|
|
ExtraAPICode func(*gin.Context)
|
|
}
|
|
|
|
type ApiInput struct {
|
|
InputPoints *big.Int
|
|
AddPointsFunction func(string, *big.Int)
|
|
ChannelID string
|
|
OptionalData string
|
|
}
|
|
|
|
type DateAndStream struct {
|
|
Date Date
|
|
Stream *big.Int
|
|
}
|