SYMBOL INDEX (2715 symbols across 190 files) FILE: client/client.go constant MessageEvent (line 22) | MessageEvent = "message" constant maxResponseBytes (line 26) | maxResponseBytes = 4096 type Client (line 34) | type Client struct method Publish (line 88) | func (c *Client) Publish(topic, message string, options ...PublishOpti... method PublishReader (line 100) | func (c *Client) PublishReader(topic string, body io.Reader, options .... method Poll (line 143) | func (c *Client) Poll(topic string, options ...SubscribeOption) ([]*Me... method Subscribe (line 184) | func (c *Client) Subscribe(topic string, options ...SubscribeOption) (... method Unsubscribe (line 205) | func (c *Client) Unsubscribe(subscriptionID string) { method expandTopicURL (line 216) | func (c *Client) expandTopicURL(topic string) (string, error) { type Message (line 42) | type Message struct type Attachment (line 62) | type Attachment struct type subscription (line 71) | type subscription struct function New (line 78) | func New(config *Config) *Client { function handleSubscribeConnLoop (line 228) | func handleSubscribeConnLoop(ctx context.Context, msgChan chan *Message,... function performSubscribeRequest (line 244) | func performSubscribeRequest(ctx context.Context, msgChan chan *Message,... function toMessage (line 283) | func toMessage(s, topicURL, subscriptionID string) (*Message, error) { FILE: client/client_test.go function TestMain (line 14) | func TestMain(m *testing.M) { function TestClient_Publish_Subscribe (line 19) | func TestClient_Publish_Subscribe(t *testing.T) { function TestClient_Publish_Poll (line 74) | func TestClient_Publish_Poll(t *testing.T) { function newTestConfig (line 104) | func newTestConfig(port int) *client.Config { function nextMessage (line 110) | func nextMessage(c *client.Client) *client.Message { FILE: client/config.go constant DefaultBaseURL (line 11) | DefaultBaseURL = "https://ntfy.sh" type Config (line 18) | type Config struct type Subscribe (line 28) | type Subscribe struct function NewConfig (line 38) | func NewConfig() *Config { function LoadConfig (line 50) | func LoadConfig(filename string) (*Config, error) { FILE: client/config_darwin.go function init (line 11) | func init() { FILE: client/config_test.go function TestConfig_Load (line 11) | func TestConfig_Load(t *testing.T) { function TestConfig_EmptyPassword (line 50) | func TestConfig_EmptyPassword(t *testing.T) { function TestConfig_NullPassword (line 74) | func TestConfig_NullPassword(t *testing.T) { function TestConfig_NoPassword (line 98) | func TestConfig_NoPassword(t *testing.T) { function TestConfig_DefaultToken (line 120) | func TestConfig_DefaultToken(t *testing.T) { FILE: client/config_unix.go function init (line 11) | func init() { FILE: client/config_windows.go function init (line 10) | func init() { FILE: client/options.go function WithMessage (line 21) | func WithMessage(message string) PublishOption { function WithTitle (line 26) | func WithTitle(title string) PublishOption { function WithPriority (line 32) | func WithPriority(priority string) PublishOption { function WithTagsList (line 38) | func WithTagsList(tags string) PublishOption { function WithTags (line 43) | func WithTags(tags []string) PublishOption { function WithDelay (line 50) | func WithDelay(delay string) PublishOption { function WithClick (line 55) | func WithClick(url string) PublishOption { function WithIcon (line 60) | func WithIcon(icon string) PublishOption { function WithActions (line 66) | func WithActions(value string) PublishOption { function WithAttach (line 71) | func WithAttach(attach string) PublishOption { function WithMarkdown (line 76) | func WithMarkdown() PublishOption { function WithTemplate (line 82) | func WithTemplate(templateName string) PublishOption { function WithFilename (line 87) | func WithFilename(filename string) PublishOption { function WithSequenceID (line 92) | func WithSequenceID(sequenceID string) PublishOption { function WithEmail (line 97) | func WithEmail(email string) PublishOption { function WithBasicAuth (line 102) | func WithBasicAuth(user, pass string) PublishOption { function WithBearerAuth (line 107) | func WithBearerAuth(token string) PublishOption { function WithEmptyAuth (line 112) | func WithEmptyAuth() PublishOption { function WithNoCache (line 117) | func WithNoCache() PublishOption { function WithNoFirebase (line 122) | func WithNoFirebase() PublishOption { function WithSince (line 128) | func WithSince(since string) SubscribeOption { function WithSinceAll (line 133) | func WithSinceAll() SubscribeOption { function WithSinceDuration (line 138) | func WithSinceDuration(since time.Duration) SubscribeOption { function WithSinceUnixTime (line 143) | func WithSinceUnixTime(since int64) SubscribeOption { function WithPoll (line 149) | func WithPoll() SubscribeOption { function WithScheduled (line 155) | func WithScheduled() SubscribeOption { function WithFilter (line 160) | func WithFilter(param, value string) SubscribeOption { function WithMessageFilter (line 165) | func WithMessageFilter(message string) SubscribeOption { function WithTitleFilter (line 170) | func WithTitleFilter(title string) SubscribeOption { function WithPriorityFilter (line 176) | func WithPriorityFilter(priority int) SubscribeOption { function WithTagsFilter (line 181) | func WithTagsFilter(tags []string) SubscribeOption { function WithHeader (line 186) | func WithHeader(header, value string) RequestOption { function WithQueryParam (line 196) | func WithQueryParam(param, value string) RequestOption { function RemoveHeader (line 208) | func RemoveHeader(header string) RequestOption { FILE: cmd/access.go function init (line 13) | func init() { constant userEveryone (line 18) | userEveryone = "everyone" function execUserAccess (line 70) | func execUserAccess(c *cli.Context) error { function changeAccess (line 99) | func changeAccess(c *cli.Context, manager *user.Manager, username string... function resetAccess (line 130) | func resetAccess(c *cli.Context, manager *user.Manager, username, topic ... function resetAllAccess (line 139) | func resetAllAccess(c *cli.Context, manager *user.Manager) error { function resetUserAccess (line 147) | func resetUserAccess(c *cli.Context, manager *user.Manager, username str... function resetUserTopicAccess (line 155) | func resetUserTopicAccess(c *cli.Context, manager *user.Manager, usernam... function showAccess (line 163) | func showAccess(c *cli.Context, manager *user.Manager, username string) ... function showAllAccess (line 170) | func showAllAccess(c *cli.Context, manager *user.Manager) error { function showUserAccess (line 178) | func showUserAccess(c *cli.Context, manager *user.Manager, username stri... function showUsers (line 188) | func showUsers(c *cli.Context, manager *user.Manager, users []*user.User... FILE: cmd/access_test.go function TestCLI_Access_Show (line 12) | func TestCLI_Access_Show(t *testing.T) { function TestCLI_Access_Grant_And_Publish (line 21) | func TestCLI_Access_Grant_And_Publish(t *testing.T) { function runAccessCommand (line 79) | func runAccessCommand(app *cli.App, conf *server.Config, args ...string)... FILE: cmd/app.go constant categoryClient (line 15) | categoryClient = "Client commands" constant categoryServer (line 16) | categoryServer = "Server commands" constant MetadataKeyCommit (line 21) | MetadataKeyCommit = "commit" constant MetadataKeyDate (line 22) | MetadataKeyDate = "date" function New (line 42) | func New() *cli.App { function initLogFunc (line 58) | func initLogFunc(c *cli.Context) error { function applyLogLevelOverrides (line 83) | func applyLogLevelOverrides(rawOverrides []string) error { FILE: cmd/app_test.go function TestMain (line 16) | func TestMain(m *testing.M) { function newTestApp (line 21) | func newTestApp() (*cli.App, *bytes.Buffer, *bytes.Buffer, *bytes.Buffer) { function toMessage (line 30) | func toMessage(t *testing.T, s string) *client.Message { FILE: cmd/config_loader.go function initConfigFileInputSourceFunc (line 14) | func initConfigFileInputSourceFunc(configFlag string, flags []cli.Flag, ... function newYamlSourceFromFile (line 42) | func newYamlSourceFromFile(file string, flags []cli.Flag) (altsrc.InputS... FILE: cmd/config_loader_test.go function TestNewYamlSourceFromFile (line 10) | func TestNewYamlSourceFromFile(t *testing.T) { FILE: cmd/publish.go function init (line 18) | func init() { function execPublish (line 90) | func execPublish(c *cli.Context) error { function parseTopicMessageCommand (line 251) | func parseTopicMessageCommand(c *cli.Context) (topic string, message str... function parseTopicAndArgs (line 281) | func parseTopicAndArgs(c *cli.Context) (topic string, args []string, err... function remainingArgs (line 293) | func remainingArgs(c *cli.Context, fromIndex int) []string { function waitForProcess (line 300) | func waitForProcess(pid int) (message string, err error) { function runAndWaitForCommand (line 314) | func runAndWaitForCommand(command []string) (message string, err error) { function isStdinRedirected (line 337) | func isStdinRedirected() bool { FILE: cmd/publish_test.go function TestCLI_Publish_Subscribe_Poll_Real_Server (line 20) | func TestCLI_Publish_Subscribe_Poll_Real_Server(t *testing.T) { function TestCLI_Publish_Subscribe_Poll (line 39) | func TestCLI_Publish_Subscribe_Poll(t *testing.T) { function TestCLI_Publish_All_The_Things (line 55) | func TestCLI_Publish_All_The_Things(t *testing.T) { function TestCLI_Publish_Wait_PID_And_Cmd (line 93) | func TestCLI_Publish_Wait_PID_And_Cmd(t *testing.T) { function TestCLI_Publish_Default_UserPass (line 156) | func TestCLI_Publish_Default_UserPass(t *testing.T) { function TestCLI_Publish_Default_Token (line 180) | func TestCLI_Publish_Default_Token(t *testing.T) { function TestCLI_Publish_Default_UserPass_CLI_Token (line 203) | func TestCLI_Publish_Default_UserPass_CLI_Token(t *testing.T) { function TestCLI_Publish_Default_Token_CLI_UserPass (line 227) | func TestCLI_Publish_Default_Token_CLI_UserPass(t *testing.T) { function TestCLI_Publish_Default_Token_CLI_Token (line 250) | func TestCLI_Publish_Default_Token_CLI_Token(t *testing.T) { function TestCLI_Publish_Default_UserPass_CLI_UserPass (line 273) | func TestCLI_Publish_Default_UserPass_CLI_UserPass(t *testing.T) { function TestCLI_Publish_Token_And_UserPass (line 297) | func TestCLI_Publish_Token_And_UserPass(t *testing.T) { FILE: cmd/publish_unix.go function processExists (line 7) | func processExists(pid int) bool { FILE: cmd/publish_windows.go function processExists (line 7) | func processExists(pid int) bool { FILE: cmd/serve.go function init (line 27) | func init() { function execServe (line 133) | func execServe(c *cli.Context) error { function parseIPHostPrefix (line 545) | func parseIPHostPrefix(host string) (prefixes []netip.Prefix, err error) { function parseUsers (line 570) | func parseUsers(usersRaw []string) ([]*user.User, error) { function parseAccess (line 597) | func parseAccess(users []*user.User, accessRaw []string) (map[string][]*... function parseTokens (line 640) | func parseTokens(users []*user.User, tokensRaw []string) (map[string][]*... function maybeFromMetadata (line 676) | func maybeFromMetadata(m map[string]any, key string) string { FILE: cmd/serve_test.go function TestParseUsers_Success (line 21) | func TestParseUsers_Success(t *testing.T) { function TestParseUsers_Errors (line 95) | func TestParseUsers_Errors(t *testing.T) { function TestParseAccess_Success (line 143) | func TestParseAccess_Success(t *testing.T) { function TestParseAccess_Errors (line 250) | func TestParseAccess_Errors(t *testing.T) { function TestParseTokens_Success (line 310) | func TestParseTokens_Success(t *testing.T) { function TestParseTokens_Errors (line 413) | func TestParseTokens_Errors(t *testing.T) { function TestCLI_Serve_Unix_Curl (line 472) | func TestCLI_Serve_Unix_Curl(t *testing.T) { function TestCLI_Serve_WebSocket (line 492) | func TestCLI_Serve_WebSocket(t *testing.T) { function TestIP_Host_Parsing (line 523) | func TestIP_Host_Parsing(t *testing.T) { function newEmptyFile (line 539) | func newEmptyFile(t *testing.T) string { FILE: cmd/serve_unix.go function sigHandlerConfigReload (line 15) | func sigHandlerConfigReload(config string) { function reloadLogLevel (line 31) | func reloadLogLevel(inputSource altsrc.InputSourceContext) error { function maybeRunAsService (line 53) | func maybeRunAsService(conf *server.Config) (bool, error) { FILE: cmd/serve_windows.go constant serviceName (line 14) | serviceName = "ntfy" function sigHandlerConfigReload (line 18) | func sigHandlerConfigReload(config string) { function runAsWindowsService (line 23) | func runAsWindowsService(conf *server.Config) error { type windowsService (line 28) | type windowsService struct method Execute (line 35) | func (s *windowsService) Execute(args []string, requests <-chan svc.Ch... function maybeRunAsService (line 88) | func maybeRunAsService(conf *server.Config) (bool, error) { FILE: cmd/subscribe.go function init (line 17) | func init() { function execSubscribe (line 85) | func execSubscribe(c *cli.Context) error { function doPoll (line 150) | func doPoll(c *cli.Context, cl *client.Client, conf *client.Config, topi... function doPollSingle (line 167) | func doPollSingle(c *cli.Context, cl *client.Client, topic, command stri... function doSubscribe (line 178) | func doSubscribe(c *cli.Context, cl *client.Client, conf *client.Config,... function maybeAddAuthHeader (line 220) | func maybeAddAuthHeader(s client.Subscribe, conf *client.Config) client.... function printMessageOrRunCommand (line 244) | func printMessageOrRunCommand(c *cli.Context, m *client.Message, command... function runCommand (line 253) | func runCommand(c *cli.Context, command string, m *client.Message) { function runCommandInternal (line 259) | func runCommandInternal(c *cli.Context, script string, m *client.Message... function envVars (line 276) | func envVars(m *client.Message) []string { function envVar (line 293) | func envVar(value string, vars ...string) []string { function loadConfig (line 301) | func loadConfig(c *cli.Context) (*client.Config, error) { function logMessagePrefix (line 316) | func logMessagePrefix(m *client.Message) string { FILE: cmd/subscribe_darwin.go constant scriptExt (line 6) | scriptExt = "sh" constant scriptHeader (line 7) | scriptHeader = "#!/bin/sh\n" constant clientCommandDescriptionSuffix (line 8) | clientCommandDescriptionSuffix = `The default config file for all client... FILE: cmd/subscribe_test.go function TestCLI_Subscribe_Default_UserPass_Subscription_Token (line 14) | func TestCLI_Subscribe_Default_UserPass_Subscription_Token(t *testing.T) { function TestCLI_Subscribe_Default_Token_Subscription_UserPass (line 42) | func TestCLI_Subscribe_Default_Token_Subscription_UserPass(t *testing.T) { function TestCLI_Subscribe_Default_Token_Subscription_Token (line 70) | func TestCLI_Subscribe_Default_Token_Subscription_Token(t *testing.T) { function TestCLI_Subscribe_Default_UserPass_Subscription_UserPass (line 97) | func TestCLI_Subscribe_Default_UserPass_Subscription_UserPass(t *testing... function TestCLI_Subscribe_Default_Token_Subscription_Empty (line 126) | func TestCLI_Subscribe_Default_Token_Subscription_Empty(t *testing.T) { function TestCLI_Subscribe_Default_UserPass_Subscription_Empty (line 152) | func TestCLI_Subscribe_Default_UserPass_Subscription_Empty(t *testing.T) { function TestCLI_Subscribe_Default_Empty_Subscription_Token (line 179) | func TestCLI_Subscribe_Default_Empty_Subscription_Token(t *testing.T) { function TestCLI_Subscribe_Default_Empty_Subscription_UserPass (line 205) | func TestCLI_Subscribe_Default_Empty_Subscription_UserPass(t *testing.T) { function TestCLI_Subscribe_Default_Token_CLI_Token (line 232) | func TestCLI_Subscribe_Default_Token_CLI_Token(t *testing.T) { function TestCLI_Subscribe_Default_Token_CLI_UserPass (line 256) | func TestCLI_Subscribe_Default_Token_CLI_UserPass(t *testing.T) { function TestCLI_Subscribe_Default_Token_Subscription_Token_CLI_UserPass (line 280) | func TestCLI_Subscribe_Default_Token_Subscription_Token_CLI_UserPass(t *... function TestCLI_Subscribe_Token_And_UserPass (line 307) | func TestCLI_Subscribe_Token_And_UserPass(t *testing.T) { function TestCLI_Subscribe_Default_Token (line 314) | func TestCLI_Subscribe_Default_Token(t *testing.T) { function TestCLI_Subscribe_Default_UserPass (line 338) | func TestCLI_Subscribe_Default_UserPass(t *testing.T) { function TestCLI_Subscribe_Override_Default_UserPass_With_Empty_UserPass (line 363) | func TestCLI_Subscribe_Override_Default_UserPass_With_Empty_UserPass(t *... function TestCLI_Subscribe_Override_Default_Token_With_Empty_Token (line 392) | func TestCLI_Subscribe_Override_Default_Token_With_Empty_Token(t *testin... FILE: cmd/subscribe_unix.go constant scriptExt (line 6) | scriptExt = "sh" constant scriptHeader (line 7) | scriptHeader = "#!/bin/sh\n" constant clientCommandDescriptionSuffix (line 8) | clientCommandDescriptionSuffix = `The default config file for all client... FILE: cmd/subscribe_windows.go constant scriptExt (line 6) | scriptExt = "bat" constant scriptHeader (line 7) | scriptHeader = "" constant clientCommandDescriptionSuffix (line 8) | clientCommandDescriptionSuffix = `The default config file for all client... FILE: cmd/tier.go function init (line 13) | func init() { constant defaultMessageLimit (line 18) | defaultMessageLimit = 5000 constant defaultMessageExpiryDuration (line 19) | defaultMessageExpiryDuration = "12h" constant defaultEmailLimit (line 20) | defaultEmailLimit = 20 constant defaultCallLimit (line 21) | defaultCallLimit = 0 constant defaultReservationLimit (line 22) | defaultReservationLimit = 3 constant defaultAttachmentFileSizeLimit (line 23) | defaultAttachmentFileSizeLimit = "15M" constant defaultAttachmentTotalSizeLimit (line 24) | defaultAttachmentTotalSizeLimit = "100M" constant defaultAttachmentExpiryDuration (line 25) | defaultAttachmentExpiryDuration = "6h" constant defaultAttachmentBandwidthLimit (line 26) | defaultAttachmentBandwidthLimit = "1G" function execTierAdd (line 168) | func execTierAdd(c *cli.Context) error { function execTierChange (line 242) | func execTierChange(c *cli.Context) error { function execTierDel (line 323) | func execTierDel(c *cli.Context) error { function execTierList (line 342) | func execTierList(c *cli.Context) error { function printTier (line 357) | func printTier(c *cli.Context, tier *user.Tier) { FILE: cmd/tier_test.go function TestCLI_Tier_AddListChangeDelete (line 11) | func TestCLI_Tier_AddListChangeDelete(t *testing.T) { function runTierCommand (line 57) | func runTierCommand(app *cli.App, conf *server.Config, args ...string) e... FILE: cmd/token.go function init (line 15) | func init() { function execTokenAdd (line 102) | func execTokenAdd(c *cli.Context) error { function execTokenDel (line 141) | func execTokenDel(c *cli.Context) error { function execTokenList (line 165) | func execTokenList(c *cli.Context) error { function execTokenGenerate (line 224) | func execTokenGenerate(c *cli.Context) error { FILE: cmd/token_test.go function TestCLI_Token_AddListRemove (line 13) | func TestCLI_Token_AddListRemove(t *testing.T) { function runTokenCommand (line 41) | func runTokenCommand(app *cli.App, conf *server.Config, args ...string) ... FILE: cmd/user.go constant tierReset (line 22) | tierReset = "-" function init (line 25) | func init() { function execUserAdd (line 195) | func execUserAdd(c *cli.Context) error { function execUserDel (line 236) | func execUserDel(c *cli.Context) error { function execUserChangePass (line 257) | func execUserChangePass(c *cli.Context) error { function execUserChangeRole (line 289) | func execUserChangeRole(c *cli.Context) error { function execUserHash (line 311) | func execUserHash(c *cli.Context) error { function execUserChangeTier (line 324) | func execUserChangeTier(c *cli.Context) error { function execUserList (line 355) | func execUserList(c *cli.Context) error { function createUserManager (line 367) | func createUserManager(c *cli.Context) (*user.Manager, error) { function readPasswordAndConfirm (line 397) | func readPasswordAndConfirm(c *cli.Context) (string, error) { FILE: cmd/user_test.go function TestCLI_User_Add (line 14) | func TestCLI_User_Add(t *testing.T) { function TestCLI_User_Add_Exists (line 24) | func TestCLI_User_Add_Exists(t *testing.T) { function TestCLI_User_Add_Admin (line 40) | func TestCLI_User_Add_Admin(t *testing.T) { function TestCLI_User_Add_Password_Mismatch (line 50) | func TestCLI_User_Add_Password_Mismatch(t *testing.T) { function TestCLI_User_ChangePass (line 61) | func TestCLI_User_ChangePass(t *testing.T) { function TestCLI_User_ChangeRole (line 86) | func TestCLI_User_ChangeRole(t *testing.T) { function TestCLI_User_Delete (line 102) | func TestCLI_User_Delete(t *testing.T) { function newTestServerWithAuth (line 124) | func newTestServerWithAuth(t *testing.T) (s *server.Server, conf *server... function runUserCommand (line 135) | func runUserCommand(app *cli.App, conf *server.Config, args ...string) e... FILE: cmd/webpush.go function init (line 19) | func init() { function generateWebPushKeys (line 41) | func generateWebPushKeys(c *cli.Context) error { FILE: cmd/webpush_test.go function TestCLI_WebPush_GenerateKeys (line 12) | func TestCLI_WebPush_GenerateKeys(t *testing.T) { function TestCLI_WebPush_WriteKeysToFile (line 18) | func TestCLI_WebPush_WriteKeysToFile(t *testing.T) { function runWebPushCommand (line 27) | func runWebPushCommand(app *cli.App, conf *server.Config, args ...string... FILE: db/db.go constant tag (line 13) | tag = "db" constant replicaHealthCheckInitialDelay (line 14) | replicaHealthCheckInitialDelay = 5 * time.Second constant replicaHealthCheckInterval (line 15) | replicaHealthCheckInterval = 30 * time.Second constant replicaHealthCheckTimeout (line 16) | replicaHealthCheckTimeout = 10 * time.Second type DB (line 22) | type DB struct method Query (line 46) | func (d *DB) Query(query string, args ...any) (*sql.Rows, error) { method QueryRow (line 51) | func (d *DB) QueryRow(query string, args ...any) *sql.Row { method Exec (line 56) | func (d *DB) Exec(query string, args ...any) (sql.Result, error) { method Begin (line 61) | func (d *DB) Begin() (*sql.Tx, error) { method Ping (line 66) | func (d *DB) Ping() error { method Primary (line 72) | func (d *DB) Primary() *sql.DB { method ReadOnly (line 78) | func (d *DB) ReadOnly() *sql.DB { method Close (line 94) | func (d *DB) Close() error { method healthCheckLoop (line 103) | func (d *DB) healthCheckLoop(ctx context.Context) { method checkReplicas (line 121) | func (d *DB) checkReplicas(ctx context.Context) { function New (line 32) | func New(primary *Host, replicas []*Host) *DB { FILE: db/pg/pg.go function Open (line 18) | func Open(dsn string) (*db.Host, error) { function OpenReplica (line 31) | func OpenReplica(dsn string) (*db.Host, error) { function open (line 39) | func open(dsn string) (*db.Host, error) { function extractIntParam (line 88) | func extractIntParam(q url.Values, key string, defaultValue int) (int, e... function censorPassword (line 102) | func censorPassword(u *url.URL) string { function extractDurationParam (line 109) | func extractDurationParam(q url.Values, key string, defaultValue time.Du... FILE: db/pg/pg_test.go function TestOpen_InvalidScheme (line 10) | func TestOpen_InvalidScheme(t *testing.T) { function TestOpen_InvalidURL (line 18) | func TestOpen_InvalidURL(t *testing.T) { function TestCensorPassword (line 24) | func TestCensorPassword(t *testing.T) { FILE: db/test/test.go constant testPoolMaxConns (line 15) | testPoolMaxConns = "2" function CreateTestPostgresSchema (line 20) | func CreateTestPostgresSchema(t *testing.T) string { function CreateTestPostgres (line 54) | func CreateTestPostgres(t *testing.T) *db.DB { FILE: db/types.go type Beginner (line 10) | type Beginner interface type Querier (line 16) | type Querier interface type Host (line 21) | type Host struct FILE: db/util.go function ExecTx (line 7) | func ExecTx(db Beginner, f func(tx *sql.Tx) error) error { function QueryTx (line 21) | func QueryTx[T any](db Beginner, f func(tx *sql.Tx) (T, error)) (T, erro... FILE: docs/hooks.py function on_post_build (line 5) | def on_post_build(config, **kwargs): FILE: docs/static/js/bcrypt.js function preferDefault (line 3) | function preferDefault(exports) { function _interopRequireDefault (line 48) | function _interopRequireDefault(e) { function randomBytes (line 98) | function randomBytes(len) { function setRandomFallback (line 125) | function setRandomFallback(random) { function genSaltSync (line 136) | function genSaltSync(rounds, seed_length) { function genSalt (line 161) | function genSalt(rounds, seed_length, callback) { function hashSync (line 201) | function hashSync(password, salt) { function hash (line 221) | function hash(password, salt, callback, progressCallback) { function safeStringCompare (line 262) | function safeStringCompare(known, unknown) { function compareSync (line 277) | function compareSync(password, hash) { function compare (line 299) | function compare(password, hashValue, callback, progressCallback) { function getRounds (line 351) | function getRounds(hash) { function getSalt (line 363) | function getSalt(hash) { function truncates (line 377) | function truncates(password) { function utf8Length (line 398) | function utf8Length(string) { function utf8Array (line 417) | function utf8Array(string) { function base64_encode (line 483) | function base64_encode(b, len) { function base64_decode (line 520) | function base64_decode(s, len) { function _encipher (line 796) | function _encipher(lr, off, P, S) { function _streamtoword (line 919) | function _streamtoword(data, offp) { function _key (line 935) | function _key(key, P, S) { function _ekskey (line 959) | function _ekskey(data, key, P, S) { function _crypt (line 1003) | function _crypt(b, salt, rounds, callback, progressCallback) { function _hash (line 1095) | function _hash(password, salt, callback, progressCallback) { function encodeBase64 (line 1191) | function encodeBase64(bytes, length) { function decodeBase64 (line 1202) | function decodeBase64(string, length) { FILE: docs/static/js/config-generator.js function cacheElements (line 159) | function cacheElements(modal) { function collectValues (line 186) | function collectValues(els) { function collectRepeatableRows (line 267) | function collectRepeatableRows(modal, selector, extractor) { function hashPassword (line 280) | function hashPassword(username, password) { function formatAuthUsers (line 289) | function formatAuthUsers(values) { function formatAuthAcls (line 294) | function formatAuthAcls(values) { function formatAuthTokens (line 299) | function formatAuthTokens(values) { function generateServerYml (line 306) | function generateServerYml(values) { function generateDockerCompose (line 383) | function generateDockerCompose(values) { function generateEnvVars (line 457) | function generateEnvVars(values) { function generateVAPIDKeys (line 486) | function generateVAPIDKeys() { function arrayToBase64Url (line 508) | function arrayToBase64Url(arr) { function updateOutput (line 518) | function updateOutput(els) { function validate (line 554) | function validate(values) { function secureRandomInt (line 656) | function secureRandomInt(max) { function generateToken (line 662) | function generateToken() { function generatePassword (line 671) | function generatePassword() { function escapeHtml (line 680) | function escapeHtml(str) { function escapeYamlValue (line 684) | function escapeYamlValue(str) { function escapeShellValue (line 688) | function escapeShellValue(val) { function prefill (line 697) | function prefill(modal, key, value) { function switchPanel (line 702) | function switchPanel(modal, panelId) { function setHidden (line 712) | function setHidden(el, hidden) { function syncRadiosToHiddenInputs (line 723) | function syncRadiosToHiddenInputs(els) { function updateFeatureVisibility (line 749) | function updateFeatureVisibility(els, flags) { function updatePostgresFields (line 788) | function updatePostgresFields(modal, isPostgres) { function prefillDefaults (line 823) | function prefillDefaults(modal, flags) { function autoDetectServerType (line 868) | function autoDetectServerType(els, loginModeVal) { function updateVisibility (line 885) | function updateVisibility(els) { function addRepeatableRow (line 932) | function addRepeatableRow(container, type, onUpdate) { function openModal (line 990) | function openModal(els) { function closeModal (line 997) | function closeModal(els) { function resetAll (line 1002) | function resetAll(els) { function fillVAPIDKeys (line 1045) | function fillVAPIDKeys(els) { function setupModalEvents (line 1058) | function setupModalEvents(els) { function setupAuthEvents (line 1095) | function setupAuthEvents(els) { function setupServerTypeEvents (line 1132) | function setupServerTypeEvents(els) { function setupUnifiedPushEvents (line 1184) | function setupUnifiedPushEvents(els) { function setupFormListeners (line 1226) | function setupFormListeners(els) { function setupWebPushEvents (line 1304) | function setupWebPushEvents(els) { function initGenerator (line 1327) | function initGenerator() { FILE: examples/publish-go/main.go function main (line 9) | func main() { FILE: examples/subscribe-go/main.go function main (line 9) | func main() { FILE: log/event.go constant fieldTag (line 15) | fieldTag = "tag" constant fieldError (line 16) | fieldError = "error" constant fieldTimeTaken (line 17) | fieldTimeTaken = "time_taken_ms" constant fieldExitCode (line 18) | fieldExitCode = "exit_code" constant tagStdLog (line 19) | tagStdLog = "stdlog" type Event (line 23) | type Event struct method Fatal (line 43) | func (e *Event) Fatal(message string, v ...any) { method Error (line 50) | func (e *Event) Error(message string, v ...any) *Event { method Warn (line 55) | func (e *Event) Warn(message string, v ...any) *Event { method Info (line 60) | func (e *Event) Info(message string, v ...any) *Event { method Debug (line 65) | func (e *Event) Debug(message string, v ...any) *Event { method Trace (line 70) | func (e *Event) Trace(message string, v ...any) *Event { method Tag (line 75) | func (e *Event) Tag(tag string) *Event { method Time (line 80) | func (e *Event) Time(t time.Time) *Event { method Timing (line 86) | func (e *Event) Timing(f func()) *Event { method Err (line 93) | func (e *Event) Err(err error) *Event { method Field (line 103) | func (e *Event) Field(key string, value any) *Event { method FieldIf (line 112) | func (e *Event) FieldIf(key string, value any, level Level) *Event { method Fields (line 120) | func (e *Event) Fields(fields Context) *Event { method With (line 131) | func (e *Event) With(contexters ...Contexter) *Event { method Render (line 147) | func (e *Event) Render(l Level, message string, v ...any) string { method Log (line 165) | func (e *Event) Log(l Level, message string, v ...any) *Event { method Loggable (line 173) | func (e *Event) Loggable(l Level) bool { method IsTrace (line 178) | func (e *Event) IsTrace() bool { method IsDebug (line 183) | func (e *Event) IsDebug() bool { method JSON (line 188) | func (e *Event) JSON() string { method String (line 199) | func (e *Event) String() string { method globalLevelWithOverride (line 211) | func (e *Event) globalLevelWithOverride() Level { method maybeApplyContexters (line 231) | func (e *Event) maybeApplyContexters() bool { method applyContexters (line 241) | func (e *Event) applyContexters() { function newEvent (line 36) | func newEvent() *Event { FILE: log/log.go function init (line 32) | func init() { function Fatal (line 37) | func Fatal(message string, v ...any) { function Error (line 42) | func Error(message string, v ...any) { function Warn (line 47) | func Warn(message string, v ...any) { function Info (line 52) | func Info(message string, v ...any) { function Debug (line 57) | func Debug(message string, v ...any) { function Trace (line 62) | func Trace(message string, v ...any) { function With (line 67) | func With(contexts ...Contexter) *Event { function Field (line 72) | func Field(key string, value any) *Event { function Fields (line 77) | func Fields(fields Context) *Event { function Tag (line 82) | func Tag(tag string) *Event { function Time (line 87) | func Time(time time.Time) *Event { function Timing (line 92) | func Timing(f func()) *Event { function CurrentLevel (line 97) | func CurrentLevel() Level { function SetLevel (line 104) | func SetLevel(newLevel Level) { function SetLevelOverride (line 111) | func SetLevelOverride(field string, value string, level Level) { function ResetLevelOverrides (line 121) | func ResetLevelOverrides() { function CurrentFormat (line 128) | func CurrentFormat() Format { function SetFormat (line 135) | func SetFormat(newFormat Format) { function SetOutput (line 145) | func SetOutput(w io.Writer) { function File (line 158) | func File() string { function IsFile (line 165) | func IsFile() bool { function DisableDates (line 172) | func DisableDates() { function Loggable (line 177) | func Loggable(l Level) bool { function IsTrace (line 182) | func IsTrace() bool { function IsDebug (line 187) | func IsDebug() bool { type peekLogWriter (line 193) | type peekLogWriter struct method Write (line 197) | func (w *peekLogWriter) Write(p []byte) (n int, err error) { FILE: log/log_test.go function TestMain (line 15) | func TestMain(m *testing.M) { function TestLog_TagContextFieldFields (line 22) | func TestLog_TagContextFieldFields(t *testing.T) { function TestLog_NoAllocIfNotPrinted (line 68) | func TestLog_NoAllocIfNotPrinted(t *testing.T) { function TestLog_Timing (line 138) | func TestLog_Timing(t *testing.T) { function TestLog_LevelOverrideAny (line 157) | func TestLog_LevelOverrideAny(t *testing.T) { function TestLog_LevelOverride_ManyOnSameField (line 180) | func TestLog_LevelOverride_ManyOnSameField(t *testing.T) { function TestLog_FieldIf (line 201) | func TestLog_FieldIf(t *testing.T) { function TestLog_UsingStdLogger_JSON (line 225) | func TestLog_UsingStdLogger_JSON(t *testing.T) { function TestLog_UsingStdLogger_Text (line 236) | func TestLog_UsingStdLogger_Text(t *testing.T) { function TestLog_File (line 247) | func TestLog_File(t *testing.T) { type fakeError (line 268) | type fakeError struct method Error (line 273) | func (e fakeError) Error() string { method Context (line 277) | func (e fakeError) Context() Context { type fakeVisitor (line 284) | type fakeVisitor struct method Context (line 290) | func (v *fakeVisitor) Context() Context { function resetState (line 298) | func resetState() { FILE: log/types.go type Level (line 9) | type Level method String (line 21) | func (l Level) String() string { method MarshalJSON (line 40) | func (l Level) MarshalJSON() ([]byte, error) { constant TraceLevel (line 13) | TraceLevel Level = iota constant DebugLevel (line 14) | DebugLevel constant InfoLevel (line 15) | InfoLevel constant WarnLevel (line 16) | WarnLevel constant ErrorLevel (line 17) | ErrorLevel constant FatalLevel (line 18) | FatalLevel function ToLevel (line 46) | func ToLevel(s string) Level { type Format (line 66) | type Format method String (line 74) | func (f Format) String() string { constant TextFormat (line 70) | TextFormat Format = iota constant JSONFormat (line 71) | JSONFormat function ToFormat (line 86) | func ToFormat(s string) Format { type Contexter (line 98) | type Contexter interface type Context (line 103) | type Context method Merge (line 106) | func (c Context) Merge(other Context) { type levelOverride (line 112) | type levelOverride struct FILE: main.go function main (line 19) | func main() { function maybeShortCommit (line 44) | func maybeShortCommit(commit string) string { FILE: message/cache.go constant tagMessageCache (line 19) | tagMessageCache = "message_cache" type queries (line 25) | type queries struct type Cache (line 52) | type Cache struct method maybeLock (line 76) | func (c *Cache) maybeLock() { method maybeUnlock (line 82) | func (c *Cache) maybeUnlock() { method AddMessage (line 90) | func (c *Cache) AddMessage(m *model.Message) error { method AddMessages (line 99) | func (c *Cache) AddMessages(ms []*model.Message) error { method addMessages (line 103) | func (c *Cache) addMessages(ms []*model.Message) error { method Messages (line 190) | func (c *Cache) Messages(topic string, since model.SinceMarker, schedu... method messagesSinceTime (line 201) | func (c *Cache) messagesSinceTime(topic string, since model.SinceMarke... method messagesSinceID (line 216) | func (c *Cache) messagesSinceID(topic string, since model.SinceMarker,... method messagesLatest (line 231) | func (c *Cache) messagesLatest(topic string) ([]*model.Message, error) { method MessagesDue (line 240) | func (c *Cache) MessagesDue() ([]*model.Message, error) { method MessagesExpired (line 249) | func (c *Cache) MessagesExpired() ([]string, error) { method Message (line 270) | func (c *Cache) Message(id string) (*model.Message, error) { method UpdateMessageTime (line 283) | func (c *Cache) UpdateMessageTime(messageID string, timestamp int64) e... method MarkPublished (line 291) | func (c *Cache) MarkPublished(m *model.Message) error { method MessagesCount (line 299) | func (c *Cache) MessagesCount() (int, error) { method Topics (line 316) | func (c *Cache) Topics() ([]string, error) { method DeleteMessages (line 337) | func (c *Cache) DeleteMessages(ids ...string) error { method DeleteScheduledBySequenceID (line 352) | func (c *Cache) DeleteScheduledBySequenceID(topic, sequenceID string) ... method ExpireMessages (line 381) | func (c *Cache) ExpireMessages(topics ...string) error { method AttachmentsExpired (line 395) | func (c *Cache) AttachmentsExpired() ([]string, error) { method MarkAttachmentsDeleted (line 416) | func (c *Cache) MarkAttachmentsDeleted(ids ...string) error { method AttachmentBytesUsedBySender (line 430) | func (c *Cache) AttachmentBytesUsedBySender(sender string) (int64, err... method AttachmentBytesUsedByUser (line 439) | func (c *Cache) AttachmentBytesUsedByUser(userID string) (int64, error) { method readAttachmentBytesUsed (line 447) | func (c *Cache) readAttachmentBytesUsed(rows *sql.Rows) (int64, error) { method UpdateStats (line 462) | func (c *Cache) UpdateStats(messages int64) error { method Stats (line 470) | func (c *Cache) Stats() (messages int64, err error) { method Close (line 486) | func (c *Cache) Close() error { method processMessageBatches (line 490) | func (c *Cache) processMessageBatches() { function newCache (line 60) | func newCache(db *db.DB, queries queries, mu *sync.Mutex, batchSize int,... function readMessages (line 501) | func readMessages(rows *sql.Rows) ([]*model.Message, error) { function readMessage (line 517) | func readMessage(rows *sql.Rows) (*model.Message, error) { FILE: message/cache_postgres.go constant postgresInsertMessageQuery (line 11) | postgresInsertMessageQuery = ` constant postgresDeleteMessageQuery (line 15) | postgresDeleteMessageQuery = `DELETE FROM message WHE... constant postgresSelectScheduledMessageIDsBySeqIDQuery (line 16) | postgresSelectScheduledMessageIDsBySeqIDQuery = `SELECT mid FROM message... constant postgresDeleteScheduledBySequenceIDQuery (line 17) | postgresDeleteScheduledBySequenceIDQuery = `DELETE FROM message WHE... constant postgresUpdateMessagesForTopicExpiryQuery (line 18) | postgresUpdateMessagesForTopicExpiryQuery = `UPDATE message SET expi... constant postgresSelectMessagesByIDQuery (line 19) | postgresSelectMessagesByIDQuery = ` constant postgresSelectMessagesSinceTimeQuery (line 24) | postgresSelectMessagesSinceTimeQuery = ` constant postgresSelectMessagesSinceTimeIncludeScheduledQuery (line 30) | postgresSelectMessagesSinceTimeIncludeScheduledQuery = ` constant postgresSelectMessagesSinceIDQuery (line 36) | postgresSelectMessagesSinceIDQuery = ` constant postgresSelectMessagesSinceIDIncludeScheduledQuery (line 44) | postgresSelectMessagesSinceIDIncludeScheduledQuery = ` constant postgresSelectMessagesLatestQuery (line 51) | postgresSelectMessagesLatestQuery = ` constant postgresSelectMessagesDueQuery (line 58) | postgresSelectMessagesDueQuery = ` constant postgresSelectMessagesExpiredQuery (line 64) | postgresSelectMessagesExpiredQuery = `SELECT mid FROM message WHERE exp... constant postgresUpdateMessagePublishedQuery (line 65) | postgresUpdateMessagePublishedQuery = `UPDATE message SET published = TR... constant postgresSelectMessagesCountQuery (line 66) | postgresSelectMessagesCountQuery = `SELECT COUNT(*) FROM message` constant postgresSelectTopicsQuery (line 67) | postgresSelectTopicsQuery = `SELECT topic FROM message GROUP B... constant postgresUpdateAttachmentDeletedQuery (line 69) | postgresUpdateAttachmentDeletedQuery = `UPDATE message SET attachm... constant postgresSelectAttachmentsExpiredQuery (line 70) | postgresSelectAttachmentsExpiredQuery = `SELECT mid FROM message WH... constant postgresSelectAttachmentsSizeBySenderQuery (line 71) | postgresSelectAttachmentsSizeBySenderQuery = `SELECT COALESCE(SUM(attach... constant postgresSelectAttachmentsSizeByUserIDQuery (line 72) | postgresSelectAttachmentsSizeByUserIDQuery = `SELECT COALESCE(SUM(attach... constant postgresSelectStatsQuery (line 74) | postgresSelectStatsQuery = `SELECT value FROM message_stats WHERE ... constant postgresUpdateStatsQuery (line 75) | postgresUpdateStatsQuery = `UPDATE message_stats SET value = $1 WH... constant postgresUpdateMessageTimeQuery (line 76) | postgresUpdateMessageTimeQuery = `UPDATE message SET time = $1 WHERE mid... function NewPostgresStore (line 106) | func NewPostgresStore(d *db.DB, batchSize int, batchTimeout time.Duratio... FILE: message/cache_postgres_schema.go constant postgresCreateTablesQuery (line 12) | postgresCreateTablesQuery = ` constant postgresCurrentSchemaVersion (line 60) | postgresCurrentSchemaVersion = 14 constant postgresInsertSchemaVersionQuery (line 61) | postgresInsertSchemaVersionQuery = `INSERT INTO schema_version (store, v... constant postgresSelectSchemaVersionQuery (line 62) | postgresSelectSchemaVersionQuery = `SELECT version FROM schema_version W... function setupPostgres (line 65) | func setupPostgres(db *sql.DB) error { function setupNewPostgresDB (line 75) | func setupNewPostgresDB(sqlDB *sql.DB) error { FILE: message/cache_sqlite.go constant sqliteInsertMessageQuery (line 17) | sqliteInsertMessageQuery = ` constant sqliteDeleteMessageQuery (line 21) | sqliteDeleteMessageQuery = `DELETE FROM messages WHER... constant sqliteSelectScheduledMessageIDsBySeqIDQuery (line 22) | sqliteSelectScheduledMessageIDsBySeqIDQuery = `SELECT mid FROM messages ... constant sqliteDeleteScheduledBySequenceIDQuery (line 23) | sqliteDeleteScheduledBySequenceIDQuery = `DELETE FROM messages WHER... constant sqliteUpdateMessagesForTopicExpiryQuery (line 24) | sqliteUpdateMessagesForTopicExpiryQuery = `UPDATE messages SET expir... constant sqliteSelectMessagesByIDQuery (line 25) | sqliteSelectMessagesByIDQuery = ` constant sqliteSelectMessagesSinceTimeQuery (line 30) | sqliteSelectMessagesSinceTimeQuery = ` constant sqliteSelectMessagesSinceTimeIncludeScheduledQuery (line 36) | sqliteSelectMessagesSinceTimeIncludeScheduledQuery = ` constant sqliteSelectMessagesSinceIDQuery (line 42) | sqliteSelectMessagesSinceIDQuery = ` constant sqliteSelectMessagesSinceIDIncludeScheduledQuery (line 48) | sqliteSelectMessagesSinceIDIncludeScheduledQuery = ` constant sqliteSelectMessagesLatestQuery (line 54) | sqliteSelectMessagesLatestQuery = ` constant sqliteSelectMessagesDueQuery (line 61) | sqliteSelectMessagesDueQuery = ` constant sqliteSelectMessagesExpiredQuery (line 67) | sqliteSelectMessagesExpiredQuery = `SELECT mid FROM messages WHERE expi... constant sqliteUpdateMessagePublishedQuery (line 68) | sqliteUpdateMessagePublishedQuery = `UPDATE messages SET published = 1 W... constant sqliteSelectMessagesCountQuery (line 69) | sqliteSelectMessagesCountQuery = `SELECT COUNT(*) FROM messages` constant sqliteSelectTopicsQuery (line 70) | sqliteSelectTopicsQuery = `SELECT topic FROM messages GROUP BY... constant sqliteUpdateAttachmentDeletedQuery (line 72) | sqliteUpdateAttachmentDeletedQuery = `UPDATE messages SET attachme... constant sqliteSelectAttachmentsExpiredQuery (line 73) | sqliteSelectAttachmentsExpiredQuery = `SELECT mid FROM messages WHE... constant sqliteSelectAttachmentsSizeBySenderQuery (line 74) | sqliteSelectAttachmentsSizeBySenderQuery = `SELECT IFNULL(SUM(attachment... constant sqliteSelectAttachmentsSizeByUserIDQuery (line 75) | sqliteSelectAttachmentsSizeByUserIDQuery = `SELECT IFNULL(SUM(attachment... constant sqliteSelectStatsQuery (line 77) | sqliteSelectStatsQuery = `SELECT value FROM stats WHERE key = 'mes... constant sqliteUpdateStatsQuery (line 78) | sqliteUpdateStatsQuery = `UPDATE stats SET value = ? WHERE key = '... constant sqliteUpdateMessageTimeQuery (line 79) | sqliteUpdateMessageTimeQuery = `UPDATE messages SET time = ? WHERE mid = ?` function NewSQLiteStore (line 109) | func NewSQLiteStore(filename, startupQueries string, cacheDuration time.... function NewMemStore (line 125) | func NewMemStore() (*Cache, error) { function NewNopStore (line 131) | func NewNopStore() (*Cache, error) { function createMemoryFilename (line 141) | func createMemoryFilename() string { FILE: message/cache_sqlite_schema.go constant sqliteCreateTablesQuery (line 14) | sqliteCreateTablesQuery = ` constant sqliteCurrentSchemaVersion (line 60) | sqliteCurrentSchemaVersion = 14 constant sqliteCreateSchemaVersionTableQuery (line 61) | sqliteCreateSchemaVersionTableQuery = ` constant sqliteInsertSchemaVersionQuery (line 67) | sqliteInsertSchemaVersionQuery = `INSERT INTO schemaVersion VALUES (1, ?)` constant sqliteUpdateSchemaVersionQuery (line 68) | sqliteUpdateSchemaVersionQuery = `UPDATE schemaVersion SET version = ? W... constant sqliteSelectSchemaVersionQuery (line 69) | sqliteSelectSchemaVersionQuery = `SELECT version FROM schemaVersion WHER... constant sqliteMigrate0To1AlterMessagesTableQuery (line 75) | sqliteMigrate0To1AlterMessagesTableQuery = ` constant sqliteMigrate1To2AlterMessagesTableQuery (line 82) | sqliteMigrate1To2AlterMessagesTableQuery = ` constant sqliteMigrate2To3AlterMessagesTableQuery (line 87) | sqliteMigrate2To3AlterMessagesTableQuery = ` constant sqliteMigrate3To4AlterMessagesTableQuery (line 97) | sqliteMigrate3To4AlterMessagesTableQuery = ` constant sqliteMigrate4To5AlterMessagesTableQuery (line 102) | sqliteMigrate4To5AlterMessagesTableQuery = ` constant sqliteMigrate5To6AlterMessagesTableQuery (line 137) | sqliteMigrate5To6AlterMessagesTableQuery = ` constant sqliteMigrate6To7AlterMessagesTableQuery (line 142) | sqliteMigrate6To7AlterMessagesTableQuery = ` constant sqliteMigrate7To8AlterMessagesTableQuery (line 147) | sqliteMigrate7To8AlterMessagesTableQuery = ` constant sqliteMigrate8To9AlterMessagesTableQuery (line 152) | sqliteMigrate8To9AlterMessagesTableQuery = ` constant sqliteMigrate9To10AlterMessagesTableQuery (line 157) | sqliteMigrate9To10AlterMessagesTableQuery = ` constant sqliteMigrate9To10UpdateMessageExpiryQuery (line 166) | sqliteMigrate9To10UpdateMessageExpiryQuery = `UPDATE messages SET expire... constant sqliteMigrate10To11AlterMessagesTableQuery (line 169) | sqliteMigrate10To11AlterMessagesTableQuery = ` constant sqliteMigrate11To12AlterMessagesTableQuery (line 178) | sqliteMigrate11To12AlterMessagesTableQuery = ` constant sqliteMigrate12To13AlterMessagesTableQuery (line 183) | sqliteMigrate12To13AlterMessagesTableQuery = ` constant sqliteMigrate13To14AlterMessagesTableQuery (line 188) | sqliteMigrate13To14AlterMessagesTableQuery = ` function setupSQLite (line 214) | func setupSQLite(db *sql.DB, startupQueries string, cacheDuration time.D... function setupNewSQLite (line 243) | func setupNewSQLite(sqlDB *sql.DB) error { function runSQLiteStartupQueries (line 258) | func runSQLiteStartupQueries(db *sql.DB, startupQueries string) error { function sqliteMigrateFrom0 (line 267) | func sqliteMigrateFrom0(sqlDB *sql.DB, _ time.Duration) error { function sqliteMigrateFrom1 (line 283) | func sqliteMigrateFrom1(sqlDB *sql.DB, _ time.Duration) error { function sqliteMigrateFrom2 (line 296) | func sqliteMigrateFrom2(sqlDB *sql.DB, _ time.Duration) error { function sqliteMigrateFrom3 (line 309) | func sqliteMigrateFrom3(sqlDB *sql.DB, _ time.Duration) error { function sqliteMigrateFrom4 (line 322) | func sqliteMigrateFrom4(sqlDB *sql.DB, _ time.Duration) error { function sqliteMigrateFrom5 (line 335) | func sqliteMigrateFrom5(sqlDB *sql.DB, _ time.Duration) error { function sqliteMigrateFrom6 (line 348) | func sqliteMigrateFrom6(sqlDB *sql.DB, _ time.Duration) error { function sqliteMigrateFrom7 (line 361) | func sqliteMigrateFrom7(sqlDB *sql.DB, _ time.Duration) error { function sqliteMigrateFrom8 (line 374) | func sqliteMigrateFrom8(sqlDB *sql.DB, _ time.Duration) error { function sqliteMigrateFrom9 (line 387) | func sqliteMigrateFrom9(sqlDB *sql.DB, cacheDuration time.Duration) error { function sqliteMigrateFrom10 (line 403) | func sqliteMigrateFrom10(sqlDB *sql.DB, _ time.Duration) error { function sqliteMigrateFrom11 (line 416) | func sqliteMigrateFrom11(sqlDB *sql.DB, _ time.Duration) error { function sqliteMigrateFrom12 (line 429) | func sqliteMigrateFrom12(sqlDB *sql.DB, _ time.Duration) error { function sqliteMigrateFrom13 (line 442) | func sqliteMigrateFrom13(sqlDB *sql.DB, _ time.Duration) error { FILE: message/cache_sqlite_test.go function TestSqliteStore_Migration_From0 (line 16) | func TestSqliteStore_Migration_From0(t *testing.T) { function TestSqliteStore_Migration_From1 (line 56) | func TestSqliteStore_Migration_From1(t *testing.T) { function TestSqliteStore_Migration_From9 (line 121) | func TestSqliteStore_Migration_From9(t *testing.T) { function TestSqliteStore_StartupQueries_WAL (line 224) | func TestSqliteStore_StartupQueries_WAL(t *testing.T) { function TestSqliteStore_StartupQueries_None (line 238) | func TestSqliteStore_StartupQueries_None(t *testing.T) { function TestSqliteStore_StartupQueries_Fail (line 249) | func TestSqliteStore_StartupQueries_Fail(t *testing.T) { function TestNopStore (line 255) | func TestNopStore(t *testing.T) { function newSqliteTestStoreFile (line 270) | func newSqliteTestStoreFile(t *testing.T) string { function newSqliteTestStoreFromFile (line 274) | func newSqliteTestStoreFromFile(t *testing.T, filename, startupQueries s... function checkSqliteSchemaVersion (line 281) | func checkSqliteSchemaVersion(t *testing.T, filename string) { FILE: message/cache_test.go function newSqliteTestStore (line 18) | func newSqliteTestStore(t *testing.T) *message.Cache { function newMemTestStore (line 26) | func newMemTestStore(t *testing.T) *message.Cache { function newTestPostgresStore (line 33) | func newTestPostgresStore(t *testing.T) *message.Cache { function forEachBackend (line 40) | func forEachBackend(t *testing.T, f func(t *testing.T, s *message.Cache)) { function TestStore_Messages (line 52) | func TestStore_Messages(t *testing.T) { function TestStore_MessagesLock (line 115) | func TestStore_MessagesLock(t *testing.T) { function TestStore_MessagesScheduled (line 129) | func TestStore_MessagesScheduled(t *testing.T) { function TestStore_Topics (line 157) | func TestStore_Topics(t *testing.T) { function TestStore_MessagesTagsPrioAndTitle (line 174) | func TestStore_MessagesTagsPrioAndTitle(t *testing.T) { function TestStore_MessagesSinceID (line 189) | func TestStore_MessagesSinceID(t *testing.T) { function TestStore_Prune (line 253) | func TestStore_Prune(t *testing.T) { function TestStore_Attachments (line 292) | func TestStore_Attachments(t *testing.T) { function TestStore_AttachmentsExpired (line 371) | func TestStore_AttachmentsExpired(t *testing.T) { function TestStore_Sender (line 424) | func TestStore_Sender(t *testing.T) { function TestStore_DeleteScheduledBySequenceID (line 441) | func TestStore_DeleteScheduledBySequenceID(t *testing.T) { function TestStore_MessageByID (line 508) | func TestStore_MessageByID(t *testing.T) { function TestStore_MarkPublished (line 533) | func TestStore_MarkPublished(t *testing.T) { function TestStore_ExpireMessages (line 561) | func TestStore_ExpireMessages(t *testing.T) { function TestStore_MarkAttachmentsDeleted (line 602) | func TestStore_MarkAttachmentsDeleted(t *testing.T) { function TestStore_Stats (line 661) | func TestStore_Stats(t *testing.T) { function TestStore_AddMessages (line 682) | func TestStore_AddMessages(t *testing.T) { function TestStore_MessagesDue (line 713) | func TestStore_MessagesDue(t *testing.T) { function TestStore_MessageFieldRoundTrip (line 757) | func TestStore_MessageFieldRoundTrip(t *testing.T) { function TestStore_AddMessage_InvalidUTF8 (line 831) | func TestStore_AddMessage_InvalidUTF8(t *testing.T) { function TestStore_AddMessage_NullByte (line 920) | func TestStore_AddMessage_NullByte(t *testing.T) { function TestStore_AddMessage_InvalidUTF8InTitleAndTags (line 933) | func TestStore_AddMessage_InvalidUTF8InTitleAndTags(t *testing.T) { function TestStore_AddMessage_InvalidUTF8BatchDoesNotDropValidMessages (line 952) | func TestStore_AddMessage_InvalidUTF8BatchDoesNotDropValidMessages(t *te... FILE: model/model.go constant OpenEvent (line 14) | OpenEvent = "open" constant KeepaliveEvent (line 15) | KeepaliveEvent = "keepalive" constant MessageEvent (line 16) | MessageEvent = "message" constant MessageDeleteEvent (line 17) | MessageDeleteEvent = "message_delete" constant MessageClearEvent (line 18) | MessageClearEvent = "message_clear" constant PollRequestEvent (line 19) | PollRequestEvent = "poll_request" constant MessageIDLength (line 23) | MessageIDLength = 12 type Message (line 32) | type Message struct method Context (line 55) | func (m *Message) Context() log.Context { method SanitizeUTF8 (line 76) | func (m *Message) SanitizeUTF8() { method ForJSON (line 95) | func (m *Message) ForJSON() *Message { type Attachment (line 105) | type Attachment struct type Action (line 114) | type Action struct function NewAction (line 129) | func NewAction() *Action { function NewMessage (line 137) | func NewMessage(event, topic, msg string) *Message { function NewOpenMessage (line 148) | func NewOpenMessage(topic string) *Message { function NewKeepaliveMessage (line 153) | func NewKeepaliveMessage(topic string) *Message { function NewDefaultMessage (line 158) | func NewDefaultMessage(topic, msg string) *Message { function NewActionMessage (line 163) | func NewActionMessage(event, topic, sequenceID string) *Message { function NewPollRequestMessage (line 170) | func NewPollRequestMessage(topic, pollID string) *Message { function ValidMessageID (line 177) | func ValidMessageID(s string) bool { type SinceMarker (line 182) | type SinceMarker struct method IsAll (line 198) | func (t SinceMarker) IsAll() bool { method IsNone (line 203) | func (t SinceMarker) IsNone() bool { method IsLatest (line 208) | func (t SinceMarker) IsLatest() bool { method IsID (line 213) | func (t SinceMarker) IsID() bool { method Time (line 218) | func (t SinceMarker) Time() time.Time { method ID (line 223) | func (t SinceMarker) ID() string { function NewSinceTime (line 188) | func NewSinceTime(timestamp int64) SinceMarker { function NewSinceID (line 193) | func NewSinceID(id string) SinceMarker { FILE: payments/payments.go constant Available (line 9) | Available = true type SubscriptionStatus (line 12) | type SubscriptionStatus type PriceRecurringInterval (line 15) | type PriceRecurringInterval function Setup (line 18) | func Setup(stripeSecretKey string) { FILE: payments/payments_dummy.go constant Available (line 7) | Available = false type SubscriptionStatus (line 10) | type SubscriptionStatus type PriceRecurringInterval (line 13) | type PriceRecurringInterval function Setup (line 16) | func Setup(stripeSecretKey string) { FILE: server/actions.go constant actionIDLength (line 16) | actionIDLength = 10 constant actionEOF (line 17) | actionEOF = rune(0) constant actionsMax (line 18) | actionsMax = 3 constant actionView (line 22) | actionView = "view" constant actionBroadcast (line 23) | actionBroadcast = "broadcast" constant actionHTTP (line 24) | actionHTTP = "http" constant actionCopy (line 25) | actionCopy = "copy" type actionParser (line 35) | type actionParser struct method Parse (line 123) | func (p *actionParser) Parse() ([]*model.Action, error) { method parseAction (line 138) | func (p *actionParser) parseAction() (*model.Action, error) { method parseSection (line 212) | func (p *actionParser) parseSection() (key string, value string, last ... method parseKey (line 230) | func (p *actionParser) parseKey() string { method parseValue (line 242) | func (p *actionParser) parseValue() (value string, last bool) { method parseQuotedValue (line 258) | func (p *actionParser) parseQuotedValue(quote rune) (value string, las... method slurpSpaces (line 288) | func (p *actionParser) slurpSpaces() { method peek (line 299) | func (p *actionParser) peek() (rune, int) { method eof (line 307) | func (p *actionParser) eof() bool { function parseActions (line 43) | func parseActions(s string) (actions []*model.Action, err error) { function parseActionsFromJSON (line 84) | func parseActionsFromJSON(s string) ([]*model.Action, error) { function parseActionsFromSimple (line 111) | func parseActionsFromSimple(s string) ([]*model.Action, error) { function populateAction (line 159) | func populateAction(newAction *model.Action, section int, key, value str... function isSpace (line 311) | func isSpace(r rune) bool { function isSectionEnd (line 315) | func isSectionEnd(r rune) bool { function isLastSection (line 319) | func isLastSection(r rune) bool { FILE: server/actions_test.go function TestParseActions (line 9) | func TestParseActions(t *testing.T) { FILE: server/config.go constant DefaultListenHTTP (line 18) | DefaultListenHTTP = ":80" constant DefaultCacheDuration (line 19) | DefaultCacheDuration = 12 * time.Hour constant DefaultCacheBatchTimeout (line 20) | DefaultCacheBatchTimeout = time.Duration(0) constant DefaultKeepaliveInterval (line 21) | DefaultKeepaliveInterval = 45 * time.Second constant DefaultManagerInterval (line 22) | DefaultManagerInterval = time.Minute constant DefaultDelayedSenderInterval (line 23) | DefaultDelayedSenderInterval = 10 * time.Second constant DefaultMessageDelayMin (line 24) | DefaultMessageDelayMin = 10 * time.Second constant DefaultMessageDelayMax (line 25) | DefaultMessageDelayMax = 3 * 24 * time.Hour constant DefaultFirebaseKeepaliveInterval (line 26) | DefaultFirebaseKeepaliveInterval = 3 * time.Hour constant DefaultFirebasePollInterval (line 27) | DefaultFirebasePollInterval = 20 * time.Minute constant DefaultFirebaseQuotaExceededPenaltyDuration (line 28) | DefaultFirebaseQuotaExceededPenaltyDuration = 10 * time.Minute constant DefaultStripePriceCacheDuration (line 29) | DefaultStripePriceCacheDuration = 3 * time.Hour constant DefaultWebPushExpiryWarningDuration (line 40) | DefaultWebPushExpiryWarningDuration = 55 * 24 * time.Hour constant DefaultWebPushExpiryDuration (line 41) | DefaultWebPushExpiryDuration = 60 * 24 * time.Hour constant DefaultMessageSizeLimit (line 49) | DefaultMessageSizeLimit = 4096 constant DefaultTotalTopicLimit (line 50) | DefaultTotalTopicLimit = 15000 constant DefaultAttachmentTotalSizeLimit (line 51) | DefaultAttachmentTotalSizeLimit = int64(5 * 1024 * 1024 * 1024) constant DefaultAttachmentFileSizeLimit (line 52) | DefaultAttachmentFileSizeLimit = int64(15 * 1024 * 1024) constant DefaultAttachmentExpiryDuration (line 53) | DefaultAttachmentExpiryDuration = 3 * time.Hour constant DefaultVisitorSubscriptionLimit (line 63) | DefaultVisitorSubscriptionLimit = 30 constant DefaultVisitorRequestLimitBurst (line 64) | DefaultVisitorRequestLimitBurst = 60 constant DefaultVisitorRequestLimitReplenish (line 65) | DefaultVisitorRequestLimitReplenish = 5 * time.Second constant DefaultVisitorMessageDailyLimit (line 66) | DefaultVisitorMessageDailyLimit = 0 constant DefaultVisitorEmailLimitBurst (line 67) | DefaultVisitorEmailLimitBurst = 16 constant DefaultVisitorEmailLimitReplenish (line 68) | DefaultVisitorEmailLimitReplenish = time.Hour constant DefaultVisitorAccountCreationLimitBurst (line 69) | DefaultVisitorAccountCreationLimitBurst = 3 constant DefaultVisitorAccountCreationLimitReplenish (line 70) | DefaultVisitorAccountCreationLimitReplenish = 24 * time.Hour constant DefaultVisitorAuthFailureLimitBurst (line 71) | DefaultVisitorAuthFailureLimitBurst = 30 constant DefaultVisitorAuthFailureLimitReplenish (line 72) | DefaultVisitorAuthFailureLimitReplenish = time.Minute constant DefaultVisitorAttachmentTotalSizeLimit (line 73) | DefaultVisitorAttachmentTotalSizeLimit = 100 * 1024 * 1024 constant DefaultVisitorAttachmentDailyBandwidthLimit (line 74) | DefaultVisitorAttachmentDailyBandwidthLimit = 500 * 1024 * 1024 constant DefaultVisitorPrefixBitsIPv4 (line 75) | DefaultVisitorPrefixBitsIPv4 = 32 constant DefaultVisitorPrefixBitsIPv6 (line 76) | DefaultVisitorPrefixBitsIPv6 = 64 type Config (line 89) | type Config struct method Hash (line 293) | func (c *Config) Hash() string { function NewConfig (line 194) | func NewConfig() *Config { FILE: server/config_test.go function TestConfig_New (line 9) | func TestConfig_New(t *testing.T) { FILE: server/config_unix.go function init (line 5) | func init() { FILE: server/config_windows.go function init (line 10) | func init() { FILE: server/errors.go type errHTTP (line 12) | type errHTTP struct method Error (line 20) | func (e errHTTP) Error() string { method JSON (line 24) | func (e errHTTP) JSON() string { method Context (line 29) | func (e errHTTP) Context() log.Context { method Wrap (line 41) | func (e errHTTP) Wrap(message string, args ...any) *errHTTP { method With (line 47) | func (e errHTTP) With(contexters ...log.Contexter) *errHTTP { method Fields (line 58) | func (e errHTTP) Fields(context log.Context) *errHTTP { method clone (line 67) | func (e errHTTP) clone() errHTTP { type errWebSocketPostUpgrade (line 84) | type errWebSocketPostUpgrade struct method Error (line 88) | func (e *errWebSocketPostUpgrade) Error() string { method Unwrap (line 92) | func (e *errWebSocketPostUpgrade) Unwrap() error { FILE: server/file_cache.go type fileCache (line 22) | type fileCache struct method Write (line 44) | func (c *fileCache) Write(id string, in io.Reader, limiters ...util.Li... method Remove (line 76) | func (c *fileCache) Remove(ids ...string) error { method Size (line 98) | func (c *fileCache) Size() int64 { method Remaining (line 104) | func (c *fileCache) Remaining() int64 { function newFileCache (line 29) | func newFileCache(dir string, totalSizeLimit int64) (*fileCache, error) { function dirSize (line 114) | func dirSize(dir string) (int64, error) { FILE: server/file_cache_test.go function TestFileCache_Write_Success (line 17) | func TestFileCache_Write_Success(t *testing.T) { function TestFileCache_Write_Remove_Success (line 27) | func TestFileCache_Write_Remove_Success(t *testing.T) { function TestFileCache_Write_FailedTotalSizeLimit (line 46) | func TestFileCache_Write_FailedTotalSizeLimit(t *testing.T) { function TestFileCache_Write_FailedAdditionalLimiter (line 58) | func TestFileCache_Write_FailedAdditionalLimiter(t *testing.T) { function newTestFileCache (line 65) | func newTestFileCache(t *testing.T) (dir string, cache *fileCache) { function readFile (line 72) | func readFile(t *testing.T, f string) string { FILE: server/log.go constant tagStartup (line 19) | tagStartup = "startup" constant tagHTTP (line 20) | tagHTTP = "http" constant tagPublish (line 21) | tagPublish = "publish" constant tagSubscribe (line 22) | tagSubscribe = "subscribe" constant tagFirebase (line 23) | tagFirebase = "firebase" constant tagSMTP (line 24) | tagSMTP = "smtp" constant tagEmail (line 25) | tagEmail = "email" constant tagTwilio (line 26) | tagTwilio = "twilio" constant tagFileCache (line 27) | tagFileCache = "file_cache" constant tagMessageCache (line 28) | tagMessageCache = "message_cache" constant tagStripe (line 29) | tagStripe = "stripe" constant tagAccount (line 30) | tagAccount = "account" constant tagManager (line 31) | tagManager = "manager" constant tagResetter (line 32) | tagResetter = "resetter" constant tagWebsocket (line 33) | tagWebsocket = "websocket" constant tagMatrix (line 34) | tagMatrix = "matrix" constant tagWebPush (line 35) | tagWebPush = "webpush" function logr (line 44) | func logr(r *http.Request) *log.Event { function logv (line 49) | func logv(v *visitor) *log.Event { function logvr (line 54) | func logvr(v *visitor, r *http.Request) *log.Event { function logvrm (line 59) | func logvrm(v *visitor, r *http.Request, m *model.Message) *log.Event { function logvm (line 64) | func logvm(v *visitor, m *model.Message) *log.Event { function logem (line 69) | func logem(smtpConn *smtp.Conn) *log.Event { function httpContext (line 77) | func httpContext(r *http.Request) log.Context { function websocketErrorContext (line 88) | func websocketErrorContext(err error) log.Context { function renderHTTPRequest (line 102) | func renderHTTPRequest(r *http.Request) string { FILE: server/server.go type Server (line 48) | type Server struct method Run (line 307) | func (s *Server) Run() error { method Stop (line 410) | func (s *Server) Stop() { method closeDatabases (line 429) | func (s *Server) closeDatabases() { method handle (line 443) | func (s *Server) handle(w http.ResponseWriter, r *http.Request) { method handleError (line 468) | func (s *Server) handleError(w http.ResponseWriter, r *http.Request, v... method handleInternal (line 512) | func (s *Server) handleInternal(w http.ResponseWriter, r *http.Request... method handleRoot (line 631) | func (s *Server) handleRoot(w http.ResponseWriter, r *http.Request, v ... method handleTopic (line 636) | func (s *Server) handleTopic(w http.ResponseWriter, r *http.Request, v... method handleEmpty (line 648) | func (s *Server) handleEmpty(_ http.ResponseWriter, _ *http.Request, _... method handleTopicAuth (line 652) | func (s *Server) handleTopicAuth(w http.ResponseWriter, _ *http.Reques... method handleHealth (line 656) | func (s *Server) handleHealth(w http.ResponseWriter, _ *http.Request, ... method handleConfig (line 663) | func (s *Server) handleConfig(w http.ResponseWriter, _ *http.Request, ... method handleWebConfig (line 668) | func (s *Server) handleWebConfig(w http.ResponseWriter, _ *http.Reques... method configResponse (line 679) | func (s *Server) configResponse() *apiConfigResponse { method handleWebManifest (line 699) | func (s *Server) handleWebManifest(w http.ResponseWriter, _ *http.Requ... method handleMetrics (line 719) | func (s *Server) handleMetrics(w http.ResponseWriter, r *http.Request,... method handleStatic (line 725) | func (s *Server) handleStatic(w http.ResponseWriter, r *http.Request, ... method handleDocs (line 732) | func (s *Server) handleDocs(w http.ResponseWriter, r *http.Request, _ ... method handleStats (line 738) | func (s *Server) handleStats(w http.ResponseWriter, _ *http.Request, _... method handleFile (line 755) | func (s *Server) handleFile(w http.ResponseWriter, r *http.Request, v ... method handleMatrixDiscovery (line 825) | func (s *Server) handleMatrixDiscovery(w http.ResponseWriter) error { method handlePublishInternal (line 832) | func (s *Server) handlePublishInternal(r *http.Request, v *visitor) (*... method handlePublish (line 954) | func (s *Server) handlePublish(w http.ResponseWriter, r *http.Request,... method handlePublishMatrix (line 964) | func (s *Server) handlePublishMatrix(w http.ResponseWriter, r *http.Re... method handleDelete (line 989) | func (s *Server) handleDelete(w http.ResponseWriter, r *http.Request, ... method handleClear (line 993) | func (s *Server) handleClear(w http.ResponseWriter, r *http.Request, v... method handleActionMessage (line 997) | func (s *Server) handleActionMessage(w http.ResponseWriter, r *http.Re... method sendToFirebase (line 1054) | func (s *Server) sendToFirebase(v *visitor, m *model.Message) { method sendEmail (line 1068) | func (s *Server) sendEmail(v *visitor, m *model.Message, email string) { method forwardPollRequest (line 1078) | func (s *Server) forwardPollRequest(v *visitor, m *model.Message) { method parsePublishParams (line 1110) | func (s *Server) parsePublishParams(r *http.Request, m *model.Message)... method handlePublishBody (line 1261) | func (s *Server) handlePublishBody(r *http.Request, v *visitor, m *mod... method handleBodyDiscard (line 1278) | func (s *Server) handleBodyDiscard(body *util.PeekedReadCloser) error { method handleBodyAsMessageAutoDetect (line 1284) | func (s *Server) handleBodyAsMessageAutoDetect(m *model.Message, body ... method handleBodyAsTextMessage (line 1294) | func (s *Server) handleBodyAsTextMessage(m *model.Message, body *util.... method handleBodyAsTemplatedTextMessage (line 1307) | func (s *Server) handleBodyAsTemplatedTextMessage(m *model.Message, te... method renderTemplateFromFile (line 1332) | func (s *Server) renderTemplateFromFile(m *model.Message, templateName... method renderTemplateFromParams (line 1374) | func (s *Server) renderTemplateFromParams(m *model.Message, peekedBody... method renderTemplate (line 1395) | func (s *Server) renderTemplate(name, tpl, source string) (string, err... method handleBodyAsAttachment (line 1415) | func (s *Server) handleBodyAsAttachment(r *http.Request, v *visitor, m... method handleSubscribeJSON (line 1465) | func (s *Server) handleSubscribeJSON(w http.ResponseWriter, r *http.Re... method handleSubscribeSSE (line 1476) | func (s *Server) handleSubscribeSSE(w http.ResponseWriter, r *http.Req... method handleSubscribeRaw (line 1490) | func (s *Server) handleSubscribeRaw(w http.ResponseWriter, r *http.Req... method handleSubscribeHTTP (line 1500) | func (s *Server) handleSubscribeHTTP(w http.ResponseWriter, r *http.Re... method handleSubscribeWS (line 1600) | func (s *Server) handleSubscribeWS(w http.ResponseWriter, r *http.Requ... method maybeSetRateVisitors (line 1759) | func (s *Server) maybeSetRateVisitors(r *http.Request, v *visitor, top... method setRateVisitors (line 1804) | func (s *Server) setRateVisitors(r *http.Request, v *visitor, rateTopi... method sendOldMessages (line 1817) | func (s *Server) sendOldMessages(topics []*topic, since model.SinceMar... method handleOptions (line 1872) | func (s *Server) handleOptions(w http.ResponseWriter, _ *http.Request,... method topicFromPath (line 1880) | func (s *Server) topicFromPath(path string) (*topic, error) { method topicsFromPath (line 1889) | func (s *Server) topicsFromPath(path string) ([]*topic, string, error) { method sequenceIDFromPath (line 1903) | func (s *Server) sequenceIDFromPath(path string) (string, *errHTTP) { method topicsFromIDs (line 1912) | func (s *Server) topicsFromIDs(ids ...string) ([]*topic, error) { method topicFromID (line 1932) | func (s *Server) topicFromID(id string) (*topic, error) { method topicsFromPattern (line 1941) | func (s *Server) topicsFromPattern(pattern string) ([]*topic, error) { method runSMTPServer (line 1957) | func (s *Server) runSMTPServer() error { method runManager (line 1970) | func (s *Server) runManager() { method runStatsResetter (line 1986) | func (s *Server) runStatsResetter() { method resetStats (line 2003) | func (s *Server) resetStats() { method runFirebaseKeepaliver (line 2017) | func (s *Server) runFirebaseKeepaliver() { method runDelayedSender (line 2040) | func (s *Server) runDelayedSender() { method sendDelayedMessages (line 2053) | func (s *Server) sendDelayedMessages() error { method sendDelayedMessage (line 2075) | func (s *Server) sendDelayedMessage(v *visitor, m *model.Message) error { method transformBodyJSON (line 2105) | func (s *Server) transformBodyJSON(next handleFunc) handleFunc { method transformMatrixJSON (line 2172) | func (s *Server) transformMatrixJSON(next handleFunc) handleFunc { method authorizeTopicWrite (line 2190) | func (s *Server) authorizeTopicWrite(next handleFunc) handleFunc { method authorizeTopicRead (line 2194) | func (s *Server) authorizeTopicRead(next handleFunc) handleFunc { method authorizeTopic (line 2198) | func (s *Server) authorizeTopic(next handleFunc, perm user.Permission)... method maybeAuthenticate (line 2229) | func (s *Server) maybeAuthenticate(r *http.Request) (*visitor, error) { method authenticate (line 2260) | func (s *Server) authenticate(r *http.Request, header string) (user *u... method authenticateBasicAuth (line 2290) | func (s *Server) authenticateBasicAuth(r *http.Request, value string) ... method authenticateBearerAuth (line 2301) | func (s *Server) authenticateBearerAuth(r *http.Request, token string)... method visitor (line 2314) | func (s *Server) visitor(ip netip.Addr, user *user.User) *visitor { method writeJSON (line 2328) | func (s *Server) writeJSON(w http.ResponseWriter, v any) error { method writeJSONWithContentType (line 2332) | func (s *Server) writeJSONWithContentType(w http.ResponseWriter, v any... method updateAndWriteStats (line 2341) | func (s *Server) updateAndWriteStats(messagesCount int64) { type handleFunc (line 76) | type handleFunc constant firebaseControlTopic (line 148) | firebaseControlTopic = "~control" constant firebasePollTopic (line 149) | firebasePollTopic = "~poll" constant emptyMessageBody (line 150) | emptyMessageBody = "triggered" constant newMessageBody (line 151) | newMessageBody = "New message" constant defaultAttachmentMessage (line 152) | defaultAttachmentMessage = "You received a file: %s" constant encodingBase64 (line 153) | encodingBase64 = "base64" constant jsonBodyBytesLimit (line 154) | jsonBodyBytesLimit = 131072 constant unifiedPushTopicPrefix (line 155) | unifiedPushTopicPrefix = "up" constant unifiedPushTopicLength (line 156) | unifiedPushTopicLength = 14 constant messagesHistoryMax (line 157) | messagesHistoryMax = 10 constant templateMaxExecutionTime (line 158) | templateMaxExecutionTime = 100 * time.Millisecond constant templateMaxOutputBytes (line 159) | templateMaxOutputBytes = 1024 * 1024 constant templateFileExtension (line 160) | templateFileExtension = ".yml" constant wsWriteWait (line 165) | wsWriteWait = 2 * time.Second constant wsBufferSize (line 166) | wsBufferSize = 1024 constant wsReadLimit (line 167) | wsReadLimit = 64 constant wsPongWait (line 168) | wsPongWait = 15 * time.Second function New (line 173) | func New(conf *Config) (*Server, error) { function createMessageCache (line 294) | func createMessageCache(conf *Config, pool *db.DB) (*message.Cache, erro... function parseSubscribeParams (line 1736) | func parseSubscribeParams(r *http.Request) (poll bool, since model.Since... function parseSince (line 1844) | func parseSince(r *http.Request, poll bool) (model.SinceMarker, error) { function readAuthHeader (line 2269) | func readAuthHeader(r *http.Request) (string, error) { function supportedAuthHeader (line 2285) | func supportedAuthHeader(value string) bool { FILE: server/server_account.go constant syncTopicAccountSyncEvent (line 18) | syncTopicAccountSyncEvent = "sync" constant tokenExpiryDuration (line 19) | tokenExpiryDuration = 72 * time.Hour method handleAccountCreate (line 22) | func (s *Server) handleAccountCreate(w http.ResponseWriter, r *http.Requ... method handleAccountGet (line 52) | func (s *Server) handleAccountGet(w http.ResponseWriter, r *http.Request... method handleAccountDelete (line 170) | func (s *Server) handleAccountDelete(w http.ResponseWriter, r *http.Requ... method handleAccountPasswordChange (line 208) | func (s *Server) handleAccountPasswordChange(w http.ResponseWriter, r *h... method handleAccountTokenCreate (line 229) | func (s *Server) handleAccountTokenCreate(w http.ResponseWriter, r *http... method handleAccountTokenUpdate (line 264) | func (s *Server) handleAccountTokenUpdate(w http.ResponseWriter, r *http... method handleAccountTokenDelete (line 305) | func (s *Server) handleAccountTokenDelete(w http.ResponseWriter, r *http... method handleAccountSettingsChange (line 327) | func (s *Server) handleAccountSettingsChange(w http.ResponseWriter, r *h... method handleAccountSubscriptionAdd (line 361) | func (s *Server) handleAccountSubscriptionAdd(w http.ResponseWriter, r *... method handleAccountSubscriptionChange (line 384) | func (s *Server) handleAccountSubscriptionChange(w http.ResponseWriter, ... method handleAccountSubscriptionDelete (line 412) | func (s *Server) handleAccountSubscriptionDelete(w http.ResponseWriter, ... method handleAccountReservationAdd (line 441) | func (s *Server) handleAccountReservationAdd(w http.ResponseWriter, r *h... method handleAccountReservationDelete (line 488) | func (s *Server) handleAccountReservationDelete(w http.ResponseWriter, r... method maybeRemoveMessagesAndExcessReservations (line 527) | func (s *Server) maybeRemoveMessagesAndExcessReservations(r *http.Reques... method handleAccountPhoneNumberVerify (line 543) | func (s *Server) handleAccountPhoneNumberVerify(w http.ResponseWriter, r... method handleAccountPhoneNumberAdd (line 574) | func (s *Server) handleAccountPhoneNumberAdd(w http.ResponseWriter, r *h... method handleAccountPhoneNumberDelete (line 593) | func (s *Server) handleAccountPhoneNumberDelete(w http.ResponseWriter, r... method publishSyncEventAsync (line 610) | func (s *Server) publishSyncEventAsync(v *visitor) { method publishSyncEvent (line 619) | func (s *Server) publishSyncEvent(v *visitor) error { FILE: server/server_account_test.go function TestAccount_Signup_Success (line 18) | func TestAccount_Signup_Success(t *testing.T) { function TestAccount_Signup_UserExists (line 57) | func TestAccount_Signup_UserExists(t *testing.T) { function TestAccount_Signup_LimitReached (line 73) | func TestAccount_Signup_LimitReached(t *testing.T) { function TestAccount_Signup_AsUser (line 90) | func TestAccount_Signup_AsUser(t *testing.T) { function TestAccount_Signup_Disabled (line 114) | func TestAccount_Signup_Disabled(t *testing.T) { function TestAccount_Signup_Rate_Limit (line 127) | func TestAccount_Signup_Rate_Limit(t *testing.T) { function TestAccount_Get_Anonymous (line 143) | func TestAccount_Get_Anonymous(t *testing.T) { function TestAccount_ChangeSettings (line 188) | func TestAccount_ChangeSettings(t *testing.T) { function TestAccount_Subscription_AddUpdateDelete (line 219) | func TestAccount_Subscription_AddUpdateDelete(t *testing.T) { function TestAccount_ChangePassword (line 272) | func TestAccount_ChangePassword(t *testing.T) { function TestAccount_ChangePassword_NoAccount (line 317) | func TestAccount_ChangePassword_NoAccount(t *testing.T) { function TestAccount_ExtendToken (line 327) | func TestAccount_ExtendToken(t *testing.T) { function TestAccount_ExtendToken_NoTokenProvided (line 366) | func TestAccount_ExtendToken_NoTokenProvided(t *testing.T) { function TestAccount_DeleteToken (line 381) | func TestAccount_DeleteToken(t *testing.T) { function TestAccount_Delete_Success (line 423) | func TestAccount_Delete_Success(t *testing.T) { function TestAccount_Delete_Not_Allowed (line 454) | func TestAccount_Delete_Not_Allowed(t *testing.T) { function TestAccount_Reservation_AddWithoutTierFails (line 477) | func TestAccount_Reservation_AddWithoutTierFails(t *testing.T) { function TestAccount_Reservation_AddAdminSuccess (line 493) | func TestAccount_Reservation_AddAdminSuccess(t *testing.T) { function TestAccount_Reservation_AddRemoveUserWithTierSuccess (line 547) | func TestAccount_Reservation_AddRemoveUserWithTierSuccess(t *testing.T) { function TestAccount_Reservation_PublishByAnonymousFails (line 635) | func TestAccount_Reservation_PublishByAnonymousFails(t *testing.T) { function TestAccount_Reservation_Delete_Messages_And_Attachments (line 671) | func TestAccount_Reservation_Delete_Messages_And_Attachments(t *testing.... FILE: server/server_admin.go method handleVersion (line 9) | func (s *Server) handleVersion(w http.ResponseWriter, r *http.Request, v... method handleUsersGet (line 17) | func (s *Server) handleUsersGet(w http.ResponseWriter, r *http.Request, ... method handleUsersAdd (line 49) | func (s *Server) handleUsersAdd(w http.ResponseWriter, r *http.Request, ... method handleUsersUpdate (line 86) | func (s *Server) handleUsersUpdate(w http.ResponseWriter, r *http.Reques... method handleUsersDelete (line 133) | func (s *Server) handleUsersDelete(w http.ResponseWriter, r *http.Reques... method handleAccessAllow (line 155) | func (s *Server) handleAccessAllow(w http.ResponseWriter, r *http.Reques... method handleAccessReset (line 176) | func (s *Server) handleAccessReset(w http.ResponseWriter, r *http.Reques... method killUserSubscriber (line 194) | func (s *Server) killUserSubscriber(u *user.User, topicPattern string) e... FILE: server/server_admin_test.go function TestVersion_Admin (line 13) | func TestVersion_Admin(t *testing.T) { function TestUser_AddRemove (line 50) | func TestUser_AddRemove(t *testing.T) { function TestUser_AddWithPasswordHash (line 108) | func TestUser_AddWithPasswordHash(t *testing.T) { function TestUser_ChangeUserPassword (line 139) | func TestUser_ChangeUserPassword(t *testing.T) { function TestUser_ChangeUserTier (line 179) | func TestUser_ChangeUserTier(t *testing.T) { function TestUser_ChangeUserPasswordAndTier (line 221) | func TestUser_ChangeUserPasswordAndTier(t *testing.T) { function TestUser_ChangeUserPasswordWithHash (line 275) | func TestUser_ChangeUserPasswordWithHash(t *testing.T) { function TestUser_DontChangeAdminPassword (line 309) | func TestUser_DontChangeAdminPassword(t *testing.T) { function TestUser_AddRemove_Failures (line 326) | func TestUser_AddRemove_Failures(t *testing.T) { function TestAccess_AllowReset (line 367) | func TestAccess_AllowReset(t *testing.T) { function TestAccess_AllowReset_NonAdminAttempt (line 410) | func TestAccess_AllowReset_NonAdminAttempt(t *testing.T) { function TestAccess_AllowReset_KillConnection (line 428) | func TestAccess_AllowReset_KillConnection(t *testing.T) { FILE: server/server_firebase.go constant FirebaseAvailable (line 22) | FirebaseAvailable = true constant fcmMessageLimit (line 24) | fcmMessageLimit = 4000 constant fcmApnsBodyMessageLimit (line 25) | fcmApnsBodyMessageLimit = 100 type firebaseClient (line 35) | type firebaseClient struct method Send (line 47) | func (c *firebaseClient) Send(v *visitor, m *model.Message) error { function newFirebaseClient (line 40) | func newFirebaseClient(sender firebaseSender, auther user.Auther) *fireb... type firebaseSender (line 72) | type firebaseSender interface type firebaseSenderImpl (line 79) | type firebaseSenderImpl struct method Send (line 97) | func (c *firebaseSenderImpl) Send(m *messaging.Message) error { function newFirebaseSender (line 83) | func newFirebaseSender(credentialsFile string) (firebaseSender, error) { function toFirebaseMessage (line 125) | func toFirebaseMessage(m *model.Message, auther user.Auther) (*messaging... function maybeTruncateFCMMessage (line 220) | func maybeTruncateFCMMessage(m *messaging.Message) *messaging.Message { function createAPNSAlertConfig (line 239) | func createAPNSAlertConfig(m *model.Message, data map[string]string) *me... function createAPNSBackgroundConfig (line 263) | func createAPNSBackgroundConfig(data map[string]string) *messaging.APNSC... function maybeTruncateAPNSBodyMessage (line 288) | func maybeTruncateAPNSBodyMessage(s string) string { function toPollRequest (line 300) | func toPollRequest(m *model.Message) *model.Message { FILE: server/server_firebase_dummy.go constant FirebaseAvailable (line 14) | FirebaseAvailable = false type firebaseClient (line 22) | type firebaseClient struct method Send (line 25) | func (c *firebaseClient) Send(v *visitor, m *model.Message) error { type firebaseSender (line 29) | type firebaseSender interface function newFirebaseClient (line 33) | func newFirebaseClient(sender firebaseSender, auther user.Auther) *fireb... function newFirebaseSender (line 37) | func newFirebaseSender(credentialsFile string) (firebaseSender, error) { FILE: server/server_firebase_test.go type testAuther (line 20) | type testAuther struct method Authenticate (line 26) | func (t testAuther) Authenticate(_, _ string) (*user.User, error) { method Authorize (line 30) | func (t testAuther) Authorize(_ *user.User, _ string, _ user.Permissio... type testFirebaseSender (line 37) | type testFirebaseSender struct method Send (line 50) | func (s *testFirebaseSender) Send(m *messaging.Message) error { method Messages (line 60) | func (s *testFirebaseSender) Messages() []*messaging.Message { function newTestFirebaseSender (line 43) | func newTestFirebaseSender(allowed int) *testFirebaseSender { function TestToFirebaseMessage_Keepalive (line 66) | func TestToFirebaseMessage_Keepalive(t *testing.T) { function TestToFirebaseMessage_Open (line 97) | func TestToFirebaseMessage_Open(t *testing.T) { function TestToFirebaseMessage_Message_Normal_Allowed (line 128) | func TestToFirebaseMessage_Message_Normal_Allowed(t *testing.T) { function TestToFirebaseMessage_Message_Normal_Not_Allowed (line 222) | func TestToFirebaseMessage_Message_Normal_Not_Allowed(t *testing.T) { function TestToFirebaseMessage_PollRequest (line 253) | func TestToFirebaseMessage_PollRequest(t *testing.T) { function TestMaybeTruncateFCMMessage (line 288) | func TestMaybeTruncateFCMMessage(t *testing.T) { function TestMaybeTruncateFCMMessage_NotTooLong (line 318) | func TestMaybeTruncateFCMMessage_NotTooLong(t *testing.T) { function TestToFirebaseSender_Abuse (line 345) | func TestToFirebaseSender_Abuse(t *testing.T) { FILE: server/server_manager.go method execManager (line 9) | func (s *Server) execManager() { method pruneVisitors (line 104) | func (s *Server) pruneVisitors() { method pruneTokens (line 123) | func (s *Server) pruneTokens() { method pruneAttachments (line 139) | func (s *Server) pruneAttachments() { method pruneMessages (line 166) | func (s *Server) pruneMessages() { FILE: server/server_manager_test.go function TestServer_Manager_Prune_Messages_Without_Attachments_DoesNotPanic (line 9) | func TestServer_Manager_Prune_Messages_Without_Attachments_DoesNotPanic(... FILE: server/server_matrix.go type matrixRequest (line 61) | type matrixRequest struct type matrixResponse (line 71) | type matrixResponse struct constant matrixRejectPushKeyForUnifiedPushTopicWithoutRateVisitorAfter (line 80) | matrixRejectPushKeyForUnifiedPushTopicWithoutRateVisitorAfter = 12 * tim... type errMatrixPushkeyRejected (line 87) | type errMatrixPushkeyRejected struct method Error (line 92) | func (e errMatrixPushkeyRejected) Error() string { function newRequestFromMatrixJSON (line 108) | func newRequestFromMatrixJSON(r *http.Request, baseURL string, messageLi... function writeMatrixDiscoveryResponse (line 146) | func writeMatrixDiscoveryResponse(w http.ResponseWriter) error { function writeMatrixSuccess (line 153) | func writeMatrixSuccess(w http.ResponseWriter) error { function writeMatrixResponse (line 159) | func writeMatrixResponse(w http.ResponseWriter, rejectedPushKey string) ... FILE: server/server_matrix_test.go function TestMatrix_NewRequestFromMatrixJSON_Success (line 12) | func TestMatrix_NewRequestFromMatrixJSON_Success(t *testing.T) { function TestMatrix_NewRequestFromMatrixJSON_TooLarge (line 24) | func TestMatrix_NewRequestFromMatrixJSON_TooLarge(t *testing.T) { function TestMatrix_NewRequestFromMatrixJSON_InvalidJSON (line 33) | func TestMatrix_NewRequestFromMatrixJSON_InvalidJSON(t *testing.T) { function TestMatrix_NewRequestFromMatrixJSON_NotAMatrixMessage (line 42) | func TestMatrix_NewRequestFromMatrixJSON_NotAMatrixMessage(t *testing.T) { function TestMatrix_NewRequestFromMatrixJSON_MismatchingPushKey (line 51) | func TestMatrix_NewRequestFromMatrixJSON_MismatchingPushKey(t *testing.T) { function TestMatrix_WriteMatrixDiscoveryResponse (line 63) | func TestMatrix_WriteMatrixDiscoveryResponse(t *testing.T) { function TestMatrix_WriteMatrixError (line 70) | func TestMatrix_WriteMatrixError(t *testing.T) { function TestMatrix_WriteMatrixSuccess (line 77) | func TestMatrix_WriteMatrixSuccess(t *testing.T) { FILE: server/server_metrics.go function initMetrics (line 31) | func initMetrics() { function minc (line 121) | func minc(counter prometheus.Counter) { function mset (line 128) | func mset[T int | int64 | float64](gauge prometheus.Gauge, value T) { FILE: server/server_middleware.go type contextKey (line 9) | type contextKey constant contextRateVisitor (line 12) | contextRateVisitor contextKey = iota + 2586 constant contextTopic (line 13) | contextTopic constant contextMatrixPushKey (line 14) | contextMatrixPushKey method limitRequests (line 17) | func (s *Server) limitRequests(next handleFunc) handleFunc { method limitRequestsWithTopic (line 29) | func (s *Server) limitRequestsWithTopic(next handleFunc) handleFunc { method ensureWebEnabled (line 52) | func (s *Server) ensureWebEnabled(next handleFunc) handleFunc { method ensureWebPushEnabled (line 61) | func (s *Server) ensureWebPushEnabled(next handleFunc) handleFunc { method ensureUserManager (line 70) | func (s *Server) ensureUserManager(next handleFunc) handleFunc { method ensureUser (line 79) | func (s *Server) ensureUser(next handleFunc) handleFunc { method ensureAdmin (line 88) | func (s *Server) ensureAdmin(next handleFunc) handleFunc { method ensureCallsEnabled (line 97) | func (s *Server) ensureCallsEnabled(next handleFunc) handleFunc { method ensurePaymentsEnabled (line 106) | func (s *Server) ensurePaymentsEnabled(next handleFunc) handleFunc { method ensureStripeCustomer (line 115) | func (s *Server) ensureStripeCustomer(next handleFunc) handleFunc { method withAccountSync (line 124) | func (s *Server) withAccountSync(next handleFunc) handleFunc { FILE: server/server_payments.go method handleBillingTiersGet (line 60) | func (s *Server) handleBillingTiersGet(w http.ResponseWriter, _ *http.Re... method handleAccountBillingSubscriptionCreate (line 116) | func (s *Server) handleAccountBillingSubscriptionCreate(w http.ResponseW... method handleAccountBillingSubscriptionCreateSuccess (line 185) | func (s *Server) handleAccountBillingSubscriptionCreateSuccess(w http.Re... method handleAccountBillingSubscriptionUpdate (line 246) | func (s *Server) handleAccountBillingSubscriptionUpdate(w http.ResponseW... method handleAccountBillingSubscriptionDelete (line 303) | func (s *Server) handleAccountBillingSubscriptionDelete(w http.ResponseW... method handleAccountBillingPortalSessionCreate (line 320) | func (s *Server) handleAccountBillingPortalSessionCreate(w http.Response... method handleAccountBillingWebhook (line 343) | func (s *Server) handleAccountBillingWebhook(_ http.ResponseWriter, r *h... method handleAccountBillingWebhookSubscriptionUpdated (line 374) | func (s *Server) handleAccountBillingWebhookSubscriptionUpdated(r *http.... method handleAccountBillingWebhookSubscriptionDeleted (line 418) | func (s *Server) handleAccountBillingWebhookSubscriptionDeleted(r *http.... method updateSubscriptionAndTier (line 441) | func (s *Server) updateSubscriptionAndTier(r *http.Request, v *visitor, ... method fetchStripePrices (line 483) | func (s *Server) fetchStripePrices() (map[string]int64, error) { type stripeAPI (line 499) | type stripeAPI interface type realStripeAPI (line 513) | type realStripeAPI struct method NewCheckoutSession (line 521) | func (s *realStripeAPI) NewCheckoutSession(params *stripe.CheckoutSess... method NewPortalSession (line 525) | func (s *realStripeAPI) NewPortalSession(params *stripe.BillingPortalS... method ListPrices (line 529) | func (s *realStripeAPI) ListPrices(params *stripe.PriceListParams) ([]... method GetCustomer (line 541) | func (s *realStripeAPI) GetCustomer(id string) (*stripe.Customer, erro... method GetSession (line 545) | func (s *realStripeAPI) GetSession(id string) (*stripe.CheckoutSession... method GetSubscription (line 549) | func (s *realStripeAPI) GetSubscription(id string) (*stripe.Subscripti... method UpdateCustomer (line 553) | func (s *realStripeAPI) UpdateCustomer(id string, params *stripe.Custo... method UpdateSubscription (line 557) | func (s *realStripeAPI) UpdateSubscription(id string, params *stripe.S... method CancelSubscription (line 561) | func (s *realStripeAPI) CancelSubscription(id string) (*stripe.Subscri... method ConstructWebhookEvent (line 565) | func (s *realStripeAPI) ConstructWebhookEvent(payload []byte, header s... function newStripeAPI (line 517) | func newStripeAPI() stripeAPI { FILE: server/server_payments_dummy.go type stripeAPI (line 9) | type stripeAPI interface function newStripeAPI (line 13) | func newStripeAPI() stripeAPI { method fetchStripePrices (line 17) | func (s *Server) fetchStripePrices() (map[string]int64, error) { method handleBillingTiersGet (line 21) | func (s *Server) handleBillingTiersGet(w http.ResponseWriter, _ *http.Re... method handleAccountBillingSubscriptionCreate (line 25) | func (s *Server) handleAccountBillingSubscriptionCreate(w http.ResponseW... method handleAccountBillingSubscriptionCreateSuccess (line 29) | func (s *Server) handleAccountBillingSubscriptionCreateSuccess(w http.Re... method handleAccountBillingSubscriptionUpdate (line 33) | func (s *Server) handleAccountBillingSubscriptionUpdate(w http.ResponseW... method handleAccountBillingSubscriptionDelete (line 37) | func (s *Server) handleAccountBillingSubscriptionDelete(w http.ResponseW... method handleAccountBillingPortalSessionCreate (line 41) | func (s *Server) handleAccountBillingPortalSessionCreate(w http.Response... method handleAccountBillingWebhook (line 45) | func (s *Server) handleAccountBillingWebhook(_ http.ResponseWriter, r *h... FILE: server/server_payments_test.go function TestPayments_Tiers (line 24) | func TestPayments_Tiers(t *testing.T) { function TestPayments_SubscriptionCreate_NotAStripeCustomer_Success (line 136) | func TestPayments_SubscriptionCreate_NotAStripeCustomer_Success(t *testi... function TestPayments_SubscriptionCreate_StripeCustomer_Success (line 171) | func TestPayments_SubscriptionCreate_StripeCustomer_Success(t *testing.T) { function TestPayments_AccountDelete_Cancels_Subscription (line 217) | func TestPayments_AccountDelete_Cancels_Subscription(t *testing.T) { function TestPayments_Checkout_Success_And_Increase_Rate_Limits_Reset_Visitor (line 264) | func TestPayments_Checkout_Success_And_Increase_Rate_Limits_Reset_Visito... function TestPayments_Webhook_Subscription_Updated_Downgrade_From_PastDue_To_Active (line 431) | func TestPayments_Webhook_Subscription_Updated_Downgrade_From_PastDue_To... function TestPayments_Webhook_Subscription_Deleted (line 562) | func TestPayments_Webhook_Subscription_Deleted(t *testing.T) { function TestPayments_Subscription_Update_Different_Tier (line 629) | func TestPayments_Subscription_Update_Different_Tier(t *testing.T) { function TestPayments_Subscription_Delete_At_Period_End (line 695) | func TestPayments_Subscription_Delete_At_Period_End(t *testing.T) { function TestPayments_CreatePortalSession (line 728) | func TestPayments_CreatePortalSession(t *testing.T) { type testStripeAPI (line 766) | type testStripeAPI struct method NewCheckoutSession (line 772) | func (s *testStripeAPI) NewCheckoutSession(params *stripe.CheckoutSess... method NewPortalSession (line 777) | func (s *testStripeAPI) NewPortalSession(params *stripe.BillingPortalS... method ListPrices (line 782) | func (s *testStripeAPI) ListPrices(params *stripe.PriceListParams) ([]... method GetCustomer (line 787) | func (s *testStripeAPI) GetCustomer(id string) (*stripe.Customer, erro... method GetSession (line 792) | func (s *testStripeAPI) GetSession(id string) (*stripe.CheckoutSession... method GetSubscription (line 797) | func (s *testStripeAPI) GetSubscription(id string) (*stripe.Subscripti... method UpdateCustomer (line 802) | func (s *testStripeAPI) UpdateCustomer(id string, params *stripe.Custo... method UpdateSubscription (line 807) | func (s *testStripeAPI) UpdateSubscription(id string, params *stripe.S... method CancelSubscription (line 812) | func (s *testStripeAPI) CancelSubscription(id string) (*stripe.Subscri... method ConstructWebhookEvent (line 817) | func (s *testStripeAPI) ConstructWebhookEvent(payload []byte, header s... function jsonToStripeEvent (line 822) | func jsonToStripeEvent(t *testing.T, v string) stripe.Event { constant subscriptionUpdatedEventJSON (line 830) | subscriptionUpdatedEventJSON = ` constant subscriptionDeletedEventJSON (line 856) | subscriptionDeletedEventJSON = ` FILE: server/server_race_off_test.go constant raceEnabled (line 5) | raceEnabled = false FILE: server/server_race_on_test.go constant raceEnabled (line 5) | raceEnabled = true FILE: server/server_test.go function TestMain (line 35) | func TestMain(m *testing.M) { function TestServer_PublishAndPoll (line 40) | func TestServer_PublishAndPoll(t *testing.T) { function TestServer_PublishWithFirebase (line 76) | func TestServer_PublishWithFirebase(t *testing.T) { function TestServer_PublishWithoutFirebase (line 95) | func TestServer_PublishWithoutFirebase(t *testing.T) { function TestServer_PublishWithFirebase_WithoutUsers_AndWithoutPanic (line 113) | func TestServer_PublishWithFirebase_WithoutUsers_AndWithoutPanic(t *test... function TestServer_SubscribeOpenAndKeepalive (line 141) | func TestServer_SubscribeOpenAndKeepalive(t *testing.T) { function TestServer_PublishAndSubscribe (line 182) | func TestServer_PublishAndSubscribe(t *testing.T) { function TestServer_Publish_Disallowed_Topic (line 224) | func TestServer_Publish_Disallowed_Topic(t *testing.T) { function TestServer_StaticSites (line 239) | func TestServer_StaticSites(t *testing.T) { function TestServer_WebEnabled (line 267) | func TestServer_WebEnabled(t *testing.T) { function TestServer_PublishLargeMessage (line 305) | func TestServer_PublishLargeMessage(t *testing.T) { function TestServer_PublishPriority (line 317) | func TestServer_PublishPriority(t *testing.T) { function TestServer_PublishPriority_SpecialHTTPHeader (line 350) | func TestServer_PublishPriority_SpecialHTTPHeader(t *testing.T) { function TestServer_PublishGETOnlyOneTopic (line 373) | func TestServer_PublishGETOnlyOneTopic(t *testing.T) { function TestServer_PublishNoCache (line 383) | func TestServer_PublishNoCache(t *testing.T) { function TestServer_PublishAt (line 401) | func TestServer_PublishAt(t *testing.T) { function TestServer_PublishAt_FromUser (line 437) | func TestServer_PublishAt_FromUser(t *testing.T) { function TestServer_PublishAt_Expires (line 476) | func TestServer_PublishAt_Expires(t *testing.T) { function TestServer_PublishAtWithCacheError (line 490) | func TestServer_PublishAtWithCacheError(t *testing.T) { function TestServer_PublishAtTooShortDelay (line 503) | func TestServer_PublishAtTooShortDelay(t *testing.T) { function TestServer_PublishAtTooLongDelay (line 514) | func TestServer_PublishAtTooLongDelay(t *testing.T) { function TestServer_PublishAtInvalidDelay (line 524) | func TestServer_PublishAtInvalidDelay(t *testing.T) { function TestServer_PublishAtTooLarge (line 534) | func TestServer_PublishAtTooLarge(t *testing.T) { function TestServer_PublishAtAndPrune (line 544) | func TestServer_PublishAtAndPrune(t *testing.T) { function TestServer_PublishAndMultiPoll (line 563) | func TestServer_PublishAndMultiPoll(t *testing.T) { function TestServer_PublishWithNopCache (line 595) | func TestServer_PublishWithNopCache(t *testing.T) { function TestServer_PublishAndPollSince (line 620) | func TestServer_PublishAndPollSince(t *testing.T) { function newMessageWithTimestamp (line 656) | func newMessageWithTimestamp(topic, msg string, timestamp int64) *model.... function TestServer_PollSinceID_MultipleTopics (line 662) | func TestServer_PollSinceID_MultipleTopics(t *testing.T) { function TestServer_PollSinceID_MultipleTopics_IDDoesNotMatch (line 688) | func TestServer_PollSinceID_MultipleTopics_IDDoesNotMatch(t *testing.T) { function TestServer_PublishViaGET (line 707) | func TestServer_PublishViaGET(t *testing.T) { function TestServer_PublishMessageInHeaderWithNewlines (line 727) | func TestServer_PublishMessageInHeaderWithNewlines(t *testing.T) { function TestServer_PublishInvalidTopic (line 740) | func TestServer_PublishInvalidTopic(t *testing.T) { function TestServer_PublishWithSIDInPath (line 749) | func TestServer_PublishWithSIDInPath(t *testing.T) { function TestServer_PublishWithSIDInHeader (line 760) | func TestServer_PublishWithSIDInHeader(t *testing.T) { function TestServer_PublishWithSIDInPathAndHeader (line 773) | func TestServer_PublishWithSIDInPathAndHeader(t *testing.T) { function TestServer_PublishWithSIDInQuery (line 786) | func TestServer_PublishWithSIDInQuery(t *testing.T) { function TestServer_PublishWithSIDViaGet (line 797) | func TestServer_PublishWithSIDViaGet(t *testing.T) { function TestServer_PublishAsJSON_WithSequenceID (line 808) | func TestServer_PublishAsJSON_WithSequenceID(t *testing.T) { function TestServer_PublishWithInvalidSIDInPath (line 822) | func TestServer_PublishWithInvalidSIDInPath(t *testing.T) { function TestServer_PublishWithInvalidSIDInHeader (line 832) | func TestServer_PublishWithInvalidSIDInHeader(t *testing.T) { function TestServer_PollWithQueryFilters (line 845) | func TestServer_PollWithQueryFilters(t *testing.T) { function TestServer_SubscribeWithQueryFilters (line 916) | func TestServer_SubscribeWithQueryFilters(t *testing.T) { function TestServer_Auth_Success_Admin (line 945) | func TestServer_Auth_Success_Admin(t *testing.T) { function TestServer_Auth_Success_User (line 960) | func TestServer_Auth_Success_User(t *testing.T) { function TestServer_Auth_Success_User_MultipleTopics (line 976) | func TestServer_Auth_Success_User_MultipleTopics(t *testing.T) { function TestServer_Auth_Fail_InvalidPass (line 998) | func TestServer_Auth_Fail_InvalidPass(t *testing.T) { function TestServer_Auth_Fail_Unauthorized (line 1013) | func TestServer_Auth_Fail_Unauthorized(t *testing.T) { function TestServer_Auth_Fail_CannotPublish (line 1029) | func TestServer_Auth_Fail_CannotPublish(t *testing.T) { function TestServer_Auth_Fail_Rate_Limiting (line 1061) | func TestServer_Auth_Fail_Rate_Limiting(t *testing.T) { function TestServer_Auth_ViaQuery (line 1082) | func TestServer_Auth_ViaQuery(t *testing.T) { function TestServer_Auth_NonBasicHeader (line 1100) | func TestServer_Auth_NonBasicHeader(t *testing.T) { function TestServer_StatsResetter (line 1121) | func TestServer_StatsResetter(t *testing.T) { function TestServer_StatsResetter_MessageLimiter_EmailsLimiter (line 1227) | func TestServer_StatsResetter_MessageLimiter_EmailsLimiter(t *testing.T) { function TestServer_DailyMessageQuotaFromDatabase (line 1274) | func TestServer_DailyMessageQuotaFromDatabase(t *testing.T) { type testMailer (line 1317) | type testMailer struct method Send (line 1322) | func (t *testMailer) Send(v *visitor, m *model.Message, to string) err... method Counts (line 1329) | func (t *testMailer) Counts() (total int64, success int64, failure int... method Count (line 1333) | func (t *testMailer) Count() int { function TestServer_PublishTooManyRequests_Defaults (line 1339) | func TestServer_PublishTooManyRequests_Defaults(t *testing.T) { function TestServer_PublishTooManyRequests_Defaults_IPv6 (line 1351) | func TestServer_PublishTooManyRequests_Defaults_IPv6(t *testing.T) { function TestServer_PublishTooManyRequests_IPv6_Slash48 (line 1373) | func TestServer_PublishTooManyRequests_IPv6_Slash48(t *testing.T) { function TestServer_PublishTooManyRequests_Defaults_ExemptHosts (line 1398) | func TestServer_PublishTooManyRequests_Defaults_ExemptHosts(t *testing.T) { function TestServer_PublishTooManyRequests_Defaults_ExemptHosts_IPv6 (line 1411) | func TestServer_PublishTooManyRequests_Defaults_ExemptHosts_IPv6(t *test... function TestServer_PublishTooManyRequests_Defaults_ExemptHosts_MessageDailyLimit (line 1427) | func TestServer_PublishTooManyRequests_Defaults_ExemptHosts_MessageDaily... function TestServer_PublishTooManyRequests_ShortReplenish (line 1441) | func TestServer_PublishTooManyRequests_ShortReplenish(t *testing.T) { function TestServer_PublishTooManyEmails_Defaults (line 1461) | func TestServer_PublishTooManyEmails_Defaults(t *testing.T) { function TestServer_PublishTooManyEmails_Replenish (line 1478) | func TestServer_PublishTooManyEmails_Replenish(t *testing.T) { function TestServer_PublishDelayedEmail_Fail (line 1509) | func TestServer_PublishDelayedEmail_Fail(t *testing.T) { function TestServer_PublishDelayedCall_Fail (line 1521) | func TestServer_PublishDelayedCall_Fail(t *testing.T) { function TestServer_PublishEmailNoMailer_Fail (line 1536) | func TestServer_PublishEmailNoMailer_Fail(t *testing.T) { function TestServer_PublishEmailAddressInvalid (line 1546) | func TestServer_PublishEmailAddressInvalid(t *testing.T) { function TestServer_PublishAndExpungeTopicAfter16Hours (line 1570) | func TestServer_PublishAndExpungeTopicAfter16Hours(t *testing.T) { function TestServer_TopicKeepaliveOnPoll (line 1621) | func TestServer_TopicKeepaliveOnPoll(t *testing.T) { function TestServer_UnifiedPushDiscovery (line 1641) | func TestServer_UnifiedPushDiscovery(t *testing.T) { function TestServer_PublishUnifiedPushBinary_AndPoll (line 1650) | func TestServer_PublishUnifiedPushBinary_AndPoll(t *testing.T) { function TestServer_PublishUnifiedPushBinary_Truncated (line 1683) | func TestServer_PublishUnifiedPushBinary_Truncated(t *testing.T) { function TestServer_PublishUnifiedPushText (line 1708) | func TestServer_PublishUnifiedPushText(t *testing.T) { function TestServer_MatrixGateway_Discovery_Success (line 1726) | func TestServer_MatrixGateway_Discovery_Success(t *testing.T) { function TestServer_MatrixGateway_Discovery_Failure_Unconfigured (line 1735) | func TestServer_MatrixGateway_Discovery_Failure_Unconfigured(t *testing.... function TestServer_MatrixGateway_Push_Success (line 1747) | func TestServer_MatrixGateway_Push_Success(t *testing.T) { function TestServer_MatrixGateway_Push_Failure_NoSubscriber (line 1766) | func TestServer_MatrixGateway_Push_Failure_NoSubscriber(t *testing.T) { function TestServer_MatrixGateway_Push_Failure_NoSubscriber_After13Hours (line 1778) | func TestServer_MatrixGateway_Push_Failure_NoSubscriber_After13Hours(t *... function TestServer_MatrixGateway_Push_Failure_InvalidPushkey (line 1806) | func TestServer_MatrixGateway_Push_Failure_InvalidPushkey(t *testing.T) { function TestServer_MatrixGateway_Push_Failure_EverythingIsWrong (line 1820) | func TestServer_MatrixGateway_Push_Failure_EverythingIsWrong(t *testing.... function TestServer_MatrixGateway_Push_Failure_Unconfigured (line 1835) | func TestServer_MatrixGateway_Push_Failure_Unconfigured(t *testing.T) { function TestServer_PublishActions_AndPoll (line 1847) | func TestServer_PublishActions_AndPoll(t *testing.T) { function TestServer_PublishMarkdown (line 1869) | func TestServer_PublishMarkdown(t *testing.T) { function TestServer_PublishMarkdown_QueryParam (line 1883) | func TestServer_PublishMarkdown_QueryParam(t *testing.T) { function TestServer_PublishMarkdown_NotMarkdown (line 1895) | func TestServer_PublishMarkdown_NotMarkdown(t *testing.T) { function TestServer_PublishAsJSON (line 1908) | func TestServer_PublishAsJSON(t *testing.T) { function TestServer_PublishAsJSON_Markdown (line 1934) | func TestServer_PublishAsJSON_Markdown(t *testing.T) { function TestServer_PublishAsJSON_RateLimit_MessageDailyLimit (line 1948) | func TestServer_PublishAsJSON_RateLimit_MessageDailyLimit(t *testing.T) { function TestServer_PublishAsJSON_WithEmail (line 1966) | func TestServer_PublishAsJSON_WithEmail(t *testing.T) { function TestServer_PublishAsJSON_WithActions (line 1984) | func TestServer_PublishAsJSON_WithActions(t *testing.T) { function TestServer_PublishAsJSON_NoCache (line 2021) | func TestServer_PublishAsJSON_NoCache(t *testing.T) { function TestServer_PublishAsJSON_WithoutFirebase (line 2037) | func TestServer_PublishAsJSON_WithoutFirebase(t *testing.T) { function TestServer_PublishAsJSON_Invalid (line 2054) | func TestServer_PublishAsJSON_Invalid(t *testing.T) { function TestServer_PublishWithTierBasedMessageLimitAndExpiry (line 2063) | func TestServer_PublishWithTierBasedMessageLimitAndExpiry(t *testing.T) { function TestServer_PublishAttachment (line 2101) | func TestServer_PublishAttachment(t *testing.T) { function TestServer_PublishAttachmentShortWithFilename (line 2135) | func TestServer_PublishAttachmentShortWithFilename(t *testing.T) { function TestServer_PublishAttachmentExternalWithoutFilename (line 2166) | func TestServer_PublishAttachmentExternalWithoutFilename(t *testing.T) { function TestServer_PublishAttachmentExternalWithFilename (line 2188) | func TestServer_PublishAttachmentExternalWithFilename(t *testing.T) { function TestServer_PublishAttachmentBadURL (line 2206) | func TestServer_PublishAttachmentBadURL(t *testing.T) { function TestServer_PublishAttachmentTooLargeContentLength (line 2217) | func TestServer_PublishAttachmentTooLargeContentLength(t *testing.T) { function TestServer_PublishAttachmentTooLargeBodyAttachmentFileSizeLimit (line 2231) | func TestServer_PublishAttachmentTooLargeBodyAttachmentFileSizeLimit(t *... function TestServer_PublishAttachmentExpiryBeforeDelivery (line 2245) | func TestServer_PublishAttachmentExpiryBeforeDelivery(t *testing.T) { function TestServer_PublishAttachmentTooLargeBodyVisitorAttachmentTotalSizeLimit (line 2260) | func TestServer_PublishAttachmentTooLargeBodyVisitorAttachmentTotalSizeL... function TestServer_PublishAttachmentAndExpire (line 2281) | func TestServer_PublishAttachmentAndExpire(t *testing.T) { function TestServer_PublishAttachmentWithTierBasedExpiry (line 2312) | func TestServer_PublishAttachmentWithTierBasedExpiry(t *testing.T) { function TestServer_PublishAttachmentWithTierBasedBandwidthLimit (line 2361) | func TestServer_PublishAttachmentWithTierBasedBandwidthLimit(t *testing.... function TestServer_PublishAttachmentWithTierBasedLimits (line 2400) | func TestServer_PublishAttachmentWithTierBasedLimits(t *testing.T) { function TestServer_PublishAttachmentBandwidthLimit (line 2458) | func TestServer_PublishAttachmentBandwidthLimit(t *testing.T) { function TestServer_PublishAttachmentBandwidthLimitUploadOnly (line 2487) | func TestServer_PublishAttachmentBandwidthLimitUploadOnly(t *testing.T) { function TestServer_PublishAttachmentAndImmediatelyGetItWithCacheTimeout (line 2510) | func TestServer_PublishAttachmentAndImmediatelyGetItWithCacheTimeout(t *... function TestServer_PublishAttachmentAccountStats (line 2531) | func TestServer_PublishAttachmentAccountStats(t *testing.T) { function TestServer_Visitor_XForwardedFor_None (line 2558) | func TestServer_Visitor_XForwardedFor_None(t *testing.T) { function TestServer_Visitor_XForwardedFor_Single (line 2572) | func TestServer_Visitor_XForwardedFor_Single(t *testing.T) { function TestServer_Visitor_XForwardedFor_Multiple (line 2586) | func TestServer_Visitor_XForwardedFor_Multiple(t *testing.T) { function TestServer_Visitor_Custom_ClientIP_Header (line 2600) | func TestServer_Visitor_Custom_ClientIP_Header(t *testing.T) { function TestServer_Visitor_Custom_ClientIP_Header_IPv6 (line 2615) | func TestServer_Visitor_Custom_ClientIP_Header_IPv6(t *testing.T) { function TestServer_Visitor_Custom_Forwarded_Header (line 2630) | func TestServer_Visitor_Custom_Forwarded_Header(t *testing.T) { function TestServer_Visitor_Custom_Forwarded_Header_IPv6 (line 2646) | func TestServer_Visitor_Custom_Forwarded_Header_IPv6(t *testing.T) { function TestServer_PublishWhileUpdatingStatsWithLotsOfMessages (line 2662) | func TestServer_PublishWhileUpdatingStatsWithLotsOfMessages(t *testing.T) { function TestServer_AnonymousUser_And_NonTierUser_Are_Same_Visitor (line 2718) | func TestServer_AnonymousUser_And_NonTierUser_Are_Same_Visitor(t *testin... function TestServer_SubscriberRateLimiting_Success (line 2751) | func TestServer_SubscriberRateLimiting_Success(t *testing.T) { function TestServer_SubscriberRateLimiting_NotWrongTopic (line 2807) | func TestServer_SubscriberRateLimiting_NotWrongTopic(t *testing.T) { function TestServer_SubscriberRateLimiting_NotEnabled_Failed (line 2825) | func TestServer_SubscriberRateLimiting_NotEnabled_Failed(t *testing.T) { function TestServer_SubscriberRateLimiting_UP_Only (line 2862) | func TestServer_SubscriberRateLimiting_UP_Only(t *testing.T) { function TestServer_Matrix_SubscriberRateLimiting_UP_Only (line 2888) | func TestServer_Matrix_SubscriberRateLimiting_UP_Only(t *testing.T) { function TestServer_SubscriberRateLimiting_VisitorExpiration (line 2918) | func TestServer_SubscriberRateLimiting_VisitorExpiration(t *testing.T) { function TestServer_SubscriberRateLimiting_ProtectedTopics_WithDefaultReadWrite (line 2954) | func TestServer_SubscriberRateLimiting_ProtectedTopics_WithDefaultReadWr... function TestServer_MessageHistoryAndStatsEndpoint (line 2976) | func TestServer_MessageHistoryAndStatsEndpoint(t *testing.T) { function TestServer_MessageHistoryMaxSize (line 3024) | func TestServer_MessageHistoryMaxSize(t *testing.T) { function TestServer_MessageCountPersistence (line 3035) | func TestServer_MessageCountPersistence(t *testing.T) { function TestServer_PublishWithUTF8MimeHeader (line 3053) | func TestServer_PublishWithUTF8MimeHeader(t *testing.T) { function TestServer_UpstreamBaseURL_Success (line 3081) | func TestServer_UpstreamBaseURL_Success(t *testing.T) { function TestServer_UpstreamBaseURL_With_Access_Token_Success (line 3113) | func TestServer_UpstreamBaseURL_With_Access_Token_Success(t *testing.T) { function TestServer_UpstreamBaseURL_DoNotForwardUnifiedPush (line 3147) | func TestServer_UpstreamBaseURL_DoNotForwardUnifiedPush(t *testing.T) { function TestServer_MessageTemplate (line 3173) | func TestServer_MessageTemplate(t *testing.T) { function TestServer_MessageTemplate_RepeatPlaceholder (line 3190) | func TestServer_MessageTemplate_RepeatPlaceholder(t *testing.T) { function TestServer_MessageTemplate_JSONBody (line 3207) | func TestServer_MessageTemplate_JSONBody(t *testing.T) { function TestServer_MessageTemplate_MalformedJSONBody (line 3225) | func TestServer_MessageTemplate_MalformedJSONBody(t *testing.T) { function TestServer_MessageTemplate_PlaceholderTypo (line 3241) | func TestServer_MessageTemplate_PlaceholderTypo(t *testing.T) { function TestServer_MessageTemplate_MultiplePlaceholders (line 3258) | func TestServer_MessageTemplate_MultiplePlaceholders(t *testing.T) { function TestServer_MessageTemplate_Range (line 3273) | func TestServer_MessageTemplate_Range(t *testing.T) { function TestServer_MessageTemplate_ExceedMessageSize_TemplatedMessageOK (line 3289) | func TestServer_MessageTemplate_ExceedMessageSize_TemplatedMessageOK(t *... function TestServer_MessageTemplate_ExceedMessageSize_TemplatedMessageTooLong (line 3308) | func TestServer_MessageTemplate_ExceedMessageSize_TemplatedMessageTooLon... function TestServer_MessageTemplate_Grafana (line 3324) | func TestServer_MessageTemplate_Grafana(t *testing.T) { function TestServer_MessageTemplate_GitHub (line 3348) | func TestServer_MessageTemplate_GitHub(t *testing.T) { function TestServer_MessageTemplate_GitHub2 (line 3361) | func TestServer_MessageTemplate_GitHub2(t *testing.T) { function TestServer_MessageTemplate_DisallowedCalls (line 3374) | func TestServer_MessageTemplate_DisallowedCalls(t *testing.T) { function TestServer_MessageTemplate_SprigFunctions (line 3404) | func TestServer_MessageTemplate_SprigFunctions(t *testing.T) { function TestServer_MessageTemplate_UnsafeSprigFunctions (line 3439) | func TestServer_MessageTemplate_UnsafeSprigFunctions(t *testing.T) { function TestServer_MessageTemplate_InlineNewlines (line 3453) | func TestServer_MessageTemplate_InlineNewlines(t *testing.T) { function TestServer_MessageTemplate_InlineNewlinesOutsideOfTemplate (line 3472) | func TestServer_MessageTemplate_InlineNewlinesOutsideOfTemplate(t *testi... function TestServer_MessageTemplate_TemplateFileNewlines (line 3491) | func TestServer_MessageTemplate_TemplateFileNewlines(t *testing.T) { function TestServer_MessageTemplate_FromNamedTemplate_GitHubCommentCreated (line 3522) | func TestServer_MessageTemplate_FromNamedTemplate_GitHubCommentCreated(t... function TestServer_MessageTemplate_FromNamedTemplate_GitHubIssueOpened (line 3543) | func TestServer_MessageTemplate_FromNamedTemplate_GitHubIssueOpened(t *t... function TestServer_MessageTemplate_FromNamedTemplate_GitHubIssueOpened_OverrideConfigTemplate (line 3573) | func TestServer_MessageTemplate_FromNamedTemplate_GitHubIssueOpened_Over... function TestServer_MessageTemplate_Repeat9999_TooLarge (line 3594) | func TestServer_MessageTemplate_Repeat9999_TooLarge(t *testing.T) { function TestServer_MessageTemplate_Repeat10001_TooLarge (line 3608) | func TestServer_MessageTemplate_Repeat10001_TooLarge(t *testing.T) { function TestServer_MessageTemplate_Until100_000 (line 3622) | func TestServer_MessageTemplate_Until100_000(t *testing.T) { function TestServer_MessageTemplate_Priority (line 3636) | func TestServer_MessageTemplate_Priority(t *testing.T) { function TestServer_MessageTemplate_Priority_Conditional (line 3653) | func TestServer_MessageTemplate_Priority_Conditional(t *testing.T) { function TestServer_MessageTemplate_Priority_NamedValue (line 3682) | func TestServer_MessageTemplate_Priority_NamedValue(t *testing.T) { function TestServer_MessageTemplate_Priority_Invalid (line 3698) | func TestServer_MessageTemplate_Priority_Invalid(t *testing.T) { function TestServer_MessageTemplate_Priority_QueryParam (line 3713) | func TestServer_MessageTemplate_Priority_QueryParam(t *testing.T) { function TestServer_MessageTemplate_Priority_FromTemplateFile (line 3725) | func TestServer_MessageTemplate_Priority_FromTemplateFile(t *testing.T) { function TestServer_DeleteMessage (line 3759) | func TestServer_DeleteMessage(t *testing.T) { function TestServer_ClearMessage (line 3793) | func TestServer_ClearMessage(t *testing.T) { function TestServer_ClearMessage_ReadEndpoint (line 3827) | func TestServer_ClearMessage_ReadEndpoint(t *testing.T) { function TestServer_UpdateMessage (line 3846) | func TestServer_UpdateMessage(t *testing.T) { function TestServer_UpdateMessage_UsingMessageID (line 3881) | func TestServer_UpdateMessage_UsingMessageID(t *testing.T) { function TestServer_DeleteAndClear_InvalidSequenceID (line 3917) | func TestServer_DeleteAndClear_InvalidSequenceID(t *testing.T) { function TestServer_DeleteMessage_WithFirebase (line 3932) | func TestServer_DeleteMessage_WithFirebase(t *testing.T) { function TestServer_ClearMessage_WithFirebase (line 3957) | func TestServer_ClearMessage_WithFirebase(t *testing.T) { function TestServer_UpdateScheduledMessage (line 3981) | func TestServer_UpdateScheduledMessage(t *testing.T) { function TestServer_DeleteScheduledMessage (line 4018) | func TestServer_DeleteScheduledMessage(t *testing.T) { function TestServer_UpdateScheduledMessage_TopicScoped (line 4053) | func TestServer_UpdateScheduledMessage_TopicScoped(t *testing.T) { function TestServer_UpdateScheduledMessage_WithAttachment (line 4085) | func TestServer_UpdateScheduledMessage_WithAttachment(t *testing.T) { function TestServer_DeleteScheduledMessage_WithAttachment (line 4119) | func TestServer_DeleteScheduledMessage_WithAttachment(t *testing.T) { function newMemTestCache (line 4147) | func newMemTestCache(t *testing.T) *message.Cache { function forEachBackend (line 4153) | func forEachBackend(t *testing.T, f func(t *testing.T, databaseURL strin... function newTestConfig (line 4162) | func newTestConfig(t *testing.T, databaseURL string) *Config { function configureAuth (line 4176) | func configureAuth(t *testing.T, conf *Config) *Config { function newTestConfigWithAuthFile (line 4185) | func newTestConfigWithAuthFile(t *testing.T, databaseURL string) *Config { function newTestServer (line 4191) | func newTestServer(t *testing.T, config *Config) *Server { function request (line 4198) | func request(t *testing.T, s *Server, method, url, body string, headers ... function subscribe (line 4215) | func subscribe(t *testing.T, s *Server, url string, rr *httptest.Respons... function toMessages (line 4235) | func toMessages(t *testing.T, s string) []*model.Message { function toMessage (line 4244) | func toMessage(t *testing.T, s string) *model.Message { function toHTTPError (line 4250) | func toHTTPError(t *testing.T, s string) *errHTTP { function readAll (line 4256) | func readAll(t *testing.T, rc io.ReadCloser) string { function waitFor (line 4264) | func waitFor(t *testing.T, f func() bool) { function waitForWithMaxWait (line 4268) | func waitForWithMaxWait(t *testing.T, maxWait time.Duration, f func() bo... type mockResponseWriter (line 4280) | type mockResponseWriter struct method Header (line 4293) | func (m *mockResponseWriter) Header() http.Header { method Write (line 4297) | func (m *mockResponseWriter) Write(b []byte) (int, error) { method WriteHeader (line 4302) | func (m *mockResponseWriter) WriteHeader(statusCode int) { function newMockResponseWriter (line 4287) | func newMockResponseWriter() *mockResponseWriter { type closableResponseWriter (line 4312) | type closableResponseWriter struct method Header (line 4325) | func (w *closableResponseWriter) Header() http.Header { method Write (line 4329) | func (w *closableResponseWriter) Write(b []byte) (int, error) { method WriteHeader (line 4339) | func (w *closableResponseWriter) WriteHeader(statusCode int) {} method Flush (line 4341) | func (w *closableResponseWriter) Flush() { method Close (line 4350) | func (w *closableResponseWriter) Close() { function newClosableResponseWriter (line 4319) | func newClosableResponseWriter() *closableResponseWriter { function TestServer_SubscribeHTTP_NoWriteAfterHandlerReturn (line 4356) | func TestServer_SubscribeHTTP_NoWriteAfterHandlerReturn(t *testing.T) { function TestServer_HandleError_SkipsWriteHeaderOnHijackedConnection (line 4437) | func TestServer_HandleError_SkipsWriteHeaderOnHijackedConnection(t *test... function TestServer_Publish_InvalidUTF8InBody (line 4469) | func TestServer_Publish_InvalidUTF8InBody(t *testing.T) { function TestServer_Publish_InvalidUTF8InTitle (line 4511) | func TestServer_Publish_InvalidUTF8InTitle(t *testing.T) { function TestServer_Publish_InvalidUTF8InTags (line 4522) | func TestServer_Publish_InvalidUTF8InTags(t *testing.T) { function TestServer_Publish_InvalidUTF8WithFirebase (line 4533) | func TestServer_Publish_InvalidUTF8WithFirebase(t *testing.T) { FILE: server/server_twilio.go type twilioCallData (line 43) | type twilioCallData struct method convertPhoneNumber (line 55) | func (s *Server) convertPhoneNumber(u *user.User, phoneNumber string) (s... method callPhone (line 80) | func (s *Server) callPhone(v *visitor, r *http.Request, m *model.Message... method callPhoneInternal (line 123) | func (s *Server) callPhoneInternal(data url.Values) (string, error) { method verifyPhoneNumber (line 143) | func (s *Server) verifyPhoneNumber(v *visitor, r *http.Request, phoneNum... method verifyPhoneNumberCheck (line 169) | func (s *Server) verifyPhoneNumberCheck(v *visitor, r *http.Request, pho... function xmlEscapeText (line 211) | func xmlEscapeText(text string) string { FILE: server/server_twilio_test.go function TestServer_Twilio_Call_Add_Verify_Call_Delete_Success (line 16) | func TestServer_Twilio_Call_Add_Verify_Call_Delete_Success(t *testing.T) { function TestServer_Twilio_Call_Success (line 119) | func TestServer_Twilio_Call_Success(t *testing.T) { function TestServer_Twilio_Call_Success_With_Yes (line 166) | func TestServer_Twilio_Call_Success_With_Yes(t *testing.T) { function TestServer_Twilio_Call_Success_with_custom_twiml (line 213) | func TestServer_Twilio_Call_Success_with_custom_twiml(t *testing.T) { function TestServer_Twilio_Call_UnverifiedNumber (line 276) | func TestServer_Twilio_Call_UnverifiedNumber(t *testing.T) { function TestServer_Twilio_Call_InvalidNumber (line 303) | func TestServer_Twilio_Call_InvalidNumber(t *testing.T) { function TestServer_Twilio_Call_Anonymous (line 319) | func TestServer_Twilio_Call_Anonymous(t *testing.T) { function TestServer_Twilio_Call_Unconfigured (line 335) | func TestServer_Twilio_Call_Unconfigured(t *testing.T) { FILE: server/server_webpush.go constant WebPushAvailable (line 22) | WebPushAvailable = true constant webPushTopicSubscribeLimit (line 24) | webPushTopicSubscribeLimit = 50 function init (line 40) | func init() { method handleWebPushUpdate (line 48) | func (s *Server) handleWebPushUpdate(w http.ResponseWriter, r *http.Requ... method handleWebPushDelete (line 76) | func (s *Server) handleWebPushDelete(w http.ResponseWriter, r *http.Requ... method publishToWebPushEndpoints (line 87) | func (s *Server) publishToWebPushEndpoints(v *visitor, m *model.Message) { method pruneAndNotifyWebPushSubscriptions (line 106) | func (s *Server) pruneAndNotifyWebPushSubscriptions() { method pruneAndNotifyWebPushSubscriptionsInternal (line 117) | func (s *Server) pruneAndNotifyWebPushSubscriptionsInternal() error { method sendWebPushNotification (line 148) | func (s *Server) sendWebPushNotification(sub *wpush.Subscription, messag... FILE: server/server_webpush_dummy.go constant WebPushAvailable (line 14) | WebPushAvailable = false method handleWebPushUpdate (line 17) | func (s *Server) handleWebPushUpdate(w http.ResponseWriter, r *http.Requ... method handleWebPushDelete (line 21) | func (s *Server) handleWebPushDelete(w http.ResponseWriter, r *http.Requ... method publishToWebPushEndpoints (line 25) | func (s *Server) publishToWebPushEndpoints(v *visitor, m *model.Message) { method pruneAndNotifyWebPushSubscriptions (line 29) | func (s *Server) pruneAndNotifyWebPushSubscriptions() { FILE: server/server_webpush_test.go constant testWebPushEndpoint (line 25) | testWebPushEndpoint = "https://updates.push.services.mozilla.com/wpush/v... function TestServer_WebPush_Enabled (line 28) | func TestServer_WebPush_Enabled(t *testing.T) { function TestServer_WebPush_Disabled (line 52) | func TestServer_WebPush_Disabled(t *testing.T) { function TestServer_WebPush_TopicAdd (line 61) | func TestServer_WebPush_TopicAdd(t *testing.T) { function TestServer_WebPush_TopicAdd_InvalidEndpoint (line 80) | func TestServer_WebPush_TopicAdd_InvalidEndpoint(t *testing.T) { function TestServer_WebPush_TopicAdd_TooManyTopics (line 90) | func TestServer_WebPush_TopicAdd_TooManyTopics(t *testing.T) { function TestServer_WebPush_TopicUnsubscribe (line 105) | func TestServer_WebPush_TopicUnsubscribe(t *testing.T) { function TestServer_WebPush_Delete (line 120) | func TestServer_WebPush_Delete(t *testing.T) { function TestServer_WebPush_TopicSubscribeProtected_Allowed (line 135) | func TestServer_WebPush_TopicSubscribeProtected_Allowed(t *testing.T) { function TestServer_WebPush_TopicSubscribeProtected_Denied (line 157) | func TestServer_WebPush_TopicSubscribeProtected_Denied(t *testing.T) { function TestServer_WebPush_DeleteAccountUnsubscribe (line 170) | func TestServer_WebPush_DeleteAccountUnsubscribe(t *testing.T) { function TestServer_WebPush_Publish (line 195) | func TestServer_WebPush_Publish(t *testing.T) { function TestServer_WebPush_Publish_RemoveOnError (line 219) | func TestServer_WebPush_Publish_RemoveOnError(t *testing.T) { function TestServer_WebPush_Expiry (line 249) | func TestServer_WebPush_Expiry(t *testing.T) { function payloadForTopics (line 288) | func payloadForTopics(t *testing.T, topics []string, endpoint string) st... function addSubscription (line 300) | func addSubscription(t *testing.T, s *Server, endpoint string, topics ..... function requireSubscriptionCount (line 304) | func requireSubscriptionCount(t *testing.T, s *Server, topic string, exp... function newTestConfigWithWebPush (line 310) | func newTestConfigWithWebPush(t *testing.T, databaseURL string) *Config { FILE: server/smtp_sender.go type mailer (line 19) | type mailer interface type smtpSender (line 24) | type smtpSender struct method Send (line 31) | func (s *smtpSender) Send(v *visitor, m *model.Message, to string) err... method Counts (line 61) | func (s *smtpSender) Counts() (total int64, success int64, failure int... method withCount (line 67) | func (s *smtpSender) withCount(v *visitor, m *model.Message, fn func()... function formatMail (line 80) | func formatMail(baseURL, senderIP, from, to string, m *model.Message) (s... function toEmojis (line 143) | func toEmojis(tags []string) (emojisOut []string, tagsOut []string, err ... FILE: server/smtp_sender_test.go function TestFormatMail_Basic (line 10) | func TestFormatMail_Basic(t *testing.T) { function TestFormatMail_JustEmojis (line 31) | func TestFormatMail_JustEmojis(t *testing.T) { function TestFormatMail_JustOtherTags (line 53) | func TestFormatMail_JustOtherTags(t *testing.T) { function TestFormatMail_JustPriority (line 77) | func TestFormatMail_JustPriority(t *testing.T) { function TestFormatMail_UTF8Subject (line 101) | func TestFormatMail_UTF8Subject(t *testing.T) { function TestFormatMail_WithAllTheThings (line 123) | func TestFormatMail_WithAllTheThings(t *testing.T) { FILE: server/smtp_server.go constant maxMultipartDepth (line 41) | maxMultipartDepth = 2 type smtpBackend (line 45) | type smtpBackend struct method NewSession (line 63) | func (b *smtpBackend) NewSession(conn *smtp.Conn) (smtp.Session, error) { method Counts (line 68) | func (b *smtpBackend) Counts() (total int64, success int64, failure in... function newMailBackend (line 56) | func newMailBackend(conf *Config, handler func(http.ResponseWriter, *htt... type smtpSession (line 75) | type smtpSession struct method AuthPlain (line 84) | func (s *smtpSession) AuthPlain(username, password string) error { method Mail (line 92) | func (s *smtpSession) Mail(from string, opts *smtp.MailOptions) error { method Rcpt (line 97) | func (s *smtpSession) Rcpt(to string) error { method Data (line 138) | func (s *smtpSession) Data(r io.Reader) error { method publishMessage (line 188) | func (s *smtpSession) publishMessage(m *model.Message) error { method Reset (line 219) | func (s *smtpSession) Reset() { method Logout (line 225) | func (s *smtpSession) Logout() error { method withFailCount (line 232) | func (s *smtpSession) withFailCount(fn func() error) error { function readMailBody (line 246) | func readMailBody(body io.Reader, header mail.Header) (string, error) { function readMultipartMailBody (line 263) | func readMultipartMailBody(body io.Reader, params map[string]string) (st... function readMultipartMailBodyParts (line 275) | func readMultipartMailBodyParts(body io.Reader, params map[string]string... function readTextMailBody (line 305) | func readTextMailBody(reader io.Reader, contentType, transferEncoding st... function readPlainTextMailBody (line 314) | func readPlainTextMailBody(reader io.Reader, transferEncoding string) (s... function readHTMLMailBody (line 327) | func readHTMLMailBody(reader io.Reader, transferEncoding string) (string... function removeExtraEmptyLines (line 342) | func removeExtraEmptyLines(s string) string { FILE: server/smtp_server_test.go function TestSmtpBackend_Multipart (line 15) | func TestSmtpBackend_Multipart(t *testing.T) { function TestSmtpBackend_MultipartNoBody (line 51) | func TestSmtpBackend_MultipartNoBody(t *testing.T) { function TestSmtpBackend_Plaintext (line 87) | func TestSmtpBackend_Plaintext(t *testing.T) { function TestSmtpBackend_Plaintext_No_ContentType (line 113) | func TestSmtpBackend_Plaintext_No_ContentType(t *testing.T) { function TestSmtpBackend_Plaintext_EncodedSubject (line 134) | func TestSmtpBackend_Plaintext_EncodedSubject(t *testing.T) { function TestSmtpBackend_Plaintext_TooLongTruncate (line 156) | func TestSmtpBackend_Plaintext_TooLongTruncate(t *testing.T) { function TestSmtpBackend_Plaintext_QuotedPrintable (line 306) | func TestSmtpBackend_Plaintext_QuotedPrintable(t *testing.T) { function TestSmtpBackend_Unsupported (line 339) | func TestSmtpBackend_Unsupported(t *testing.T) { function TestSmtpBackend_InvalidAddress (line 362) | func TestSmtpBackend_InvalidAddress(t *testing.T) { function TestSmtpBackend_Base64Body (line 384) | func TestSmtpBackend_Base64Body(t *testing.T) { function TestSmtpBackend_MultipartQuotedPrintable (line 426) | func TestSmtpBackend_MultipartQuotedPrintable(t *testing.T) { function TestSmtpBackend_NestedMultipartBase64 (line 469) | func TestSmtpBackend_NestedMultipartBase64(t *testing.T) { function TestSmtpBackend_NestedMultipartTooDeep (line 518) | func TestSmtpBackend_NestedMultipartTooDeep(t *testing.T) { function TestSmtpBackend_HTMLEmail (line 571) | func TestSmtpBackend_HTMLEmail(t *testing.T) { constant spamEmail (line 709) | spamEmail = ` function TestSmtpBackend_Spam_Text (line 1276) | func TestSmtpBackend_Spam_Text(t *testing.T) { function TestSmtpBackend_Spam_HTML (line 1290) | func TestSmtpBackend_Spam_HTML(t *testing.T) { function TestSmtpBackend_HTMLOnly_FromDiskStation (line 1339) | func TestSmtpBackend_HTMLOnly_FromDiskStation(t *testing.T) { function TestSmtpBackend_HTMLEmail_BrTagsPreserved (line 1371) | func TestSmtpBackend_HTMLEmail_BrTagsPreserved(t *testing.T) { function TestSmtpBackend_PlaintextWithToken (line 1401) | func TestSmtpBackend_PlaintextWithToken(t *testing.T) { function TestSmtpBackend_PlaintextWithPlainAuth (line 1422) | func TestSmtpBackend_PlaintextWithPlainAuth(t *testing.T) { type smtpHandlerFunc (line 1444) | type smtpHandlerFunc function newTestSMTPServer (line 1446) | func newTestSMTPServer(t *testing.T, handler smtpHandlerFunc) (s *smtp.S... function writeAndReadUntilLine (line 1470) | func writeAndReadUntilLine(t *testing.T, email string, conn net.Conn, sc... function readUntilLine (line 1476) | func readUntilLine(t *testing.T, conn net.Conn, scanner *bufio.Scanner, ... FILE: server/topic.go constant topicExpungeAfter (line 17) | topicExpungeAfter = 16 * time.Hour type topic (line 22) | type topic struct method Subscribe (line 49) | func (t *topic) Subscribe(s subscriber, userID string, cancel func()) ... method Stale (line 68) | func (t *topic) Stale() bool { method LastAccess (line 77) | func (t *topic) LastAccess() time.Time { method SetRateVisitor (line 83) | func (t *topic) SetRateVisitor(v *visitor) { method RateVisitor (line 90) | func (t *topic) RateVisitor() *visitor { method Unsubscribe (line 100) | func (t *topic) Unsubscribe(id int) { method Publish (line 107) | func (t *topic) Publish(v *visitor, m *model.Message) error { method Stats (line 132) | func (t *topic) Stats() (int, time.Time) { method Keepalive (line 139) | func (t *topic) Keepalive() { method CancelSubscribersExceptUser (line 146) | func (t *topic) CancelSubscribersExceptUser(exceptUserID string) { method CancelSubscriberUser (line 157) | func (t *topic) CancelSubscriberUser(userID string) { method cancelUserSubscriber (line 168) | func (t *topic) cancelUserSubscriber(s *topicSubscriber) { method Context (line 179) | func (t *topic) Context() log.Context { method subscribersCopy (line 196) | func (t *topic) subscribersCopy() map[int]*topicSubscriber { type topicSubscriber (line 30) | type topicSubscriber struct type subscriber (line 37) | type subscriber function newTopic (line 40) | func newTopic(id string) *topic { FILE: server/topic_test.go function TestTopic_CancelSubscribersExceptUser (line 13) | func TestTopic_CancelSubscribersExceptUser(t *testing.T) { function TestTopic_CancelSubscribersUser (line 34) | func TestTopic_CancelSubscribersUser(t *testing.T) { function TestTopic_Keepalive (line 57) | func TestTopic_Keepalive(t *testing.T) { function TestTopic_Subscribe_DuplicateID (line 67) | func TestTopic_Subscribe_DuplicateID(t *testing.T) { FILE: server/types.go type publishMessage (line 12) | type publishMessage struct type messageEncoder (line 33) | type messageEncoder type queryFilter (line 35) | type queryFilter struct method Pass (line 65) | func (q *queryFilter) Pass(msg *model.Message) bool { function parseQueryFilters (line 43) | func parseQueryFilters(r *http.Request) (*queryFilter, error) { type templateMode (line 94) | type templateMode method Enabled (line 97) | func (t templateMode) Enabled() bool { method InlineMode (line 102) | func (t templateMode) InlineMode() bool { method FileMode (line 107) | func (t templateMode) FileMode() bool { method FileName (line 112) | func (t templateMode) FileName() string { type templateFile (line 129) | type templateFile struct type apiHealthResponse (line 135) | type apiHealthResponse struct type apiVersionResponse (line 139) | type apiVersionResponse struct type apiStatsResponse (line 145) | type apiStatsResponse struct type apiUserAddOrUpdateRequest (line 150) | type apiUserAddOrUpdateRequest struct type apiUserResponse (line 158) | type apiUserResponse struct type apiUserGrantResponse (line 165) | type apiUserGrantResponse struct type apiUserDeleteRequest (line 170) | type apiUserDeleteRequest struct type apiAccessAllowRequest (line 174) | type apiAccessAllowRequest struct type apiAccessResetRequest (line 180) | type apiAccessResetRequest struct type apiAccountCreateRequest (line 185) | type apiAccountCreateRequest struct type apiAccountPasswordChangeRequest (line 190) | type apiAccountPasswordChangeRequest struct type apiAccountDeleteRequest (line 195) | type apiAccountDeleteRequest struct type apiAccountTokenIssueRequest (line 199) | type apiAccountTokenIssueRequest struct type apiAccountTokenUpdateRequest (line 204) | type apiAccountTokenUpdateRequest struct type apiAccountTokenResponse (line 210) | type apiAccountTokenResponse struct type apiAccountPhoneNumberVerifyRequest (line 219) | type apiAccountPhoneNumberVerifyRequest struct type apiAccountPhoneNumberAddRequest (line 224) | type apiAccountPhoneNumberAddRequest struct type apiAccountTier (line 229) | type apiAccountTier struct type apiAccountLimits (line 234) | type apiAccountLimits struct type apiAccountStats (line 247) | type apiAccountStats struct type apiAccountReservation (line 260) | type apiAccountReservation struct type apiAccountBilling (line 265) | type apiAccountBilling struct type apiAccountResponse (line 274) | type apiAccountResponse struct type apiAccountReservationRequest (line 291) | type apiAccountReservationRequest struct type apiConfigResponse (line 296) | type apiConfigResponse struct type apiAccountBillingPrices (line 313) | type apiAccountBillingPrices struct type apiAccountBillingTier (line 318) | type apiAccountBillingTier struct type apiAccountBillingSubscriptionCreateResponse (line 325) | type apiAccountBillingSubscriptionCreateResponse struct type apiAccountBillingSubscriptionChangeRequest (line 329) | type apiAccountBillingSubscriptionChangeRequest struct type apiAccountBillingPortalRedirectResponse (line 334) | type apiAccountBillingPortalRedirectResponse struct type apiAccountSyncTopicResponse (line 338) | type apiAccountSyncTopicResponse struct type apiSuccessResponse (line 342) | type apiSuccessResponse struct function newSuccessResponse (line 346) | func newSuccessResponse() *apiSuccessResponse { type apiStripeSubscriptionUpdatedEvent (line 352) | type apiStripeSubscriptionUpdatedEvent struct type apiStripeSubscriptionDeletedEvent (line 370) | type apiStripeSubscriptionDeletedEvent struct type apiWebPushUpdateSubscriptionRequest (line 375) | type apiWebPushUpdateSubscriptionRequest struct constant webPushMessageEvent (line 384) | webPushMessageEvent = "message" constant webPushExpiringEvent (line 385) | webPushExpiringEvent = "subscription_expiring" type webPushPayload (line 388) | type webPushPayload struct function newWebPushPayload (line 394) | func newWebPushPayload(subscriptionID string, message *model.Message) *w... type webPushControlMessagePayload (line 402) | type webPushControlMessagePayload struct function newWebPushSubscriptionExpiringPayload (line 406) | func newWebPushSubscriptionExpiringPayload() *webPushControlMessagePaylo... type webManifestResponse (line 413) | type webManifestResponse struct type webManifestIcon (line 425) | type webManifestIcon struct FILE: server/util.go function readBoolParam (line 33) | func readBoolParam(r *http.Request, defaultValue bool, names ...string) ... function isBoolValue (line 41) | func isBoolValue(value string) bool { function toBool (line 45) | func toBool(value string) bool { function readCommaSeparatedParam (line 49) | func readCommaSeparatedParam(r *http.Request, names ...string) []string { function readParam (line 56) | func readParam(r *http.Request, names ...string) string { function readHeaderParam (line 64) | func readHeaderParam(r *http.Request, names ...string) string { function readQueryParam (line 74) | func readQueryParam(r *http.Request, names ...string) string { function extractIPAddress (line 86) | func extractIPAddress(r *http.Request, behindProxy bool, proxyForwardedH... function extractIPAddressFromHeader (line 111) | func extractIPAddressFromHeader(r *http.Request, forwardedHeader string,... function readJSONWithLimit (line 148) | func readJSONWithLimit[T any](r io.ReadCloser, limit int, allowEmpty boo... function withContext (line 160) | func withContext(r *http.Request, ctx map[contextKey]any) *http.Request { function fromContext (line 168) | func fromContext[T any](r *http.Request, key contextKey) (T, error) { function maybeDecodeHeader (line 179) | func maybeDecodeHeader(name, value string) string { function maybeIgnoreSpecialHeader (line 193) | func maybeIgnoreSpecialHeader(name, value string) string { FILE: server/util_test.go function TestReadBoolParam (line 16) | func TestReadBoolParam(t *testing.T) { function TestRenderHTTPRequest_ValidShort (line 38) | func TestRenderHTTPRequest_ValidShort(t *testing.T) { function TestRenderHTTPRequest_ValidLong (line 48) | func TestRenderHTTPRequest_ValidLong(t *testing.T) { function TestRenderHTTPRequest_InvalidShort (line 59) | func TestRenderHTTPRequest_InvalidShort(t *testing.T) { function TestRenderHTTPRequest_InvalidLong (line 70) | func TestRenderHTTPRequest_InvalidLong(t *testing.T) { function TestMaybeIgnoreSpecialHeader (line 82) | func TestMaybeIgnoreSpecialHeader(t *testing.T) { function TestMaybeDecodeHeaders (line 88) | func TestMaybeDecodeHeaders(t *testing.T) { function TestExtractIPAddress (line 95) | func TestExtractIPAddress(t *testing.T) { function TestExtractIPAddress_UnixSocket (line 112) | func TestExtractIPAddress_UnixSocket(t *testing.T) { function TestExtractIPAddress_MixedIPv4IPv6 (line 125) | func TestExtractIPAddress_MixedIPv4IPv6(t *testing.T) { function TestExtractIPAddress_TrustedIPv6Prefix (line 133) | func TestExtractIPAddress_TrustedIPv6Prefix(t *testing.T) { function TestVisitorID (line 141) | func TestVisitorID(t *testing.T) { FILE: server/visitor.go constant oneDay (line 18) | oneDay = 24 * time.Hour constant visitorExpungeAfter (line 23) | visitorExpungeAfter = oneDay constant visitorDefaultReservationsLimit (line 27) | visitorDefaultReservationsLimit = int64(0) constant visitorDefaultCallsLimit (line 31) | visitorDefaultCallsLimit = int64(0) constant visitorMessageToRequestLimitBurstRate (line 41) | visitorMessageToRequestLimitBurstRate = 0.05 constant visitorMessageToRequestLimitBurstMax (line 42) | visitorMessageToRequestLimitBurstMax = 1000 constant visitorMessageToRequestLimitReplenishFactor (line 43) | visitorMessageToRequestLimitReplenishFactor = 2 constant visitorEmailLimitBurstRate (line 50) | visitorEmailLimitBurstRate = 0.2 constant visitorEmailLimitBurstMax (line 51) | visitorEmailLimitBurstMax = 150 type visitor (line 55) | type visitor struct method Context (line 146) | func (v *visitor) Context() log.Context { method contextNoLock (line 152) | func (v *visitor) contextNoLock() log.Context { method RequestAllowed (line 207) | func (v *visitor) RequestAllowed() bool { method FirebaseAllowed (line 213) | func (v *visitor) FirebaseAllowed() bool { method FirebaseTemporarilyDeny (line 219) | func (v *visitor) FirebaseTemporarilyDeny() { method MessageAllowed (line 225) | func (v *visitor) MessageAllowed() bool { method EmailAllowed (line 231) | func (v *visitor) EmailAllowed() bool { method CallAllowed (line 237) | func (v *visitor) CallAllowed() bool { method SubscriptionAllowed (line 243) | func (v *visitor) SubscriptionAllowed() bool { method AuthAllowed (line 250) | func (v *visitor) AuthAllowed() bool { method AuthFailed (line 260) | func (v *visitor) AuthFailed() { method AccountCreationAllowed (line 269) | func (v *visitor) AccountCreationAllowed() bool { method AccountCreated (line 279) | func (v *visitor) AccountCreated() { method BandwidthAllowed (line 287) | func (v *visitor) BandwidthAllowed(bytes int64) bool { method RemoveSubscription (line 293) | func (v *visitor) RemoveSubscription() { method Keepalive (line 299) | func (v *visitor) Keepalive() { method BandwidthLimiter (line 305) | func (v *visitor) BandwidthLimiter() util.Limiter { method Stale (line 311) | func (v *visitor) Stale() bool { method Stats (line 317) | func (v *visitor) Stats() *user.Stats { method ResetStats (line 327) | func (v *visitor) ResetStats() { method User (line 336) | func (v *visitor) User() *user.User { method IP (line 343) | func (v *visitor) IP() netip.Addr { method Authenticated (line 350) | func (v *visitor) Authenticated() bool { method SetUser (line 357) | func (v *visitor) SetUser(u *user.User) { method MaybeUserID (line 373) | func (v *visitor) MaybeUserID() string { method resetLimitersNoLock (line 382) | func (v *visitor) resetLimitersNoLock(messages, emails, calls int64, e... method Limits (line 406) | func (v *visitor) Limits() *visitorLimits { method limitsNoLock (line 412) | func (v *visitor) limitsNoLock() *visitorLimits { method Info (line 461) | func (v *visitor) Info() (*visitorInfo, error) { method infoLightNoLock (line 495) | func (v *visitor) infoLightNoLock() *visitorInfo { type visitorInfo (line 74) | type visitorInfo struct type visitorLimits (line 79) | type visitorLimits struct type visitorStats (line 96) | type visitorStats struct type visitorLimitBasis (line 111) | type visitorLimitBasis constant visitorLimitBasisIP (line 114) | visitorLimitBasisIP = visitorLimitBasis("ip") constant visitorLimitBasisTier (line 115) | visitorLimitBasisTier = visitorLimitBasis("tier") function newVisitor (line 118) | func newVisitor(conf *Config, messageCache *message.Cache, userManager *... function visitorExtendedInfoContext (line 196) | func visitorExtendedInfoContext(info *visitorInfo) log.Context { function tierBasedVisitorLimits (line 419) | func tierBasedVisitorLimits(conf *Config, tier *user.Tier) *visitorLimits { function configBasedVisitorLimits (line 438) | func configBasedVisitorLimits(conf *Config) *visitorLimits { function zeroIfNegative (line 513) | func zeroIfNegative(value int64) int64 { function replenishDurationToDailyLimit (line 520) | func replenishDurationToDailyLimit(duration time.Duration) int64 { function dailyLimitToRate (line 524) | func dailyLimitToRate(limit int64) rate.Limit { function visitorID (line 529) | func visitorID(ip netip.Addr, u *user.User, conf *Config) string { FILE: test/server.go function StartServer (line 13) | func StartServer(t *testing.T) (*server.Server, int) { function StartServerWithConfig (line 18) | func StartServerWithConfig(t *testing.T, conf *server.Config) (*server.S... function findAvailablePort (line 37) | func findAvailablePort(t *testing.T) int { function StopServer (line 48) | func StopServer(t *testing.T, s *server.Server, port int) { FILE: test/util.go function WaitForPortUp (line 11) | func WaitForPortUp(t *testing.T, port int) { function WaitForPortDown (line 31) | func WaitForPortDown(t *testing.T, port int) { FILE: tools/fbsend/main.go function main (line 16) | func main() { function fail (line 49) | func fail(s string) { FILE: tools/loadgen/main.go function main (line 12) | func main() { function subscribe (line 31) | func subscribe(worker int, baseURL string) { function poll (line 50) | func poll(worker int, baseURL string) { FILE: tools/loadtest/main.go function main (line 65) | func main() { function trackError (line 205) | func trackError(category string, err error) { function trackErrorMsg (line 213) | func trackErrorMsg(category string, msg string) { function truncateErr (line 221) | func truncateErr(err error) string { function setAuth (line 229) | func setAuth(req *http.Request) { function generateTopics (line 235) | func generateTopics(n int) []string { function pickTopic (line 245) | func pickTopic(topics []string) string { function randomSince (line 250) | func randomSince() string { function randomMessage (line 256) | func randomMessage() string { function runAtRate (line 271) | func runAtRate(ctx context.Context, rate float64, fn func()) { function doPoll (line 288) | func doPoll(ctx context.Context, client *http.Client, topics []string) { function doPublishPost (line 294) | func doPublishPost(ctx context.Context, client *http.Client, topics []st... function doPublishPut (line 323) | func doPublishPut(ctx context.Context, client *http.Client, topics []str... function doConfig (line 345) | func doConfig(ctx context.Context, client *http.Client, topics []string) { function doAccountCheck (line 350) | func doAccountCheck(ctx context.Context, client *http.Client, topics []s... function doOtherGet (line 355) | func doOtherGet(ctx context.Context, client *http.Client, topics []strin... function doGet (line 361) | func doGet(ctx context.Context, client *http.Client, url string) { function streamSubscription (line 383) | func streamSubscription(ctx context.Context, client *http.Client, topics... function wsSubscription (line 435) | func wsSubscription(ctx context.Context, topics []string) { function reportStats (line 498) | func reportStats(ctx context.Context) { FILE: tools/pgimport/main.go constant batchSize (line 21) | batchSize = 1000 constant expectedMessageSchemaVersion (line 23) | expectedMessageSchemaVersion = 14 constant expectedUserSchemaVersion (line 24) | expectedUserSchemaVersion = 6 constant expectedWebPushSchemaVersion (line 25) | expectedWebPushSchemaVersion = 1 constant everyoneID (line 27) | everyoneID = "u_everyone" constant createMessageSchemaQuery (line 30) | createMessageSchemaQuery = ` constant createUserSchemaQuery (line 77) | createUserSchemaQuery = ` constant createWebPushSchemaQuery (line 153) | createWebPushSchemaQuery = ` function main (line 191) | func main() { function execImport (line 206) | func execImport(c *cli.Context) error { function execPreImport (line 312) | func execPreImport(c *cli.Context, databaseURL, cacheFile string) error { function createSchema (line 360) | func createSchema(pgDB *sql.DB, cacheFile, authFile, webPushFile string)... function loadConfigFile (line 388) | func loadConfigFile(configFlag string, flags []cli.Flag) cli.BeforeFunc { function newYamlSourceFromFile (line 405) | func newYamlSourceFromFile(file string, flags []cli.Flag) (altsrc.InputS... function verifySchemaVersion (line 425) | func verifySchemaVersion(pgDB *sql.DB, store string, expected int) error { function printSource (line 437) | func printSource(label, path string) { function maskPassword (line 447) | func maskPassword(databaseURL string) string { function openSQLite (line 464) | func openSQLite(filename string) (*sql.DB, error) { function importUsers (line 473) | func importUsers(sqliteFile string, pgDB *sql.DB) error { function importTiers (line 515) | func importTiers(sqlDB, pgDB *sql.DB) (int, error) { function importUserRows (line 551) | func importUserRows(sqlDB, pgDB *sql.DB) (int, error) { function importUserAccess (line 596) | func importUserAccess(sqlDB, pgDB *sql.DB) (int, error) { function importUserTokens (line 634) | func importUserTokens(sqlDB, pgDB *sql.DB) (int, error) { function importUserPhones (line 670) | func importUserPhones(sqlDB, pgDB *sql.DB) (int, error) { constant preImportTimeDelta (line 705) | preImportTimeDelta = 30 function maxMessageTime (line 710) | func maxMessageTime(pgDB *sql.DB) int64 { function importMessages (line 723) | func importMessages(sqliteFile string, pgDB *sql.DB, sinceTime int64) er... function importWebPush (line 838) | func importWebPush(sqliteFile string, pgDB *sql.DB) error { function toUTF8 (line 921) | func toUTF8(s string) string { function verifyUsers (line 929) | func verifyUsers(sqliteFile string, pgDB *sql.DB, failed *bool) error { function verifyMessages (line 969) | func verifyMessages(sqliteFile string, pgDB *sql.DB, failed *bool) error { function verifyWebPush (line 981) | func verifyWebPush(sqliteFile string, pgDB *sql.DB, failed *bool) error { function verifyCount (line 1003) | func verifyCount(sqlDB, pgDB *sql.DB, table, sqliteQuery, pgQuery string... function verifyContent (line 1023) | func verifyContent(sqlDB, pgDB *sql.DB, table, sqliteQuery, pgQuery stri... function verifySampledMessages (line 1095) | func verifySampledMessages(sqlDB, pgDB *sql.DB, failed *bool) { function makeStringSlice (line 1158) | func makeStringSlice(n int) []any { FILE: user/manager.go constant tierIDPrefix (line 23) | tierIDPrefix = "ti_" constant tierIDLength (line 24) | tierIDLength = 8 constant syncTopicPrefix (line 25) | syncTopicPrefix = "st_" constant syncTopicLength (line 26) | syncTopicLength = 16 constant userIDPrefix (line 27) | userIDPrefix = "u_" constant userIDLength (line 28) | userIDLength = 12 constant userAuthIntentionalSlowDownHash (line 29) | userAuthIntentionalSlowDownHash = "$2a$10$YFCQvqQDwIIwnJM1xkAYOeih0dg17U... constant userHardDeleteAfterDuration (line 30) | userHardDeleteAfterDuration = 7 * 24 * time.Hour constant tokenPrefix (line 31) | tokenPrefix = "tk_" constant tokenLength (line 32) | tokenLength = 32 constant tokenMaxCount (line 33) | tokenMaxCount = 60 constant tag (line 34) | tag = "user_manager" constant DefaultUserStatsQueueWriterInterval (line 39) | DefaultUserStatsQueueWriterInterval = 33 * time.Second constant DefaultUserPasswordBcryptCost (line 40) | DefaultUserPasswordBcryptCost = 10 type Manager (line 50) | type Manager struct method Authenticate (line 85) | func (a *Manager) Authenticate(username, password string) (*User, erro... method AuthenticateToken (line 107) | func (a *Manager) AuthenticateToken(token string) (*User, error) { method AddUser (line 121) | func (a *Manager) AddUser(username, password string, role Role, hashed... method addUserTx (line 132) | func (a *Manager) addUserTx(tx *sql.Tx, username, hash string, role Ro... method RemoveUser (line 150) | func (a *Manager) RemoveUser(username string) error { method removeUserTx (line 160) | func (a *Manager) removeUserTx(tx *sql.Tx, username string) error { method MarkUserRemoved (line 173) | func (a *Manager) MarkUserRemoved(user *User) error { method RemoveDeletedUsers (line 193) | func (a *Manager) RemoveDeletedUsers() error { method ChangePassword (line 201) | func (a *Manager) ChangePassword(username, password string, hashed boo... method changePasswordHashTx (line 215) | func (a *Manager) changePasswordHashTx(tx *sql.Tx, username, hash stri... method ChangeRole (line 224) | func (a *Manager) ChangeRole(username string, role Role) error { method changeRoleTx (line 234) | func (a *Manager) changeRoleTx(tx *sql.Tx, username string, role Role)... method CanChangeUser (line 252) | func (a *Manager) CanChangeUser(username string) error { method changeProvisionedTx (line 263) | func (a *Manager) changeProvisionedTx(tx *sql.Tx, username string, pro... method ChangeSettings (line 271) | func (a *Manager) ChangeSettings(userID string, prefs *Prefs) error { method ChangeTier (line 284) | func (a *Manager) ChangeTier(username, tier string) error { method ResetTier (line 304) | func (a *Manager) ResetTier(username string) error { method checkReservationsLimitTx (line 319) | func (a *Manager) checkReservationsLimitTx(tx *sql.Tx, username string... method ResetStats (line 336) | func (a *Manager) ResetStats() error { method EnqueueUserStats (line 348) | func (a *Manager) EnqueueUserStats(userID string, stats *Stats) { method asyncQueueWriter (line 354) | func (a *Manager) asyncQueueWriter(interval time.Duration) { method writeUserStatsQueue (line 366) | func (a *Manager) writeUserStatsQueue() error { method User (line 398) | func (a *Manager) User(username string) (*User, error) { method userTx (line 402) | func (a *Manager) userTx(tx db.Querier, username string) (*User, error) { method UserByID (line 411) | func (a *Manager) UserByID(id string) (*User, error) { method userByToken (line 420) | func (a *Manager) userByToken(token string) (*User, error) { method UserByStripeCustomer (line 429) | func (a *Manager) UserByStripeCustomer(customerID string) (*User, erro... method Users (line 439) | func (a *Manager) Users() ([]*User, error) { method UsersCount (line 448) | func (a *Manager) UsersCount() (int64, error) { method readUser (line 464) | func (a *Manager) readUser(rows *sql.Rows) (*User, error) { method readUsers (line 476) | func (a *Manager) readUsers(rows *sql.Rows) ([]*User, error) { method scanUser (line 489) | func (a *Manager) scanUser(rows *sql.Rows) (*User, error) { method maybeHashPassword (line 548) | func (a *Manager) maybeHashPassword(password string, hashed bool) (str... method Authorize (line 560) | func (a *Manager) Authorize(user *User, topic string, perm Permission)... method resolvePerms (line 578) | func (a *Manager) resolvePerms(base, perm Permission) error { method AllowAccess (line 590) | func (a *Manager) AllowAccess(username string, topicPattern string, pe... method allowAccessTx (line 596) | func (a *Manager) allowAccessTx(tx *sql.Tx, username string, topicPatt... method ResetAccess (line 608) | func (a *Manager) ResetAccess(username string, topicPattern string) er... method resetAccessTx (line 614) | func (a *Manager) resetAccessTx(tx *sql.Tx, username string, topicPatt... method DefaultAccess (line 630) | func (a *Manager) DefaultAccess() Permission { method AllowReservation (line 636) | func (a *Manager) AllowReservation(username string, topic string) error { method authorizeTopicAccess (line 656) | func (a *Manager) authorizeTopicAccess(usernameOrEveryone, topic strin... method AllGrants (line 674) | func (a *Manager) AllGrants() (map[string][]Grant, error) { method Grants (line 702) | func (a *Manager) Grants(username string) ([]Grant, error) { method AddReservation (line 730) | func (a *Manager) AddReservation(username string, topic string, everyo... method RemoveReservations (line 763) | func (a *Manager) RemoveReservations(username string, topics ...string... method Reservations (line 783) | func (a *Manager) Reservations(username string) ([]Reservation, error) { method reservationsTx (line 787) | func (a *Manager) reservationsTx(tx db.Querier, username string) ([]Re... method HasReservation (line 813) | func (a *Manager) HasReservation(username, topic string) (bool, error) { method hasReservationTx (line 817) | func (a *Manager) hasReservationTx(tx db.Querier, username, topic stri... method ReservationsCount (line 834) | func (a *Manager) ReservationsCount(username string) (int64, error) { method reservationsCountTx (line 838) | func (a *Manager) reservationsCountTx(tx db.Querier, username string) ... method ReservationOwner (line 855) | func (a *Manager) ReservationOwner(topic string) (string, error) { method RemoveExcessReservations (line 874) | func (a *Manager) RemoveExcessReservations(username string, limit int6... method otherAccessCount (line 896) | func (a *Manager) otherAccessCount(username, topic string) (int, error) { method removeReservationAccessTx (line 912) | func (a *Manager) removeReservationAccessTx(tx *sql.Tx, username, topi... method resetUserAccessTx (line 919) | func (a *Manager) resetUserAccessTx(tx *sql.Tx, username string) error { method resetTopicAccessTx (line 927) | func (a *Manager) resetTopicAccessTx(tx *sql.Tx, username, topicPatter... method CreateToken (line 940) | func (a *Manager) CreateToken(userID, label string, expires time.Time,... method createTokenTx (line 948) | func (a *Manager) createTokenTx(tx *sql.Tx, userID, token, label strin... method ChangeToken (line 976) | func (a *Manager) ChangeToken(userID, token string, label *string, exp... method RemoveToken (line 1000) | func (a *Manager) RemoveToken(userID, token string) error { method canChangeToken (line 1014) | func (a *Manager) canChangeToken(userID, token string) error { method Token (line 1025) | func (a *Manager) Token(userID, token string) (*Token, error) { method Tokens (line 1035) | func (a *Manager) Tokens(userID string) ([]*Token, error) { method allProvisionedTokens (line 1054) | func (a *Manager) allProvisionedTokens() ([]*Token, error) { method RemoveExpiredTokens (line 1074) | func (a *Manager) RemoveExpiredTokens() error { method EnqueueTokenUpdate (line 1083) | func (a *Manager) EnqueueTokenUpdate(tokenID string, update *TokenUpda... method writeTokenUpdateQueue (line 1089) | func (a *Manager) writeTokenUpdateQueue() error { method updateTokenLastAccessTx (line 1112) | func (a *Manager) updateTokenLastAccessTx(tx *sql.Tx, token string, la... method readToken (line 1119) | func (a *Manager) readToken(rows *sql.Rows) (*Token, error) { method AddTier (line 1146) | func (a *Manager) AddTier(tier *Tier) error { method UpdateTier (line 1157) | func (a *Manager) UpdateTier(tier *Tier) error { method RemoveTier (line 1165) | func (a *Manager) RemoveTier(code string) error { method Tiers (line 1177) | func (a *Manager) Tiers() ([]*Tier, error) { method Tier (line 1197) | func (a *Manager) Tier(code string) (*Tier, error) { method TierByStripePrice (line 1207) | func (a *Manager) TierByStripePrice(priceID string) (*Tier, error) { method readTier (line 1216) | func (a *Manager) readTier(rows *sql.Rows) (*Tier, error) { method PhoneNumbers (line 1248) | func (a *Manager) PhoneNumbers(userID string) ([]string, error) { method AddPhoneNumber (line 1268) | func (a *Manager) AddPhoneNumber(userID, phoneNumber string) error { method RemovePhoneNumber (line 1279) | func (a *Manager) RemovePhoneNumber(userID, phoneNumber string) error { method readPhoneNumber (line 1284) | func (a *Manager) readPhoneNumber(rows *sql.Rows) (string, error) { method ChangeBilling (line 1298) | func (a *Manager) ChangeBilling(username string, billing *Billing) err... method maybeProvisionUsersAccessAndTokens (line 1306) | func (a *Manager) maybeProvisionUsersAccessAndTokens() error { method removeAllProvisioned (line 1343) | func (a *Manager) removeAllProvisioned() error { method maybeProvisionUsers (line 1360) | func (a *Manager) maybeProvisionUsers(tx *sql.Tx, provisionUsernames [... method maybeProvisionGrants (line 1408) | func (a *Manager) maybeProvisionGrants(tx *sql.Tx) error { method maybeProvisionTokens (line 1435) | func (a *Manager) maybeProvisionTokens(tx *sql.Tx, provisionUsernames ... method Close (line 1469) | func (a *Manager) Close() error { function newManager (line 61) | func newManager(d *db.DB, queries queries, config *Config) (*Manager, er... function isUniqueConstraintError (line 1474) | func isUniqueConstraintError(err error) bool { FILE: user/manager_postgres.go constant postgresSelectUsersQuery (line 10) | postgresSelectUsersQuery = ` constant postgresSelectUserByIDQuery (line 21) | postgresSelectUserByIDQuery = ` constant postgresSelectUserByNameQuery (line 27) | postgresSelectUserByNameQuery = ` constant postgresSelectUserByTokenQuery (line 33) | postgresSelectUserByTokenQuery = ` constant postgresSelectUserByStripeCustomerIDQuery (line 40) | postgresSelectUserByStripeCustomerIDQuery = ` constant postgresSelectUsernamesQuery (line 46) | postgresSelectUsernamesQuery = ` constant postgresSelectUserCountQuery (line 56) | postgresSelectUserCountQuery = `SELECT COUNT(*) FROM "user"` constant postgresSelectUserIDFromUsernameQuery (line 57) | postgresSelectUserIDFromUsernameQuery = `SELECT id FROM "user" WHERE use... constant postgresInsertUserQuery (line 58) | postgresInsertUserQuery = `INSERT INTO "user" (id, user_na... constant postgresUpdateUserPassQuery (line 59) | postgresUpdateUserPassQuery = `UPDATE "user" SET pass = $1 WHE... constant postgresUpdateUserRoleQuery (line 60) | postgresUpdateUserRoleQuery = `UPDATE "user" SET role = $1 WHE... constant postgresUpdateUserProvisionedQuery (line 61) | postgresUpdateUserProvisionedQuery = `UPDATE "user" SET provisioned =... constant postgresUpdateUserPrefsQuery (line 62) | postgresUpdateUserPrefsQuery = `UPDATE "user" SET prefs = $1 WH... constant postgresUpdateUserStatsQuery (line 63) | postgresUpdateUserStatsQuery = `UPDATE "user" SET stats_message... constant postgresUpdateUserStatsResetAllQuery (line 64) | postgresUpdateUserStatsResetAllQuery = `UPDATE "user" SET stats_message... constant postgresUpdateUserTierQuery (line 65) | postgresUpdateUserTierQuery = `UPDATE "user" SET tier_id = (SE... constant postgresUpdateUserDeletedQuery (line 66) | postgresUpdateUserDeletedQuery = `UPDATE "user" SET deleted = $1 ... constant postgresDeleteUserQuery (line 67) | postgresDeleteUserQuery = `DELETE FROM "user" WHERE user_n... constant postgresDeleteUserTierQuery (line 68) | postgresDeleteUserTierQuery = `UPDATE "user" SET tier_id = nul... constant postgresDeleteUsersMarkedQuery (line 69) | postgresDeleteUsersMarkedQuery = `DELETE FROM "user" WHERE delete... constant postgresDeleteUsersProvisionedQuery (line 70) | postgresDeleteUsersProvisionedQuery = `DELETE FROM "user" WHERE provis... constant postgresSelectTopicPermsQuery (line 73) | postgresSelectTopicPermsQuery = ` constant postgresSelectUserAllAccessQuery (line 80) | postgresSelectUserAllAccessQuery = ` constant postgresSelectUserAccessQuery (line 85) | postgresSelectUserAccessQuery = ` constant postgresSelectUserReservationsQuery (line 91) | postgresSelectUserReservationsQuery = ` constant postgresSelectUserReservationsCountQuery (line 99) | postgresSelectUserReservationsCountQuery = ` constant postgresSelectUserReservationsOwnerQuery (line 105) | postgresSelectUserReservationsOwnerQuery = ` constant postgresSelectUserHasReservationQuery (line 111) | postgresSelectUserHasReservationQuery = ` constant postgresSelectOtherAccessCountQuery (line 118) | postgresSelectOtherAccessCountQuery = ` constant postgresUpsertUserAccessQuery (line 124) | postgresUpsertUserAccessQuery = ` constant postgresDeleteUserAccessQuery (line 137) | postgresDeleteUserAccessQuery = ` constant postgresDeleteUserAccessProvisionedQuery (line 142) | postgresDeleteUserAccessProvisionedQuery = `DELETE FROM user_access WHER... constant postgresDeleteTopicAccessQuery (line 143) | postgresDeleteTopicAccessQuery = ` constant postgresDeleteAllAccessQuery (line 148) | postgresDeleteAllAccessQuery = `DELETE FROM user_access` constant postgresSelectTokenQuery (line 151) | postgresSelectTokenQuery = `SELECT token, label, last_acc... constant postgresSelectTokensQuery (line 152) | postgresSelectTokensQuery = `SELECT token, label, last_acc... constant postgresSelectTokenCountQuery (line 153) | postgresSelectTokenCountQuery = `SELECT COUNT(*) FROM user_tok... constant postgresSelectAllProvisionedTokensQuery (line 154) | postgresSelectAllProvisionedTokensQuery = `SELECT token, label, last_acc... constant postgresUpsertTokenQuery (line 155) | postgresUpsertTokenQuery = ` constant postgresUpdateTokenQuery (line 161) | postgresUpdateTokenQuery = `UPDATE user_token SET label =... constant postgresUpdateTokenLastAccessQuery (line 162) | postgresUpdateTokenLastAccessQuery = `UPDATE user_token SET last_ac... constant postgresDeleteTokenQuery (line 163) | postgresDeleteTokenQuery = `DELETE FROM user_token WHERE ... constant postgresDeleteProvisionedTokenQuery (line 164) | postgresDeleteProvisionedTokenQuery = `DELETE FROM user_token WHERE ... constant postgresDeleteAllProvisionedTokensQuery (line 165) | postgresDeleteAllProvisionedTokensQuery = `DELETE FROM user_token WHERE ... constant postgresDeleteAllTokenQuery (line 166) | postgresDeleteAllTokenQuery = `DELETE FROM user_token WHERE ... constant postgresDeleteExpiredTokensQuery (line 167) | postgresDeleteExpiredTokensQuery = `DELETE FROM user_token WHERE ... constant postgresDeleteExcessTokensQuery (line 168) | postgresDeleteExcessTokensQuery = ` constant postgresInsertTierQuery (line 181) | postgresInsertTierQuery = ` constant postgresUpdateTierQuery (line 185) | postgresUpdateTierQuery = ` constant postgresSelectTiersQuery (line 190) | postgresSelectTiersQuery = ` constant postgresSelectTierByCodeQuery (line 194) | postgresSelectTierByCodeQuery = ` constant postgresSelectTierByPriceIDQuery (line 199) | postgresSelectTierByPriceIDQuery = ` constant postgresDeleteTierQuery (line 204) | postgresDeleteTierQuery = `DELETE FROM tier WHERE code = $1` constant postgresSelectPhoneNumbersQuery (line 207) | postgresSelectPhoneNumbersQuery = `SELECT phone_number FROM user_phone W... constant postgresInsertPhoneNumberQuery (line 208) | postgresInsertPhoneNumberQuery = `INSERT INTO user_phone (user_id, phon... constant postgresDeletePhoneNumberQuery (line 209) | postgresDeletePhoneNumberQuery = `DELETE FROM user_phone WHERE user_id ... constant postgresUpdateBillingQuery (line 212) | postgresUpdateBillingQuery = ` function NewPostgresManager (line 281) | func NewPostgresManager(d *db.DB, config *Config) (*Manager, error) { FILE: user/manager_postgres_schema.go constant postgresCreateTablesQueries (line 10) | postgresCreateTablesQueries = ` constant postgresCurrentSchemaVersion (line 87) | postgresCurrentSchemaVersion = 6 constant postgresSelectSchemaVersionQuery (line 88) | postgresSelectSchemaVersionQuery = `SELECT version FROM schema_version W... constant postgresInsertSchemaVersionQuery (line 89) | postgresInsertSchemaVersionQuery = `INSERT INTO schema_version (store, v... function setupPostgres (line 92) | func setupPostgres(db *sql.DB) error { function setupNewPostgres (line 105) | func setupNewPostgres(db *sql.DB) error { FILE: user/manager_sqlite.go constant sqliteSelectUsersQuery (line 16) | sqliteSelectUsersQuery = ` constant sqliteSelectUserByIDQuery (line 27) | sqliteSelectUserByIDQuery = ` constant sqliteSelectUserByNameQuery (line 33) | sqliteSelectUserByNameQuery = ` constant sqliteSelectUserByTokenQuery (line 39) | sqliteSelectUserByTokenQuery = ` constant sqliteSelectUserByStripeCustomerIDQuery (line 46) | sqliteSelectUserByStripeCustomerIDQuery = ` constant sqliteSelectUsernamesQuery (line 52) | sqliteSelectUsernamesQuery = ` constant sqliteSelectUserCountQuery (line 62) | sqliteSelectUserCountQuery = `SELECT COUNT(*) FROM user` constant sqliteSelectUserIDFromUsernameQuery (line 63) | sqliteSelectUserIDFromUsernameQuery = `SELECT id FROM user WHERE user = ?` constant sqliteInsertUserQuery (line 64) | sqliteInsertUserQuery = `INSERT INTO user (id, user, pass,... constant sqliteUpdateUserPassQuery (line 65) | sqliteUpdateUserPassQuery = `UPDATE user SET pass = ? WHERE us... constant sqliteUpdateUserRoleQuery (line 66) | sqliteUpdateUserRoleQuery = `UPDATE user SET role = ? WHERE us... constant sqliteUpdateUserProvisionedQuery (line 67) | sqliteUpdateUserProvisionedQuery = `UPDATE user SET provisioned = ? W... constant sqliteUpdateUserPrefsQuery (line 68) | sqliteUpdateUserPrefsQuery = `UPDATE user SET prefs = ? WHERE i... constant sqliteUpdateUserStatsQuery (line 69) | sqliteUpdateUserStatsQuery = `UPDATE user SET stats_messages = ... constant sqliteUpdateUserStatsResetAllQuery (line 70) | sqliteUpdateUserStatsResetAllQuery = `UPDATE user SET stats_messages = ... constant sqliteUpdateUserTierQuery (line 71) | sqliteUpdateUserTierQuery = `UPDATE user SET tier_id = (SELECT... constant sqliteUpdateUserDeletedQuery (line 72) | sqliteUpdateUserDeletedQuery = `UPDATE user SET deleted = ? WHERE... constant sqliteDeleteUserQuery (line 73) | sqliteDeleteUserQuery = `DELETE FROM user WHERE user = ?` constant sqliteDeleteUserTierQuery (line 74) | sqliteDeleteUserTierQuery = `UPDATE user SET tier_id = null WH... constant sqliteDeleteUsersMarkedQuery (line 75) | sqliteDeleteUsersMarkedQuery = `DELETE FROM user WHERE deleted < ?` constant sqliteDeleteUsersProvisionedQuery (line 76) | sqliteDeleteUsersProvisionedQuery = `DELETE FROM user WHERE provisione... constant sqliteSelectTopicPermsQuery (line 79) | sqliteSelectTopicPermsQuery = ` constant sqliteSelectUserAllAccessQuery (line 86) | sqliteSelectUserAllAccessQuery = ` constant sqliteSelectUserAccessQuery (line 91) | sqliteSelectUserAccessQuery = ` constant sqliteSelectUserReservationsQuery (line 97) | sqliteSelectUserReservationsQuery = ` constant sqliteSelectUserReservationsCountQuery (line 105) | sqliteSelectUserReservationsCountQuery = ` constant sqliteSelectUserReservationsOwnerQuery (line 111) | sqliteSelectUserReservationsOwnerQuery = ` constant sqliteSelectUserHasReservationQuery (line 117) | sqliteSelectUserHasReservationQuery = ` constant sqliteSelectOtherAccessCountQuery (line 124) | sqliteSelectOtherAccessCountQuery = ` constant sqliteUpsertUserAccessQuery (line 130) | sqliteUpsertUserAccessQuery = ` constant sqliteDeleteUserAccessQuery (line 136) | sqliteDeleteUserAccessQuery = ` constant sqliteDeleteUserAccessProvisionedQuery (line 141) | sqliteDeleteUserAccessProvisionedQuery = `DELETE FROM user_access WHERE ... constant sqliteDeleteTopicAccessQuery (line 142) | sqliteDeleteTopicAccessQuery = ` constant sqliteDeleteAllAccessQuery (line 147) | sqliteDeleteAllAccessQuery = `DELETE FROM user_access` constant sqliteSelectTokenQuery (line 150) | sqliteSelectTokenQuery = `SELECT token, label, last_acces... constant sqliteSelectTokensQuery (line 151) | sqliteSelectTokensQuery = `SELECT token, label, last_acces... constant sqliteSelectTokenCountQuery (line 152) | sqliteSelectTokenCountQuery = `SELECT COUNT(*) FROM user_token... constant sqliteSelectAllProvisionedTokensQuery (line 153) | sqliteSelectAllProvisionedTokensQuery = `SELECT token, label, last_acces... constant sqliteUpsertTokenQuery (line 154) | sqliteUpsertTokenQuery = ` constant sqliteUpdateTokenQuery (line 160) | sqliteUpdateTokenQuery = `UPDATE user_token SET label = ?... constant sqliteUpdateTokenLastAccessQuery (line 161) | sqliteUpdateTokenLastAccessQuery = `UPDATE user_token SET last_acce... constant sqliteDeleteTokenQuery (line 162) | sqliteDeleteTokenQuery = `DELETE FROM user_token WHERE us... constant sqliteDeleteProvisionedTokenQuery (line 163) | sqliteDeleteProvisionedTokenQuery = `DELETE FROM user_token WHERE to... constant sqliteDeleteAllProvisionedTokensQuery (line 164) | sqliteDeleteAllProvisionedTokensQuery = `DELETE FROM user_token WHERE pr... constant sqliteDeleteAllTokenQuery (line 165) | sqliteDeleteAllTokenQuery = `DELETE FROM user_token WHERE us... constant sqliteDeleteExpiredTokensQuery (line 166) | sqliteDeleteExpiredTokensQuery = `DELETE FROM user_token WHERE ex... constant sqliteDeleteExcessTokensQuery (line 167) | sqliteDeleteExcessTokensQuery = ` constant sqliteInsertTierQuery (line 180) | sqliteInsertTierQuery = ` constant sqliteUpdateTierQuery (line 184) | sqliteUpdateTierQuery = ` constant sqliteSelectTiersQuery (line 189) | sqliteSelectTiersQuery = ` constant sqliteSelectTierByCodeQuery (line 193) | sqliteSelectTierByCodeQuery = ` constant sqliteSelectTierByPriceIDQuery (line 198) | sqliteSelectTierByPriceIDQuery = ` constant sqliteDeleteTierQuery (line 203) | sqliteDeleteTierQuery = `DELETE FROM tier WHERE code = ?` constant sqliteSelectPhoneNumbersQuery (line 206) | sqliteSelectPhoneNumbersQuery = `SELECT phone_number FROM user_phone WHE... constant sqliteInsertPhoneNumberQuery (line 207) | sqliteInsertPhoneNumberQuery = `INSERT INTO user_phone (user_id, phone_... constant sqliteDeletePhoneNumberQuery (line 208) | sqliteDeletePhoneNumberQuery = `DELETE FROM user_phone WHERE user_id = ... constant sqliteUpdateBillingQuery (line 211) | sqliteUpdateBillingQuery = ` function NewSQLiteManager (line 279) | func NewSQLiteManager(filename, startupQueries string, config *Config) (... FILE: user/manager_sqlite_schema.go constant sqliteCreateTablesQueries (line 14) | sqliteCreateTablesQueries = ` constant sqliteBuiltinStartupQueries (line 99) | sqliteBuiltinStartupQueries = `PRAGMA foreign_keys = ON;` constant sqliteCurrentSchemaVersion (line 104) | sqliteCurrentSchemaVersion = 6 constant sqliteInsertSchemaVersionQuery (line 105) | sqliteInsertSchemaVersionQuery = `INSERT INTO schemaVersion VALUES (1, ?)` constant sqliteUpdateSchemaVersionQuery (line 106) | sqliteUpdateSchemaVersionQuery = `UPDATE schemaVersion SET version = ? W... constant sqliteSelectSchemaVersionQuery (line 107) | sqliteSelectSchemaVersionQuery = `SELECT version FROM schemaVersion WHER... constant sqliteMigrate1To2CreateTablesQueries (line 113) | sqliteMigrate1To2CreateTablesQueries = ` constant sqliteMigrate1To2SelectAllOldUsernamesNoTxQuery (line 181) | sqliteMigrate1To2SelectAllOldUsernamesNoTxQuery = `SELECT user FROM user... constant sqliteMigrate1To2InsertUserNoTxQuery (line 182) | sqliteMigrate1To2InsertUserNoTxQuery = ` constant sqliteMigrate1To2InsertFromOldTablesAndDropNoTxQuery (line 186) | sqliteMigrate1To2InsertFromOldTablesAndDropNoTxQuery = ` constant sqliteMigrate2To3UpdateQueries (line 197) | sqliteMigrate2To3UpdateQueries = ` constant sqliteMigrate3To4UpdateQueries (line 207) | sqliteMigrate3To4UpdateQueries = ` constant sqliteMigrate4To5UpdateQueries (line 219) | sqliteMigrate4To5UpdateQueries = ` constant sqliteMigrate5To6UpdateQueries (line 224) | sqliteMigrate5To6UpdateQueries = ` function setupSQLite (line 328) | func setupSQLite(db *sql.DB) error { function setupNewSQLite (line 349) | func setupNewSQLite(sqlDB *sql.DB) error { function runSQLiteStartupQueries (line 361) | func runSQLiteStartupQueries(db *sql.DB, startupQueries string) error { function sqliteMigrateFrom1 (line 373) | func sqliteMigrateFrom1(sqlDB *sql.DB) error { function sqliteMigrateFrom2 (line 415) | func sqliteMigrateFrom2(sqlDB *sql.DB) error { function sqliteMigrateFrom3 (line 428) | func sqliteMigrateFrom3(sqlDB *sql.DB) error { function sqliteMigrateFrom4 (line 441) | func sqliteMigrateFrom4(sqlDB *sql.DB) error { function sqliteMigrateFrom5 (line 454) | func sqliteMigrateFrom5(sqlDB *sql.DB) error { FILE: user/manager_test.go constant minBcryptTimingMillis (line 20) | minBcryptTimingMillis = int64(40) type newManagerFunc (line 26) | type newManagerFunc function forEachBackend (line 28) | func forEachBackend(t *testing.T, f func(t *testing.T, newManager newMan... function TestManager_FullScenario_Default_DenyAll (line 49) | func TestManager_FullScenario_Default_DenyAll(t *testing.T) { function TestManager_Access_Order_LengthWriteRead (line 164) | func TestManager_Access_Order_LengthWriteRead(t *testing.T) { function TestManager_AddUser_Invalid (line 181) | func TestManager_AddUser_Invalid(t *testing.T) { function TestManager_AddUser_Timing (line 189) | func TestManager_AddUser_Timing(t *testing.T) { function TestManager_AddUser_And_Query (line 196) | func TestManager_AddUser_And_Query(t *testing.T) { function TestManager_MarkUserRemoved_RemoveDeletedUsers (line 223) | func TestManager_MarkUserRemoved_RemoveDeletedUsers(t *testing.T) { function TestManager_CreateToken_Only_Lower (line 276) | func TestManager_CreateToken_Only_Lower(t *testing.T) { function TestManager_UserManagement (line 291) | func TestManager_UserManagement(t *testing.T) { function TestManager_ChangePassword (line 384) | func TestManager_ChangePassword(t *testing.T) { function TestManager_ChangeRole (line 410) | func TestManager_ChangeRole(t *testing.T) { function TestManager_Reservations (line 437) | func TestManager_Reservations(t *testing.T) { function TestManager_ChangeRoleFromTierUserToAdmin (line 509) | func TestManager_ChangeRoleFromTierUserToAdmin(t *testing.T) { function TestManager_Token_Valid (line 570) | func TestManager_Token_Valid(t *testing.T) { function TestManager_Token_Invalid (line 616) | func TestManager_Token_Invalid(t *testing.T) { function TestManager_Token_NotFound (line 631) | func TestManager_Token_NotFound(t *testing.T) { function TestManager_Token_Expire (line 639) | func TestManager_Token_Expire(t *testing.T) { function TestManager_Token_Extend (line 689) | func TestManager_Token_Extend(t *testing.T) { function TestManager_Token_MaxCount_AutoDelete (line 718) | func TestManager_Token_MaxCount_AutoDelete(t *testing.T) { function TestManager_EnqueueStats_ResetStats (line 790) | func TestManager_EnqueueStats_ResetStats(t *testing.T) { function TestManager_EnqueueTokenUpdate (line 838) | func TestManager_EnqueueTokenUpdate(t *testing.T) { function TestManager_ChangeSettings (line 877) | func TestManager_ChangeSettings(t *testing.T) { function TestManager_Tier_Create_Update_List_Delete (line 924) | func TestManager_Tier_Create_Update_List_Delete(t *testing.T) { function TestAccount_Tier_Create_With_ID (line 1044) | func TestAccount_Tier_Create_With_ID(t *testing.T) { function TestManager_Tier_Change_And_Reset (line 1059) | func TestManager_Tier_Change_And_Reset(t *testing.T) { function TestUser_PhoneNumberAddListRemove (line 1098) | func TestUser_PhoneNumberAddListRemove(t *testing.T) { function TestUser_PhoneNumberAdd_Multiple_Users_Same_Number (line 1125) | func TestUser_PhoneNumberAdd_Multiple_Users_Same_Number(t *testing.T) { function TestManager_Topic_Wildcard_With_Asterisk_Underscore (line 1140) | func TestManager_Topic_Wildcard_With_Asterisk_Underscore(t *testing.T) { function TestManager_Topic_Wildcard_With_Underscore (line 1154) | func TestManager_Topic_Wildcard_With_Underscore(t *testing.T) { function TestManager_WithProvisionedUsers (line 1165) | func TestManager_WithProvisionedUsers(t *testing.T) { function TestManager_WithProvisionedUsers_RemoveToken (line 1318) | func TestManager_WithProvisionedUsers_RemoveToken(t *testing.T) { function TestManager_UpdateNonProvisionedUsersToProvisionedUsers (line 1365) | func TestManager_UpdateNonProvisionedUsersToProvisionedUsers(t *testing.... function TestManager_RemoveProvisionedOnEmptyConfig (line 1445) | func TestManager_RemoveProvisionedOnEmptyConfig(t *testing.T) { function TestToFromSQLWildcard (line 1493) | func TestToFromSQLWildcard(t *testing.T) { function TestMigrationFrom1 (line 1507) | func TestMigrationFrom1(t *testing.T) { function TestMigrationFrom4 (line 1592) | func TestMigrationFrom4(t *testing.T) { function checkSchemaVersion (line 1738) | func checkSchemaVersion(t *testing.T, d *db.DB) { function newTestManager (line 1749) | func newTestManager(t *testing.T, newManager newManagerFunc, defaultAcce... function newTestManagerFromFile (line 1759) | func newTestManagerFromFile(t *testing.T, filename, startupQueries strin... function newTestManagerFromConfig (line 1769) | func newTestManagerFromConfig(t *testing.T, newManager newManagerFunc, c... function testDB (line 1775) | func testDB(a *Manager) *db.DB { function forEachStoreBackend (line 1779) | func forEachStoreBackend(t *testing.T, f func(t *testing.T, manager *Man... function TestStoreAddUser (line 1794) | func TestStoreAddUser(t *testing.T) { function TestStoreAddUserAlreadyExists (line 1807) | func TestStoreAddUserAlreadyExists(t *testing.T) { function TestStoreRemoveUser (line 1814) | func TestStoreRemoveUser(t *testing.T) { function TestStoreUserByID (line 1827) | func TestStoreUserByID(t *testing.T) { function TestStoreUserByToken (line 1840) | func TestStoreUserByToken(t *testing.T) { function TestStoreUserByStripeCustomer (line 1856) | func TestStoreUserByStripeCustomer(t *testing.T) { function TestStoreUsers (line 1871) | func TestStoreUsers(t *testing.T) { function TestStoreUsersCount (line 1882) | func TestStoreUsersCount(t *testing.T) { function TestStoreChangePassword (line 1895) | func TestStoreChangePassword(t *testing.T) { function TestStoreChangeRole (line 1909) | func TestStoreChangeRole(t *testing.T) { function TestStoreTokens (line 1923) | func TestStoreTokens(t *testing.T) { function TestStoreTokenChange (line 1951) | func TestStoreTokenChange(t *testing.T) { function TestStoreTokenRemove (line 1970) | func TestStoreTokenRemove(t *testing.T) { function TestStoreTokenRemoveExpired (line 1985) | func TestStoreTokenRemoveExpired(t *testing.T) { function TestStoreTokenUpdateLastAccess (line 2010) | func TestStoreTokenUpdateLastAccess(t *testing.T) { function TestStoreAllowAccess (line 2025) | func TestStoreAllowAccess(t *testing.T) { function TestStoreAllowAccessReadOnly (line 2038) | func TestStoreAllowAccessReadOnly(t *testing.T) { function TestStoreResetAccess (line 2051) | func TestStoreResetAccess(t *testing.T) { function TestStoreResetAccessAll (line 2069) | func TestStoreResetAccessAll(t *testing.T) { function TestStoreAuthorizeTopicAccess (line 2082) | func TestStoreAuthorizeTopicAccess(t *testing.T) { function TestStoreAuthorizeTopicAccessNotFound (line 2095) | func TestStoreAuthorizeTopicAccessNotFound(t *testing.T) { function TestStoreAuthorizeTopicAccessDenyAll (line 2105) | func TestStoreAuthorizeTopicAccessDenyAll(t *testing.T) { function TestStoreReservations (line 2118) | func TestStoreReservations(t *testing.T) { function TestStoreReservationsCount (line 2133) | func TestStoreReservationsCount(t *testing.T) { function TestStoreHasReservation (line 2145) | func TestStoreHasReservation(t *testing.T) { function TestStoreReservationOwner (line 2160) | func TestStoreReservationOwner(t *testing.T) { function TestStoreAddReservationWithLimit (line 2175) | func TestStoreAddReservationWithLimit(t *testing.T) { function TestStoreTiers (line 2195) | func TestStoreTiers(t *testing.T) { function TestStoreTierUpdate (line 2232) | func TestStoreTierUpdate(t *testing.T) { function TestStoreTierRemove (line 2252) | func TestStoreTierRemove(t *testing.T) { function TestStoreTierByStripePrice (line 2271) | func TestStoreTierByStripePrice(t *testing.T) { function TestStoreChangeTier (line 2292) | func TestStoreChangeTier(t *testing.T) { function TestStorePhoneNumbers (line 2310) | func TestStorePhoneNumbers(t *testing.T) { function TestStoreChangeSettings (line 2331) | func TestStoreChangeSettings(t *testing.T) { function TestStoreChangeBilling (line 2348) | func TestStoreChangeBilling(t *testing.T) { function TestStoreUpdateStats (line 2365) | func TestStoreUpdateStats(t *testing.T) { function TestStoreResetStats (line 2382) | func TestStoreResetStats(t *testing.T) { function TestStoreMarkUserRemoved (line 2400) | func TestStoreMarkUserRemoved(t *testing.T) { function TestStoreRemoveDeletedUsers (line 2414) | func TestStoreRemoveDeletedUsers(t *testing.T) { function TestStoreAllGrants (line 2431) | func TestStoreAllGrants(t *testing.T) { function TestStoreOtherAccessCount (line 2450) | func TestStoreOtherAccessCount(t *testing.T) { FILE: user/types.go type User (line 14) | type User struct method TierID (line 31) | func (u *User) TierID() string { method IsAdmin (line 39) | func (u *User) IsAdmin() bool { method IsUser (line 44) | func (u *User) IsUser() bool { type Auther (line 49) | type Auther interface type Token (line 61) | type Token struct type TokenUpdate (line 71) | type TokenUpdate struct type Prefs (line 77) | type Prefs struct type Tier (line 84) | type Tier struct method Context (line 102) | func (t *Tier) Context() log.Context { type Subscription (line 112) | type Subscription struct method Context (line 119) | func (s *Subscription) Context() log.Context { type NotificationPrefs (line 127) | type NotificationPrefs struct type Stats (line 134) | type Stats struct type Billing (line 141) | type Billing struct type Grant (line 151) | type Grant struct type Reservation (line 158) | type Reservation struct type Permission (line 165) | type Permission method IsRead (line 204) | func (p Permission) IsRead() bool { method IsWrite (line 209) | func (p Permission) IsWrite() bool { method IsReadWrite (line 214) | func (p Permission) IsReadWrite() bool { method String (line 219) | func (p Permission) String() string { constant PermissionDenyAll (line 169) | PermissionDenyAll Permission = iota constant PermissionRead (line 170) | PermissionRead constant PermissionWrite (line 171) | PermissionWrite constant PermissionReadWrite (line 172) | PermissionReadWrite function NewPermission (line 176) | func NewPermission(read, write bool) Permission { function ParsePermission (line 188) | func ParsePermission(s string) (Permission, error) { type Role (line 231) | type Role constant RoleAdmin (line 235) | RoleAdmin = Role("admin") constant RoleUser (line 236) | RoleUser = Role("user") constant RoleAnonymous (line 237) | RoleAnonymous = Role("anonymous") constant Everyone (line 242) | Everyone = "*" constant everyoneID (line 243) | everyoneID = "u_everyone" type Config (line 247) | type Config struct type queries (line 279) | type queries struct FILE: user/types_test.go function TestPermission (line 8) | func TestPermission(t *testing.T) { function TestParsePermission (line 20) | func TestParsePermission(t *testing.T) { function TestAllowedTier (line 45) | func TestAllowedTier(t *testing.T) { function TestTierContext (line 50) | func TestTierContext(t *testing.T) { function TestUsernameRegex (line 65) | func TestUsernameRegex(t *testing.T) { FILE: user/util.go function AllowedRole (line 21) | func AllowedRole(role Role) bool { function AllowedUsername (line 26) | func AllowedUsername(username string) bool { function AllowedTopic (line 31) | func AllowedTopic(topic string) bool { function AllowedTopicPattern (line 36) | func AllowedTopicPattern(topic string) bool { function AllowedTier (line 41) | func AllowedTier(tier string) bool { function ValidPasswordHash (line 46) | func ValidPasswordHash(hash string, minCost int) error { function ValidToken (line 60) | func ValidToken(token string) bool { function GenerateToken (line 66) | func GenerateToken() string { function HashPassword (line 71) | func HashPassword(password string) (string, error) { function hashPassword (line 75) | func hashPassword(password string, cost int) (string, error) { function nullString (line 83) | func nullString(s string) sql.NullString { function nullInt64 (line 90) | func nullInt64(v int64) sql.NullInt64 { function toSQLWildcard (line 99) | func toSQLWildcard(s string) string { function fromSQLWildcard (line 105) | func fromSQLWildcard(s string) string { function escapeUnderscore (line 109) | func escapeUnderscore(s string) string { function unescapeUnderscore (line 113) | func unescapeUnderscore(s string) string { FILE: user/util_test.go function TestAllowedRole (line 9) | func TestAllowedRole(t *testing.T) { function TestAllowedTopic (line 18) | func TestAllowedTopic(t *testing.T) { function TestAllowedTopicPattern (line 52) | func TestAllowedTopicPattern(t *testing.T) { function TestValidPasswordHash (line 90) | func TestValidPasswordHash(t *testing.T) { function TestValidToken (line 119) | func TestValidToken(t *testing.T) { function TestGenerateToken (line 150) | func TestGenerateToken(t *testing.T) { function TestHashPassword (line 175) | func TestHashPassword(t *testing.T) { function TestHashPassword_WithCost (line 201) | func TestHashPassword_WithCost(t *testing.T) { function TestUser_TierID (line 223) | func TestUser_TierID(t *testing.T) { function TestUser_IsAdmin (line 244) | func TestUser_IsAdmin(t *testing.T) { function TestUser_IsUser (line 260) | func TestUser_IsUser(t *testing.T) { function TestPermission_String (line 276) | func TestPermission_String(t *testing.T) { FILE: util/batching_queue.go type BatchingQueue (line 26) | type BatchingQueue struct function NewBatchingQueue (line 35) | func NewBatchingQueue[T any](batchSize int, timeout time.Duration) *Batc... method Enqueue (line 48) | func (q *BatchingQueue[T]) Enqueue(element T) { method Dequeue (line 62) | func (q *BatchingQueue[T]) Dequeue() <-chan []T { method dequeueAll (line 66) | func (q *BatchingQueue[T]) dequeueAll() []T { method timeoutTicker (line 73) | func (q *BatchingQueue[T]) timeoutTicker() { FILE: util/batching_queue_test.go function TestBatchingQueue_InfTimeout (line 12) | func TestBatchingQueue_InfTimeout(t *testing.T) { function TestBatchingQueue_WithTimeout (line 34) | func TestBatchingQueue_WithTimeout(t *testing.T) { FILE: util/content_type_writer.go type ContentTypeWriter (line 13) | type ContentTypeWriter struct method Write (line 24) | func (w *ContentTypeWriter) Write(p []byte) (n int, err error) { function NewContentTypeWriter (line 20) | func NewContentTypeWriter(w http.ResponseWriter, filename string) *Conte... FILE: util/content_type_writer_test.go function TestSniffWriter_WriteHTML (line 10) | func TestSniffWriter_WriteHTML(t *testing.T) { function TestSniffWriter_WriteTwoWriteCalls (line 17) | func TestSniffWriter_WriteTwoWriteCalls(t *testing.T) { function TestSniffWriter_NoSniffWriterWriteHTML (line 25) | func TestSniffWriter_NoSniffWriterWriteHTML(t *testing.T) { function TestSniffWriter_WriteHTMLSplitIntoTwoWrites (line 33) | func TestSniffWriter_WriteHTMLSplitIntoTwoWrites(t *testing.T) { function TestSniffWriter_WriteUnknownMimeType (line 43) | func TestSniffWriter_WriteUnknownMimeType(t *testing.T) { function TestSniffWriter_WriteWithFilenameAPK (line 52) | func TestSniffWriter_WriteWithFilenameAPK(t *testing.T) { FILE: util/embedfs.go type CachingEmbedFS (line 21) | type CachingEmbedFS struct method Open (line 27) | func (f CachingEmbedFS) Open(name string) (fs.File, error) { type cachingEmbedFile (line 39) | type cachingEmbedFile struct method Stat (line 45) | func (f cachingEmbedFile) Stat() (fs.FileInfo, error) { method Read (line 49) | func (f cachingEmbedFile) Read(bytes []byte) (int, error) { method Seek (line 53) | func (f *cachingEmbedFile) Seek(offset int64, whence int) (int64, erro... method ModTime (line 60) | func (f cachingEmbedFile) ModTime() time.Time { method Close (line 64) | func (f cachingEmbedFile) Close() error { FILE: util/embedfs_test.go function TestCachingEmbedFS (line 20) | func TestCachingEmbedFS(t *testing.T) { function TestCachingEmbedFS_Range (line 36) | func TestCachingEmbedFS_Range(t *testing.T) { FILE: util/gzip_handler.go function Gzip (line 13) | func Gzip(next http.Handler) http.Handler { type gzipResponseWriter (line 39) | type gzipResponseWriter struct method WriteHeader (line 44) | func (w *gzipResponseWriter) WriteHeader(status int) { method Write (line 49) | func (w *gzipResponseWriter) Write(b []byte) (int, error) { FILE: util/gzip_handler_test.go function TestGzipHandler (line 12) | func TestGzipHandler(t *testing.T) { function TestGzipHandler_NoGzip (line 28) | func TestGzipHandler_NoGzip(t *testing.T) { FILE: util/limit.go type Limiter (line 15) | type Limiter interface type FixedLimiter (line 31) | type FixedLimiter struct method Allow (line 54) | func (l *FixedLimiter) Allow() bool { method AllowN (line 60) | func (l *FixedLimiter) AllowN(n int64) bool { method Value (line 71) | func (l *FixedLimiter) Value() int64 { method Reset (line 78) | func (l *FixedLimiter) Reset() { function NewFixedLimiter (line 40) | func NewFixedLimiter(limit int64) *FixedLimiter { function NewFixedLimiterWithValue (line 45) | func NewFixedLimiterWithValue(limit, value int64) *FixedLimiter { type RateLimiter (line 85) | type RateLimiter struct method Allow (line 121) | func (l *RateLimiter) Allow() bool { method AllowN (line 127) | func (l *RateLimiter) AllowN(n int64) bool { method Value (line 141) | func (l *RateLimiter) Value() int64 { method Reset (line 148) | func (l *RateLimiter) Reset() { function NewRateLimiter (line 96) | func NewRateLimiter(r rate.Limit, b int) *RateLimiter { function NewRateLimiterWithValue (line 104) | func NewRateLimiterWithValue(r rate.Limit, b int, value int64) *RateLimi... function NewBytesLimiter (line 115) | func NewBytesLimiter(bytes int, interval time.Duration) *RateLimiter { type LimitWriter (line 158) | type LimitWriter struct method Write (line 174) | func (w *LimitWriter) Write(p []byte) (n int, err error) { function NewLimitWriter (line 166) | func NewLimitWriter(w io.Writer, limiters ...Limiter) *LimitWriter { FILE: util/limit_test.go function TestFixedLimiter_AllowValueReset (line 10) | func TestFixedLimiter_AllowValueReset(t *testing.T) { function TestFixedLimiter_AddSub (line 28) | func TestFixedLimiter_AddSub(t *testing.T) { function TestBytesLimiter_Add_Simple (line 40) | func TestBytesLimiter_Add_Simple(t *testing.T) { function TestBytesLimiter_Add_Wait (line 52) | func TestBytesLimiter_Add_Wait(t *testing.T) { function TestLimitWriter_WriteNoLimiter (line 60) | func TestLimitWriter_WriteNoLimiter(t *testing.T) { function TestLimitWriter_WriteOneLimiter (line 74) | func TestLimitWriter_WriteOneLimiter(t *testing.T) { function TestLimitWriter_WriteTwoLimiters (line 92) | func TestLimitWriter_WriteTwoLimiters(t *testing.T) { function TestLimitWriter_WriteTwoDifferentLimiters (line 114) | func TestLimitWriter_WriteTwoDifferentLimiters(t *testing.T) { function TestLimitWriter_WriteTwoDifferentLimiters_Wait (line 125) | func TestLimitWriter_WriteTwoDifferentLimiters_Wait(t *testing.T) { function TestLimitWriter_WriteTwoDifferentLimiters_Wait_FixedLimiterFail (line 139) | func TestLimitWriter_WriteTwoDifferentLimiters_Wait_FixedLimiterFail(t *... FILE: util/lookup_cache.go type LookupCache (line 21) | type LookupCache struct type LookupFunc (line 31) | type LookupFunc function NewLookupCache (line 34) | func NewLookupCache[T any](lookup LookupFunc[T], ttl time.Duration) *Loo... method Value (line 43) | func (c *LookupCache[T]) Value() (T, error) { FILE: util/lookup_cache_test.go function TestLookupCache_Success (line 10) | func TestLookupCache_Success(t *testing.T) { function TestLookupCache_Error (line 46) | func TestLookupCache_Error(t *testing.T) { FILE: util/peek.go type PeekedReadCloser (line 14) | type PeekedReadCloser struct method Read (line 43) | func (r *PeekedReadCloser) Read(p []byte) (n int, err error) { method Close (line 57) | func (r *PeekedReadCloser) Close() error { function Peek (line 24) | func Peek(underlying io.ReadCloser, limit int) (*PeekedReadCloser, error) { FILE: util/peek_test.go function TestPeak_LimitReached (line 10) | func TestPeak_LimitReached(t *testing.T) { function TestPeak_LimitNotReached (line 28) | func TestPeak_LimitNotReached(t *testing.T) { function TestPeak_Nil (line 43) | func TestPeak_Nil(t *testing.T) { FILE: util/sprig/crypto.go function sha512sum (line 16) | func sha512sum(input string) string { function sha256sum (line 25) | func sha256sum(input string) string { function sha1sum (line 35) | func sha1sum(input string) string { function adler32sum (line 44) | func adler32sum(input string) string { FILE: util/sprig/crypto_test.go function TestSha512Sum (line 7) | func TestSha512Sum(t *testing.T) { function TestSha256Sum (line 14) | func TestSha256Sum(t *testing.T) { function TestSha1Sum (line 21) | func TestSha1Sum(t *testing.T) { function TestAdler32Sum (line 28) | func TestAdler32Sum(t *testing.T) { FILE: util/sprig/date.go function date (line 18) | func date(fmt string, date any) string { function htmlDate (line 30) | func htmlDate(date any) string { function htmlDateInZone (line 44) | func htmlDateInZone(date any, zone string) string { function dateInZone (line 59) | func dateInZone(fmt string, date any, zone string) string { function dateModify (line 91) | func dateModify(fmt string, date time.Time) time.Time { function mustDateModify (line 108) | func mustDateModify(fmt string, date time.Time) (time.Time, error) { function dateAgo (line 124) | func dateAgo(date any) string { function duration (line 145) | func duration(sec any) string { function durationRound (line 167) | func durationRound(duration any) string { function toDate (line 214) | func toDate(fmt, str string) time.Time { function mustToDate (line 228) | func mustToDate(fmt, str string) (time.Time, error) { function unixEpoch (line 238) | func unixEpoch(date time.Time) string { FILE: util/sprig/date_test.go function TestHtmlDate (line 8) | func TestHtmlDate(t *testing.T) { function TestAgo (line 16) | func TestAgo(t *testing.T) { function TestToDate (line 31) | func TestToDate(t *testing.T) { function TestUnixEpoch (line 38) | func TestUnixEpoch(t *testing.T) { function TestDateInZone (line 50) | func TestDateInZone(t *testing.T) { function TestDuration (line 95) | func TestDuration(t *testing.T) { function TestDurationRound (line 109) | func TestDurationRound(t *testing.T) { FILE: util/sprig/defaults.go function defaultValue (line 21) | func defaultValue(d any, given ...any) any { function empty (line 44) | func empty(given any) bool { function coalesce (line 80) | func coalesce(v ...any) any { function all (line 98) | func all(v ...any) bool { function anyNonEmpty (line 111) | func anyNonEmpty(v ...any) bool { function fromJSON (line 129) | func fromJSON(v string) any { function mustFromJSON (line 143) | func mustFromJSON(v string) (any, error) { function toJSON (line 158) | func toJSON(v any) string { function mustToJSON (line 172) | func mustToJSON(v any) (string, error) { function toPrettyJSON (line 189) | func toPrettyJSON(v any) string { function mustToPrettyJSON (line 203) | func mustToPrettyJSON(v any) (string, error) { function toRawJSON (line 220) | func toRawJSON(v any) string { function mustToRawJSON (line 238) | func mustToRawJSON(v any) (string, error) { function ternary (line 259) | func ternary(vt any, vf any, v bool) any { FILE: util/sprig/defaults_test.go function TestDefault (line 9) | func TestDefault(t *testing.T) { function TestEmpty (line 33) | func TestEmpty(t *testing.T) { function TestCoalesce (line 67) | func TestCoalesce(t *testing.T) { function TestAll (line 87) | func TestAll(t *testing.T) { function TestAny (line 107) | func TestAny(t *testing.T) { function TestFromJSON (line 127) | func TestFromJSON(t *testing.T) { function TestToJSON (line 143) | func TestToJSON(t *testing.T) { function TestToPrettyJSON (line 153) | func TestToPrettyJSON(t *testing.T) { function TestToRawJSON (line 166) | func TestToRawJSON(t *testing.T) { function TestTernary (line 176) | func TestTernary(t *testing.T) { FILE: util/sprig/dict.go function get (line 13) | func get(d map[string]any, key string) any { function set (line 30) | func set(d map[string]any, key string, value any) map[string]any { function unset (line 45) | func unset(d map[string]any, key string) map[string]any { function hasKey (line 58) | func hasKey(d map[string]any, key string) bool { function pluck (line 72) | func pluck(key string, d ...map[string]any) []any { function keys (line 90) | func keys(dicts ...map[string]any) []string { function pick (line 109) | func pick(dict map[string]any, keys ...string) map[string]any { function omit (line 128) | func omit(dict map[string]any, keys ...string) map[string]any { function dict (line 152) | func dict(v ...any) map[string]any { function values (line 174) | func values(dict map[string]any) []any { function dig (line 198) | func dig(ps ...any) (any, error) { function digFromDict (line 223) | func digFromDict(dict map[string]any, d any, ks []string) (any, error) { FILE: util/sprig/dict_test.go function TestDict (line 8) | func TestDict(t *testing.T) { function TestUnset (line 33) | func TestUnset(t *testing.T) { function TestHasKey (line 44) | func TestHasKey(t *testing.T) { function TestPluck (line 55) | func TestPluck(t *testing.T) { function TestKeys (line 70) | func TestKeys(t *testing.T) { function TestPick (line 83) | func TestPick(t *testing.T) { function TestOmit (line 97) | func TestOmit(t *testing.T) { function TestGet (line 112) | func TestGet(t *testing.T) { function TestSet (line 125) | func TestSet(t *testing.T) { function TestValues (line 140) | func TestValues(t *testing.T) { function TestDig (line 153) | func TestDig(t *testing.T) { FILE: util/sprig/example_test.go function Example (line 9) | func Example() { FILE: util/sprig/flow_control.go function fail (line 6) | func fail(msg string) (string, error) { FILE: util/sprig/flow_control_test.go function TestFail (line 10) | func TestFail(t *testing.T) { FILE: util/sprig/functions.go constant loopExecutionLimit (line 13) | loopExecutionLimit = 10_000 constant stringLengthLimit (line 14) | stringLengthLimit = 100_000 constant sliceSizeLimit (line 15) | sliceSizeLimit = 10_000 function TxtFuncMap (line 25) | func TxtFuncMap() template.FuncMap { FILE: util/sprig/functions_linux_test.go function TestOsBase (line 9) | func TestOsBase(t *testing.T) { function TestOsDir (line 13) | func TestOsDir(t *testing.T) { function TestOsIsAbs (line 17) | func TestOsIsAbs(t *testing.T) { function TestOsClean (line 22) | func TestOsClean(t *testing.T) { function TestOsExt (line 26) | func TestOsExt(t *testing.T) { FILE: util/sprig/functions_test.go function TestBase (line 12) | func TestBase(t *testing.T) { function TestDir (line 16) | func TestDir(t *testing.T) { function TestIsAbs (line 20) | func TestIsAbs(t *testing.T) { function TestClean (line 25) | func TestClean(t *testing.T) { function TestExt (line 29) | func TestExt(t *testing.T) { function TestRegex (line 33) | func TestRegex(t *testing.T) { function runt (line 39) | func runt(tpl, expect string) error { function runtv (line 46) | func runtv(tpl, expect string, vars any) error { function runRaw (line 61) | func runRaw(tpl string, vars any) (string, error) { FILE: util/sprig/list.go function list (line 16) | func list(v ...any) []any { function push (line 23) | func push(list any, v any) []any { function mustPush (line 33) | func mustPush(list any, v any) ([]any, error) { function prepend (line 52) | func prepend(list any, v any) []any { function mustPrepend (line 62) | func mustPrepend(list any, v any) ([]any, error) { function chunk (line 82) | func chunk(size int, list any) [][]any { function mustChunk (line 92) | func mustChunk(size int, list any) ([][]any, error) { function last (line 128) | func last(list any) any { function mustLast (line 139) | func mustLast(list any) (any, error) { function first (line 159) | func first(list any) any { function mustFirst (line 170) | func mustFirst(list any) (any, error) { function rest (line 190) | func rest(list any) []any { function mustRest (line 201) | func mustRest(list any) ([]any, error) { function initial (line 223) | func initial(list any) []any { function mustInitial (line 234) | func mustInitial(list any) ([]any, error) { function sortAlpha (line 256) | func sortAlpha(list any) []string { function reverse (line 270) | func reverse(v any) []any { function mustReverse (line 281) | func mustReverse(v any) ([]any, error) { function compact (line 301) | func compact(list any) []any { function mustCompact (line 311) | func mustCompact(list any) ([]any, error) { function uniq (line 334) | func uniq(list any) []any { function mustUniq (line 344) | func mustUniq(list any) ([]any, error) { function inList (line 367) | func inList(haystack []any, needle any) bool { function without (line 378) | func without(list any, omit ...any) []any { function mustWithout (line 388) | func mustWithout(list any, omit ...any) ([]any, error) { function has (line 411) | func has(needle any, haystack any) bool { function mustHas (line 421) | func mustHas(needle any, haystack any) (bool, error) { function slice (line 452) | func slice(list any, indices ...any) any { function mustSlice (line 462) | func mustSlice(list any, indices ...any) (any, error) { function concat (line 490) | func concat(lists ...any) any { FILE: util/sprig/list_test.go function TestTuple (line 10) | func TestTuple(t *testing.T) { function TestList (line 17) | func TestList(t *testing.T) { function TestPush (line 24) | func TestPush(t *testing.T) { function TestMustPush (line 36) | func TestMustPush(t *testing.T) { function TestChunk (line 48) | func TestChunk(t *testing.T) { function TestMustChunk (line 61) | func TestMustChunk(t *testing.T) { function TestPrepend (line 76) | func TestPrepend(t *testing.T) { function TestMustPrepend (line 87) | func TestMustPrepend(t *testing.T) { function TestFirst (line 98) | func TestFirst(t *testing.T) { function TestMustFirst (line 109) | func TestMustFirst(t *testing.T) { function TestLast (line 120) | func TestLast(t *testing.T) { function TestMustLast (line 131) | func TestMustLast(t *testing.T) { function TestInitial (line 142) | func TestInitial(t *testing.T) { function TestMustInitial (line 155) | func TestMustInitial(t *testing.T) { function TestRest (line 168) | func TestRest(t *testing.T) { function TestMustRest (line 181) | func TestMustRest(t *testing.T) { function TestReverse (line 194) | func TestReverse(t *testing.T) { function TestMustReverse (line 209) | func TestMustReverse(t *testing.T) { function TestCompact (line 224) | func TestCompact(t *testing.T) { function TestMustCompact (line 236) | func TestMustCompact(t *testing.T) { function TestUniq (line 248) | func TestUniq(t *testing.T) { function TestMustUniq (line 262) | func TestMustUniq(t *testing.T) { function TestWithout (line 276) | func TestWithout(t *testing.T) { function TestMustWithout (line 291) | func TestMustWithout(t *testing.T) { function TestHas (line 306) | func TestHas(t *testing.T) { function TestMustHas (line 318) | func TestMustHas(t *testing.T) { function TestSlice (line 330) | func TestSlice(t *testing.T) { function TestMustSlice (line 343) | func TestMustSlice(t *testing.T) { function TestConcat (line 356) | func TestConcat(t *testing.T) { FILE: util/sprig/numeric.go function toFloat64 (line 26) | func toFloat64(v any) float64 { function toInt (line 63) | func toInt(v any) int { function toInt64 (line 76) | func toInt64(v any) int64 { function add1 (line 117) | func add1(i any) int64 { function add (line 129) | func add(i ...any) int64 { function sub (line 146) | func sub(a, b any) int64 { function div (line 163) | func div(a, b any) int64 { function mod (line 179) | func mod(a, b any) int64 { function mul (line 192) | func mul(a any, v ...any) int64 { function randInt (line 211) | func randInt(min, max int) int { function maxAsInt64 (line 224) | func maxAsInt64(a any, i ...any) int64 { function maxAsFloat64 (line 244) | func maxAsFloat64(a any, i ...any) float64 { function minAsInt64 (line 261) | func minAsInt64(a any, i ...any) int64 { function minAsFloat64 (line 281) | func minAsFloat64(a any, i ...any) float64 { function until (line 297) | func until(count int) []int { function untilStep (line 322) | func untilStep(start, stop, step int) []int { function floor (line 357) | func floor(a any) float64 { function ceil (line 369) | func ceil(a any) float64 { function round (line 387) | func round(a any, p int, rOpt ...float64) float64 { function toDecimal (line 415) | func toDecimal(v any) int64 { function atoi (line 431) | func atoi(a string) int { function seq (line 451) | func seq(params ...int) string { function intArrayToString (line 497) | func intArrayToString(slice []int, delimiter string) string { FILE: util/sprig/numeric_test.go function TestUntil (line 10) | func TestUntil(t *testing.T) { function TestUntilStep (line 21) | func TestUntilStep(t *testing.T) { function TestBiggest (line 38) | func TestBiggest(t *testing.T) { function TestMaxf (line 49) | func TestMaxf(t *testing.T) { function TestMin (line 60) | func TestMin(t *testing.T) { function TestMinf (line 72) | func TestMinf(t *testing.T) { function TestToFloat64 (line 84) | func TestToFloat64(t *testing.T) { function TestToInt64 (line 120) | func TestToInt64(t *testing.T) { function TestToInt (line 157) | func TestToInt(t *testing.T) { function TestToDecimal (line 194) | func TestToDecimal(t *testing.T) { function TestAdd1 (line 210) | func TestAdd1(t *testing.T) { function TestAdd (line 217) | func TestAdd(t *testing.T) { function TestDiv (line 224) | func TestDiv(t *testing.T) { function TestMul (line 231) | func TestMul(t *testing.T) { function TestSub (line 238) | func TestSub(t *testing.T) { function TestCeil (line 245) | func TestCeil(t *testing.T) { function TestFloor (line 252) | func TestFloor(t *testing.T) { function TestRound (line 259) | func TestRound(t *testing.T) { function TestRandomInt (line 268) | func TestRandomInt(t *testing.T) { function TestSeq (line 288) | func TestSeq(t *testing.T) { FILE: util/sprig/reflect.go function typeIs (line 17) | func typeIs(target string, src any) bool { function typeIsLike (line 30) | func typeIsLike(target string, src any) bool { function typeOf (line 43) | func typeOf(src any) string { function kindIs (line 56) | func kindIs(target string, src any) bool { function kindOf (line 68) | func kindOf(src any) string { FILE: util/sprig/reflect_test.go type fixtureTO (line 7) | type fixtureTO struct function TestTypeOf (line 11) | func TestTypeOf(t *testing.T) { function TestKindOf (line 19) | func TestKindOf(t *testing.T) { function TestTypeIs (line 38) | func TestTypeIs(t *testing.T) { function TestTypeIsLike (line 50) | func TestTypeIsLike(t *testing.T) { function TestKindIs (line 63) | func TestKindIs(t *testing.T) { FILE: util/sprig/regex.go function regexMatch (line 16) | func regexMatch(regex string, s string) bool { function mustRegexMatch (line 31) | func mustRegexMatch(regex string, s string) (bool, error) { function regexFindAll (line 45) | func regexFindAll(regex string, s string, n int) []string { function mustRegexFindAll (line 61) | func mustRegexFindAll(regex string, s string, n int) ([]string, error) { function regexFind (line 78) | func regexFind(regex string, s string) string { function mustRegexFind (line 93) | func mustRegexFind(regex string, s string) (string, error) { function regexReplaceAll (line 112) | func regexReplaceAll(regex string, s string, repl string) string { function mustRegexReplaceAll (line 129) | func mustRegexReplaceAll(regex string, s string, repl string) (string, e... function regexReplaceAllLiteral (line 148) | func regexReplaceAllLiteral(regex string, s string, repl string) string { function mustRegexReplaceAllLiteral (line 165) | func mustRegexReplaceAllLiteral(regex string, s string, repl string) (st... function regexSplit (line 183) | func regexSplit(regex string, s string, n int) []string { function mustRegexSplit (line 199) | func mustRegexSplit(regex string, s string, n int) ([]string, error) { function regexQuoteMeta (line 215) | func regexQuoteMeta(s string) string { FILE: util/sprig/regex_test.go function TestRegexMatch (line 9) | func TestRegexMatch(t *testing.T) { function TestMustRegexMatch (line 19) | func TestMustRegexMatch(t *testing.T) { function TestRegexFindAll (line 43) | func TestRegexFindAll(t *testing.T) { function TestMustRegexFindAll (line 51) | func TestMustRegexFindAll(t *testing.T) { function TestRegexFindl (line 75) | func TestRegexFindl(t *testing.T) { function TestMustRegexFindl (line 82) | func TestMustRegexFindl(t *testing.T) { function TestRegexReplaceAll (line 102) | func TestRegexReplaceAll(t *testing.T) { function TestMustRegexReplaceAll (line 110) | func TestMustRegexReplaceAll(t *testing.T) { function TestRegexReplaceAllLiteral (line 131) | func TestRegexReplaceAllLiteral(t *testing.T) { function TestMustRegexReplaceAllLiteral (line 138) | func TestMustRegexReplaceAllLiteral(t *testing.T) { function TestRegexSplit (line 158) | func TestRegexSplit(t *testing.T) { function TestMustRegexSplit (line 172) | func TestMustRegexSplit(t *testing.T) { function TestRegexQuoteMeta (line 200) | func TestRegexQuoteMeta(t *testing.T) { FILE: util/sprig/strings.go function base64encode (line 21) | func base64encode(v string) string { function base64decode (line 33) | func base64decode(v string) string { function base32encode (line 48) | func base32encode(v string) string { function base32decode (line 60) | func base32decode(v string) string { function quote (line 76) | func quote(str ...any) string { function squote (line 94) | func squote(str ...any) string { function cat (line 112) | func cat(v ...any) string { function indent (line 126) | func indent(spaces int, v string) string { function nindent (line 140) | func nindent(spaces int, v string) string { function replace (line 153) | func replace(old, new, src string) string { function plural (line 167) | func plural(one, many string, count int) string { function strslice (line 187) | func strslice(v any) []string { function removeNilElements (line 230) | func removeNilElements(v []any) []any { function strval (line 253) | func strval(v any) string { function trunc (line 279) | func trunc(c int, s string) string { function title (line 297) | func title(s string) string { function join (line 310) | func join(sep string, v any) string { function split (line 323) | func split(sep, orig string) map[string]string { function splitList (line 341) | func splitList(sep, orig string) []string { function splitn (line 356) | func splitn(sep string, n int, orig string) map[string]string { function substring (line 380) | func substring(start, end int, s string) string { function repeat (line 403) | func repeat(count int, str string) string { function trimAll (line 421) | func trimAll(a, b string) string { function trimPrefix (line 435) | func trimPrefix(a, b string) string { function trimSuffix (line 449) | func trimSuffix(a, b string) string { function contains (line 461) | func contains(substr string, str string) bool { function hasPrefix (line 473) | func hasPrefix(substr string, str string) bool { function hasSuffix (line 485) | func hasSuffix(substr string, str string) bool { FILE: util/sprig/strings_test.go function TestSubstr (line 12) | func TestSubstr(t *testing.T) { function TestSubstr_shorterString (line 19) | func TestSubstr_shorterString(t *testing.T) { function TestTrunc (line 26) | func TestTrunc(t *testing.T) { function TestQuote (line 45) | func TestQuote(t *testing.T) { function TestSquote (line 64) | func TestSquote(t *testing.T) { function TestContains (line 80) | func TestContains(t *testing.T) { function TestTrim (line 94) | func TestTrim(t *testing.T) { function TestSplit (line 108) | func TestSplit(t *testing.T) { function TestSplitn (line 115) | func TestSplitn(t *testing.T) { function TestToString (line 122) | func TestToString(t *testing.T) { function TestToStrings (line 127) | func TestToStrings(t *testing.T) { function TestJoin (line 137) | func TestJoin(t *testing.T) { function TestSortAlpha (line 146) | func TestSortAlpha(t *testing.T) { function TestBase64EncodeDecode (line 156) | func TestBase64EncodeDecode(t *testing.T) { function TestBase32EncodeDecode (line 173) | func TestBase32EncodeDecode(t *testing.T) { function TestCat (line 191) | func TestCat(t *testing.T) { function TestIndent (line 203) | func TestIndent(t *testing.T) { function TestNindent (line 210) | func TestNindent(t *testing.T) { function TestReplace (line 217) | func TestReplace(t *testing.T) { function TestPlural (line 224) | func TestPlural(t *testing.T) { FILE: util/sprig/url.go function dictGetOrEmpty (line 9) | func dictGetOrEmpty(dict map[string]any, key string) string { function urlParse (line 22) | func urlParse(v string) map[string]any { function urlJoin (line 45) | func urlJoin(d map[string]any) string { FILE: util/sprig/url_test.go function TestUrlParse (line 62) | func TestUrlParse(t *testing.T) { function TestUrlJoin (line 74) | func TestUrlJoin(t *testing.T) { FILE: util/time.go constant timestampFormat (line 18) | timestampFormat = "2006-01-02T15:04:05.999Z07:00" function FormatTime (line 22) | func FormatTime(t time.Time) string { function NextOccurrenceUTC (line 28) | func NextOccurrenceUTC(timeOfDay, base time.Time) time.Time { function ParseFutureTime (line 40) | func ParseFutureTime(s string, now time.Time) (time.Time, error) { function ParseDuration (line 59) | func ParseDuration(s string) (time.Duration, error) { function FormatDuration (line 88) | func FormatDuration(d time.Duration) string { function parseFromDuration (line 104) | func parseFromDuration(s string, now time.Time) (time.Time, error) { function parseUnixTime (line 112) | func parseUnixTime(s string, now time.Time) (time.Time, error) { function parseNaturalTime (line 122) | func parseNaturalTime(s string, now time.Time) (time.Time, error) { FILE: util/time_test.go function TestNextOccurrenceUTC_NextDate (line 14) | func TestNextOccurrenceUTC_NextDate(t *testing.T) { function TestNextOccurrenceUTC_SameDay (line 24) | func TestNextOccurrenceUTC_SameDay(t *testing.T) { function TestParseFutureTime_11am_FutureTime (line 34) | func TestParseFutureTime_11am_FutureTime(t *testing.T) { function TestParseFutureTime_9am_PastTime (line 40) | func TestParseFutureTime_9am_PastTime(t *testing.T) { function TestParseFutureTime_Monday_10_30pm_FutureTime (line 46) | func TestParseFutureTime_Monday_10_30pm_FutureTime(t *testing.T) { function TestParseFutureTime_30m (line 52) | func TestParseFutureTime_30m(t *testing.T) { function TestParseFutureTime_30min (line 58) | func TestParseFutureTime_30min(t *testing.T) { function TestParseFutureTime_3h (line 64) | func TestParseFutureTime_3h(t *testing.T) { function TestParseFutureTime_1day (line 70) | func TestParseFutureTime_1day(t *testing.T) { function TestParseFutureTime_UnixTime (line 76) | func TestParseFutureTime_UnixTime(t *testing.T) { function TestParseDuration (line 82) | func TestParseDuration(t *testing.T) { function TestFormatDuration (line 96) | func TestFormatDuration(t *testing.T) { function TestFormatDuration_Rounded (line 116) | func TestFormatDuration_Rounded(t *testing.T) { FILE: util/timeout_writer.go type TimeoutWriter (line 13) | type TimeoutWriter struct method Write (line 29) | func (tw *TimeoutWriter) Write(p []byte) (n int, err error) { function NewTimeoutWriter (line 20) | func NewTimeoutWriter(w io.Writer, timeout time.Duration) *TimeoutWriter { FILE: util/util.go constant randomStringCharset (line 28) | randomStringCharset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMN... constant randomStringLowerCaseCharset (line 29) | randomStringLowerCaseCharset = "abcdefghijklmnopqrstuvwxyz0123456789" function FileExists (line 47) | func FileExists(filename string) bool { function Contains (line 53) | func Contains[T comparable](haystack []T, needle T) bool { function ContainsIP (line 58) | func ContainsIP(haystack []netip.Prefix, needle netip.Addr) bool { function ContainsAll (line 68) | func ContainsAll[T comparable](haystack []T, needles []T) bool { function SplitNoEmpty (line 78) | func SplitNoEmpty(s string, sep string) []string { function SplitKV (line 90) | func SplitKV(s string, sep string) (key string, value string) { function Map (line 100) | func Map[T any, U any](slice []T, f func(T) U) []U { function Filter (line 110) | func Filter[T any](slice []T, f func(T) bool) []T { function Find (line 122) | func Find[T any](slice []T, f func(T) bool) (T, bool) { function RandomString (line 133) | func RandomString(length int) string { function RandomStringPrefix (line 138) | func RandomStringPrefix(prefix string, length int) string { function RandomLowerStringPrefix (line 143) | func RandomLowerStringPrefix(prefix string, length int) string { function randomStringPrefixWithCharset (line 147) | func randomStringPrefixWithCharset(prefix string, length int, charset st... function ValidRandomString (line 158) | func ValidRandomString(s string, length int) bool { function ParsePriority (line 171) | func ParsePriority(priority string) (int, error) { function PriorityString (line 192) | func PriorityString(priority int) (string, error) { function ShortTopicURL (line 212) | func ShortTopicURL(s string) string { function DetectContentType (line 218) | func DetectContentType(b []byte, filename string) (mimeType string, ext ... function ParseSize (line 231) | func ParseSize(s string) (int64, error) { function FormatSize (line 256) | func FormatSize(b int64) string { function FormatSizeHuman (line 270) | func FormatSizeHuman(b int64) string { function ReadPassword (line 285) | func ReadPassword(in io.Reader) ([]byte, error) { function BasicAuth (line 324) | func BasicAuth(user, pass string) string { function BearerAuth (line 329) | func BearerAuth(token string) string { function MaybeMarshalJSON (line 335) | func MaybeMarshalJSON(v any) string { function QuoteCommand (line 354) | func QuoteCommand(command []string) string { function UnmarshalJSON (line 367) | func UnmarshalJSON[T any](body io.ReadCloser) (*T, error) { function UnmarshalJSONWithLimit (line 376) | func UnmarshalJSONWithLimit[T any](r io.ReadCloser, limit int, allowEmpt... function Retry (line 395) | func Retry[T any](f func() (*T, error), after ...time.Duration) (t *T, e... function MinMax (line 407) | func MinMax[T int | int64](value, min, max T) T { function Max (line 417) | func Max[T int | int64 | rate.Limit](a, b T) T { function String (line 425) | func String(v string) *string { function Int (line 430) | func Int(v int) *int { function Time (line 435) | func Time(v time.Time) *time.Time { function SanitizeUTF8 (line 448) | func SanitizeUTF8(s string) string { FILE: util/util_test.go function TestRandomString (line 18) | func TestRandomString(t *testing.T) { function TestFileExists (line 28) | func TestFileExists(t *testing.T) { function TestInStringList (line 35) | func TestInStringList(t *testing.T) { function TestInStringListAll (line 41) | func TestInStringListAll(t *testing.T) { function TestContains (line 47) | func TestContains(t *testing.T) { function TestContainsAll (line 53) | func TestContainsAll(t *testing.T) { function TestContainsIP (line 58) | func TestContainsIP(t *testing.T) { function TestSplitNoEmpty (line 65) | func TestSplitNoEmpty(t *testing.T) { function TestParsePriority (line 72) | func TestParsePriority(t *testing.T) { function TestParsePriority_Invalid (line 82) | func TestParsePriority_Invalid(t *testing.T) { function TestPriorityString (line 90) | func TestPriorityString(t *testing.T) { function TestPriorityString_Invalid (line 100) | func TestPriorityString_Invalid(t *testing.T) { function TestShortTopicURL (line 105) | func TestShortTopicURL(t *testing.T) { function TestParseSize_10GSuccess (line 111) | func TestParseSize_10GSuccess(t *testing.T) { function TestParseSize_10MUpperCaseSuccess (line 117) | func TestParseSize_10MUpperCaseSuccess(t *testing.T) { function TestParseSize_10kLowerCaseSuccess (line 123) | func TestParseSize_10kLowerCaseSuccess(t *testing.T) { function TestParseSize_FailureInvalid (line 129) | func TestParseSize_FailureInvalid(t *testing.T) { function TestFormatSize (line 134) | func TestFormatSize(t *testing.T) { function TestFormatSize_Rounded (line 152) | func TestFormatSize_Rounded(t *testing.T) { function TestSplitKV (line 156) | func TestSplitKV(t *testing.T) { function TestQuoteCommand (line 170) | func TestQuoteCommand(t *testing.T) { function TestBasicAuth (line 176) | func TestBasicAuth(t *testing.T) { function TestBearerAuth (line 180) | func TestBearerAuth(t *testing.T) { type testJSON (line 184) | type testJSON struct function TestReadJSON_Success (line 189) | func TestReadJSON_Success(t *testing.T) { function TestReadJSON_Failure (line 196) | func TestReadJSON_Failure(t *testing.T) { function TestReadJSONWithLimit_Success (line 201) | func TestReadJSONWithLimit_Success(t *testing.T) { function TestReadJSONWithLimit_FailureTooLong (line 208) | func TestReadJSONWithLimit_FailureTooLong(t *testing.T) { function TestReadJSONWithLimit_AllowEmpty (line 213) | func TestReadJSONWithLimit_AllowEmpty(t *testing.T) { function TestReadJSONWithLimit_NoAllowEmpty (line 220) | func TestReadJSONWithLimit_NoAllowEmpty(t *testing.T) { function TestRetry_Succeeds (line 225) | func TestRetry_Succeeds(t *testing.T) { function TestRetry_Fails (line 241) | func TestRetry_Fails(t *testing.T) { function TestMinMax (line 249) | func TestMinMax(t *testing.T) { function TestMax (line 255) | func TestMax(t *testing.T) { function TestPointerFunctions (line 261) | func TestPointerFunctions(t *testing.T) { function TestMaybeMarshalJSON (line 268) | func TestMaybeMarshalJSON(t *testing.T) { FILE: web/src/app/AccountApi.js class AccountApi (line 28) | class AccountApi { method constructor (line 29) | constructor() { method registerListener (line 35) | registerListener(listener) { method resetListener (line 39) | resetListener() { method login (line 43) | async login(user) { method logout (line 57) | async logout() { method create (line 66) | async create(username, password) { method get (line 79) | async get() { method delete (line 93) | async delete(password) { method changePassword (line 105) | async changePassword(currentPassword, newPassword) { method createToken (line 118) | async createToken(label, expires) { method updateToken (line 132) | async updateToken(token, label, expires) { method extendToken (line 149) | async extendToken() { method deleteToken (line 158) | async deleteToken(token) { method updateSettings (line 167) | async updateSettings(payload) { method addSubscription (line 178) | async addSubscription(baseUrl, topic) { method updateSubscription (line 195) | async updateSubscription(baseUrl, topic, payload) { method deleteSubscription (line 213) | async deleteSubscription(baseUrl, topic) { method upsertReservation (line 226) | async upsertReservation(topic, everyone) { method deleteReservation (line 239) | async deleteReservation(topic, deleteMessages) { method billingTiers (line 251) | async billingTiers() { method createBillingSubscription (line 262) | async createBillingSubscription(tier, interval) { method updateBillingSubscription (line 267) | async updateBillingSubscription(tier, interval) { method upsertBillingSubscription (line 272) | async upsertBillingSubscription(method, tier, interval) { method deleteBillingSubscription (line 285) | async deleteBillingSubscription() { method createBillingPortalSession (line 294) | async createBillingPortalSession() { method verifyPhoneNumber (line 304) | async verifyPhoneNumber(phoneNumber, channel) { method addPhoneNumber (line 317) | async addPhoneNumber(phoneNumber, code) { method deletePhoneNumber (line 330) | async deletePhoneNumber(phoneNumber) { method sync (line 342) | async sync() { method startWorker (line 376) | startWorker() { method stopWorker (line 385) | stopWorker() { method runWorker (line 389) | async runWorker() { FILE: web/src/app/Api.js class Api (line 14) | class Api { method poll (line 15) | async poll(baseUrl, topic, since) { method publish (line 32) | async publish(baseUrl, topic, message, options) { method publishXHR (line 61) | publishXHR(url, body, headers, onProgress) { method topicAuth (line 102) | async topicAuth(baseUrl, topic, user) { method updateWebPush (line 118) | async updateWebPush(pushSubscription, topics) { method deleteWebPush (line 135) | async deleteWebPush(pushSubscription) { FILE: web/src/app/Connection.js class ConnectionState (line 7) | class ConnectionState { class Connection (line 19) | class Connection { method constructor (line 20) | constructor(connectionId, subscriptionId, baseUrl, topic, user, since,... method start (line 35) | start() { method close (line 86) | close() { method wsUrl (line 100) | wsUrl() { method authParam (line 112) | authParam() { FILE: web/src/app/ConnectionManager.js class ConnectionManager (line 13) | class ConnectionManager { method constructor (line 14) | constructor() { method registerStateListener (line 20) | registerStateListener(listener) { method resetStateListener (line 24) | resetStateListener() { method registerMessageListener (line 28) | registerMessageListener(listener) { method resetMessageListener (line 32) | resetMessageListener() { method refresh (line 43) | async refresh(subscriptions, users) { method stateChanged (line 94) | stateChanged(subscriptionId, state) { method notificationReceived (line 104) | notificationReceived(subscriptionId, notification) { FILE: web/src/app/Notifier.js class Notifier (line 10) | class Notifier { method notify (line 13) | async notify(subscription, notification) { method cancel (line 37) | async cancel(subscription, notification) { method playSound (line 53) | async playSound() { method webPushSubscription (line 71) | async webPushSubscription(hasWebPushTopics) { method pushManager (line 92) | async pushManager() { method serviceWorkerRegistration (line 96) | async serviceWorkerRegistration() { method notRequested (line 104) | notRequested() { method granted (line 108) | granted() { method denied (line 112) | denied() { method maybeRequestPermission (line 116) | async maybeRequestPermission() { method supported (line 128) | supported() { method browserSupported (line 132) | browserSupported() { method pushSupported (line 136) | pushSupported() { method pushPossible (line 140) | pushPossible() { method contextSupported (line 148) | contextSupported() { method iosSupportedButInstallRequired (line 153) | iosSupportedButInstallRequired() { FILE: web/src/app/Poller.js class Poller (line 9) | class Poller { method constructor (line 10) | constructor() { method startWorker (line 14) | startWorker() { method stopWorker (line 23) | stopWorker() { method pollAll (line 27) | async pollAll() { method poll (line 42) | async poll(subscription) { method pollInBackground (line 78) | pollInBackground(subscription) { method latestNotificationsBySequenceId (line 92) | latestNotificationsBySequenceId(notifications) { FILE: web/src/app/Prefs.js constant THEME (line 3) | const THEME = { class Prefs (line 9) | class Prefs { method constructor (line 10) | constructor(dbImpl) { method setSound (line 14) | async setSound(sound) { method sound (line 18) | async sound() { method setMinPriority (line 23) | async setMinPriority(minPriority) { method minPriority (line 27) | async minPriority() { method setDeleteAfter (line 32) | async setDeleteAfter(deleteAfter) { method deleteAfter (line 36) | async deleteAfter() { method webPushEnabled (line 41) | async webPushEnabled() { method setWebPushEnabled (line 46) | async setWebPushEnabled(enabled) { method theme (line 50) | async theme() { method setTheme (line 55) | async setTheme(mode) { FILE: web/src/app/Pruner.js class Pruner (line 7) | class Pruner { method constructor (line 8) | constructor() { method startWorker (line 12) | startWorker() { method stopWorker (line 21) | stopWorker() { method prune (line 29) | async prune() { FILE: web/src/app/Session.js class Session (line 7) | class Session { method constructor (line 8) | constructor() { method store (line 35) | async store(username, token) { method resetAndRedirect (line 44) | async resetAndRedirect(url) { method usernameAsync (line 51) | async usernameAsync() { method exists (line 55) | exists() { method username (line 59) | username() { method token (line 63) | token() { FILE: web/src/app/SubscriptionManager.js class SubscriptionManager (line 9) | class SubscriptionManager { method constructor (line 10) | constructor(dbImpl) { method all (line 15) | async all() { method webPushTopics (line 32) | async webPushTopics(pushPossible) { method get (line 48) | async get(subscriptionId) { method notify (line 52) | async notify(subscriptionId, notification) { method add (line 74) | async add(baseUrl, topic, opts = {}) { method syncFromRemote (line 96) | async syncFromRemote(remoteSubscriptions, remoteReservations) { method updateWebPushSubscriptions (line 126) | async updateWebPushSubscriptions(topics) { method updateState (line 144) | async updateState(subscriptionId, state) { method remove (line 148) | async remove(subscription) { method first (line 153) | async first() { method getNotifications (line 157) | async getNotifications(subscriptionId) { method getAllNotifications (line 169) | async getAllNotifications() { method addNotification (line 177) | async addNotification(subscriptionId, notification) { method addNotifications (line 205) | async addNotifications(subscriptionId, notifications) { method updateNotification (line 217) | async updateNotification(notification) { method deleteNotification (line 230) | async deleteNotification(notificationId) { method deleteNotificationBySequenceId (line 234) | async deleteNotificationBySequenceId(subscriptionId, sequenceId) { method deleteNotifications (line 238) | async deleteNotifications(subscriptionId) { method markNotificationRead (line 242) | async markNotificationRead(notificationId) { method markNotificationReadBySequenceId (line 246) | async markNotificationReadBySequenceId(subscriptionId, sequenceId) { method markNotificationsRead (line 250) | async markNotificationsRead(subscriptionId) { method setMutedUntil (line 254) | async setMutedUntil(subscriptionId, mutedUntil) { method setDisplayName (line 260) | async setDisplayName(subscriptionId, displayName) { method setReservation (line 266) | async setReservation(subscriptionId, reservation) { method update (line 272) | async update(subscriptionId, params) { method pruneNotifications (line 276) | async pruneNotifications(thresholdTimestamp) { FILE: web/src/app/UserManager.js class UserManager (line 4) | class UserManager { method constructor (line 5) | constructor(dbImpl) { method all (line 9) | async all() { method get (line 17) | async get(baseUrl) { method save (line 24) | async save(user) { method delete (line 31) | async delete(baseUrl) { method localUser (line 38) | localUser() { FILE: web/src/app/VersionChecker.js class VersionChecker (line 8) | class VersionChecker { method constructor (line 9) | constructor() { method startWorker (line 19) | startWorker() { method stopWorker (line 26) | stopWorker() { method registerListener (line 34) | registerListener(listener) { method resetListener (line 38) | resetListener() { method checkVersion (line 42) | async checkVersion() { FILE: web/src/app/actions.js constant ACTION_VIEW (line 4) | const ACTION_VIEW = "view"; constant ACTION_BROADCAST (line 5) | const ACTION_BROADCAST = "broadcast"; constant ACTION_HTTP (line 6) | const ACTION_HTTP = "http"; constant ACTION_COPY (line 7) | const ACTION_COPY = "copy"; FILE: web/src/app/errors.js class UnauthorizedError (line 12) | class UnauthorizedError extends Error { method constructor (line 13) | constructor() { class UserExistsError (line 18) | class UserExistsError extends Error { method constructor (line 21) | constructor() { class TopicReservedError (line 26) | class TopicReservedError extends Error { method constructor (line 29) | constructor() { class AccountCreateLimitReachedError (line 34) | class AccountCreateLimitReachedError extends Error { method constructor (line 37) | constructor() { class IncorrectPasswordError (line 42) | class IncorrectPasswordError extends Error { method constructor (line 45) | constructor() { FILE: web/src/app/events.js constant EVENT_OPEN (line 4) | const EVENT_OPEN = "open"; constant EVENT_KEEPALIVE (line 5) | const EVENT_KEEPALIVE = "keepalive"; constant EVENT_MESSAGE (line 6) | const EVENT_MESSAGE = "message"; constant EVENT_MESSAGE_DELETE (line 7) | const EVENT_MESSAGE_DELETE = "message_delete"; constant EVENT_MESSAGE_CLEAR (line 8) | const EVENT_MESSAGE_CLEAR = "message_clear"; constant EVENT_POLL_REQUEST (line 9) | const EVENT_POLL_REQUEST = "poll_request"; constant WEBPUSH_EVENT_MESSAGE (line 11) | const WEBPUSH_EVENT_MESSAGE = "message"; constant WEBPUSH_EVENT_SUBSCRIPTION_EXPIRING (line 12) | const WEBPUSH_EVENT_SUBSCRIPTION_EXPIRING = "subscription_expiring"; FILE: web/src/components/ErrorBoundary.jsx class ErrorBoundaryImpl (line 7) | class ErrorBoundaryImpl extends React.Component { method constructor (line 8) | constructor(props) { method componentDidCatch (line 18) | componentDidCatch(error, info) { method handleError (line 34) | handleError(error, info) { method handleUnsupportedIndexedDB (line 55) | handleUnsupportedIndexedDB() { method copyStack (line 62) | copyStack() { method renderUnsupportedIndexedDB (line 71) | renderUnsupportedIndexedDB() { method renderError (line 90) | renderError() { method render (line 127) | render() { FILE: web/src/components/Notifications.jsx constant ACTION_PROGRESS_ONGOING (line 496) | const ACTION_PROGRESS_ONGOING = 1; constant ACTION_PROGRESS_SUCCESS (line 497) | const ACTION_PROGRESS_SUCCESS = 2; constant ACTION_PROGRESS_FAILED (line 498) | const ACTION_PROGRESS_FAILED = 3; constant ACTION_LABEL_SUFFIX (line 500) | const ACTION_LABEL_SUFFIX = { FILE: web/src/registerSW.js method onRegisteredSW (line 16) | onRegisteredSW(swUrl, registration) { method onRegisterError (line 41) | onRegisterError(error) { FILE: webpush/store.go constant subscriptionIDPrefix (line 14) | subscriptionIDPrefix = "wps_" constant subscriptionIDLength (line 15) | subscriptionIDLength = 10 constant subscriptionEndpointLimitPerSubscriberIP (line 16) | subscriptionEndpointLimitPerSubscriberIP = 10 type Store (line 26) | type Store struct method UpsertSubscription (line 49) | func (s *Store) UpsertSubscription(endpoint string, auth, p256dh, user... method SubscriptionsForTopic (line 86) | func (s *Store) SubscriptionsForTopic(topic string) ([]*Subscription, ... method SubscriptionsExpiring (line 96) | func (s *Store) SubscriptionsExpiring(warnAfter time.Duration) ([]*Sub... method MarkExpiryWarningSent (line 106) | func (s *Store) MarkExpiryWarningSent(subscriptions []*Subscription) e... method RemoveSubscriptionsByEndpoint (line 118) | func (s *Store) RemoveSubscriptionsByEndpoint(endpoint string) error { method RemoveSubscriptionsByUserID (line 124) | func (s *Store) RemoveSubscriptionsByUserID(userID string) error { method RemoveExpiredSubscriptions (line 133) | func (s *Store) RemoveExpiredSubscriptions(expireAfter time.Duration) ... method SetSubscriptionUpdatedAt (line 145) | func (s *Store) SetSubscriptionUpdatedAt(endpoint string, updatedAt in... method Close (line 151) | func (s *Store) Close() error { type queries (line 32) | type queries struct function subscriptionsFromRows (line 155) | func subscriptionsFromRows(rows *sql.Rows) ([]*Subscription, error) { FILE: webpush/store_postgres.go constant postgresCreateTablesQuery (line 11) | postgresCreateTablesQuery = ` constant postgresSelectSubscriptionIDByEndpointQuery (line 37) | postgresSelectSubscriptionIDByEndpointQuery = `SELECT id FROM web... constant postgresSelectSubscriptionCountBySubscriberIPQuery (line 38) | postgresSelectSubscriptionCountBySubscriberIPQuery = `SELECT COUNT(*) FR... constant postgresSelectSubscriptionsForTopicQuery (line 39) | postgresSelectSubscriptionsForTopicQuery = ` constant postgresSelectSubscriptionsExpiringSoonQuery (line 46) | postgresSelectSubscriptionsExpiringSoonQuery = ` constant postgresUpsertSubscriptionQuery (line 51) | postgresUpsertSubscriptionQuery = ` constant postgresUpdateSubscriptionWarningSentQuery (line 58) | postgresUpdateSubscriptionWarningSentQuery = `UPDATE webpush_subscriptio... constant postgresUpdateSubscriptionUpdatedAtQuery (line 59) | postgresUpdateSubscriptionUpdatedAtQuery = `UPDATE webpush_subscriptio... constant postgresDeleteSubscriptionByEndpointQuery (line 60) | postgresDeleteSubscriptionByEndpointQuery = `DELETE FROM webpush_subscr... constant postgresDeleteSubscriptionByUserIDQuery (line 61) | postgresDeleteSubscriptionByUserIDQuery = `DELETE FROM webpush_subscr... constant postgresDeleteSubscriptionByAgeQuery (line 62) | postgresDeleteSubscriptionByAgeQuery = `DELETE FROM webpush_subscr... constant postgresInsertSubscriptionTopicQuery (line 64) | postgresInsertSubscriptionTopicQuery = `INSERT INTO w... constant postgresDeleteSubscriptionTopicAllQuery (line 65) | postgresDeleteSubscriptionTopicAllQuery = `DELETE FROM w... constant postgresDeleteSubscriptionTopicWithoutSubscriptionQuery (line 66) | postgresDeleteSubscriptionTopicWithoutSubscriptionQuery = `DELETE FROM w... constant pgCurrentSchemaVersion (line 71) | pgCurrentSchemaVersion = 1 constant postgresInsertSchemaVersionQuery (line 72) | postgresInsertSchemaVersionQuery = `INSERT INTO schema_version (store, v... constant postgresSelectSchemaVersionQuery (line 73) | postgresSelectSchemaVersionQuery = `SELECT version FROM schema_version W... function NewPostgresStore (line 77) | func NewPostgresStore(d *db.DB) (*Store, error) { function setupPostgres (line 101) | func setupPostgres(d *sql.DB) error { function setupNewPostgres (line 113) | func setupNewPostgres(d *sql.DB) error { FILE: webpush/store_sqlite.go constant sqliteCreateTablesQuery (line 13) | sqliteCreateTablesQuery = ` constant sqliteBuiltinStartupQueries (line 38) | sqliteBuiltinStartupQueries = ` constant sqliteSelectSubscriptionIDByEndpointQuery (line 42) | sqliteSelectSubscriptionIDByEndpointQuery = `SELECT id FROM subsc... constant sqliteSelectSubscriptionCountBySubscriberIPQuery (line 43) | sqliteSelectSubscriptionCountBySubscriberIPQuery = `SELECT COUNT(*) FROM... constant sqliteSelectSubscriptionsForTopicQuery (line 44) | sqliteSelectSubscriptionsForTopicQuery = ` constant sqliteSelectSubscriptionsExpiringSoonQuery (line 51) | sqliteSelectSubscriptionsExpiringSoonQuery = ` constant sqliteUpsertSubscriptionQuery (line 56) | sqliteUpsertSubscriptionQuery = ` constant sqliteUpdateSubscriptionWarningSentQuery (line 63) | sqliteUpdateSubscriptionWarningSentQuery = `UPDATE subscription SET warn... constant sqliteUpdateSubscriptionUpdatedAtQuery (line 64) | sqliteUpdateSubscriptionUpdatedAtQuery = `UPDATE subscription SET upda... constant sqliteDeleteSubscriptionByEndpointQuery (line 65) | sqliteDeleteSubscriptionByEndpointQuery = `DELETE FROM subscription WHE... constant sqliteDeleteSubscriptionByUserIDQuery (line 66) | sqliteDeleteSubscriptionByUserIDQuery = `DELETE FROM subscription WHE... constant sqliteDeleteSubscriptionByAgeQuery (line 67) | sqliteDeleteSubscriptionByAgeQuery = `DELETE FROM subscription WHE... constant sqliteInsertSubscriptionTopicQuery (line 69) | sqliteInsertSubscriptionTopicQuery = `INSERT INTO sub... constant sqliteDeleteSubscriptionTopicAllQuery (line 70) | sqliteDeleteSubscriptionTopicAllQuery = `DELETE FROM sub... constant sqliteDeleteSubscriptionTopicWithoutSubscriptionQuery (line 71) | sqliteDeleteSubscriptionTopicWithoutSubscriptionQuery = `DELETE FROM sub... constant sqliteCurrentSchemaVersion (line 76) | sqliteCurrentSchemaVersion = 1 constant sqliteInsertSchemaVersionQuery (line 77) | sqliteInsertSchemaVersionQuery = `INSERT INTO schemaVersion VALUES (1, ?)` constant sqliteSelectSchemaVersionQuery (line 78) | sqliteSelectSchemaVersionQuery = `SELECT version FROM schemaVersion WHER... function NewSQLiteStore (line 82) | func NewSQLiteStore(filename, startupQueries string) (*Store, error) { function setupSQLite (line 113) | func setupSQLite(db *sql.DB) error { function setupNewSQLite (line 123) | func setupNewSQLite(sqlDB *sql.DB) error { function runSQLiteStartupQueries (line 135) | func runSQLiteStartupQueries(db *sql.DB, startupQueries string) error { FILE: webpush/store_test.go constant testWebPushEndpoint (line 15) | testWebPushEndpoint = "https://updates.push.services.mozilla.com/wpush/v... function forEachBackend (line 17) | func forEachBackend(t *testing.T, f func(t *testing.T, store *webpush.St... function TestStoreUpsertSubscriptionSubscriptionsForTopic (line 32) | func TestStoreUpsertSubscriptionSubscriptionsForTopic(t *testing.T) { function TestStoreUpsertSubscriptionSubscriberIPLimitReached (line 51) | func TestStoreUpsertSubscriptionSubscriberIPLimitReached(t *testing.T) { function TestStoreUpsertSubscriptionUpdateTopics (line 70) | func TestStoreUpsertSubscriptionUpdateTopics(t *testing.T) { function TestStoreUpsertSubscriptionUpdateFields (line 101) | func TestStoreUpsertSubscriptionUpdateFields(t *testing.T) { function TestStoreRemoveByUserIDMultiple (line 126) | func TestStoreRemoveByUserIDMultiple(t *testing.T) { function TestStoreRemoveByEndpoint (line 149) | func TestStoreRemoveByEndpoint(t *testing.T) { function TestStoreRemoveByUserID (line 165) | func TestStoreRemoveByUserID(t *testing.T) { function TestStoreRemoveByUserIDEmpty (line 181) | func TestStoreRemoveByUserIDEmpty(t *testing.T) { function TestStoreExpiryWarningSent (line 187) | func TestStoreExpiryWarningSent(t *testing.T) { function TestStoreExpiring (line 211) | func TestStoreExpiring(t *testing.T) { function TestStoreRemoveExpired (line 233) | func TestStoreRemoveExpired(t *testing.T) { FILE: webpush/types.go type Subscription (line 6) | type Subscription struct method Context (line 15) | func (w *Subscription) Context() log.Context {