Documentation
¶
Index ¶
- Constants
- Variables
- func AccessSecretVersion(name string) (*string, error)
- func AddBigInts(a, b []byte) []byte
- func AddSyncStats(validators []uint64, ...) types.SyncCommitteesStats
- func AddressToWithdrawalCredentials(address []byte) ([]byte, error)
- func AuthorizedAPIMiddleware(next http.Handler) http.Handler
- func BitAtVector(b []byte, i int) bool
- func BitAtVectorReversed(b []byte, i int) bool
- func CORSMiddleware(next http.Handler) http.Handler
- func ClToCurrency(valIf interface{}, currency string) decimal.Decimal
- func ClToCurrencyGwei(valIf interface{}, currency string) decimal.Decimal
- func ClToMainCurrency(valIf interface{}) decimal.Decimal
- func CmdPrompt(label string) string
- func CopyButton(clipboardText interface{}) string
- func CopyButtonText(clipboardText interface{}) string
- func CreateAccessToken(userID, appID, deviceID uint64, pkg, theme string) (string, int, error)
- func DayOfSlot(slot uint64) uint64
- func DayToTime(day int64) time.Time
- func DerefString(str *string) string
- func EffectiveProductId(productId string) string
- func EffectiveProductName(productId string) string
- func ElToCurrency(valIf interface{}, currency string) decimal.Decimal
- func ElToMainCurrency(valIf interface{}) decimal.Decimal
- func ElementExists(arr []string, el string) bool
- func EpochOfSlot(slot uint64) uint64
- func EpochToTime(epoch uint64) time.Time
- func EpochsPerDay() uint64
- func Eth1BlockReward(blockNumber uint64, difficulty []byte) *big.Int
- func Eth1TotalReward(block *types.Eth1BlockIndexed) *big.Int
- func EthBytesToFloat(b []byte) float64
- func FirstEpochOfSyncPeriod(syncPeriod uint64) uint64
- func FixAddressCasing(add string) string
- func ForkVersionAtEpoch(epoch uint64) *types.ForkVersion
- func FormatAddCommas(n uint64) template.HTML
- func FormatAddCommasFormatted(num float64, precision uint) template.HTML
- func FormatAddress(address []byte, token []byte, name string, verified bool, isContract bool, ...) template.HTML
- func FormatAddressAll(address []byte, name string, isContract bool, link string, digitsLimit int, ...) template.HTML
- func FormatAddressAsLink(address []byte, name string, isContract bool) template.HTML
- func FormatAddressAsTokenLink(token, address []byte, name string, verified bool, isContract bool) template.HTML
- func FormatAddressEthBalance(balance *types.Eth1AddressBalance) template.HTML
- func FormatAddressLong(address string) template.HTML
- func FormatAddressToWithdrawalCredentials(address []byte, addCopyButton bool) template.HTML
- func FormatAddressWithLimits(address []byte, name string, isContract bool, link string, digitsLimit int, ...) template.HTML
- func FormatAddressWithLimitsInAddressPageTable(mainAddress []byte, txAddress []byte, name string, isContract bool, ...) template.HTML
- func FormatAmount(amount *big.Int, unit string, digits int) template.HTML
- func FormatAmountFormatted(amount *big.Int, unit string, digits int, maxPreCommaDigitsBeforeTrim int, ...) template.HTML
- func FormatAttestationInclusionEffectiveness(eff float64) template.HTML
- func FormatAttestationInclusionSlot(blockSlot uint64) template.HTML
- func FormatAttestationStatus(status uint64) template.HTML
- func FormatAttestationStatusShort(status uint64) template.HTML
- func FormatAttestorAssignmentKey(AttesterSlot, CommitteeIndex, MemberIndex uint64) string
- func FormatBalance(balanceInt uint64, currency string) template.HTML
- func FormatBalanceChange(balance *int64, currency string) template.HTML
- func FormatBalanceChangeFormatted(balance *int64, currencyName string, details *itypes.ValidatorEpochIncome) template.HTML
- func FormatBalanceGwei(balance *int64, currency string) template.HTML
- func FormatBalanceShort(balanceInt uint64, currency string) template.HTML
- func FormatBalanceSql(balanceInt sql.NullInt64, currency string) template.HTML
- func FormatBigAmount(amount *hexutil.Big, unit string, digits int) template.HTML
- func FormatBigNumberAddCommasFormated(val hexutil.Big, precision uint) template.HTML
- func FormatBitlist(b []byte) template.HTML
- func FormatBlobVersionedHash(h []byte) template.HTML
- func FormatBlockHash(hash []byte) template.HTML
- func FormatBlockNumber(number uint64) template.HTML
- func FormatBlockRoot(blockRoot []byte) template.HTML
- func FormatBlockSlot(blockSlot uint64) template.HTML
- func FormatBlockStatus(status, slot uint64) template.HTML
- func FormatBlockStatusShort(status, slot uint64) template.HTML
- func FormatBlockUsage(gasUsage uint64, gasLimit uint64) template.HTML
- func FormatBuilder(pubkey []byte) template.HTML
- func FormatBytes(b []byte, addCopyToClipboard bool, link string) template.HTML
- func FormatBytesAmount(amount []byte, unit string, digits int) template.HTML
- func FormatClCurrency(value interface{}, targetCurrency string, digitsAfterComma int, ...) template.HTML
- func FormatClCurrencyString(value interface{}, targetCurrency string, digitsAfterComma int, ...) string
- func FormatCount(count uint64, finalized bool, shortenCalcHint bool) template.HTML
- func FormatCurrentBalance(balanceInt uint64, currency string) template.HTML
- func FormatDepositAmount(balanceInt uint64, currency string) template.HTML
- func FormatDifficulty(number *big.Int) string
- func FormatETH(num string) string
- func FormatEffectiveBalance(balanceInt uint64, currency string) template.HTML
- func FormatElCurrency(value interface{}, targetCurrency string, digitsAfterComma int, ...) template.HTML
- func FormatElCurrencyString(value interface{}, targetCurrency string, digitsAfterComma int, ...) string
- func FormatEligibleBalance(balanceInt uint64, currency string) template.HTML
- func FormatEpoch(epoch uint64) template.HTML
- func FormatErc20Decimals(balance []byte, metadata *types.ERC20Metadata) decimal.Decimal
- func FormatEth1Address(addr []byte) template.HTML
- func FormatEth1AddressFull(addr common.Address) template.HTML
- func FormatEth1AddressStringLowerCase(addr []byte) template.HTML
- func FormatEth1Block(block uint64) template.HTML
- func FormatEth1BlockHash(block []byte) template.HTML
- func FormatEth1TxHash(hash []byte) template.HTML
- func FormatEth1TxStatus(status uint64) template.HTML
- func FormatEtherValue(currency string, ethPrice decimal.Decimal, currentPrice template.HTML) template.HTML
- func FormatEthstoreComparison(pool string, val float64) template.HTML
- func FormatFloat(num float64, precision int) string
- func FormatFloatWithDigits(num float64, min, max int) template.HTML
- func FormatFloatWithDigitsString(num float64, min, max int) string
- func FormatGlobalParticipationRate(e uint64, r float64, currency string) template.HTML
- func FormatGraffiti(graffiti []byte) template.HTML
- func FormatGraffitiAsLink(graffiti []byte) template.HTML
- func FormatGraffitiString(graffiti string) string
- func FormatHash(hash []byte, trunc_opt ...bool) template.HTML
- func FormatHashLong(hash common.Hash) template.HTML
- func FormatHashRaw(hash []byte, trunc_opt ...bool) string
- func FormatHashWithCopy(hash []byte) template.HTML
- func FormatHashrate(h float64) template.HTML
- func FormatInOutSelf(address, from, to []byte) template.HTML
- func FormatInclusionDelay(inclusionSlot uint64, delay int64) template.HTML
- func FormatIncome(balance interface{}, currency string, includeCurrency bool) template.HTML
- func FormatIncomeClEl(income types.ClEl, currency string) template.HTML
- func FormatIncomeClElInt64(income types.ClElInt64, currency string) template.HTML
- func FormatIncomeSql(balanceInt sql.NullInt64, currency string) template.HTML
- func FormatMachineName(machineName string) template.HTML
- func FormatMessageToHtml(message string) template.HTML
- func FormatMethod(method string) template.HTML
- func FormatNotificationChannel(ch types.NotificationChannel) template.HTML
- func FormatNumber(number interface{}) string
- func FormatParticipation(v float64) template.HTML
- func FormatPercentage(percentage float64) string
- func FormatPercentageColoredEmoji(percentage float64) template.HTML
- func FormatPercentageWithGPrecision(percentage float64, precision int) string
- func FormatPercentageWithPrecision(percentage float64, precision int) string
- func FormatPoolPerformance(val float64) template.HTML
- func FormatPricedValue(val interface{}, valueCurrency, targetCurrency string) template.HTML
- func FormatPublicKey(validator []byte) template.HTML
- func FormatRPL(num string) string
- func FormatSlashedValidator(validator uint64) template.HTML
- func FormatSlashedValidatorInt64(validator int64) template.HTML
- func FormatSlashedValidatorWithName(validator uint64, name string) template.HTML
- func FormatSlashedValidators(validators []uint64) template.HTML
- func FormatSlashedValidatorsWithName(validators []uint64, nameMap map[uint64]string) template.HTML
- func FormatSlotToTimestamp(blockSlot uint64) template.HTML
- func FormatSqlInt64(i sql.NullInt64) template.HTML
- func FormatSyncParticipationStatus(status, blockSlot uint64) template.HTML
- func FormatSyncParticipations(participants uint64) template.HTML
- func FormatThousandsEnglish(number string) string
- func FormatTimestamp(ts int64) template.HTML
- func FormatTokenBalance(balance *types.Eth1AddressBalance) template.HTML
- func FormatTokenIcon(icon []byte, size int) template.HTML
- func FormatTokenName(balance *types.Eth1AddressBalance) template.HTML
- func FormatTokenSymbol(symbol string) string
- func FormatTokenSymbolTitle(symbol string) string
- func FormatTokenValue(balance *types.Eth1AddressBalance, fullAmountTooltip bool) template.HTML
- func FormatTracePath(callType string, tracePath []int64, success bool, method string) template.HTML
- func FormatTransactionHash(hash []byte, successful bool) template.HTML
- func FormatTransactionType(txnType uint8) string
- func FormatTsWithoutTooltip(ts int64) template.HTML
- func FormatTxHash(hash string) template.HTML
- func FormatValidator(validator uint64) template.HTML
- func FormatValidatorInt64(validator int64) template.HTML
- func FormatValidatorName(name string) template.HTML
- func FormatValidatorStatus(status string) template.HTML
- func FormatValidatorTag(tag string) template.HTML
- func FormatValidatorTags(tags []string) template.HTML
- func FormatValidatorWithName(validator interface{}, name string) template.HTML
- func FormatWithdawalCredentials(hash []byte, addCopyButton bool) template.HTML
- func FormatWithdrawalShort(slot uint64, amount uint64) template.HTML
- func FormatYesNo(yes bool) template.HTML
- func GWeiBytesToEther(gwei []byte) decimal.Decimal
- func GWeiToEther(gwei *big.Int) decimal.Decimal
- func GenerateQRCodeForAddress(address []byte) (string, string, error)
- func GenerateRandomAPIKey() (string, error)
- func GenerateRandomBytesSecure(n int) ([]byte, error)
- func GetCurrentFuncName() string
- func GetEtherscanAPIBaseUrl(provideDefault bool) string
- func GetFirstAndLastEpochForDay(day uint64) (firstEpoch uint64, lastEpoch uint64)
- func GetFlash(w http.ResponseWriter, r *http.Request, name string) (string, error)
- func GetFlashes(w http.ResponseWriter, r *http.Request, name string) []interface{}
- func GetLastBalanceInfoSlotForDay(day uint64) uint64
- func GetMaxAllowedDayRangeValidatorStats(validatorAmount int) int
- func GetNetwork() string
- func GetParentFuncName() string
- func GetPurchaseGroup(priceId string) string
- func GetRemainingScheduledSyncDuties(validatorCount int, stats types.SyncCommitteesStats, ...) uint64
- func GetSigningDomain() ([]byte, error)
- func GetTemplateFuncs() template.FuncMap
- func GetTimeToNextWithdrawal(distance uint64) time.Time
- func Glob(dir string, ext string) ([]string, error)
- func GraffitiToString(graffiti []byte) string
- func HandleRecaptcha(w http.ResponseWriter, r *http.Request, errorRoute string) error
- func HasProblematicUtfCharacters(s string) bool
- func HashAndEncode(input string) string
- func HttpReq(ctx context.Context, method, url string, params, result interface{}) error
- func IfToDec(valIf interface{}) decimal.Decimal
- func IncludeHTML(path string) template.HTML
- func IncludeSvg(name string) template.HTML
- func InitSessionStore(secret string)
- func Int64Max(x, y int64) int64
- func Int64Min(x, y int64) int64
- func IsApiRequest(r *http.Request) bool
- func IsEth1Address(s string) bool
- func IsEth1Tx(s string) bool
- func IsHash(s string) bool
- func IsPoSBlock0(number uint64, ts int64) bool
- func IsValidEmail(s string) bool
- func IsValidEnsDomain(text string) bool
- func IsValidEth1Address(s string) bool
- func IsValidEth1Tx(s string) bool
- func IsValidUrl(s string) bool
- func IsValidWithdrawalCredentials(s string) bool
- func KFormatterEthPrice(price uint64) template.HTML
- func LogError(err error, errorMsg interface{}, callerSkip int, ...)
- func LogFatal(err error, errorMsg interface{}, callerSkip int, ...)
- func LogWarn(err error, errorMsg interface{}, callerSkip int, ...)
- func MapProductV1ToV2(product string) string
- func MapProductV2ToV1(product string) string
- func MustParseHex(hexString string) []byte
- func PriceIdToProductId(priceId string) string
- func ProcessSecrets(cfg interface{}) error
- func ProductIsEligibleForAddons(productId string) bool
- func RandomString(length int) string
- func ReadConfig(cfg *types.Config, path string) error
- func RemoveRoundBracketsIncludingContent(input string) string
- func ReverseSlice[S ~[]E, E any](s S)
- func ReverseString(s string) string
- func RoundDecimals(f float64, n int) float64
- func SendOAuthErrorResponse(j *json.Encoder, route, errString, description string)
- func SendOAuthResponse(j *json.Encoder, route, accessToken, refreshToken string, expiresIn int)
- func SetFlash(w http.ResponseWriter, r *http.Request, name string, value string)
- func SliceContains(list []string, target string) bool
- func SlotToTime(slot uint64) time.Time
- func SlotsPerSyncCommittee() uint64
- func SortedUniqueUint64(arr []uint64) []uint64
- func SqlRowsToJSON(rows *sql.Rows) ([]interface{}, error)
- func StripPrefix(hexStr string) string
- func SyncPeriodOfEpoch(epoch uint64) uint64
- func TimeToDay(timestamp uint64) uint64
- func TimeToEpoch(ts time.Time) int64
- func TimeToFirstSlotOfEpoch(timestamp uint64) uint64
- func TimeToSlot(timestamp uint64) uint64
- func TimeToSyncPeriod(t time.Time) uint64
- func ToBase64(input []byte) string
- func TrLang(lang string, key string) template.HTML
- func TryFetchContractMetadata(address []byte) (*types.ContractMetadata, error)
- func UniqueStrings(s []string) []string
- func ValidateReCAPTCHA(recaptchaResponse string) (bool, error)
- func VerifyBlsToExecutionChangeSignature(op *capella.SignedBLSToExecutionChange) error
- func VerifyVoluntaryExitSignature(op *phase0.SignedVoluntaryExit, forkVersion, pubkeyBytes []byte) error
- func VersionedBlobHash(commitment []byte) common.Hash
- func WaitForCtrlC()
- func WeekOfSlot(slot uint64) uint64
- func WeiBytesToEther(wei []byte) decimal.Decimal
- func WeiToEther(wei *big.Int) decimal.Decimal
- func WithdrawalCredentialsToAddress(credentials []byte) ([]byte, error)
- type CustomClaims
- type CustomSession
- func (cs *CustomSession) AddFlash(value string)
- func (cs *CustomSession) DeleteValue(key string)
- func (cs *CustomSession) Flashes(vars ...string) []interface{}
- func (cs *CustomSession) GetValue(key string) interface{}
- func (cs *CustomSession) Save(r *http.Request, w http.ResponseWriter) error
- func (cs *CustomSession) SetValue(key string, value interface{})
- func (cs *CustomSession) Values() map[interface{}]interface{}
- type CustomSessionStore
- type Decoder
- type HttpReqHttpError
- type OAuthErrorResponse
- type OAuthResponse
- type Setter
Constants ¶
const ( Day = 24 * time.Hour Week = 7 * Day Month = 30 * Day Year = 12 * Month LongTime = 37 * Year )
Seconds-based time units
const AccessDenied = "access_denied"
const BeginningOfSetWithdrawalCredentials = "010000000000000000000000"
const CalculatingHint = `Calculating…`
const ClaimsContextKey = "ClaimsKey"
UserIDKey Key for context access to get the validated userID
const GROUP_ADDON = "addon"
const GROUP_API = "api"
const GROUP_MOBILE = "mobile"
const InvalidClient = "invalid_client"
const InvalidGrant = "invalid_grant"
const InvalidRequest = "invalid_request"
const InvalidScope = "invalid_scope"
const JsonBodyKey = "JsonBodyKey"
const JsonBodyNakedKey = "JsonBodyNakedKey"
const MobileAuthorizedKey = "MobileAuthKey"
const ServerError = "server_error"
const UnsupportedGrantType = "unsupported_grant_type"
Variables ¶
var Config *types.Config
Config is the globally accessible configuration
var ENS_ETH_REGEXP = regexp.MustCompile(`^.{3,}\.eth$`)
var Erc1155TransferSingleEventHash = common.HexToHash("0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62")
var Erc20TransferEventHash = common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef")
var ErrInvalidSpecification = errors.New("specification must be a struct pointer")
ErrInvalidSpecification indicates that a specification is of the wrong type.
var ErrRateLimit = errors.New("## RATE LIMIT ##")
var HashLikeRegex = regexp.MustCompile(`^[0-9a-fA-F]{0,96}$`)
var ProductsGroups = map[string]string{ "sapphire": GROUP_API, "emerald": GROUP_API, "diamond": GROUP_API, "plankton": GROUP_MOBILE, "goldfish": GROUP_MOBILE, "whale": GROUP_MOBILE, "guppy": GROUP_MOBILE, "dolphin": GROUP_MOBILE, "orca": GROUP_MOBILE, "guppy.yearly": GROUP_MOBILE, "dolphin.yearly": GROUP_MOBILE, "orca.yearly": GROUP_MOBILE, "vdb_addon_1k": GROUP_ADDON, "vdb_addon_1k.yearly": GROUP_ADDON, "vdb_addon_10k": GROUP_ADDON, "vdb_addon_10k.yearly": GROUP_ADDON, }
var ProductsMapV1ToV2 = map[string]string{
"plankton": "guppy",
"goldfish": "guppy",
"whale": "dolphin",
}
var ProductsMapV2ToV1 = map[string]string{
"guppy": "goldfish",
"dolphin": "whale",
"orca": "whale",
"guppy.yearly": "goldfish",
"dolphin.yearly": "whale",
"orca.yearly": "whale",
"vdb_addon_1k": "",
"vdb_addon_1k.yearly": "",
"vdb_addon_10k": "",
"vdb_addon_10k.yearly": "",
}
var Rates map[string]int = map[string]int{
"AT": 20,
"BE": 21,
"BG": 20,
"CY": 19,
"CZ": 21,
"DE": 19,
"DK": 25,
"EE": 20,
"EL": 24,
"ES": 21,
"FI": 24,
"FR": 20,
"GB": 20,
"HR": 25,
"HU": 27,
"IE": 23,
"IT": 22,
"LT": 21,
"LU": 17,
"LV": 21,
"MT": 18,
"NL": 21,
"PL": 23,
"PT": 23,
"RO": 19,
"SE": 25,
"SI": 22,
"SK": 20,
}
A map of the european tax rates according to https://ec.europa.eu/taxation_customs/sites/taxation/files/resources/documents/taxation/vat/how_vat_works/rates/vat_rates_en.pdf
var StripeDynamicRatesLive = []*string{
strToPointer("txr_1IBMDaBiORp9oTlKp8EWwp8j"),
strToPointer("txr_1IBMDYBiORp9oTlKdcfgMZX3"),
strToPointer("txr_1IBMDXBiORp9oTlKlZ1VbEqY"),
strToPointer("txr_1IBMDVBiORp9oTlKeV6FwBnA"),
strToPointer("txr_1IBMDUBiORp9oTlK6p8C6qK9"),
strToPointer("txr_1IBMDSBiORp9oTlKMj0KwTwm"),
strToPointer("txr_1IBMDQBiORp9oTlKDnYFmsv3"),
strToPointer("txr_1IBMDPBiORp9oTlKfaPyr9il"),
strToPointer("txr_1IBMDNBiORp9oTlKcZfiSttV"),
strToPointer("txr_1IBMDLBiORp9oTlKnKCLXOF8"),
strToPointer("txr_1IBMDJBiORp9oTlKtDR2w3uh"),
strToPointer("txr_1IBMDIBiORp9oTlKIlPuDNmy"),
strToPointer("txr_1IBMDHBiORp9oTlKgJaePWff"),
strToPointer("txr_1IBMDFBiORp9oTlK2JDAsvYn"),
strToPointer("txr_1IBMDEBiORp9oTlKfhwkiebt"),
strToPointer("txr_1IBMDDBiORp9oTlKtWxmZyAT"),
strToPointer("txr_1IBMDABiORp9oTlK25TCgczQ"),
strToPointer("txr_1IBMD8BiORp9oTlKsB9QPkUG"),
strToPointer("txr_1IBMD7BiORp9oTlKwtw2fxpe"),
strToPointer("txr_1IBMD6BiORp9oTlKMsgBKyMe"),
strToPointer("txr_1IBMD4BiORp9oTlKVIN2jYCU"),
strToPointer("txr_1IBMD3BiORp9oTlKU1vYxvH5"),
strToPointer("txr_1IBMD2BiORp9oTlKKLV4yE2z"),
strToPointer("txr_1IBMD0BiORp9oTlKHcW9KHQ7"),
strToPointer("txr_1IBMCzBiORp9oTlKFp9CLAND"),
strToPointer("txr_1IBMCxBiORp9oTlK0lc5PZgI"),
strToPointer("txr_1IBMCuBiORp9oTlKIQmX5NaZ"),
strToPointer("txr_1IBMBfBiORp9oTlKsxI0Css0"),
}
var StripeDynamicRatesTest = []*string{
strToPointer("txr_1HqcFcBiORp9oTlKnyNWVp4r"),
strToPointer("txr_1I9pNwBiORp9oTlKxTmOz7a1"),
strToPointer("txr_1I9pOKBiORp9oTlKfMcVou1L"),
strToPointer("txr_1I9pP0BiORp9oTlKy5CpfXQR"),
strToPointer("txr_1I9pPzBiORp9oTlKWnfxgOw1"),
strToPointer("txr_1HqdWaBiORp9oTlKkij8L6dU"),
strToPointer("txr_1I9pQsBiORp9oTlK4UTiJJTN"),
strToPointer("txr_1I9pR7BiORp9oTlKgaTRDucB"),
strToPointer("txr_1I9pRKBiORp9oTlKudk6Zbf5"),
strToPointer("txr_1I9pRYBiORp9oTlKlFCuCxDv"),
strToPointer("txr_1I9pRsBiORp9oTlKabg2US6z"),
strToPointer("txr_1I9pS5BiORp9oTlKK6b9bi1n"),
strToPointer("txr_1I9pSNBiORp9oTlKCO3Of9YI"),
strToPointer("txr_1I9pSdBiORp9oTlKsdb5E2eO"),
strToPointer("txr_1I9pSuBiORp9oTlKW7OdEDln"),
strToPointer("txr_1I9pTCBiORp9oTlK4LAH8ZAQ"),
strToPointer("txr_1I9pUOBiORp9oTlKrissM9GJ"),
strToPointer("txr_1I9pUgBiORp9oTlKCXqz67MM"),
strToPointer("txr_1I9pUzBiORp9oTlK8zsYnVgS"),
strToPointer("txr_1I9pVCBiORp9oTlKUGQ94mXO"),
strToPointer("txr_1I9pVPBiORp9oTlKDaogHVHn"),
strToPointer("txr_1I9pVeBiORp9oTlKbn6ZdXvh"),
strToPointer("txr_1I9pVvBiORp9oTlKJuyxDeDD"),
strToPointer("txr_1I9pW8BiORp9oTlKEiGKbdcq"),
strToPointer("txr_1I9pWNBiORp9oTlKRvGIm5mx"),
strToPointer("txr_1I9pWbBiORp9oTlKqGEvmQ0H"),
strToPointer("txr_1I9pWrBiORp9oTlKljnvpOqI"),
strToPointer("txr_1I9pX9BiORp9oTlKDtkJ8A09"),
}
var StripeRatesLive map[string]string = map[string]string{
"AT": "txr_1IBMDaBiORp9oTlKp8EWwp8j",
"BE": "txr_1IBMDXBiORp9oTlKlZ1VbEqY",
"BG": "txr_1IBMDVBiORp9oTlKeV6FwBnA",
"CY": "txr_1IBMDUBiORp9oTlK6p8C6qK9",
"CZ": "txr_1IBMDSBiORp9oTlKMj0KwTwm",
"DE": "txr_1IBMDYBiORp9oTlKdcfgMZX3",
"DK": "txr_1IBMDQBiORp9oTlKDnYFmsv3",
"EE": "txr_1IBMDPBiORp9oTlKfaPyr9il",
"EL": "txr_1IBMDNBiORp9oTlKcZfiSttV",
"ES": "txr_1IBMDLBiORp9oTlKnKCLXOF8",
"FI": "txr_1IBMDJBiORp9oTlKtDR2w3uh",
"FR": "txr_1IBMDIBiORp9oTlKIlPuDNmy",
"GB": "txr_1IBMDHBiORp9oTlKgJaePWff",
"HR": "txr_1IBMDFBiORp9oTlK2JDAsvYn",
"HU": "txr_1IBMDEBiORp9oTlKfhwkiebt",
"IE": "txr_1IBMDDBiORp9oTlKtWxmZyAT",
"IT": "txr_1IBMDABiORp9oTlK25TCgczQ",
"LT": "txr_1IBMD8BiORp9oTlKsB9QPkUG",
"LU": "txr_1IBMD7BiORp9oTlKwtw2fxpe",
"LV": "txr_1IBMD6BiORp9oTlKMsgBKyMe",
"MT": "txr_1IBMD4BiORp9oTlKVIN2jYCU",
"NL": "txr_1IBMD3BiORp9oTlKU1vYxvH5",
"PL": "txr_1IBMD2BiORp9oTlKKLV4yE2z",
"PT": "txr_1IBMD0BiORp9oTlKHcW9KHQ7",
"RO": "txr_1IBMCzBiORp9oTlKFp9CLAND",
"SE": "txr_1IBMCxBiORp9oTlK0lc5PZgI",
"SI": "txr_1IBMCuBiORp9oTlKIQmX5NaZ",
"SK": "txr_1IBMBfBiORp9oTlKsxI0Css0",
}
var StripeRatesTest map[string]string = map[string]string{
"AT": "txr_1HqcFcBiORp9oTlKnyNWVp4r",
"BE": "txr_1I9pNwBiORp9oTlKxTmOz7a1",
"BG": "txr_1I9pOKBiORp9oTlKfMcVou1L",
"CY": "txr_1I9pP0BiORp9oTlKy5CpfXQR",
"CZ": "txr_1I9pPzBiORp9oTlKWnfxgOw1",
"DE": "txr_1HqdWaBiORp9oTlKkij8L6dU",
"DK": "txr_1I9pQsBiORp9oTlK4UTiJJTN",
"EE": "txr_1I9pR7BiORp9oTlKgaTRDucB",
"EL": "txr_1I9pRKBiORp9oTlKudk6Zbf5",
"ES": "txr_1I9pRYBiORp9oTlKlFCuCxDv",
"FI": "txr_1I9pRsBiORp9oTlKabg2US6z",
"FR": "txr_1I9pS5BiORp9oTlKK6b9bi1n",
"GB": "txr_1I9pSNBiORp9oTlKCO3Of9YI",
"HR": "txr_1I9pSdBiORp9oTlKsdb5E2eO",
"HU": "txr_1I9pSuBiORp9oTlKW7OdEDln",
"IE": "txr_1I9pTCBiORp9oTlK4LAH8ZAQ",
"IT": "txr_1I9pUOBiORp9oTlKrissM9GJ",
"LT": "txr_1I9pUgBiORp9oTlKCXqz67MM",
"LU": "txr_1I9pUzBiORp9oTlK8zsYnVgS",
"LV": "txr_1I9pVCBiORp9oTlKUGQ94mXO",
"MT": "txr_1I9pVPBiORp9oTlKDaogHVHn",
"NL": "txr_1I9pVeBiORp9oTlKbn6ZdXvh",
"PL": "txr_1I9pVvBiORp9oTlKJuyxDeDD",
"PT": "txr_1I9pW8BiORp9oTlKEiGKbdcq",
"RO": "txr_1I9pWNBiORp9oTlKRvGIm5mx",
"SE": "txr_1I9pWbBiORp9oTlKqGEvmQ0H",
"SI": "txr_1I9pWrBiORp9oTlKljnvpOqI",
"SK": "txr_1I9pX9BiORp9oTlKDtkJ8A09",
}
A map of the european tax rates according to https://ec.europa.eu/taxation_customs/sites/taxation/files/resources/documents/taxation/vat/how_vat_works/rates/vat_rates_en.pdf
Functions ¶
func AccessSecretVersion ¶
accessSecretVersion accesses the payload for the given secret version if one exists. The version can be a version number as a string (e.g. "5") or an alias (e.g. "latest").
func AddBigInts ¶
func AddSyncStats ¶
func AddSyncStats(validators []uint64, syncDutiesHistory map[uint64]map[uint64]*types.ValidatorSyncParticipation, stats *types.SyncCommitteesStats) types.SyncCommitteesStats
AddSyncStats adds the sync stats of a set of validators from a given syncDutiesHistory to the given stats, if stats is nil a new stats object is created. Parameters:
- validators: the validators to add the stats for
- syncDutiesHistory: the sync duties history of all queried validators
- stats: the stats object to add the stats to, if nil a new stats object is created
func AddressToWithdrawalCredentials ¶
AddressToWithdrawalCredentials converts a valid address to withdrawalCredentials
func AuthorizedAPIMiddleware ¶
AuthorizedAPIMiddleware Demands an Authorization header to be present with a valid user api token Once authorization passes, this middleware sets a context entry with the authenticated userID
func BitAtVector ¶
func BitAtVectorReversed ¶
func ClToCurrency ¶
func ClToCurrencyGwei ¶
func ClToMainCurrency ¶
func CopyButton ¶
func CopyButton(clipboardText interface{}) string
func CopyButtonText ¶
func CopyButtonText(clipboardText interface{}) string
func CreateAccessToken ¶
CreateAccessToken Creates a new access token for a given user
func DerefString ¶
func EffectiveProductId ¶
func EffectiveProductName ¶
func ElToCurrency ¶
func ElToMainCurrency ¶
func ElementExists ¶
func EpochOfSlot ¶
EpochOfSlot returns the corresponding epoch of a slot
func EpochToTime ¶
EpochToTime will return a time.Time for an epoch
func EpochsPerDay ¶
func EpochsPerDay() uint64
func Eth1TotalReward ¶
func Eth1TotalReward(block *types.Eth1BlockIndexed) *big.Int
func EthBytesToFloat ¶
func FirstEpochOfSyncPeriod ¶
FirstEpochOfSyncPeriod returns the first epoch of a given sync period.
Please note that it will return the calculated first epoch of the sync period even if it is pre ALTAIR.
Furthermore, for the very first actual sync period, it may return an epoch pre ALTAIR even though that is inccorect.
For more information: https://eth2book.info/capella/annotated-spec/#sync-committee-updates
func FixAddressCasing ¶
func ForkVersionAtEpoch ¶
func ForkVersionAtEpoch(epoch uint64) *types.ForkVersion
ForkVersionAtEpoch returns the forkversion active a specific epoch
func FormatAddCommas ¶
func FormatAddress ¶
func FormatAddressAll ¶
func FormatAddressAsLink ¶
func FormatAddressEthBalance ¶
func FormatAddressEthBalance(balance *types.Eth1AddressBalance) template.HTML
func FormatAddressLong ¶
func FormatAddressWithLimits ¶
func FormatAddressWithLimitsInAddressPageTable ¶
func FormatAddressWithLimitsInAddressPageTable(mainAddress []byte, txAddress []byte, name string, isContract bool, digitsLimit int, nameLimit int, addCopyToClipboard bool) template.HTML
wrapper function of FormatAddressWithLimits used to format addresses in the address page's tables for txs
no link to the given txAddress will be added if it is mainAddress of the page is formatted
otherwise, "address" will be passed as link
func FormatAmountFormatted ¶
func FormatAttestationInclusionSlot ¶
FormatAttestationInclusionSlot will return the block-slot formated as html
func FormatAttestationStatus ¶
FormatAttestationStatus will return a user-friendly attestation for an attestation status number
func FormatAttestationStatusShort ¶
FormatAttestationStatusShort will return a user-friendly attestation for an attestation status number
func FormatAttestorAssignmentKey ¶
FormatAttestorAssignmentKey will format attestor assignment keys
func FormatBalance ¶
FormatBalance will return a string for a balance
func FormatBalanceChange ¶
FormatBalanceChange will return a string for a balance change
func FormatBalanceShort ¶
FormatBalance will return a string for a balance
func FormatBalanceSql ¶
func FormatBigAmount ¶
func FormatBitlist ¶
func FormatBlobVersionedHash ¶
func FormatBlockHash ¶
func FormatBlockNumber ¶
func FormatBlockRoot ¶
FormatBlockRoot will return the block-root formated as html
func FormatBlockSlot ¶
FormatBlockSlot will return the block-slot formated as html
func FormatBlockStatus ¶
FormatBlockStatus will return an html status for a block.
func FormatBlockStatusShort ¶
FormatBlockStatusShort will return an html status for a block.
func FormatBuilder ¶
func FormatBytesAmount ¶
func FormatClCurrency ¶
func FormatClCurrencyString ¶
func FormatCount ¶
When 'finalized' is false and 'count' is 0, a in-progress hint is returned (three dots if 'shortenCalcHint' is true) If 'count' is positive or 'finalized' is true, 'count' is returned as a string
func FormatCurrentBalance ¶
FormatCurrentBalance will return the current balance formated as string with 9 digits after the comma (1 gwei = 1e9 eth)
func FormatDepositAmount ¶
FormatDepositAmount will return the deposit amount formated as string
func FormatDifficulty ¶
func FormatEffectiveBalance ¶
FormatEffectiveBalance will return the effective balance formated as string with 1 digit after the comma
func FormatElCurrency ¶
func FormatElCurrencyString ¶
func FormatEligibleBalance ¶
FormatBalance will return a string for a balance
func FormatEpoch ¶
FormatEpoch will return the epoch formated as html
func FormatErc20Decimals ¶
func FormatErc20Decimals(balance []byte, metadata *types.ERC20Metadata) decimal.Decimal
func FormatEth1Address ¶
FormatEth1Address will return the eth1-address formated as html
func FormatEth1AddressFull ¶
FormatEth1AddressFull will return the eth1-address formated as html
func FormatEth1AddressStringLowerCase ¶
FormatEth1AddressStringLowerCase will return the eth1-address formated as html string in lower case
func FormatEth1Block ¶
FormatEth1Block will return the eth1-block formated as html
func FormatEth1BlockHash ¶
FormatEth1BlockHash will return the eth1-block formated as html
func FormatEth1TxHash ¶
FormatEth1TxHash will return the eth1-tx-hash formated as html
func FormatEth1TxStatus ¶
FormatBalance will return a string for a balance
func FormatEtherValue ¶
func FormatFloat ¶
func FormatFloatWithDigitsString ¶
FormatFloatWithDigitsString formats num with max amount of digits after comma but stop after min number of non-zero-digits after comma. In other words it can be used to format a number with the least amount of characters keeping a threshold of significant digits.
examples:
FormatFloatWithDigitsString(0.01234,2,2) = "0.01" FormatFloatWithDigitsString(0.01234,2,3) = "0.012" FormatFloatWithDigitsString(0.01234,2,4) = "0.012" FormatFloatWithDigitsString(0.01234,3,4) = "0.0123"
func FormatGlobalParticipationRate ¶
FormatGlobalParticipationRate will return the global-participation-rate formated as html
func FormatGraffiti ¶
FormatGraffiti will return the graffiti formated as html
func FormatGraffitiAsLink ¶
FormatGraffitiAsLink will return the graffiti formated as html-link
func FormatGraffitiString ¶
FormatGraffitiString formats (and escapes) the graffiti
func FormatHash ¶
- FormatHash will return a hash formated as html hash is required, trunc is optional. Only the first value in trunc_opt will be used. ATTENTION: IT TRUNCATES BY DEFAULT, PASS FALSE TO trunc_opt TO DISABLE
func FormatHashRaw ¶
- FormatHashRaw will return a hash formated hash is required, trunc is optional. Only the first value in trunc_opt will be used. ATTENTION: IT TRUNCATES BY DEFAULT, PASS FALSE TO trunc_opt TO DISABLE
func FormatHashWithCopy ¶
func FormatHashrate ¶
func FormatInOutSelf ¶
func FormatInclusionDelay ¶
FormatAttestationInclusionSlot will return the block-slot formated as html
func FormatIncome ¶
func FormatIncomeClElInt64 ¶
func FormatIncomeSql ¶
func FormatMachineName ¶
func FormatMessageToHtml ¶
func FormatMethod ¶
func FormatNotificationChannel ¶
func FormatNotificationChannel(ch types.NotificationChannel) template.HTML
func FormatNumber ¶
func FormatNumber(number interface{}) string
func FormatParticipation ¶
func FormatPercentage ¶
FormatPercentage will return a string for a percentage
func FormatPercentageWithGPrecision ¶
FormatPercentageWithGPrecision will return a string for a percentage the maximum number of significant digits (trailing zeros are removed).
func FormatPercentageWithPrecision ¶
FormatPercentageWithPrecision will return a string for a percentage
func FormatPoolPerformance ¶
func FormatPricedValue ¶
func FormatPublicKey ¶
FormatPublicKey will return html formatted text for a validator-public-key
func FormatSlashedValidator ¶
FormatSlashedValidator will return html formatted text for a slashed validator
func FormatSlashedValidatorInt64 ¶
FormatSlashedValidatorInt64 will return html formatted text for a slashed validator
func FormatSlashedValidatorWithName ¶
FormatSlashedValidator will return html formatted text for a slashed validator
func FormatSlashedValidators ¶
FormatSlashedValidators will return html formatted text for slashed validators
func FormatSlashedValidatorsWithName ¶
FormatSlashedValidators will return html formatted text for slashed validators
func FormatSlotToTimestamp ¶
FormatSlotToTimestamp will return the time elapsed since blockSlot
func FormatSyncParticipationStatus ¶
FormatSyncParticipationStatus will return a user-friendly format for an sync-participation-status number
func FormatSyncParticipations ¶
FormatSyncParticipationStatus will return a user-friendly format for an sync-participation-status number
func FormatThousandsEnglish ¶
func FormatTimestamp ¶
FormatTimestamp will return a timestamp formated as html. This is supposed to be used together with client-side js
func FormatTokenBalance ¶
func FormatTokenBalance(balance *types.Eth1AddressBalance) template.HTML
func FormatTokenName ¶
func FormatTokenName(balance *types.Eth1AddressBalance) template.HTML
func FormatTokenSymbol ¶
func FormatTokenSymbolTitle ¶
func FormatTokenValue ¶
func FormatTokenValue(balance *types.Eth1AddressBalance, fullAmountTooltip bool) template.HTML
func FormatTracePath ¶
func FormatTransactionType ¶
func FormatTsWithoutTooltip ¶
FormatTsWithoutTooltip will return a timestamp formated as html. This is supposed to be used together with client-side js
func FormatTxHash ¶
func FormatValidator ¶
FormatValidator will return html formatted text for a validator
func FormatValidatorInt64 ¶
FormatValidatorInt64 will return html formatted text for a validator (for an int64 validator-id)
func FormatValidatorName ¶
func FormatValidatorStatus ¶
FormatValidatorStatus will return the validator-status formated as html possible states pending, active_online, active_offline, exiting_online, exciting_offline, slashing_online, slashing_offline, exited, slashed
func FormatValidatorTag ¶
FormatValidatorTag will return html formated text of a validator-tag. Depending on the tag it will describe the tag in a tooltip and link to more information regarding the tag.
func FormatValidatorTags ¶
func FormatValidatorWithName ¶
func FormatWithdrawalShort ¶
FormatBlockStatusShort will return an html status for a block.
func FormatYesNo ¶
FormatYesNo will return yes or no formated as html
func GWeiBytesToEther ¶
func GenerateQRCodeForAddress ¶
Generates a QR code for an address returns two transparent base64 encoded img strings for dark and light theme the first has a black QR code the second a white QR code
func GenerateRandomAPIKey ¶
GenerateAPIKey generates an API key for a user
func GetCurrentFuncName ¶
func GetCurrentFuncName() string
func GetEtherscanAPIBaseUrl ¶
func GetFlashes ¶
func GetFlashes(w http.ResponseWriter, r *http.Request, name string) []interface{}
func GetNetwork ¶
func GetNetwork() string
func GetParentFuncName ¶
func GetParentFuncName() string
func GetPurchaseGroup ¶
func GetRemainingScheduledSyncDuties ¶
func GetRemainingScheduledSyncDuties(validatorCount int, stats types.SyncCommitteesStats, lastExportedEpoch, firstEpochOfPeriod uint64) uint64
GetRemainingScheduledSyncDuties returns the remaining count of scheduled slots given the stats of the current period, while also accounting for exported slots.
Parameters:
- validatorCount: the count of validators associated with the stats.
- stats: the current sync committee stats of the validators
- lastExportedEpoch: the last epoch that was exported into the validator_stats table
- firstEpochOfPeriod: the first epoch of the current sync committee period
func GetSigningDomain ¶
func GetTemplateFuncs ¶
GetTemplateFuncs will get the template functions
func GetTimeToNextWithdrawal ¶
GetTimeToNextWithdrawal calculates the time it takes for the validators next withdrawal to be processed.
func GraffitiToString ¶
func HandleRecaptcha ¶
func HashAndEncode ¶
HashAndEncode digests the input with sha256 and returns it as hex string
func IncludeSvg ¶
func InitSessionStore ¶
func InitSessionStore(secret string)
InitSessionStore initializes SessionStore with the given secret.
func IsApiRequest ¶
func IsEth1Address ¶
IsEth1Address verifies whether a string represents an eth1-address. In contrast to IsValidEth1Address, this also returns true for the 0x0 address
func IsEth1Tx ¶
IsEth1Tx verifies whether a string represents an eth1-tx-hash. In contrast to IsValidEth1Tx, this also returns true for the 0x0 address
func IsPoSBlock0 ¶
Returns true if the given block number is 0 and if it is (according to its timestamp) included in slot 0
This is only true for networks that launch with active PoS at block 0 which requires
- Belatrix happening at epoch 0 (pre condition for merged networks)
- Genesis for PoS to happen at the same timestamp as the first block
func IsValidEmail ¶
IsValidEmail verifies whether a string represents a valid email-address.
func IsValidEnsDomain ¶
func IsValidEth1Address ¶
IsValidEth1Address verifies whether a string represents a valid eth1-address.
func IsValidEth1Tx ¶
IsValidEth1Tx verifies whether a string represents a valid eth1-tx-hash.
func IsValidUrl ¶
IsValidUrl verifies whether a string represents a valid Url.
func IsValidWithdrawalCredentials ¶
IsValidWithdrawalCredentials verifies whether a string represents valid withdrawal credentials.
func KFormatterEthPrice ¶
func LogError ¶
func LogError(err error, errorMsg interface{}, callerSkip int, additionalInfos ...map[string]interface{})
LogError logs an error with callstack info that skips callerSkip many levels with arbitrarily many additional infos. callerSkip equal to 0 gives you info directly where LogError is called.
func LogFatal ¶
func LogFatal(err error, errorMsg interface{}, callerSkip int, additionalInfos ...map[string]interface{})
LogFatal logs a fatal error with callstack info that skips callerSkip many levels with arbitrarily many additional infos. callerSkip equal to 0 gives you info directly where LogFatal is called.
func LogWarn ¶
func LogWarn(err error, errorMsg interface{}, callerSkip int, additionalInfos ...map[string]interface{})
LogError logs a warning with callstack info that skips callerSkip many levels with arbitrarily many additional infos. callerSkip equal to 0 gives you info directly where LogError is called.
func MapProductV1ToV2 ¶
func MapProductV2ToV1 ¶
func MustParseHex ¶
MustParseHex will parse a string into hex
func PriceIdToProductId ¶
func ProcessSecrets ¶
func ProcessSecrets(cfg interface{}) error
func ReadConfig ¶
ReadConfig will process a configuration
func RemoveRoundBracketsIncludingContent ¶
To remove all round brackets (including its content) from a string
func ReverseSlice ¶
func ReverseSlice[S ~[]E, E any](s S)
func ReverseString ¶
func RoundDecimals ¶
RoundDecimals rounds (nearest) a number to the specified number of digits after comma
func SendOAuthErrorResponse ¶
SendOAuthErrorResponse creates and sends a OAuth error response according to RFC6749
func SendOAuthResponse ¶
SendOAuthResponse creates and sends a OAuth response according to RFC6749
func SliceContains ¶
sliceContains reports whether the provided string is present in the given slice of strings.
func SlotsPerSyncCommittee ¶
func SlotsPerSyncCommittee() uint64
SlotsPerSyncCommittee returns the count of slots per sync committee period (might be wrong for the first sync period at atlair which might be shorter, see https://eth2book.info/capella/annotated-spec/#sync-committee-updates)
func SortedUniqueUint64 ¶
func SqlRowsToJSON ¶
func StripPrefix ¶
func SyncPeriodOfEpoch ¶
func TimeToEpoch ¶
TimeToEpoch will return an epoch for a given time
func TimeToFirstSlotOfEpoch ¶
func TimeToSlot ¶
TimeToSlot returns time to slot in seconds
func TimeToSyncPeriod ¶
func TryFetchContractMetadata ¶
func TryFetchContractMetadata(address []byte) (*types.ContractMetadata, error)
func UniqueStrings ¶
UniqueStrings returns an array of strings containing each value of s only once
func ValidateReCAPTCHA ¶
ValidateReCAPTCHA validates a ReCaptcha server side
func VerifyBlsToExecutionChangeSignature ¶
func VerifyBlsToExecutionChangeSignature(op *capella.SignedBLSToExecutionChange) error
VerifyBlsToExecutionChangeSignature verifies the signature of an bls_to_execution_change message see: https://github.com/wealdtech/ethdo/blob/master/cmd/validator/credentials/set/process.go see: https://github.com/prysmaticlabs/prysm/blob/76ed634f7386609f0d1ee47b703eb0143c995464/beacon-chain/core/blocks/withdrawals.go
func VerifyVoluntaryExitSignature ¶
func VerifyVoluntaryExitSignature(op *phase0.SignedVoluntaryExit, forkVersion, pubkeyBytes []byte) error
VerifyVoluntaryExitSignature verifies the signature of an voluntary_exit message
func VersionedBlobHash ¶
func WeekOfSlot ¶
WeekOfSlot returns the corresponding week of a slot
func WeiBytesToEther ¶
func WithdrawalCredentialsToAddress ¶
WithdrawalCredentialsToAddress converts withdrawalCredentials to an address if possible
Types ¶
type CustomClaims ¶
type CustomClaims struct { UserID uint64 `json:"userID"` AppID uint64 `json:"appID"` DeviceID uint64 `json:"deviceID"` Package string `json:"package"` Theme string `json:"theme"` jwt.StandardClaims }
CustomClaims Structure of JWT body, contains standard JWT claims and userID as a custom claim
func GetAuthorizationClaims ¶
func GetAuthorizationClaims(r *http.Request) *CustomClaims
func UnsafeGetClaims ¶
func UnsafeGetClaims(tokenString string) (*CustomClaims, error)
UnsafeGetClaims this method returns the userID of a given jwt token WITHOUT VALIDATION DO NOT USE THIS METHOD AS RELIABLE SOURCE FOR USERID
func ValidateAccessTokenGetClaims ¶
func ValidateAccessTokenGetClaims(tokenString string) (*CustomClaims, error)
ValidateAccessTokenGetClaims validates the jwt token and returns the UserID
type CustomSession ¶
func (*CustomSession) AddFlash ¶
func (cs *CustomSession) AddFlash(value string)
func (*CustomSession) DeleteValue ¶
func (cs *CustomSession) DeleteValue(key string)
func (*CustomSession) Flashes ¶
func (cs *CustomSession) Flashes(vars ...string) []interface{}
func (*CustomSession) GetValue ¶
func (cs *CustomSession) GetValue(key string) interface{}
func (*CustomSession) Save ¶
func (cs *CustomSession) Save(r *http.Request, w http.ResponseWriter) error
func (*CustomSession) SetValue ¶
func (cs *CustomSession) SetValue(key string, value interface{})
func (*CustomSession) Values ¶
func (cs *CustomSession) Values() map[interface{}]interface{}
type CustomSessionStore ¶
type CustomSessionStore struct {
// TODO: Implement
SCS *scs.SessionManager
}
var SessionStore *CustomSessionStore
func (*CustomSessionStore) Get ¶
func (css *CustomSessionStore) Get(r *http.Request, name string) (*CustomSession, error)
type Decoder ¶
Decoder has the same semantics as Setter, but takes higher precedence. It is provided for historical compatibility.
type HttpReqHttpError ¶
func (*HttpReqHttpError) Error ¶
func (err *HttpReqHttpError) Error() string
type OAuthErrorResponse ¶
type OAuthErrorResponse struct { Error string `json:"error"` Description string `json:"error_description"` }
OAuthErrorResponse Structure of an OAuth error response