commit d56da455c76c77071202ee9de6431030c36a4282 Author: aerosol Date: Wed Jul 12 08:28:07 2023 +0000 deploy: eb8bc062d56b234a4acf7e20f5f208fffe944df7 diff --git a/.build b/.build new file mode 100644 index 000000000..c1753ece8 --- /dev/null +++ b/.build @@ -0,0 +1,241 @@ +404.html +Mix.Tasks.AnalyzePlans.html +Mix.Tasks.CleanClickhouse.html +Mix.Tasks.CreateFreeSubscription.html +Mix.Tasks.DownloadCountryDatabase.html +Mix.Tasks.GenerateReferrerFavicons.html +Mix.Tasks.PullSandboxSubscription.html +Mix.Tasks.SendPageview.html +ObanErrorReporter.html +Plausible.AsyncInsertRepo.html +Plausible.Auth.ApiKey.html +Plausible.Auth.ApiKeyAdmin.html +Plausible.Auth.GracePeriod.html +Plausible.Auth.Invitation.html +Plausible.Auth.Password.html +Plausible.Auth.Token.html +Plausible.Auth.User.html +Plausible.Auth.UserAdmin.html +Plausible.Auth.html +Plausible.Billing.EnterprisePlan.html +Plausible.Billing.EnterprisePlanAdmin.html +Plausible.Billing.PaddleApi.html +Plausible.Billing.Plans.html +Plausible.Billing.SiteLocker.html +Plausible.Billing.html +Plausible.ChangesetHelpers.html +Plausible.Cldr.AcceptLanguage.html +Plausible.Cldr.Currency.html +Plausible.Cldr.Locale.html +Plausible.Cldr.Number.Cardinal.html +Plausible.Cldr.Number.Format.html +Plausible.Cldr.Number.Formatter.Decimal.html +Plausible.Cldr.Number.Ordinal.html +Plausible.Cldr.Number.PluralRule.Range.html +Plausible.Cldr.Number.Symbol.html +Plausible.Cldr.Number.System.html +Plausible.Cldr.Number.Transliterate.html +Plausible.Cldr.Number.html +Plausible.Cldr.Rbnf.NumberSystem.html +Plausible.Cldr.Rbnf.Ordinal.html +Plausible.Cldr.Rbnf.Spellout.html +Plausible.Cldr.html +Plausible.ClickhouseEventV2.html +Plausible.ClickhouseRepo.html +Plausible.ClickhouseSessionV2.BoolUInt8.html +Plausible.ClickhouseSessionV2.html +Plausible.ConfigHelpers.html +Plausible.DataCase.html +Plausible.DataMigration.NumericIDs.html +Plausible.DataMigration.Repo.html +Plausible.DataMigration.html +Plausible.Ecto.EventName.html +Plausible.Event.WriteBuffer.html +Plausible.Factory.html +Plausible.Funnel.Step.html +Plausible.Funnel.html +Plausible.Funnels.html +Plausible.Geo.html +Plausible.Goal.html +Plausible.Goals.html +Plausible.Google.Api.Mock.html +Plausible.Google.Api.html +Plausible.Google.Buffer.html +Plausible.Google.HTTP.html +Plausible.Google.ReportRequest.html +Plausible.HTTPClient.Interface.html +Plausible.HTTPClient.Non200Error.html +Plausible.HTTPClient.html +Plausible.ImportDeletionRepo.html +Plausible.Imported.html +Plausible.IngestRepo.html +Plausible.Ingestion.Counters.Buffer.html +Plausible.Ingestion.Counters.Record.html +Plausible.Ingestion.Counters.TelemetryHandler.html +Plausible.Ingestion.Counters.html +Plausible.Ingestion.Event.html +Plausible.Ingestion.Request.html +Plausible.Mailer.html +Plausible.OpenTelemetry.Sampler.html +Plausible.PaddleApi.Mock.html +Plausible.PromEx.Plugins.PlausibleMetrics.html +Plausible.PromEx.html +Plausible.Purge.html +Plausible.Release.html +Plausible.Repo.html +Plausible.Sentry.Client.html +Plausible.SentryFilter.html +Plausible.Session.CacheStore.html +Plausible.Session.Salts.html +Plausible.Session.WriteBuffer.html +Plausible.Site.Cache.Warmer.All.html +Plausible.Site.Cache.Warmer.RecentlyUpdated.html +Plausible.Site.Cache.Warmer.html +Plausible.Site.Cache.html +Plausible.Site.CustomDomain.html +Plausible.Site.Domain.html +Plausible.Site.GateKeeper.html +Plausible.Site.GoogleAuth.html +Plausible.Site.ImportedData.html +Plausible.Site.Membership.html +Plausible.Site.MonthlyReport.html +Plausible.Site.Removal.html +Plausible.Site.SharedLink.html +Plausible.Site.SpikeNotification.html +Plausible.Site.WeeklyReport.html +Plausible.Site.html +Plausible.SiteAdmin.html +Plausible.Sites.html +Plausible.Stats.Aggregate.html +Plausible.Stats.Base.html +Plausible.Stats.Breakdown.html +Plausible.Stats.Clickhouse.html +Plausible.Stats.Compare.html +Plausible.Stats.Comparisons.html +Plausible.Stats.CurrentVisitors.html +Plausible.Stats.CustomProps.html +Plausible.Stats.FilterParser.html +Plausible.Stats.FilterSuggestions.html +Plausible.Stats.Filters.html +Plausible.Stats.Fragments.html +Plausible.Stats.Funnel.html +Plausible.Stats.Imported.html +Plausible.Stats.Interval.html +Plausible.Stats.Props.html +Plausible.Stats.Query.html +Plausible.Stats.Timeseries.html +Plausible.Stats.Util.html +Plausible.Stats.html +Plausible.Test.Support.HTML.html +Plausible.TestUtils.html +Plausible.Themes.html +Plausible.Timezones.html +Plausible.Workers.CheckUsage.html +Plausible.Workers.CleanEmailVerificationCodes.html +Plausible.Workers.CleanInvitations.html +Plausible.Workers.ExpireDomainChangeTransitions.html +Plausible.Workers.ImportGoogleAnalytics.html +Plausible.Workers.LockSites.html +Plausible.Workers.NotifyAnnualRenewal.html +Plausible.Workers.RotateSalts.html +Plausible.Workers.ScheduleEmailReports.html +Plausible.Workers.SendCheckStatsEmails.html +Plausible.Workers.SendEmailReport.html +Plausible.Workers.SendSiteSetupEmails.html +Plausible.Workers.SendTrialNotifications.html +Plausible.Workers.SpikeNotifier.html +Plausible.html +PlausibleWeb.Api.ExternalController.html +PlausibleWeb.Api.ExternalSitesController.html +PlausibleWeb.Api.ExternalStatsController.html +PlausibleWeb.Api.Helpers.html +PlausibleWeb.Api.InternalController.html +PlausibleWeb.Api.PaddleController.html +PlausibleWeb.Api.StatsController.html +PlausibleWeb.AuthController.html +PlausibleWeb.AuthPlug.html +PlausibleWeb.AuthView.html +PlausibleWeb.AuthorizeSiteAccess.html +PlausibleWeb.AuthorizeSitesApiPlug.html +PlausibleWeb.AuthorizeStatsApiPlug.html +PlausibleWeb.BillingController.html +PlausibleWeb.BillingView.html +PlausibleWeb.CRMAuthPlug.html +PlausibleWeb.Captcha.html +PlausibleWeb.Components.Generic.html +PlausibleWeb.Components.Site.Feature.html +PlausibleWeb.ConnCase.html +PlausibleWeb.ControllerHelpers.html +PlausibleWeb.Email.html +PlausibleWeb.EmailView.html +PlausibleWeb.Endpoint.html +PlausibleWeb.ErrorHelpers.html +PlausibleWeb.ErrorReportController.html +PlausibleWeb.ErrorView.html +PlausibleWeb.Favicon.html +PlausibleWeb.FirstLaunchPlug.html +PlausibleWeb.FormHelpers.html +PlausibleWeb.InvitationController.html +PlausibleWeb.LastSeenPlug.html +PlausibleWeb.LayoutView.html +PlausibleWeb.Live.Flash.html +PlausibleWeb.Live.FunnelSettings.ComboBox.html +PlausibleWeb.Live.FunnelSettings.Form.html +PlausibleWeb.Live.FunnelSettings.List.html +PlausibleWeb.Live.FunnelSettings.html +PlausibleWeb.PageController.html +PlausibleWeb.PageView.html +PlausibleWeb.Plugs.NoRobots.html +PlausibleWeb.Plugs.RuntimeSessionAdapter.html +PlausibleWeb.RefInspector.html +PlausibleWeb.RemoteIp.html +PlausibleWeb.RequireAccountPlug.html +PlausibleWeb.RequireLoggedOutPlug.html +PlausibleWeb.Router.html +PlausibleWeb.SessionTimeoutPlug.html +PlausibleWeb.Site.MembershipController.html +PlausibleWeb.Site.MembershipView.html +PlausibleWeb.SiteController.html +PlausibleWeb.SiteView.html +PlausibleWeb.StatsController.html +PlausibleWeb.StatsView.html +PlausibleWeb.Tracker.html +PlausibleWeb.UnsubscribeController.html +PlausibleWeb.UnsubscribeView.html +PlausibleWeb.html +account-locking.html +api-reference.html +assets/logo.png +contributing.html +dist/handlebars.runtime-NWIB6V2M.js +dist/handlebars.templates-XWGFFSCD.js +dist/html-JDI3AVDD.js +dist/html-elixir-HHVY3JYD.css +dist/inconsolata-latin-400-normal-RGKDDNDD.woff2 +dist/inconsolata-latin-700-normal-DTS2D7TO.woff2 +dist/inconsolata-latin-ext-400-normal-K7HVGTP7.woff2 +dist/inconsolata-latin-ext-700-normal-4MPBLFZC.woff2 +dist/inconsolata-vietnamese-400-normal-IGQPHHJH.woff2 +dist/inconsolata-vietnamese-700-normal-LHEGSN35.woff2 +dist/lato-latin-300-normal-YUMVEFOL.woff2 +dist/lato-latin-400-normal-W7754I4D.woff2 +dist/lato-latin-700-normal-2XVSBPG4.woff2 +dist/lato-latin-ext-300-normal-VPGGJKJL.woff2 +dist/lato-latin-ext-400-normal-N27NCBWW.woff2 +dist/lato-latin-ext-700-normal-Q2L5DVMW.woff2 +dist/merriweather-cyrillic-300-italic-M6KMXZSZ.woff2 +dist/merriweather-cyrillic-300-normal-7PAAHU3N.woff2 +dist/merriweather-cyrillic-ext-300-italic-JP3ZEV2P.woff2 +dist/merriweather-cyrillic-ext-300-normal-5LF5LCEK.woff2 +dist/merriweather-latin-300-italic-353COS6Q.woff2 +dist/merriweather-latin-300-normal-RWDJH4FN.woff2 +dist/merriweather-latin-ext-300-italic-MWCA36KE.woff2 +dist/merriweather-latin-ext-300-normal-K6L27CZ5.woff2 +dist/merriweather-vietnamese-300-italic-EHHNZPUO.woff2 +dist/merriweather-vietnamese-300-normal-U376L4Z4.woff2 +dist/remixicon-NKANDIL5.woff2 +dist/search_items-3C5A86A8.js +dist/sidebar_items-3D6C76A3.js +index.html +readme.html +search.html diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 000000000..e69de29bb diff --git a/404.html b/404.html new file mode 100644 index 000000000..fcb16bc67 --- /dev/null +++ b/404.html @@ -0,0 +1,145 @@ + + + + + + + + + + 404 — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + Page not found +

+ +

Sorry, but the page you were trying to get to, does not exist. You +may want to try searching this site using the sidebar + + or using our API Reference page + +to find what you were looking for.

+ +
+
+
+
+ + + + + + diff --git a/Mix.Tasks.AnalyzePlans.html b/Mix.Tasks.AnalyzePlans.html new file mode 100644 index 000000000..c5f7c88f1 --- /dev/null +++ b/Mix.Tasks.AnalyzePlans.html @@ -0,0 +1,212 @@ + + + + + + + + + + mix analyze_plans — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + mix analyze_plans + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+
+ run(_) + +
+ +

Callback implementation for Mix.Task.run/1.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +

Callback implementation for Mix.Task.run/1.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Mix.Tasks.CleanClickhouse.html b/Mix.Tasks.CleanClickhouse.html new file mode 100644 index 000000000..4ff1b7394 --- /dev/null +++ b/Mix.Tasks.CleanClickhouse.html @@ -0,0 +1,212 @@ + + + + + + + + + + mix clean_clickhouse — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + mix clean_clickhouse + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+
+ run(_) + +
+ +

Callback implementation for Mix.Task.run/1.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +

Callback implementation for Mix.Task.run/1.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Mix.Tasks.CreateFreeSubscription.html b/Mix.Tasks.CreateFreeSubscription.html new file mode 100644 index 000000000..7aa84c5f0 --- /dev/null +++ b/Mix.Tasks.CreateFreeSubscription.html @@ -0,0 +1,242 @@ + + + + + + + + + + mix create_free_subscription — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + mix create_free_subscription + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ +
+
+ run(arg1) + +
+ +

Callback implementation for Mix.Task.run/1.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + +
+
+
+ + + +
+ +

Callback implementation for Mix.Task.run/1.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Mix.Tasks.DownloadCountryDatabase.html b/Mix.Tasks.DownloadCountryDatabase.html new file mode 100644 index 000000000..d3b7952d8 --- /dev/null +++ b/Mix.Tasks.DownloadCountryDatabase.html @@ -0,0 +1,217 @@ + + + + + + + + + + mix download_country_database — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + mix download_country_database + (Plausible v0.0.1) + +

+ + +
+

This task downloads the Country Lite database from DB-IP for self-hosted or development purposes. +Plausible Cloud runs a paid version of DB-IP with more detailed geolocation data.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+
+ run(_) + +
+ +

Callback implementation for Mix.Task.run/1.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +

Callback implementation for Mix.Task.run/1.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Mix.Tasks.GenerateReferrerFavicons.html b/Mix.Tasks.GenerateReferrerFavicons.html new file mode 100644 index 000000000..59eeca248 --- /dev/null +++ b/Mix.Tasks.GenerateReferrerFavicons.html @@ -0,0 +1,212 @@ + + + + + + + + + + mix generate_referrer_favicons — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + mix generate_referrer_favicons + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+
+ run(_) + +
+ +

Callback implementation for Mix.Task.run/1.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +

Callback implementation for Mix.Task.run/1.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Mix.Tasks.PullSandboxSubscription.html b/Mix.Tasks.PullSandboxSubscription.html new file mode 100644 index 000000000..75d21d7af --- /dev/null +++ b/Mix.Tasks.PullSandboxSubscription.html @@ -0,0 +1,212 @@ + + + + + + + + + + mix pull_sandbox_subscription — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + mix pull_sandbox_subscription + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+
+ run(list) + +
+ +

Callback implementation for Mix.Task.run/1.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +

Callback implementation for Mix.Task.run/1.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Mix.Tasks.SendPageview.html b/Mix.Tasks.SendPageview.html new file mode 100644 index 000000000..a973dca6d --- /dev/null +++ b/Mix.Tasks.SendPageview.html @@ -0,0 +1,217 @@ + + + + + + + + + + mix send_pageview — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + mix send_pageview + (Plausible v0.0.1) + +

+ + +
+

It's often necessary to generate fake events for development and testing purposes. This Mix Task provides a quick and easy +way to generate a pageview or custom event, either in your development environment or a remote Plausible instance.

See Mix.Tasks.SendPageview.usage/1 for more detailed documentation.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+
+ run(opts) + +
+ +

Callback implementation for Mix.Task.run/1.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +

Callback implementation for Mix.Task.run/1.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/ObanErrorReporter.html b/ObanErrorReporter.html new file mode 100644 index 000000000..23c077fc2 --- /dev/null +++ b/ObanErrorReporter.html @@ -0,0 +1,210 @@ + + + + + + + + + + ObanErrorReporter — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + ObanErrorReporter + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

handle_event(list, measure, meta, _)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.AsyncInsertRepo.html b/Plausible.AsyncInsertRepo.html new file mode 100644 index 000000000..789fa99a2 --- /dev/null +++ b/Plausible.AsyncInsertRepo.html @@ -0,0 +1,1578 @@ + + + + + + + + + + Plausible.AsyncInsertRepo — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.AsyncInsertRepo + (Plausible v0.0.1) + +

+ + +
+

Clickhouse access with async inserts enabled

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Callback implementation for Ecto.Repo.aggregate/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.aggregate/4.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.all/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.checked_out?/0.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.checkout/2.

+ +
+ +
+ + +
+ +
+
+ config() + +
+ +

Callback implementation for Ecto.Repo.config/0.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.default_options/1.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.delete/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.delete!/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.delete_all/2.

+ +
+ +
+ + +

A convenience function for SQL-based repositories that forces all connections in the +pool to disconnect within the given interval.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.exists?/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get!/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get_by/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get_by!/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get_dynamic_repo/0.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.insert/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.insert!/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.insert_all/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.insert_or_update/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.insert_or_update!/2.

+ +
+ +
+ + +

Similar to insert_all/2 but with the following differences

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.load/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.one/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.one!/2.

+ +
+ + + +
+ + +

Callback implementation for Ecto.Repo.prepare_query/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.put_dynamic_repo/1.

+ +
+ +
+ + +

A convenience function for SQL-based repositories that executes the given query.

+ +
+ +
+ + +

A convenience function for SQL-based repositories that executes the given query.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.reload/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.reload!/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.start_link/1.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.stop/1.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.stream/2.

+ +
+ +
+ + +

A convenience function for SQL-based repositories that translates the given query to SQL.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.update/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.update!/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.update_all/3.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + + Link to this function + +

aggregate(queryable, aggregate, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.aggregate/3.

+
+
+
+ +
+ + + Link to this function + +

aggregate(queryable, aggregate, field, opts)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.aggregate/4.

+
+
+
+ + + +
+ + + Link to this function + +

all(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.all/2.

+
+
+
+ + + +
+ +

Callback implementation for Ecto.Repo.checked_out?/0.

+
+
+
+ + + +
+ + + Link to this function + +

checkout(fun, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.checkout/2.

+
+
+
+ + + +
+ + +
+
+
+ + + +
+ +

Callback implementation for Ecto.Repo.config/0.

+
+
+
+ +
+ + + Link to this function + +

default_options(operation)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.default_options/1.

+
+
+
+ + + +
+ + + Link to this function + +

delete(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.delete/2.

+
+
+
+ + + +
+ + + Link to this function + +

delete!(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.delete!/2.

+
+
+
+ + + +
+ + + Link to this function + +

delete_all(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.delete_all/2.

+
+
+
+ + + +
+ + + Link to this function + +

disconnect_all(interval, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

A convenience function for SQL-based repositories that forces all connections in the +pool to disconnect within the given interval.

See Ecto.Adapters.SQL.disconnect_all/3 for more information.

+
+
+
+ + + +
+ + + Link to this function + +

exists?(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.exists?/2.

+
+
+
+ + + +
+ + + Link to this function + +

get(queryable, id, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get/3.

+
+
+
+ + + +
+ + + Link to this function + +

get!(queryable, id, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get!/3.

+
+
+
+ + + +
+ + + Link to this function + +

get_by(queryable, clauses, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get_by/3.

+
+
+
+ + + +
+ + + Link to this function + +

get_by!(queryable, clauses, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get_by!/3.

+
+
+
+ +
+ + + Link to this function + +

get_dynamic_repo()

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get_dynamic_repo/0.

+
+
+
+ + + +
+ + + Link to this function + +

insert(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.insert/2.

+
+
+
+ + + +
+ + + Link to this function + +

insert!(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.insert!/2.

+
+
+
+ + + +
+ + + Link to this function + +

insert_all(schema_or_source, entries, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.insert_all/3.

+
+
+
+ + + +
+ + + Link to this function + +

insert_or_update(changeset, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.insert_or_update/2.

+
+
+
+ + + +
+ + + Link to this function + +

insert_or_update!(changeset, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.insert_or_update!/2.

+
+
+
+ + + +
+ + + Link to this function + +

insert_stream(source_or_schema, rows, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Similar to insert_all/2 but with the following differences:

  • accepts rows as streams or lists
  • sends rows as a chunked request
  • doesn't autogenerate ids or does any other preprocessing

Example:

Repo.query!("create table ecto_ch_demo(a UInt64, b String) engine Null")
+
+defmodule Demo do
+  use Ecto.Schema
+
+  @primary_key false
+  schema "ecto_ch_demo" do
+    field :a, Ch, type: "UInt64"
+    field :b, :string
+  end
+end
+
+rows = Stream.map(1..100_000, fn i -> %{a: i, b: to_string(i)} end)
+{100_000, nil} = Repo.insert_stream(Demo, rows)
+
+# schemaless
+{100_000, nil} = Repo.insert_stream("ecto_ch_demo", rows, types: [a: Ch.Types.u64(), b: :string])
+
+
+
+ +
+ + + Link to this function + +

load(schema_or_types, data)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.load/2.

+
+
+
+ + + +
+ + + Link to this function + +

one(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.one/2.

+
+
+
+ + + +
+ + + Link to this function + +

one!(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.one!/2.

+
+
+
+ + + +
+ + + Link to this function + +

preload(struct_or_structs_or_nil, preloads, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.preload/3.

+
+
+
+ +
+ + + Link to this function + +

prepare_query(operation, query, opts)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.prepare_query/3.

+
+
+
+ +
+ + + Link to this function + +

put_dynamic_repo(dynamic)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.put_dynamic_repo/1.

+
+
+
+ + + + + +
+ + + Link to this function + +

query(sql, params \\ [], opts \\ [])

+ + + + View Source + + + +
+ +
+ +

A convenience function for SQL-based repositories that executes the given query.

See Ecto.Adapters.SQL.query/4 for more information.

+
+
+
+ + + + + +
+ + + Link to this function + +

query!(sql, params \\ [], opts \\ [])

+ + + + View Source + + + +
+ +
+ +

A convenience function for SQL-based repositories that executes the given query.

See Ecto.Adapters.SQL.query!/4 for more information.

+
+
+
+ + + +
+ + + Link to this function + +

reload(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.reload/2.

+
+
+
+ + + +
+ + + Link to this function + +

reload!(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.reload!/2.

+
+
+
+ + + +
+ + + Link to this function + +

start_link(opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.start_link/1.

+
+
+
+ + + +
+ + + Link to this function + +

stop(timeout \\ 5000)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.stop/1.

+
+
+
+ + + +
+ + + Link to this function + +

stream(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.stream/2.

+
+
+
+ +
+ + + Link to this function + +

to_sql(operation, queryable)

+ + + + View Source + + + +
+ +
+ +

A convenience function for SQL-based repositories that translates the given query to SQL.

See Ecto.Adapters.SQL.to_sql/3 for more information.

+
+
+
+ + + +
+ + + Link to this function + +

update(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.update/2.

+
+
+
+ + + +
+ + + Link to this function + +

update!(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.update!/2.

+
+
+
+ + + +
+ + + Link to this function + +

update_all(queryable, updates, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.update_all/3.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Auth.ApiKey.html b/Plausible.Auth.ApiKey.html new file mode 100644 index 000000000..cf95237cc --- /dev/null +++ b/Plausible.Auth.ApiKey.html @@ -0,0 +1,304 @@ + + + + + + + + + + Plausible.Auth.ApiKey — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Auth.ApiKey + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + +
+
+ do_hash(key) + +
+ +
+ + + + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + + Link to this function + +

changeset(schema, attrs \\ %{})

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

process_key(changeset)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

update(schema, attrs \\ %{})

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Auth.ApiKeyAdmin.html b/Plausible.Auth.ApiKeyAdmin.html new file mode 100644 index 000000000..f3e2bb2b5 --- /dev/null +++ b/Plausible.Auth.ApiKeyAdmin.html @@ -0,0 +1,360 @@ + + + + + + + + + + Plausible.Auth.ApiKeyAdmin — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Auth.ApiKeyAdmin + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + + + +
+ + +
+ +
+
+ index(_) + +
+ +
+ +
+ + +
+ + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

create_changeset(schema, attrs)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

custom_index_query(conn, schema, query)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

search_fields(schema)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

update_changeset(schema, attrs)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Auth.GracePeriod.html b/Plausible.Auth.GracePeriod.html new file mode 100644 index 000000000..6293259a8 --- /dev/null +++ b/Plausible.Auth.GracePeriod.html @@ -0,0 +1,490 @@ + + + + + + + + + + Plausible.Auth.GracePeriod — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Auth.GracePeriod + (Plausible v0.0.1) + +

+ + +
+

This embedded schema stores information about the account locking grace +period.

Users are given this 7-day grace period to upgrade their account after +outgrowing their subscriptions. The actual account locking happens in +background with Plausible.Workers.LockSites.

The grace period can also be manual, without an end date, being controlled +manually from the CRM, and not by the background site locker job. This is +useful for enterprise subscriptions.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Types +

+ +
+
+ t() + +
+ +
+ +
+
+

+ Functions +

+ +
+ + +

Returns whether the grace period is still active for a User. Defaults to +false if the user is nil or there is no grace period.

+ +
+ +
+ + +

Ends an existing grace period by setting users.grace_period.is_over to true. +This means the grace period has expired.

+ +
+ +
+ + +

Returns whether the grace period has already expired for a User. Defaults to +false if the user is nil or there is no grace period.

+ +
+ +
+ + +

Removes the grace period from the User completely.

+ +
+ +
+ + +

Starts a account locking grace period of 7 days by changing the User struct.

+ +
+ +
+ + +

Starts a manual account locking grace period by changing the User struct. +Manual locking means the grace period can only be removed manually from the +CRM.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Types +

+
+
+ + + +
+ +
+ +
@type t() :: %Plausible.Auth.GracePeriod{
+  allowance_required: non_neg_integer(),
+  end_date: Date.t() | nil,
+  id: term(),
+  is_over: boolean(),
+  manual_lock: boolean()
+}
+ +
+ + +
+
+ +
+
+ +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +
+ +
@spec active?(Plausible.Auth.User.t()) :: boolean()
+ +
+ +

Returns whether the grace period is still active for a User. Defaults to +false if the user is nil or there is no grace period.

+
+
+
+ +
+ + + Link to this function + +

end_changeset(user)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec end_changeset(Plausible.Auth.User.t()) :: Ecto.Changeset.t()
+ +
+ +

Ends an existing grace period by setting users.grace_period.is_over to true. +This means the grace period has expired.

+
+
+
+ + + +
+ +
+ +
@spec expired?(Plausible.Auth.User.t()) :: boolean()
+ +
+ +

Returns whether the grace period has already expired for a User. Defaults to +false if the user is nil or there is no grace period.

+
+
+
+ +
+ + + Link to this function + +

remove_changeset(user)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec remove_changeset(Plausible.Auth.User.t()) :: Ecto.Changeset.t()
+ +
+ +

Removes the grace period from the User completely.

+
+
+
+ +
+ + + Link to this function + +

start_changeset(user, allowance_required)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec start_changeset(Plausible.Auth.User.t(), non_neg_integer()) ::
+  Ecto.Changeset.t()
+ +
+ +

Starts a account locking grace period of 7 days by changing the User struct.

+
+
+
+ +
+ + + Link to this function + +

start_manual_lock_changeset(user, allowance_required)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec start_manual_lock_changeset(Plausible.Auth.User.t(), non_neg_integer()) ::
+  Ecto.Changeset.t()
+ +
+ +

Starts a manual account locking grace period by changing the User struct. +Manual locking means the grace period can only be removed manually from the +CRM.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Auth.Invitation.html b/Plausible.Auth.Invitation.html new file mode 100644 index 000000000..3acda6304 --- /dev/null +++ b/Plausible.Auth.Invitation.html @@ -0,0 +1,212 @@ + + + + + + + + + + Plausible.Auth.Invitation — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Auth.Invitation + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Auth.Password.html b/Plausible.Auth.Password.html new file mode 100644 index 000000000..6605aa904 --- /dev/null +++ b/Plausible.Auth.Password.html @@ -0,0 +1,270 @@ + + + + + + + + + + Plausible.Auth.Password — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Auth.Password + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ +
+ + +
+ + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

dummy_calculation()

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

match?(password, hash)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Auth.Token.html b/Plausible.Auth.Token.html new file mode 100644 index 000000000..58ff15749 --- /dev/null +++ b/Plausible.Auth.Token.html @@ -0,0 +1,300 @@ + + + + + + + + + + Plausible.Auth.Token — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Auth.Token + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + + + + + + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

sign_password_reset(email)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

sign_shared_link(slug)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

verify_password_reset(token)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

verify_shared_link(token)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Auth.User.html b/Plausible.Auth.User.html new file mode 100644 index 000000000..34278debe --- /dev/null +++ b/Plausible.Auth.User.html @@ -0,0 +1,470 @@ + + + + + + + + + + Plausible.Auth.User — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Auth.User + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Types +

+ +
+
+ t() + +
+ +
+ +
+
+

+ Functions +

+ + + +
+ + +
+ + + +
+ + +
+ + + + + +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Types +

+
+
+ + + +
+ +
+ +
@type t() :: %Plausible.Auth.User{
+  __meta__: term(),
+  api_keys: term(),
+  email: term(),
+  email_verified: term(),
+  enterprise_plan: term(),
+  google_auth: term(),
+  grace_period: term(),
+  id: term(),
+  inserted_at: term(),
+  last_seen: term(),
+  name: term(),
+  password: term(),
+  password_confirmation: term(),
+  password_hash: term(),
+  site_memberships: term(),
+  sites: term(),
+  subscription: term(),
+  theme: term(),
+  trial_expiry_date: term(),
+  updated_at: term()
+}
+ +
+ + +
+
+ +
+
+ +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + + Link to this function + +

changeset(user, attrs \\ %{})

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

hash_password(changeset)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + + + +
+ + +
+
+
+ +
+ + + Link to this function + +

remove_trial_expiry(user)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

set_password(user, password)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Auth.UserAdmin.html b/Plausible.Auth.UserAdmin.html new file mode 100644 index 000000000..2d0dc0d0a --- /dev/null +++ b/Plausible.Auth.UserAdmin.html @@ -0,0 +1,300 @@ + + + + + + + + + + Plausible.Auth.UserAdmin — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Auth.UserAdmin + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + +
+ + +
+ +
+
+ index(_) + +
+ +
+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

custom_index_query(conn, schema, query)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

resource_actions(_)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Auth.html b/Plausible.Auth.html new file mode 100644 index 000000000..e8b8f2273 --- /dev/null +++ b/Plausible.Auth.html @@ -0,0 +1,452 @@ + + + + + + + + + + Plausible.Auth — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Auth + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

create_user(name, email, pwd)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

find_user_by(opts)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

has_active_sites?(user, roles \\ [:owner, :admin, :viewer])

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

is_super_admin?(user_id)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

issue_email_verification(user)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

user_owns_sites?(user)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

verify_email(user, code)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Billing.EnterprisePlan.html b/Plausible.Billing.EnterprisePlan.html new file mode 100644 index 000000000..12621bb01 --- /dev/null +++ b/Plausible.Billing.EnterprisePlan.html @@ -0,0 +1,212 @@ + + + + + + + + + + Plausible.Billing.EnterprisePlan — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Billing.EnterprisePlan + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + + Link to this function + +

changeset(model, attrs \\ %{})

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Billing.EnterprisePlanAdmin.html b/Plausible.Billing.EnterprisePlanAdmin.html new file mode 100644 index 000000000..c592adcb8 --- /dev/null +++ b/Plausible.Billing.EnterprisePlanAdmin.html @@ -0,0 +1,300 @@ + + + + + + + + + + Plausible.Billing.EnterprisePlanAdmin — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Billing.EnterprisePlanAdmin + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + +
+ + +
+ +
+
+ index(_) + +
+ +
+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

custom_index_query(conn, schema, query)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

search_fields(schema)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Billing.PaddleApi.html b/Plausible.Billing.PaddleApi.html new file mode 100644 index 000000000..10a2c469e --- /dev/null +++ b/Plausible.Billing.PaddleApi.html @@ -0,0 +1,367 @@ + + + + + + + + + + Plausible.Billing.PaddleApi — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Billing.PaddleApi + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

get_invoices(subscription)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec get_invoices(Plausible.Billing.Subscription.t()) ::
+  {:ok, list()} | {:error, :request_failed} | {:error, :no_invoices}
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

get_subscription(paddle_subscription_id)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

update_subscription(paddle_subscription_id, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

update_subscription_preview(paddle_subscription_id, new_plan_id)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Billing.Plans.html b/Plausible.Billing.Plans.html new file mode 100644 index 000000000..03971adc7 --- /dev/null +++ b/Plausible.Billing.Plans.html @@ -0,0 +1,429 @@ + + + + + + + + + + Plausible.Billing.Plans — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Billing.Plans + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Types +

+ +
+
+ plan() + +
+ +
+ +
+
+

+ Functions +

+ +
+ + +
+ + + + + +
+ + +
+ + + + + +
+ +
+ + +
+

+ + + Link to this section + +Types +

+
+
+ + + +
+ +
+ +
@type plan() ::
+  %{
+    limit: non_neg_integer(),
+    monthly_product_id: String.t(),
+    yearly_product_id: String.t(),
+    monthly_cost: String.t(),
+    yearly_cost: String.t()
+  }
+  | :enterprise
+ +
+ + +
+
+ +
+
+ +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

all_yearly_plan_ids()

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

allowance(subscription)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

for_product_id(product_id)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

subscription_interval(subscription)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

suggested_plan(user, usage_during_cycle)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec suggested_plan(Plausible.Auth.User.t(), non_neg_integer()) :: plan()
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Billing.SiteLocker.html b/Plausible.Billing.SiteLocker.html new file mode 100644 index 000000000..2290444e7 --- /dev/null +++ b/Plausible.Billing.SiteLocker.html @@ -0,0 +1,240 @@ + + + + + + + + + + Plausible.Billing.SiteLocker — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Billing.SiteLocker + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

check_sites_for(user)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

set_lock_status_for(user, status)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Billing.html b/Plausible.Billing.html new file mode 100644 index 000000000..8ff96dd4b --- /dev/null +++ b/Plausible.Billing.html @@ -0,0 +1,712 @@ + + + + + + + + + + Plausible.Billing — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Billing + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + + + + + + + + + + + + + +
+ + +
+ +
+
+ paddle_api() + +
+ +
+ +
+ + +

Returns the number of sites that an account is allowed to have. Accounts for +grandfathering old accounts to unlimited websites and ignores site limit on self-hosted +installations.

+ +
+ + + + + + + + + +
+ + +
+ +
+
+ usage(user) + +
+ +
+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

active_subscription_for(user_id)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec active_subscription_for(integer()) :: Plausible.Billing.Subscription.t() | nil
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

change_plan(user, new_plan_id)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

change_plan_preview(subscription, new_plan_id)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

has_active_subscription?(user_id)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec has_active_subscription?(integer()) :: boolean()
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

last_two_billing_cycles(user, today \\ Timex.today())

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

last_two_billing_months_usage(user, today \\ Timex.today())

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

needs_to_upgrade?(user)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+
+ + + +
+ +

Returns the number of sites that an account is allowed to have. Accounts for +grandfathering old accounts to unlimited websites and ignores site limit on self-hosted +installations.

+
+
+
+ +
+ + + Link to this function + +

subscription_cancelled(params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

subscription_created(params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

subscription_payment_succeeded(params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

subscription_updated(params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

trial_days_left(user)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

usage_breakdown(user)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.ChangesetHelpers.html b/Plausible.ChangesetHelpers.html new file mode 100644 index 000000000..30ef3f202 --- /dev/null +++ b/Plausible.ChangesetHelpers.html @@ -0,0 +1,214 @@ + + + + + + + + + + Plausible.ChangesetHelpers — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.ChangesetHelpers + (Plausible v0.0.1) + +

+ + +
+

Helper function for working with Ecto changesets

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

traverse_errors(changeset)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Cldr.AcceptLanguage.html b/Plausible.Cldr.AcceptLanguage.html new file mode 100644 index 000000000..a5c155dc9 --- /dev/null +++ b/Plausible.Cldr.AcceptLanguage.html @@ -0,0 +1,602 @@ + + + + + + + + + + Plausible.Cldr.AcceptLanguage — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Cldr.AcceptLanguage + (Plausible v0.0.1) + +

+ + +
+

Parses HTTP Accept-Language header values as defined in +rfc2616.

The Accept-Language request-header field is similar to Accept, but restricts +the set of natural languages that are preferred as a response to the request. +Language tags function are provided in Cldr.LanguageTag.

The format of an Accept-Language header is as follows in ABNF format:

   Accept-Language = "Accept-Language" ":"
+                     1#( language-range [ ";" "q" "=" qvalue ] )
+   language-range  = ( ( 1*8ALPHA *( "-" 1*8ALPHA ) ) | "*" )

Each language-range MAY be given an associated quality value which represents an +estimate of the user's preference for the languages specified by that range. The +quality value defaults to "q=1". For example,

   Accept-Language: da, en-gb;q=0.8, en;q=0.7

would mean: "I prefer Danish, but will accept British English and other types of English."

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Parse an Accept-Language string and return the best match for +a configured Cldr locale.

+ +
+ +
+ + +

Parses an Accept-Language header value in its string +or tokenized form to return a tuple of the form +{:ok, [{quality, %Cldr.LanguageTag{}}, ...]} sorted by quality.

+ +
+ +
+ + +

Parses an Accept-Language header value in its string +or tokenized form to produce a list of tuples of the form +[{quality, %Cldr.LanguageTag{}}, ...] sorted by quality +in descending order.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

best_match(accept_language)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec best_match(String.t()) ::
+  {:ok, Cldr.LanguageTag.t()}
+  | {:error, {Cldr.AcceptLanguageError | Cldr.NoMatchingLocale, String.t()}}
+ +
+ +

Parse an Accept-Language string and return the best match for +a configured Cldr locale.

+ +

arguments

+
+ Arguments +

+
  • accept_langauge is a string representing an accept language header

+ +

returns

+
+ Returns +

+
  • {:ok, language_tag} or

  • {:error, reason}

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.AcceptLanguage.best_match("da;q=0.1,zh-TW;q=0.3", TestBackend.Cldr)
+{:ok,
+ %Cldr.LanguageTag{
+   backend: TestBackend.Cldr,
+   canonical_locale_name: "zh-TW",
+   cldr_locale_name: :"zh-Hant",
+   language_subtags: [],
+   extensions: %{},
+   gettext_locale_name: nil,
+   language: "zh",
+   locale: %{},
+   private_use: [],
+   rbnf_locale_name: :"zh-Hant",
+   requested_locale_name: "zh-TW",
+   script: :Hant,
+   territory: :TW,
+   transform: %{},
+   language_variants: []
+ }}
+
+iex> Plausible.Cldr.AcceptLanguage.best_match("da;q=0.1,zh-TW;q=0.3", TestBackend.Cldr)
+{:ok,
+ %Cldr.LanguageTag{
+   backend: TestBackend.Cldr,
+   canonical_locale_name: "zh-TW",
+   cldr_locale_name: :"zh-Hant",
+   language_subtags: [],
+   extensions: %{},
+   gettext_locale_name: nil,
+   language: "zh",
+   locale: %{},
+   private_use: [],
+   rbnf_locale_name: :"zh-Hant",
+   requested_locale_name: "zh-TW",
+   script: :Hant,
+   territory: :TW,
+   transform: %{},
+   language_variants: []
+ }}
+
+iex> Plausible.Cldr.AcceptLanguage.best_match("xx,yy;q=0.3")
+{:error,
+ {Cldr.NoMatchingLocale,
+  "No configured locale could be matched to \"xx,yy;q=0.3\""}}
+
+iex> Plausible.Cldr.AcceptLanguage.best_match("invalid_tag")
+{:error, {Cldr.LanguageTag.ParseError,
+  "Expected a BCP47 language tag. Could not parse the remaining \"g\" starting at position 11"}}
+
+
+
+ +
+ + + Link to this function + +

parse(tokens_or_string)

+ + + + View Source + + + + (since 2.30.0) + +
+ +
+ +
+ +
@spec parse([{float(), String.t()}, ...] | String.t()) ::
+  {:ok,
+   [
+     {float(), Cldr.LanguageTag.t()}
+     | {:error, {Cldr.InvalidLanguageTag, String.t()}},
+     ...
+   ]}
+  | {:error, {Cldr.AcceptLanguageError, String.t()}}
+ +
+ +

Parses an Accept-Language header value in its string +or tokenized form to return a tuple of the form +{:ok, [{quality, %Cldr.LanguageTag{}}, ...]} sorted by quality.

+ +

arguments

+
+ Arguments +

+
  • accept-language is any string in the format defined by +rfc2616

  • backend is any module that includes use Cldr and therefore +is a Cldr backend module

+ +

returns

+
+ Returns +

+
  • {:ok, [{quality, language_tag}, ...]} or

  • {:error, {Cldr.AcceptLanguageError, String.t}}

If at least one valid language tag is found but errors are also +detected on one more more tags, an {ok, list} tuple is returned +wuth an error tuple for each invalid tag added at the end of the list.

+ +

example

+
+ Example +

+
iex> Cldr.AcceptLanguage.parse("da,zh-TW;q=0.3", TestBackend.Cldr)
+{:ok,
+ [
+   {1.0,
+    %Cldr.LanguageTag{
+      backend: TestBackend.Cldr,
+      canonical_locale_name: "da",
+      cldr_locale_name: :da,
+      language_subtags: [],
+      extensions: %{},
+      gettext_locale_name: nil,
+      language: "da",
+      locale: %{},
+      private_use: [],
+      rbnf_locale_name: :da,
+      requested_locale_name: "da",
+      script: :Latn,
+      territory: :DK,
+      transform: %{},
+      language_variants: []
+    }},
+   {0.3,
+    %Cldr.LanguageTag{
+      backend: TestBackend.Cldr,
+      canonical_locale_name: "zh-TW",
+      cldr_locale_name: :"zh-Hant",
+      language_subtags: [],
+      extensions: %{},
+      gettext_locale_name: nil,
+      language: "zh",
+      locale: %{},
+      private_use: [],
+      rbnf_locale_name: :"zh-Hant",
+      requested_locale_name: "zh-TW",
+      script: :Hant,
+      territory: :TW,
+      transform: %{},
+      language_variants: []
+    }}
+ ]}
+
+iex> Plausible.Cldr.AcceptLanguage.parse("invalid_tag")
+{:error,
+ {Cldr.LanguageTag.ParseError,
+  "Expected a BCP47 language tag. Could not parse the remaining \"g\" starting at position 11"}}
+
+iex> Plausible.Cldr.AcceptLanguage.parse("da,zh-TW;q=0.3,invalid_tag")
+{:ok,
+ [
+   {1.0,
+    %Cldr.LanguageTag{
+      backend: TestBackend.Cldr,
+      canonical_locale_name: "da",
+      cldr_locale_name: :da,
+      language_subtags: [],
+      extensions: %{},
+      gettext_locale_name: nil,
+      language: "da",
+      locale: %{},
+      private_use: [],
+      rbnf_locale_name: :da,
+      requested_locale_name: "da",
+      script: :Latn,
+      territory: :DK,
+      transform: %{},
+      language_variants: []
+    }},
+   {0.3,
+    %Cldr.LanguageTag{
+      backend: TestBackend.Cldr,
+      canonical_locale_name: "zh-TW",
+      cldr_locale_name: :"zh-Hant",
+      language_subtags: [],
+      extensions: %{},
+      gettext_locale_name: nil,
+      language: "zh",
+      locale: %{},
+      private_use: [],
+      rbnf_locale_name: :"zh-Hant",
+      requested_locale_name: "zh-TW",
+      script: :Hant,
+      territory: :TW,
+      transform: %{},
+      language_variants: []
+    }},
+   {:error,
+    {Cldr.LanguageTag.ParseError,
+     "Expected a BCP47 language tag. Could not parse the remaining \"g\" starting at position 11"}}
+ ]}
+
+
+
+ +
+ + + Link to this function + +

parse!(accept_language)

+ + + + View Source + + + +
+ +
+ +

Parses an Accept-Language header value in its string +or tokenized form to produce a list of tuples of the form +[{quality, %Cldr.LanguageTag{}}, ...] sorted by quality +in descending order.

+ +

arguments

+
+ Arguments +

+
  • accept-language is any string in the format defined by rfc2616

+ +

returns

+
+ Returns +

+

If at least one valid language tag is found but errors are also +detected on one more more tags, an {ok, list} tuple is returned +wuth an error tuple for each invalid tag added at the end of the list.

+ +

example

+
+ Example +

+
iex> Plausible.Cldr.AcceptLanguage.parse!("da,zh-TW;q=0.3")
+[
+  {1.0,
+   %Cldr.LanguageTag{
+     backend: TestBackend.Cldr,
+     canonical_locale_name: "da",
+     cldr_locale_name: :da,
+     language_subtags: [],
+     extensions: %{},
+     gettext_locale_name: nil,
+     language: "da",
+     locale: %{},
+     private_use: [],
+     rbnf_locale_name: :da,
+     requested_locale_name: "da",
+     script: :Latn,
+     territory: :DK,
+     transform: %{},
+     language_variants: []
+   }},
+  {0.3,
+   %Cldr.LanguageTag{
+     backend: TestBackend.Cldr,
+     canonical_locale_name: "zh-TW",
+     cldr_locale_name: :"zh-Hant",
+     language_subtags: [],
+     extensions: %{},
+     gettext_locale_name: nil,
+     language: "zh",
+     locale: %{},
+     private_use: [],
+     rbnf_locale_name: :"zh-Hant",
+     requested_locale_name: "zh-TW",
+     script: :Hant,
+     territory: :TW,
+     transform: %{},
+     language_variants: []
+   }}
+]
+
+Plausible.Cldr.AcceptLanguage.parse! "invalid_tag"
+** (Cldr.AcceptLanguageError) "Expected a BCP47 language tag. Could not parse the remaining "g" starting at position 11
+    (ex_cldr) lib/cldr/accept_language.ex:304: Cldr.AcceptLanguage.parse!/1
+
+iex> Plausible.Cldr.AcceptLanguage.parse!("da,zh-TW;q=0.3,invalid_tag")
+[
+  {1.0,
+   %Cldr.LanguageTag{
+     backend: TestBackend.Cldr,
+     canonical_locale_name: "da",
+     cldr_locale_name: :da,
+     language_subtags: [],
+     extensions: %{},
+     gettext_locale_name: nil,
+     language: "da",
+     locale: %{},
+     private_use: [],
+     rbnf_locale_name: :da,
+     requested_locale_name: "da",
+     script: :Latn,
+     territory: :DK,
+     transform: %{},
+     language_variants: []
+   }},
+  {0.3,
+   %Cldr.LanguageTag{
+     backend: TestBackend.Cldr,
+     canonical_locale_name: "zh-TW",
+     cldr_locale_name: :"zh-Hant",
+     language_subtags: [],
+     extensions: %{},
+     gettext_locale_name: nil,
+     language: "zh",
+     locale: %{},
+     private_use: [],
+     rbnf_locale_name: :"zh-Hant",
+     requested_locale_name: "zh-TW",
+     script: :Hant,
+     territory: :TW,
+     transform: %{},
+     language_variants: []
+   }},
+  {:error,
+   {Cldr.LanguageTag.ParseError,
+    "Expected a BCP47 language tag. Could not parse the remaining \"g\" starting at position 11"}}
+]
+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Cldr.Currency.html b/Plausible.Cldr.Currency.html new file mode 100644 index 000000000..7cc73ad60 --- /dev/null +++ b/Plausible.Cldr.Currency.html @@ -0,0 +1,1426 @@ + + + + + + + + + + Plausible.Cldr.Currency — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Cldr.Currency + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Returns a map of the metadata for all currencies for +a given locale.

+ +
+ +
+ + +

Returns a map of the metadata for all currencies for +a given locale and raises on error.

+ +
+ +
+ + +

Returns the currency metadata for the requested currency code.

+ +
+ +
+ + +

Returns the currency metadata for the requested currency code.

+ +
+ +
+ + +

Returns the effective currency for a given locale

+ +
+ +
+ + +

Returns a list of historic and the current +currency for a given locale.

+ +
+ +
+ + +

Returns a map that matches a currency string to a +currency code.

+ +
+ +
+ + +

Returns a map that matches a currency string to a +currency code or raises an exception.

+ +
+ +
+ + +

Returns the current currency for a given locale.

+ +
+ +
+ + +

Returns a mapping from a territory code to its +current currency code.

+ +
+ + + + + +
+ + +

Returns a 2-tuple indicating if the supplied currency code is known.

+ +
+ +
+ + +

Returns a boolean indicating if the supplied currency code is known.

+ +
+ +
+ + +

Returns a list of all known currency codes.

+ +
+ +
+ + +

Returns a Currency struct created from the arguments.

+ +
+ +
+ + +

Returns the appropriate currency display name for the currency, based +on the plural rules in effect for the locale.

+ +
+ +
+ + +

Returns the strings associated with a currency +in a given locale.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + + + +
+ + + Link to this function + +

currencies_for_locale(locale, only \\ :all, except \\ nil)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec currencies_for_locale(
+  Cldr.Locale.locale_name() | Cldr.LanguageTag.t(),
+  only :: Cldr.Currency.filter(),
+  except :: Cldr.Currency.filter()
+) :: {:ok, map()} | {:error, {module(), String.t()}}
+ +
@spec currencies_for_locale(
+  Cldr.Locale.locale_name() | Cldr.LanguageTag.t(),
+  only :: Cldr.Currency.filter(),
+  except :: Cldr.Currency.filter()
+) :: map() | no_return()
+ +
+ +

Returns a map of the metadata for all currencies for +a given locale.

+ +

arguments

+
+ Arguments +

+
  • locale is any valid locale name returned by MyApp.Cldr.known_locale_names/0 +or a Cldr.LanguageTag struct returned by MyApp.Cldr.Locale.new!/1

  • currency_status is :all, :current, :historic, +unannotated or :tender; or a list of one or more status. +The default is :all. See Cldr.Currency.currency_filter/2.

+ +

returns

+
+ Returns +

+
  • {:ok, currency_map} or

  • {:error, {exception, reason}}

+ +

example

+
+ Example +

+

MyApp.Cldr.Currency.currencies_for_locale "en" + => {:ok, + %{

 FJD: %Cldr.Currency{
+   cash_digits: 2,
+   cash_rounding: 0,
+   code: "FJD",
+   count: %{one: "Fijian dollar", other: "Fijian dollars"},
+   digits: 2,
+   from: nil,
+   iso_digits: 2,
+   name: "Fijian Dollar",
+   narrow_symbol: "$",
+   rounding: 0,
+   symbol: "FJD",
+   tender: true,
+   to: nil
+ },
+ SUR: %Cldr.Currency{
+   cash_digits: 2,
+   cash_rounding: 0,
+   code: "SUR",
+   count: %{one: "Soviet rouble", other: "Soviet roubles"},
+   digits: 2,
+   from: nil,
+   iso_digits: nil,
+   name: "Soviet Rouble",
+   narrow_symbol: nil,
+   rounding: 0,
+   symbol: "SUR",
+   tender: true,
+   to: nil
+ },
+ ...
+}}
+
+
+
+ + + + + +
+ + + Link to this function + +

currencies_for_locale!(locale, only \\ :all, except \\ nil)

+ + + + View Source + + + +
+ +
+ +

Returns a map of the metadata for all currencies for +a given locale and raises on error.

+ +

arguments

+
+ Arguments +

+
  • locale is any valid locale name returned by MyApp.Cldr.known_locale_names/0 +or a Cldr.LanguageTag struct returned by MyApp.Cldr.Locale.new!/1

  • currency_status is :all, :current, :historic, +unannotated or :tender; or a list of one or more status. +The default is :all. See Cldr.Currency.currency_filter/2.

+ +

returns

+
+ Returns +

+
  • {:ok, currency_map} or

  • raises an exception

+ +

example

+
+ Example +

+

MyApp.Cldr.Currency.currencies_for_locale! "en" + => %{

FJD: %Cldr.Currency{
+  cash_digits: 2,
+  cash_rounding: 0,
+  code: "FJD",
+  count: %{one: "Fijian dollar", other: "Fijian dollars"},
+  digits: 2,
+  from: nil,
+  iso_digits: 2,
+  name: "Fijian Dollar",
+  narrow_symbol: "$",
+  rounding: 0,
+  symbol: "FJD",
+  tender: true,
+  to: nil
+},
+SUR: %Cldr.Currency{
+  cash_digits: 2,
+  cash_rounding: 0,
+  code: "SUR",
+  count: %{one: "Soviet rouble", other: "Soviet roubles"},
+  digits: 2,
+  from: nil,
+  iso_digits: nil,
+  name: "Soviet Rouble",
+  narrow_symbol: nil,
+  rounding: 0,
+  symbol: "SUR",
+  tender: true,
+  to: nil
+},
+...

}

+
+
+
+ + + +
+ + + Link to this function + +

currency_for_code(currency_or_currency_code, options \\ [locale: Plausible.Cldr.default_locale()])

+ + + + View Source + + + +
+ +
+ +
+ +
@spec currency_for_code(Cldr.Currency.code() | Cldr.Currency.t(), Keyword.t()) ::
+  {:ok, Cldr.Currency.t()} | {:error, {module(), String.t()}}
+ +
+ +

Returns the currency metadata for the requested currency code.

+ +

arguments

+
+ Arguments +

+
  • currency_or_currency_code is a binary or atom representation + of an ISO 4217 currency code, or a %Cldr.Currency{} struct.

+ +

options

+
+ Options +

+

+ +

returns

+
+ Returns +

+
  • A {:ok, currency} or

  • {:error, {exception, reason}}

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Currency.currency_for_code("AUD")
+{:ok,
+  %Cldr.Currency{
+    cash_digits: 2,
+    cash_rounding: 0,
+    code: "AUD",
+    count: %{one: "Australian dollar", other: "Australian dollars"},
+    digits: 2,
+    iso_digits: 2,
+    name: "Australian Dollar",
+    narrow_symbol: "$",
+    rounding: 0,
+    symbol: "A$",
+    tender: true
+}}
+
+iex> Plausible.Cldr.Currency.currency_for_code("THB")
+{:ok,
+  %Cldr.Currency{
+    cash_digits: 2,
+    cash_rounding: 0,
+    code: "THB",
+    count: %{one: "Thai baht", other: "Thai baht"},
+    digits: 2,
+    iso_digits: 2,
+    name: "Thai Baht",
+    narrow_symbol: "฿",
+    rounding: 0,
+    symbol: "THB",
+    tender: true
+}}
+
+
+
+ + + +
+ + + Link to this function + +

currency_for_code!(currency_or_currency_code, options \\ [locale: Plausible.Cldr.default_locale()])

+ + + + View Source + + + + (since 2.14.0) + +
+ +
+ +
+ +
@spec currency_for_code!(Cldr.Currency.code() | Cldr.Currency.t(), Keyword.t()) ::
+  Cldr.Currency.t() | no_return()
+ +
+ +

Returns the currency metadata for the requested currency code.

+ +

arguments

+
+ Arguments +

+
  • currency_or_currency_code is a binary or atom representation + of an ISO 4217 currency code, or a %Cldr.Currency{} struct.

+ +

options

+
+ Options +

+

+ +

returns

+
+ Returns +

+
  • A t:Cldr.Current.t/0 or

  • raises an exception

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Currency.currency_for_code!("AUD")
+%Cldr.Currency{
+  cash_digits: 2,
+  cash_rounding: 0,
+  code: "AUD",
+  count: %{one: "Australian dollar", other: "Australian dollars"},
+  digits: 2,
+  iso_digits: 2,
+  name: "Australian Dollar",
+  narrow_symbol: "$",
+  rounding: 0,
+  symbol: "A$",
+  tender: true
+}
+
+iex> Plausible.Cldr.Currency.currency_for_code!("THB")
+%Cldr.Currency{
+  cash_digits: 2,
+  cash_rounding: 0,
+  code: "THB",
+  count: %{one: "Thai baht", other: "Thai baht"},
+  digits: 2,
+  iso_digits: 2,
+  name: "Thai Baht",
+  narrow_symbol: "฿",
+  rounding: 0,
+  symbol: "THB",
+  tender: true
+}
+
+
+
+ +
+ + + Link to this function + +

currency_from_locale(locale)

+ + + + View Source + + + +
+ +
+ +

Returns the effective currency for a given locale

+ +

arguments

+
+ Arguments +

+

+ +

returns

+
+ Returns +

+
  • A ISO 4217 currency code as an upcased atom

+ +

examples

+
+ Examples +

+
iex> {:ok, locale} = Plausible.Cldr.validate_locale "en"
+iex> Plausible.Cldr.Currency.currency_from_locale locale
+:USD
+
+iex> {:ok, locale} = Plausible.Cldr.validate_locale "en-AU"
+iex> Plausible.Cldr.Currency.currency_from_locale locale
+:AUD
+
+iex> Plausible.Cldr.Currency.currency_from_locale "en-GB"
+:GBP
+
+
+
+ +
+ + + Link to this function + +

currency_history_for_locale(language_tag)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec currency_history_for_locale(Cldr.LanguageTag.t() | Cldr.Locale.locale_name()) ::
+  map() | {:error, {module(), String.t()}}
+ +
+ +

Returns a list of historic and the current +currency for a given locale.

+ +

arguments

+
+ Arguments +

+
  • locale is any valid locale name returned by MyApp.Cldr.known_locale_names/0 +or a Cldr.LanguageTag struct returned by MyApp.Cldr.Locale.new!/1

+ +

example

+
+ Example +

+
iex> MyApp.Cldr.Currency.currency_history_for_locale "en"
+{:ok,
+    %{
+    USD: %{from: ~D[1792-01-01], to: nil},
+    USN: %{tender: false},
+    USS: %{from: nil, tender: false, to: ~D[2014-03-01]}
+  }
+}
+
+
+
+ + + + + +
+ + + Link to this function + +

currency_strings(locale, only \\ :all, except \\ nil)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec currency_strings(
+  Cldr.LanguageTag.t() | Cldr.Locale.locale_name(),
+  only :: Cldr.Currency.filter(),
+  except :: Cldr.Currency.filter()
+) :: {:ok, map()} | {:error, {module(), String.t()}}
+ +
+ +

Returns a map that matches a currency string to a +currency code.

A currency string is a localised name or symbol +representing a currency in a locale-specific manner.

+ +

arguments

+
+ Arguments +

+
  • locale is any valid locale name returned by MyApp.Cldr.known_locale_names/0 +or a Cldr.LanguageTag struct returned by MyApp.Cldr.Locale.new!/1

  • currency_status is :all, :current, :historic, +unannotated or :tender; or a list of one or more status. +The default is :all. See Cldr.Currency.currency_filter/2.

+ +

returns

+
+ Returns +

+
  • {:ok, currency_string_map} or

  • {:error, {exception, reason}}

+ +

example

+
+ Example +

+
MyApp.Cldr.Currency.currency_strings "en"
+=> {:ok,
+ %{
+   "mexican silver pesos" => :MXP,
+   "sudanese dinar" => :SDD,
+   "bad" => :BAD,
+   "rsd" => :RSD,
+   "swazi lilangeni" => :SZL,
+   "zairean new zaire" => :ZRN,
+   "guyanaese dollars" => :GYD,
+   "equatorial guinean ekwele" => :GQE,
+   ...
+  }}
+
+
+
+ + + + + +
+ + + Link to this function + +

currency_strings!(locale_name, only \\ :all, except \\ nil)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec currency_strings!(
+  Cldr.LanguageTag.t() | Cldr.Locale.locale_name(),
+  only :: Cldr.Currency.filter(),
+  except :: Cldr.Currency.filter()
+) :: map() | no_return()
+ +
+ +

Returns a map that matches a currency string to a +currency code or raises an exception.

A currency string is a localised name or symbol +representing a currency in a locale-specific manner.

+ +

arguments

+
+ Arguments +

+
  • locale is any valid locale name returned by MyApp.Cldr.known_locale_names/0 +or a Cldr.LanguageTag struct returned by MyApp.Cldr.Locale.new!/1

  • currency_status is :all, :current, :historic, +unannotated or :tender; or a list of one or more status. +The default is :all. See Cldr.Currency.currency_filter/2.

+ +

returns

+
+ Returns +

+
  • {:ok, currency_string_map} or

  • raises an exception

+ +

example

+
+ Example +

+
MyApp.Cldr.Currency.currency_strings! "en"
+=> %{
+  "mexican silver pesos" => :MXP,
+  "sudanese dinar" => :SDD,
+  "bad" => :BAD,
+  "rsd" => :RSD,
+  "swazi lilangeni" => :SZL,
+  "zairean new zaire" => :ZRN,
+  "guyanaese dollars" => :GYD,
+  "equatorial guinean ekwele" => :GQE,
+  ...
+ }
+
+
+
+ +
+ + + Link to this function + +

current_currency_from_locale(locale)

+ + + + View Source + + + +
+ +
+ +

Returns the current currency for a given locale.

This function does not consider the U extenion +parameters cu or rg. It is recommended to us +Cldr.Currency.currency_from_locale/1 in most +circumstances.

+ +

arguments

+
+ Arguments +

+
  • locale is any valid locale name returned by MyApp.Cldr.known_locale_names/0 +or a Cldr.LanguageTag struct returned by MyApp.Cldr.Locale.new!/1

+ +

example

+
+ Example +

+
iex> MyApp.Cldr.Currency.current_currency_from_locale "en"
+:USD
+
+iex> MyApp.Cldr.Currency.current_currency_from_locale "en-AU"
+:AUD
+
+
+
+ +
+ + + Link to this function + +

current_territory_currencies()

+ + + + View Source + + + + (since 2.15.0) + +
+ +
+ +
+ +
@spec current_territory_currencies() :: %{
+  required(Cldr.Locale.territory_code()) => Cldr.Currency.code()
+}
+ +
+ +

Returns a mapping from a territory code to its +current currency code.

If a territory has no current currency (like +Antartica, territory code :AQ) then no +mapping is returned for that territory.

+ +

returns

+
+ Returns +

+
  • A map of {territory_code => Cldr.Currency.t}

+ +

example

+
+ Example +

+
iex> Plausible.Cldr.Currency.current_territory_currencies()
+
+
+
+ +
+ + + Link to this function + +

known_currencies()

+ + + + View Source + + + +
+ +
+ +

See Plausible.Cldr.Currency.known_currency_codes/0.

+
+
+
+ +
+ + + Link to this function + +

known_currency?(code)

+ + + + View Source + + + +
+ +
+ +

See Plausible.Cldr.Currency.known_currency_code?/1.

+
+
+
+ +
+ + + Link to this function + +

known_currency_code(currency_code)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec known_currency_code(Cldr.Currency.code()) ::
+  {:ok, Cldr.Currency.code()} | {:error, {module(), String.t()}}
+ +
+ +

Returns a 2-tuple indicating if the supplied currency code is known.

+ +

arguments

+
+ Arguments +

+
  • currency_code is a binary or atom representing an ISO4217 +currency code

+ +

returns

+
+ Returns +

+
  • {:ok, currency_code} or

  • {:error, {exception, reason}}

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Currency.known_currency_code "AUD"
+{:ok, :AUD}
+
+iex> Plausible.Cldr.Currency.known_currency_code "GGG"
+{:error, {Cldr.UnknownCurrencyError, "The currency \"GGG\" is invalid"}}
+
+
+
+ +
+ + + Link to this function + +

known_currency_code?(currency_code)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec known_currency_code?(Cldr.Currency.code()) :: boolean()
+ +
+ +

Returns a boolean indicating if the supplied currency code is known.

+ +

arguments

+
+ Arguments +

+
  • currency_code is a binary or atom representing an ISO4217 +currency code

+ +

returns

+
+ Returns +

+
  • true or false

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Currency.known_currency_code? "AUD"
+true
+
+iex> Plausible.Cldr.Currency.known_currency_code? "GGG"
+false
+
+iex> Plausible.Cldr.Currency.known_currency_code? :XCV
+false
+
+
+
+ +
+ + + Link to this function + +

known_currency_codes()

+ + + + View Source + + + +
+ +
+ +
+ +
@spec known_currency_codes() :: [atom()]
+ +
+ +

Returns a list of all known currency codes.

+ +

example

+
+ Example +

+
iex> Plausible.Cldr.Currency.known_currency_codes
+
+
+
+ + + +
+ + + Link to this function + +

new(currency, options \\ [])

+ + + + View Source + + + +
+ +
+ +
+ +
@spec new(Cldr.Currency.code(), map() | Keyword.t()) ::
+  {:ok, Cldr.Currency.t()} | {:error, {module(), String.t()}}
+ +
+ +

Returns a Currency struct created from the arguments.

+ +

arguments

+
+ Arguments +

+
  • currency is a private use currency code in a format defined by +ISO4217 +which is X followed by two alphanumeric characters.

  • options is a map of options representing the optional elements of +the Cldr.Currency.t struct.

+ +

options

+
+ Options +

+
  • :name is the name of the currency. Required.
  • :digits is the precision of the currency. Required.
  • :symbol is the currency symbol. Optional.
  • :narrow_symbol is an alternative narrow symbol. Optional.
  • :round_nearest is the rounding precision such as 0.05. Optional.
  • :alt_code is an alternative currency code for application use.
  • :cash_digits is the precision of the currency when used as cash. Optional.
  • :cash_rounding_nearest is the rounding precision when used as cash +such as 0.05. Optional.

+ +

returns

+
+ Returns +

+
  • {:ok, Cldr.Currency.t} or

  • {:error, {exception, message}}

+ +

example

+
+ Example +

+
iex> Plausible.Cldr.Currency.new(:XAE, name: "Custom Name", digits: 0)
+{:ok,
+ %Cldr.Currency{
+   alt_code: :XAE,
+   cash_digits: 0,
+   cash_rounding: nil,
+   code: :XAE,
+   count: %{other: "Custom Name"},
+   digits: 0,
+   from: nil,
+   iso_digits: 0,
+   name: "Custom Name",
+   narrow_symbol: nil,
+   rounding: 0,
+   symbol: "XAE",
+   tender: false,
+   to: nil
+ }}
+iex> MyApp.Cldr.Currency.new(:XAH, name: "Custom Name")
+{:error, "Required options are missing. Required options are [:name, :digits]"}
+iex> Plausible.Cldr.Currency.new(:XAE, name: "XAE", digits: 0)
+{:error, {Cldr.CurrencyAlreadyDefined, "Currency :XAE is already defined."}}
+
+
+
+ + + +
+ + + Link to this function + +

pluralize(number, currency, options \\ [])

+ + + + View Source + + + +
+ +
+ +
+ +
@spec pluralize(pos_integer(), atom(), Keyword.t()) ::
+  {:ok, String.t()} | {:error, {module(), String.t()}}
+ +
+ +

Returns the appropriate currency display name for the currency, based +on the plural rules in effect for the locale.

+ +

arguments

+
+ Arguments +

+

+ +

options

+
+ Options +

+

+ +

returns

+
+ Returns +

+
  • {:ok, plural_string} or

  • {:error, {exception, message}}

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Currency.pluralize 1, :USD
+{:ok, "US dollar"}
+
+iex> Plausible.Cldr.Currency.pluralize 3, :USD
+{:ok, "US dollars"}
+
+iex> Plausible.Cldr.Currency.pluralize 12, :USD, locale: "zh"
+{:ok, "美元"}
+
+iex> Plausible.Cldr.Currency.pluralize 12, :USD, locale: "fr"
+{:ok, "dollars des États-Unis"}
+
+iex> Plausible.Cldr.Currency.pluralize 1, :USD, locale: "fr"
+{:ok, "dollar des États-Unis"}
+
+
+
+ +
+ + + Link to this function + +

strings_for_currency(currency, locale)

+ + + + View Source + + + +
+ +
+ +

Returns the strings associated with a currency +in a given locale.

+ +

arguments

+
+ Arguments +

+
  • currency is an ISO4217 currency code

  • locale is any valid locale name returned by MyApp.Cldr.known_locale_names/0 +or a Cldr.LanguageTag struct returned by MyApp.Cldr.Locale.new!/1

+ +

returns

+
+ Returns +

+
  • A list of strings or

  • {:error, {exception, reason}}

+ +

example

+
+ Example +

+
iex> MyApp.Cldr.Currency.strings_for_currency :AUD, "en"
+["a$", "australian dollars", "aud", "australian dollar"]
+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Cldr.Locale.html b/Plausible.Cldr.Locale.html new file mode 100644 index 000000000..33f102f06 --- /dev/null +++ b/Plausible.Cldr.Locale.html @@ -0,0 +1,760 @@ + + + + + + + + + + Plausible.Cldr.Locale — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Cldr.Locale + (Plausible v0.0.1) + +

+ + +
+

Backend module that provides functions +to define new locales and display human-readable +locale names for presentation purposes.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Returns the list of fallback locale names, starting +with the provided locale name.

+ +
+ +
+ + +

Returns the list of fallback locales, starting +with the provided locale name.

+ +
+ +
+ + +

Returns the "best fit" locale for a given territory.

+ +
+ +
+ + +

Returns a "best fit" locale for a host name.

+ +
+ +
+ + +
+ +
+ + +
+ +
+ + +

Returns the last segment of a host that might +be a territory.

+ +
+ +
+ + +

Returns the territory from a language tag or +locale name.

+ +
+ +
+ + +

Returns the time zone from a language tag or +locale name.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

fallback_locale_names(locale)

+ + + + View Source + + + + (since 2.26.0) + +
+ +
+ +
+ +
@spec fallback_locale_names(Cldr.LanguageTag.t() | Cldr.Locale.locale_reference()) ::
+  {:ok, [Cldr.Locale.locale_name(), ...]} | {:error, {module(), String.t()}}
+ +
+ +

Returns the list of fallback locale names, starting +with the provided locale name.

Fallbacks are a list of locate names which can +be used to resolve translation or other localization +data if such localised data does not exist for +this specific locale. After locale-specific fallbacks +are determined, the the default locale and its fallbacks +are added to the chain.

+ +

arguments

+
+ Arguments +

+

+ +

returns

+
+ Returns +

+
  • {:ok, list_of_locale_names} or

  • {:error, {exception, reason}}

+ +

examples

+
+ Examples +

+

In these examples the default locale is :"en-001".

iex> Plausible.Cldr.Locale.fallback_locale_names(:"fr-CA")
+{:ok, [:"fr-CA", :fr, :"en-001", :en]}
+
+# Fallbacks are typically formed by progressively
+# stripping variant, territory and script from the
+# given locale name. But not always - there are
+# certain fallbacks that take a different path.
+
+iex> Plausible.Cldr.Locale.fallback_locale_names(:nb)
+{:ok, [:nb, :no, :"en-001", :en]}
+
+
+
+ +
+ + + Link to this function + +

fallback_locales(locale)

+ + + + View Source + + + + (since 2.26.0) + +
+ +
+ +
+ +
@spec fallback_locales(Cldr.LanguageTag.t() | Cldr.Locale.locale_reference()) ::
+  {:ok, [Cldr.LanguageTag.t(), ...]} | {:error, {module(), String.t()}}
+ +
+ +

Returns the list of fallback locales, starting +with the provided locale name.

Fallbacks are a list of locate names which can +be used to resolve translation or other localization +data if such localised data does not exist for +this specific locale. After locale-specific fallbacks +are determined, the the default locale and its fallbacks +are added to the chain.

+ +

arguments

+
+ Arguments +

+

+ +

returns

+
+ Returns +

+
  • {:ok, list_of_locales} or

  • {:error, {exception, reason}}

+ +

examples

+
+ Examples +

+

In these examples the default locale is :"en-001".

Plausible.Cldr.Locale.fallback_locales(:"fr-CA")
+=> {:ok,
+     [#Cldr.LanguageTag<fr-CA [validated]>, #Cldr.LanguageTag<fr [validated]>,
+      #Cldr.LanguageTag<en [validated]>]}
+
+# Fallbacks are typically formed by progressively
+# stripping variant, territory and script from the
+# given locale name. But not always - there are
+# certain fallbacks that take a different path.
+
+Plausible.Cldr.Locale.fallback_locales(:nb))
+=> {:ok,
+     [#Cldr.LanguageTag<nb [validated]>, #Cldr.LanguageTag<no [validated]>,
+      #Cldr.LanguageTag<en [validated]>]}
+
+
+
+ +
+ + + Link to this function + +

locale_for_territory(territory)

+ + + + View Source + + + + (since 2.26.0) + +
+ +
+ +
+ +
@spec locale_for_territory(Cldr.Locale.territory_code()) ::
+  {:ok, Cldr.LanguageTag.t()} | {:error, {module(), String.t()}}
+ +
+ +

Returns the "best fit" locale for a given territory.

Using the population percentage data from CLDR, the +language most commonly spoken in the given territory +is used to form a locale name which is then validated +against the given backend.

First a territory-specific locale is validated and if +that fails, the base language only is validate.

For example, if the territory is AU then then the +language most spoken is "en". First, the locale "en-AU" +is validated and if that fails, "en" is validated.

+ +

arguments

+
+ Arguments +

+

+ +

returns

+
+ Returns +

+
  • {:ok, language_tag} or

  • {:error, {exception, reason}}

+ +

examples

+
+ Examples +

+

iex> Plausible.Cldr.Locale.locale_for_territory(:AU) + Elixir.Plausible.Cldr.validate_locale(:"en-AU")

iex> Plausible.Cldr.Locale.locale_for_territory(:US) + Elixir.Plausible.Cldr.validate_locale(:"en-US")

iex> Plausible.Cldr.Locale.locale_for_territory(:ZZ) + {:error, {Cldr.UnknownTerritoryError, "The territory :ZZ is unknown"}}

+
+
+
+ + + +
+ + + Link to this function + +

locale_from_host(host, options \\ [])

+ + + + View Source + + + + (since 2.26.0) + +
+ +
+ +
+ +
@spec locale_from_host(String.t(), Keyword.t()) ::
+  {:ok, Cldr.LanguageTag.t()} | {:error, {module(), String.t()}}
+ +
+ +

Returns a "best fit" locale for a host name.

+ +

arguments

+
+ Arguments +

+
  • host is any valid host name

  • options is a keyword list of options. The default +is [].

+ +

options

+
+ Options +

+
  • :tlds is a list of territory codes as upper-cased +atoms that are to be considered as top-level domains. +See Cldr.Locale.locale_from_host/2 for the default +list.

+ +

returns

+
+ Returns +

+
  • {:ok, langauge_tag} or

  • {:error, {exception, reason}}

+ +

notes

+
+ Notes +

+

Certain top-level domains have become associated with content +underlated to the territory for who the domain is registered. +Therefore Google (and perhaps others) do not associate these +TLDs as belonging to the territory but rather are considered +generic top-level domain names.

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Locale.locale_from_host "a.b.com.au"
+Elixir.Plausible.Cldr.validate_locale(:"en-AU")
+
+iex> Plausible.Cldr.Locale.locale_from_host("a.b.com.tv")
+{:error,
+ {Cldr.UnknownLocaleError, "No locale was identified for territory \"tv\""}}
+
+iex> Plausible.Cldr.Locale.locale_from_host("a.b.com")
+{:error,
+ {Cldr.UnknownLocaleError, "No locale was identified for territory \"com\""}}
+
+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

territory_from_host(host)

+ + + + View Source + + + + (since 2.26.0) + +
+ +
+ +
+ +
@spec territory_from_host(String.t()) ::
+  {:ok, Cldr.Locale.territory_code()} | {:error, {module(), String.t()}}
+ +
+ +

Returns the last segment of a host that might +be a territory.

+ +

arguments

+
+ Arguments +

+
  • host is any valid host name

+ +

returns

+
+ Returns +

+
  • {:ok, territory} or

  • {:error, {exception, reason}}

+ +

examples

+
+ Examples +

+
iex> Cldr.Locale.territory_from_host("a.b.com.au")
+{:ok, :AU}
+
+iex> Cldr.Locale.territory_from_host("a.b.com")
+{:error,
+ {Cldr.UnknownLocaleError, "No locale was identified for territory \"com\""}}
+
+
+
+ +
+ + + Link to this function + +

territory_from_locale(locale)

+ + + + View Source + + + + (since 2.18.2) + +
+ +
+ +
+ +
@spec territory_from_locale(Cldr.LanguageTag.t() | Cldr.Locale.locale_name()) ::
+  Cldr.Locale.territory_code()
+ +
+ +

Returns the territory from a language tag or +locale name.

+ +

arguments

+
+ Arguments +

+

+ +

returns

+
+ Returns +

+
  • A territory code as an atom

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Locale.territory_from_locale "en-US"
+:US
+
+iex> Plausible.Cldr.Locale.territory_from_locale "en-US-u-rg-GBzzzz"
+:GB
+
+
+
+ +
+ + + Link to this function + +

timezone_from_locale(locale)

+ + + + View Source + + + + (since 2.19.0) + +
+ +
+ +
+ +
@spec timezone_from_locale(Cldr.LanguageTag.t() | Cldr.Locale.locale_name()) ::
+  String.t() | {:error, {module(), String.t()}}
+ +
+ +

Returns the time zone from a language tag or +locale name.

+ +

arguments

+
+ Arguments +

+

+ +

returns

+
+ Returns +

+
  • A time zone ID as a string or

  • :error if no time zone can be determined

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Locale.timezone_from_locale "en-US-u-tz-ausyd"
+"Australia/Sydney"
+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Cldr.Number.Cardinal.html b/Plausible.Cldr.Number.Cardinal.html new file mode 100644 index 000000000..778d3cb8a --- /dev/null +++ b/Plausible.Cldr.Number.Cardinal.html @@ -0,0 +1,495 @@ + + + + + + + + + + Plausible.Cldr.Number.Cardinal — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Cldr.Number.Cardinal + (Plausible v0.0.1) + +

+ + +
+

Implements cardinal plural rules for numbers.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

The locale names for which plural rules are defined.

+ +
+ +
+ + +

The configured locales for which plural rules are defined.

+ +
+ +
+ + +

Return the plural key for a given number in a given locale

+ +
+ +
+ + +

Returns all the plural rules defined in CLDR.

+ +
+ +
+ + +

Return the plural rules for a locale.

+ +
+ +
+ + +

Pluralize a number using cardinal plural rules +and a substitution map.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

available_locale_names()

+ + + + View Source + + + +
+ +
+ +

The locale names for which plural rules are defined.

+
+
+
+ +
+ + + Link to this function + +

known_locale_names()

+ + + + View Source + + + +
+ +
+ +
+ +
@spec known_locale_names() :: [Cldr.Locale.locale_name(), ...]
+ +
+ +

The configured locales for which plural rules are defined.

Returns the intersection of Plausible.Cldr.known_locale_names/0 and +the locales for which Cardinal plural rules are defined.

There are many Cldr locales which don't have their own plural +rules so this list is the intersection of Cldr's configured +locales and those that have rules.

+
+
+
+ + + +
+ + + Link to this function + +

plural_rule(number, locale, rounding \\ Math.default_rounding())

+ + + + View Source + + + +
+ +
+ + + +

Return the plural key for a given number in a given locale

Returns which plural key (:zero, :one, :two, :few, +:many or :other) a given number fits into within the +context of a given locale.

Note that these key names should not be interpreted +literally. For example, the key returned from +Cldr.Number.Ordinal.plural_rule(0, "en") is actually +:other, not :zero.

This key can then be used to format a number, date, time, unit, +list or other content in a plural-sensitive way.

+ +

arguments

+
+ Arguments +

+

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Number.Cardinal.plural_rule 0, "fr"
+:one
+
+iex> Plausible.Cldr.Number.Cardinal.plural_rule 0, "en"
+:other
+
+
+
+ + + +
+ +
+ +
@spec plural_rules() :: map()
+ +
+ +

Returns all the plural rules defined in CLDR.

+
+
+
+ +
+ + + Link to this function + +

plural_rules_for(locale_name)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec plural_rules_for(Cldr.Locale.locale_name() | Cldr.LanguageTag.t()) :: [
+  {atom(), list()},
+  ...
+]
+ +
+ +

Return the plural rules for a locale.

+ +

arguments

+
+ Arguments +

+

The rules are returned in AST form after parsing.

+
+
+
+ +
+ + + Link to this function + +

pluralize(number, locale_name, substitutions)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec pluralize(
+  Cldr.Math.number_or_decimal() | Range.t(),
+  Cldr.Locale.locale_reference(),
+  %{}
+) :: any()
+ +
+ +

Pluralize a number using cardinal plural rules +and a substitution map.

+ +

arguments

+
+ Arguments +

+

See also Plausible.Cldr.Number.Cardinal.Cardinal.plural_rule/3.

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Number.Cardinal.pluralize 1, "en", %{one: "one"}
+"one"
+
+iex> Plausible.Cldr.Number.Cardinal.pluralize 2, "en", %{one: "one"}
+nil
+
+iex> Plausible.Cldr.Number.Cardinal.pluralize 2, "en", %{one: "one", two: "two", other: "other"}
+"other"
+
+iex> Plausible.Cldr.Number.Cardinal.pluralize 22, "en", %{one: "one", two: "two", other: "other"}
+"other"
+
+iex> Plausible.Cldr.Number.Cardinal.pluralize Decimal.new(1), "en", %{one: "one"}
+"one"
+
+iex> Plausible.Cldr.Number.Cardinal.pluralize Decimal.new(2), "en", %{one: "one"}
+nil
+
+iex> Plausible.Cldr.Number.Cardinal.pluralize Decimal.new(2), "en", %{one: "one", two: "two"}
+nil
+
+iex> Plausible.Cldr.Number.Cardinal.pluralize 1..10, "ar", %{one: "one", few: "few", other: "other"}
+"few"
+
+iex> Plausible.Cldr.Number.Cardinal.pluralize 1..10, "en", %{one: "one", few: "few", other: "other"}
+"other"
+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Cldr.Number.Format.html b/Plausible.Cldr.Number.Format.html new file mode 100644 index 000000000..225acd4c7 --- /dev/null +++ b/Plausible.Cldr.Number.Format.html @@ -0,0 +1,870 @@ + + + + + + + + + + Plausible.Cldr.Number.Format — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Cldr.Number.Format + (Plausible v0.0.1) + +

+ + +
+

Functions to manage the collection of number patterns defined in Cldr.

Number patterns affect how numbers are interpreted in a localized context. +Here are some examples, based on the French locale. The "." shows where the +decimal point should go. The "," shows where the thousands separator should +go. A "0" indicates zero-padding: if the number is too short, a zero (in the +locale's numeric set) will go there. A "#" indicates no padding: if the +number is too short, nothing goes there. A "¤" shows where the currency sign +will go. The following illustrates the effects of different patterns for the +French locale, with the number "1234.567". Notice how the pattern characters +',' and '.' are replaced by the characters appropriate for the locale.

+ +

number-pattern-examples

+
+ Number Pattern Examples +

+
PatternCurrencyText
#,##0.##n/a1 234,57
#,##0.###n/a1 234,567
###0.#####n/a1234,567
###0.0000#n/a1234,5670
00000.0000n/a01234,5670
#,##0.00 ¤EUR1 234,57 €

The number of # placeholder characters before the decimal do not matter, +since no limit is placed on the maximum number of digits. There should, +however, be at least one zero some place in the pattern. In currency formats, +the number of digits after the decimal also do not matter, since the +information in the supplemental data (see Supplemental Currency Data) is used +to override the number of decimal places — and the rounding — according to +the currency that is being formatted. That can be seen in the above chart, +with the difference between Yen and Euro formatting.

Details of the number formats are described in the +Unicode documentation

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Returns the decimal formats defined for a given locale.

+ +
+ +
+ + +

Returns the decimal formats defined for a given locale.

+ +
+ +
+ + +

Returns the currency space for a given locale and +number system.

+ +
+ +
+ + +

Returns the list of decimal formats in the configured locales including +the list of locales configured for precompilation in config.exs.

+ +
+ +
+ + +

Returns the list of decimal formats for a configured locale.

+ +
+ +
+ + +

Returns the default grouping for a locale as a map.

+ +
+ +
+ + +

Returns the default grouping for a locale +or raises on error.

+ +
+ +
+ + +

Return the predfined formats for a given locale and number_system.

+ +
+ + + +
+ + +

Returns the minimum grouping digits for a locale.

+ +
+ +
+ + +

Returns the minimum grouping digits for a locale +or raises on error.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + + Link to this function + +

all_formats_for(locale \\ Plausible.Cldr.get_locale())

+ + + + View Source + + + +
+ +
+ +
+ +
@spec all_formats_for(Cldr.LanguageTag.t() | Cldr.Locale.locale_name()) ::
+  {:ok, map()} | {:error, {module(), String.t()}}
+ +
+ +

Returns the decimal formats defined for a given locale.

+ +

arguments

+
+ Arguments +

+

+ +

returns

+
+ Returns +

+
  • {:ok, map} where map is a map of decimal formats +keyed by number system or

  • {:error, {exception, message}}

+
+
+
+ + + +
+ + + Link to this function + +

all_formats_for!(locale \\ Plausible.Cldr.get_locale())

+ + + + View Source + + + +
+ +
+ +
+ +
@spec all_formats_for!(Cldr.LanguageTag.t() | Cldr.Locale.locale_name()) ::
+  map() | no_return()
+ +
+ +

Returns the decimal formats defined for a given locale.

+ +

arguments

+
+ Arguments +

+

+ +

returns

+
+ Returns +

+
  • {:ok, map} where map is a map of decimal formats +keyed by number system or

  • raises an exception

See Plausible.Cldr.Number.Format.Number.Format.all_formats_for/1 for further information.

+
+
+
+ +
+ + + Link to this function + +

currency_spacing(locale, number_system)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec currency_spacing(
+  Cldr.LanguageTag.t() | Cldr.Locale.locale_name(),
+  Cldr.Number.System.system_name()
+) :: map() | {:error, {module(), String.t()}}
+ +
+ +

Returns the currency space for a given locale and +number system.

+
+
+
+ +
+ + + Link to this function + +

decimal_format_list()

+ + + + View Source + + + +
+ +
+ +
+ +
@spec decimal_format_list() :: [Cldr.Number.Format.format()]
+ +
+ +

Returns the list of decimal formats in the configured locales including +the list of locales configured for precompilation in config.exs.

This function exists to allow the decimal formatter +to precompile all the known formats at compile time.

+ +

example

+
+ Example +

+
#=> Plausible.Cldr.Number.Format.Format.decimal_format_list
+["#", "#,##,##0%",
+"#,##,##0.###", "#,##,##0.00¤", "#,##,##0.00¤;(#,##,##0.00¤)",
+"#,##,##0 %", "#,##0%", "#,##0.###", "#,##0.00 ¤",
+"#,##0.00 ¤;(#,##0.00 ¤)", "#,##0.00¤", "#,##0.00¤;(#,##0.00¤)",
+"#,##0 %", "#0%", "#0.######", "#0.00 ¤", "#E0", "%#,##0", "% #,##0",
+"0", "0.000000E+000", "0000 M ¤", "0000¤", "000G ¤", "000K ¤", "000M ¤",
+"000T ¤", "000mM ¤", "000m ¤", "000 Bio'.' ¤", "000 Bln ¤", "000 Bn ¤",
+"000 B ¤", "000 E ¤", "000 K ¤", "000 MRD ¤", "000 Md ¤", "000 Mio'.' ¤",
+"000 Mio ¤", "000 Mld ¤", "000 Mln ¤", "000 Mn ¤", "000 Mrd'.' ¤",
+"000 Mrd ¤", "000 Mr ¤", "000 M ¤", "000 NT ¤", "000 N ¤", "000 Tn ¤",
+"000 Tr ¤", ...]
+
+
+
+ + + +
+ + + Link to this function + +

decimal_format_list_for(locale \\ Plausible.Cldr.get_locale())

+ + + + View Source + + + +
+ +
+ +
+ +
@spec decimal_format_list_for(Cldr.LanguageTag.t() | Cldr.Locale.locale_name()) ::
+  {:ok, [String.t()]} | {:error, {module(), String.t()}}
+ +
+ +

Returns the list of decimal formats for a configured locale.

+ +

arguments

+
+ Arguments +

+

This function exists to allow the decimal formatter to precompile all +the known formats at compile time. Its use is not otherwise recommended.

+ +

example

+
+ Example +

+
iex> Plausible.Cldr.Number.Format.decimal_format_list_for(:en)
+{:ok, ["#,##0%", "#,##0.###", "#,##0.00", "#,##0.00;(#,##0.00)","#E0",
+ "0 billion", "0 million", "0 thousand",
+ "0 trillion", "00 billion", "00 million", "00 thousand", "00 trillion",
+ "000 billion", "000 million", "000 thousand", "000 trillion", "000B", "000K",
+ "000M", "000T", "00B", "00K", "00M", "00T", "0B", "0K", "0M", "0T",
+ "¤#,##0.00", "¤#,##0.00;(¤#,##0.00)", "¤000B", "¤000K", "¤000M",
+ "¤000T", "¤00B", "¤00K", "¤00M", "¤00T", "¤0B", "¤0K", "¤0M", "¤0T",
+ "¤ #,##0.00", "¤ #,##0.00;(¤ #,##0.00)", "¤ 000B", "¤ 000K", "¤ 000M",
+ "¤ 000T", "¤ 00B", "¤ 00K", "¤ 00M", "¤ 00T", "¤ 0B", "¤ 0K", "¤ 0M", "¤ 0T"]}
+
+
+
+ + + +
+ + + Link to this function + +

default_grouping_for(locale \\ Plausible.Cldr.get_locale())

+ + + + View Source + + + +
+ +
+ +
+ +
@spec default_grouping_for(Cldr.LanguageTag.t() | Cldr.Locale.locale_name()) ::
+  {:ok, map()} | {:error, {module(), String.t()}}
+ +
+ +

Returns the default grouping for a locale as a map.

+ +

arguments

+
+ Arguments +

+

+ +

returns

+
+ Returns +

+
  • {:ok, grouping} or

  • {:error, {exception, message}}

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Number.Format.default_grouping_for(:en)
+{:ok, %{fraction: %{first: 0, rest: 0}, integer: %{first: 3, rest: 3}}}
+
+
+
+ +
+ + + Link to this function + +

default_grouping_for!(locale)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec default_grouping_for!(Cldr.LanguageTag.t() | Cldr.Locale.locale_name()) ::
+  map() | no_return()
+ +
+ +

Returns the default grouping for a locale +or raises on error.

+ +

arguments

+
+ Arguments +

+

+ +

returns

+
+ Returns +

+
  • grouping as a map or

  • raises an exception

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Number.Format.default_grouping_for!(:en)
+%{fraction: %{first: 0, rest: 0}, integer: %{first: 3, rest: 3}}
+
+
+
+ + + + + +
+ + + Link to this function + +

formats_for(locale \\ Plausible.Cldr.default_locale(), number_system \\ Cldr.Number.System.default_number_system_type())

+ + + + View Source + + + +
+ +
+ +
+ +
@spec formats_for(Cldr.LanguageTag.t() | binary(), atom() | String.t()) ::
+  {:ok, map()} | {:error, {module(), String.t()}}
+ +
+ +

Return the predfined formats for a given locale and number_system.

+ +

arguments

+
+ Arguments +

+

+ +

example

+
+ Example +

+
Plausible.Cldr.Number.Format.formats_for :fr, :native
+#=> %Cldr.Number.Format{
+  accounting: "#,##0.00 ¤;(#,##0.00 ¤)",
+  currency: "#,##0.00 ¤",
+  percent: "#,##0 %",
+  scientific: "#E0",
+  standard: "#,##0.###"
+  currency_short: [{"1000", [one: "0 k ¤", other: "0 k ¤"]},
+   {"10000", [one: "00 k ¤", other: "00 k ¤"]},
+   {"100000", [one: "000 k ¤", other: "000 k ¤"]},
+   {"1000000", [one: "0 M ¤", other: "0 M ¤"]},
+   {"10000000", [one: "00 M ¤", other: "00 M ¤"]},
+   {"100000000", [one: "000 M ¤", other: "000 M ¤"]},
+   {"1000000000", [one: "0 Md ¤", other: "0 Md ¤"]},
+   {"10000000000", [one: "00 Md ¤", other: "00 Md ¤"]},
+   {"100000000000", [one: "000 Md ¤", other: "000 Md ¤"]},
+   {"1000000000000", [one: "0 Bn ¤", other: "0 Bn ¤"]},
+   {"10000000000000", [one: "00 Bn ¤", other: "00 Bn ¤"]},
+   {"100000000000000", [one: "000 Bn ¤", other: "000 Bn ¤"]}],
+   ...
+  }
+
+
+
+ + + + + +
+ + + Link to this function + +

formats_for!(locale \\ Plausible.Cldr.default_locale(), number_system \\ Cldr.Number.System.default_number_system_type())

+ + + + View Source + + + +
+ +
+ +
+ +
@spec formats_for!(
+  Cldr.LanguageTag.t() | Cldr.Locale.locale_name(),
+  Cldr.Number.System.system_name()
+) ::
+  map() | no_return()
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

minimum_grouping_digits_for(locale \\ Plausible.Cldr.get_locale())

+ + + + View Source + + + +
+ +
+ +
+ +
@spec minimum_grouping_digits_for(Cldr.LanguageTag.t() | Cldr.Locale.locale_name()) ::
+  {:ok, non_neg_integer()} | {:error, {module(), String.t()}}
+ +
+ +

Returns the minimum grouping digits for a locale.

+ +

arguments

+
+ Arguments +

+

+ +

returns

+
+ Returns +

+
  • {:ok, minumum_digits} or

  • {:error, {exception, message}}

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Number.Format.minimum_grouping_digits_for("en")
+{:ok, 1}
+
+
+
+ +
+ + + Link to this function + +

minimum_grouping_digits_for!(locale)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec minimum_grouping_digits_for!(Cldr.LanguageTag.t() | Cldr.Locale.locale_name()) ::
+  non_neg_integer() | no_return()
+ +
+ +

Returns the minimum grouping digits for a locale +or raises on error.

+ +

arguments

+
+ Arguments +

+

+ +

returns

+
+ Returns +

+
  • minumum_digits or

  • raises an exception

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Number.Format.minimum_grouping_digits_for!("en")
+1
+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Cldr.Number.Formatter.Decimal.html b/Plausible.Cldr.Number.Formatter.Decimal.html new file mode 100644 index 000000000..8546ad9a7 --- /dev/null +++ b/Plausible.Cldr.Number.Formatter.Decimal.html @@ -0,0 +1,261 @@ + + + + + + + + + + Plausible.Cldr.Number.Formatter.Decimal — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Cldr.Number.Formatter.Decimal + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ +
+ + +

Formats a number according to a decimal format string.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + +
+
+
+ + + +
+ + + Link to this function + +

to_string(number, format, options \\ [])

+ + + + View Source + + + +
+ +
+ +
+ +
@spec to_string(
+  Cldr.Math.number_or_decimal(),
+  String.t() | Cldr.Number.Format.Meta.t(),
+  Keyword.t() | Cldr.Number.Format.Options.t()
+) :: {:ok, String.t()} | {:error, {module(), String.t()}}
+ +
+ +

Formats a number according to a decimal format string.

+ +

arguments

+
+ Arguments +

+ +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Cldr.Number.Ordinal.html b/Plausible.Cldr.Number.Ordinal.html new file mode 100644 index 000000000..90ec408ca --- /dev/null +++ b/Plausible.Cldr.Number.Ordinal.html @@ -0,0 +1,498 @@ + + + + + + + + + + Plausible.Cldr.Number.Ordinal — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Cldr.Number.Ordinal + (Plausible v0.0.1) + +

+ + +
+

Implements ordinal plural rules for numbers.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

The locale names for which plural rules are defined.

+ +
+ +
+ + +

The configured locales for which plural rules are defined.

+ +
+ +
+ + +

Return the plural key for a given number in a given locale

+ +
+ +
+ + +

Returns all the plural rules defined in CLDR.

+ +
+ +
+ + +

Return the plural rules for a locale.

+ +
+ +
+ + +

Pluralize a number using ordinal plural rules +and a substitution map.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

available_locale_names()

+ + + + View Source + + + +
+ +
+ +

The locale names for which plural rules are defined.

+
+
+
+ +
+ + + Link to this function + +

known_locale_names()

+ + + + View Source + + + +
+ +
+ +
+ +
@spec known_locale_names() :: [Cldr.Locale.locale_name(), ...]
+ +
+ +

The configured locales for which plural rules are defined.

Returns the intersection of Plausible.Cldr.known_locale_names/0 and +the locales for which Ordinal plural rules are defined.

There are many Cldr locales which don't have their own plural +rules so this list is the intersection of Cldr's configured +locales and those that have rules.

+
+
+
+ + + +
+ + + Link to this function + +

plural_rule(number, locale, rounding \\ Math.default_rounding())

+ + + + View Source + + + +
+ +
+ + + +

Return the plural key for a given number in a given locale

Returns which plural key (:zero, :one, :two, :few, +:many or :other) a given number fits into within the +context of a given locale.

Note that these key names should not be interpreted +literally. For example, the key returned from +Cldr.Number.Ordinal.plural_rule(0, "en") is actually +:other, not :zero.

This key can then be used to format a number, date, time, unit, +list or other content in a plural-sensitive way.

+ +

arguments

+
+ Arguments +

+

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Number.Ordinal.plural_rule 0, "fr"
+:other
+
+iex> Plausible.Cldr.Number.Ordinal.plural_rule 1, "en"
+:one
+
+
+
+ + + +
+ +
+ +
@spec plural_rules() :: map()
+ +
+ +

Returns all the plural rules defined in CLDR.

+
+
+
+ +
+ + + Link to this function + +

plural_rules_for(locale_name)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec plural_rules_for(Cldr.Locale.locale_name() | Cldr.LanguageTag.t()) :: [
+  {atom(), list()},
+  ...
+]
+ +
+ +

Return the plural rules for a locale.

+ +

arguments

+
+ Arguments +

+

The rules are returned in AST form after parsing.

+
+
+
+ +
+ + + Link to this function + +

pluralize(number, locale_name, substitutions)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec pluralize(
+  Cldr.Math.number_or_decimal() | Range.t(),
+  Cldr.Locale.locale_reference(),
+  %{}
+) :: any()
+ +
+ +

Pluralize a number using ordinal plural rules +and a substitution map.

+ +

arguments

+
+ Arguments +

+
  • number is an integer, float or Decimal or a Range.t{}. When a range, The +is that in any usage, the start value is strictly less than the end value, +and that no values are negative. Results for any cases that do not meet +these criteria are undefined.

  • locale is any locale returned by Plausible.Cldr.Locale.new!/1 or any +locale_name returned by Plausible.Cldr.known_locale_names/0

  • substitutions is a map that maps plural keys to a string. +The valid substitution keys are :zero, :one, :two, +:few, :many and :other.

See also Plausible.Cldr.Number.Ordinal.Ordinal.plural_rule/3.

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Number.Ordinal.pluralize 1, :en, %{one: "one"}
+"one"
+
+iex> Plausible.Cldr.Number.Ordinal.pluralize 2, :en, %{one: "one"}
+nil
+
+iex> Plausible.Cldr.Number.Ordinal.pluralize 2, :en, %{one: "one", two: "two"}
+"two"
+
+iex> Plausible.Cldr.Number.Ordinal.pluralize 22, :en, %{one: "one", two: "two", other: "other"}
+"two"
+
+iex> Plausible.Cldr.Number.Ordinal.pluralize Decimal.new(1), :en, %{one: "one"}
+"one"
+
+iex> Plausible.Cldr.Number.Ordinal.pluralize Decimal.new(2), :en, %{one: "one"}
+nil
+
+iex> Plausible.Cldr.Number.Ordinal.pluralize Decimal.new(2), :en, %{one: "one", two: "two"}
+"two"
+
+iex> Plausible.Cldr.Number.Ordinal.pluralize 1..10, "ar", %{one: "one", few: "few", other: "other"}
+"other"
+
+iex> Plausible.Cldr.Number.Ordinal.pluralize 1..10, "en", %{one: "one", few: "few", other: "other"}
+"other"
+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Cldr.Number.PluralRule.Range.html b/Plausible.Cldr.Number.PluralRule.Range.html new file mode 100644 index 000000000..7054ddaac --- /dev/null +++ b/Plausible.Cldr.Number.PluralRule.Range.html @@ -0,0 +1,242 @@ + + + + + + + + + + Plausible.Cldr.Number.PluralRule.Range — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Cldr.Number.PluralRule.Range + (Plausible v0.0.1) + +

+ + +
+

Implements plural rules for ranges

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Returns a final plural type for a start-of-range plural +type, an end-of-range plural type and a locale.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

plural_rule(first, last, locale)

+ + + + View Source + + + +
+ +
+ + + +

Returns a final plural type for a start-of-range plural +type, an end-of-range plural type and a locale.

+ +

arguments

+
+ Arguments +

+
  • first is a plural type for the start of a range

  • last is a plural type for the end of a range

  • locale is any Cldr.LanguageTag.t or a language name +(not locale name)

+ +

example

+
+ Example +

+
iex> Plausible.Cldr.Number.PluralRule.Range.plural_rule :other, :few, "ar"
+:few
+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Cldr.Number.Symbol.html b/Plausible.Cldr.Number.Symbol.html new file mode 100644 index 000000000..6f7d5787d --- /dev/null +++ b/Plausible.Cldr.Number.Symbol.html @@ -0,0 +1,445 @@ + + + + + + + + + + Plausible.Cldr.Number.Symbol — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Cldr.Number.Symbol + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Returns a list of all decimal symbols defined +by the locales configured in this backend as +a list.

+ +
+ +
+ + +

Returns a list of all decimal symbols defined +by the locales configured in this backend as +a string.

+ +
+ +
+ + +

Returns a list of all grouping symbols defined +by the locales configured in this backend as +a list.

+ +
+ +
+ + +

Returns a list of all grouping symbols defined +by the locales configured in this backend as +a string.

+ +
+ +
+ + +

Returns a map of Cldr.Number.Symbol.t structs of the number symbols for each +of the number systems of a locale.

+ +
+ + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

all_decimal_symbols()

+ + + + View Source + + + +
+ +
+ +

Returns a list of all decimal symbols defined +by the locales configured in this backend as +a list.

+
+
+
+ +
+ + + Link to this function + +

all_decimal_symbols_class()

+ + + + View Source + + + +
+ +
+ +

Returns a list of all decimal symbols defined +by the locales configured in this backend as +a string.

This string can be used as a character class +when builing a regular expression.

+
+
+
+ +
+ + + Link to this function + +

all_grouping_symbols()

+ + + + View Source + + + +
+ +
+ +

Returns a list of all grouping symbols defined +by the locales configured in this backend as +a list.

+
+
+
+ +
+ + + Link to this function + +

all_grouping_symbols_class()

+ + + + View Source + + + +
+ +
+ +

Returns a list of all grouping symbols defined +by the locales configured in this backend as +a string.

This string can be used as a character class +when builing a regular expression.

+
+
+
+ + + +
+ + + Link to this function + +

number_symbols_for(locale \\ Plausible.Cldr.get_locale())

+ + + + View Source + + + +
+ +
+ +
+ +
@spec number_symbols_for(Cldr.LanguageTag.t() | Cldr.Locale.locale_name()) ::
+  {:ok, map()} | {:error, {module(), String.t()}}
+ +
+ +

Returns a map of Cldr.Number.Symbol.t structs of the number symbols for each +of the number systems of a locale.

+ +

options

+
+ Options +

+

+ +

example

+
+ Example: +

+
iex> Plausible.Cldr.Number.Symbol.number_symbols_for(:th)
+{:ok, %{
+   latn: %Cldr.Number.Symbol{
+     decimal: ".",
+     exponential: "E",
+     group: ",",
+     infinity: "∞",
+     list: ";",
+     minus_sign: "-",
+     nan: "NaN",
+     per_mille: "‰",
+     percent_sign: "%",
+     plus_sign: "+",
+     superscripting_exponent: "×",
+     time_separator: ":"
+   },
+   thai: %Cldr.Number.Symbol{
+     decimal: ".",
+     exponential: "E",
+     group: ",",
+     infinity: "∞",
+     list: ";",
+     minus_sign: "-",
+     nan: "NaN",
+     per_mille: "‰",
+     percent_sign: "%",
+     plus_sign: "+",
+     superscripting_exponent: "×",
+     time_separator: ":"
+   }
+ }}
+
+
+
+ +
+ + + Link to this function + +

number_symbols_for(locale, number_system)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Cldr.Number.System.html b/Plausible.Cldr.Number.System.html new file mode 100644 index 000000000..4f3f21217 --- /dev/null +++ b/Plausible.Cldr.Number.System.html @@ -0,0 +1,737 @@ + + + + + + + + + + Plausible.Cldr.Number.System — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Cldr.Number.System + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Returns the actual number system from a number system type.

+ +
+ +
+ + +

Returns the number system from a language tag or +locale name.

+ +
+ +
+ + +

Returns the number systems available for a locale +or {:error, message} if the locale is not known.

+ +
+ + + + + +
+ + +

Returns the number systems available for a locale +or {:error, message} if the locale is not known.

+ +
+ + + + + +
+ + +

Returns a number system name for a given locale and number system reference.

+ +
+ +
+ + +

Converts a number into the representation of +a non-latin number system.

+ +
+ +
+ + +

Converts a number into the representation of +a non-latin number system. Returns a converted +string or raises on error.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

number_system_for(locale, system_name)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec number_system_for(
+  Cldr.Locale.locale_reference(),
+  Cldr.Number.System.system_name()
+) ::
+  {:ok, [atom()]} | {:error, {module(), String.t()}}
+ +
+ +

Returns the actual number system from a number system type.

This function will decode a number system type into the actual +number system. If the number system provided can't be decoded +it is returned as is.

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Number.System.number_system_for "th", :latn
+{:ok, %{digits: "0123456789", type: :numeric}}
+
+iex> Plausible.Cldr.Number.System.number_system_for "en", :default
+{:ok, %{digits: "0123456789", type: :numeric}}
+
+iex> Plausible.Cldr.Number.System.number_system_for "he", :traditional
+{:ok, %{rules: "hebrew", type: :algorithmic}}
+
+iex> Plausible.Cldr.Number.System.number_system_for "en", :native
+{:ok, %{digits: "0123456789", type: :numeric}}
+
+iex> Plausible.Cldr.Number.System.number_system_for "en", :finance
+{
+  :error,
+  {Cldr.UnknownNumberSystemError,
+    "The number system :finance is unknown for the locale named :en. Valid number systems are %{default: :latn, native: :latn}"}
+}
+
+
+
+ +
+ + + Link to this function + +

number_system_from_locale(locale)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec number_system_from_locale(Cldr.Locale.locale_reference()) ::
+  Cldr.Number.System.system_name()
+ +
+ +

Returns the number system from a language tag or +locale name.

+ +

arguments

+
+ Arguments +

+

+ +

returns

+
+ Returns +

+
  • A number system name as an atom

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Number.System.number_system_from_locale "en-US-u-nu-thai"
+:thai
+
+iex> Plausible.Cldr.Number.System.number_system_from_locale "en-US"
+:latn
+
+
+
+ +
+ + + Link to this function + +

number_system_names_for(locale)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec number_system_names_for(Cldr.Locale.locale_reference()) ::
+  {:ok, [atom()]} | {:error, {module(), String.t()}}
+ +
+ +

Returns the number systems available for a locale +or {:error, message} if the locale is not known.

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Number.System.number_system_names_for "en"
+{:ok, [:latn]}
+
+iex> Plausible.Cldr.Number.System.number_system_names_for "zz"
+{:error, {Cldr.InvalidLanguageError, "The language \"zz\" is invalid"}}
+
+
+
+ +
+ + + Link to this function + +

number_system_names_for!(locale)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

number_system_types_for(locale)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

number_systems_for(locale)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec number_systems_for(Cldr.Locale.locale_reference()) ::
+  {:ok, map()} | {:error, {module(), String.t()}}
+ +
+ +

Returns the number systems available for a locale +or {:error, message} if the locale is not known.

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Number.System.number_systems_for "en"
+{:ok, %{default: :latn, native: :latn}}
+
+iex> Plausible.Cldr.Number.System.number_systems_for "th"
+{:ok, %{default: :latn, native: :thai}}
+
+iex> Plausible.Cldr.Number.System.number_systems_for "zz"
+{:error, {Cldr.InvalidLanguageError, "The language \"zz\" is invalid"}}
+
+
+
+ +
+ + + Link to this function + +

number_systems_for!(locale)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

number_systems_like(locale, number_system)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec number_systems_like(
+  Cldr.Locale.locale_reference(),
+  Cldr.Number.System.system_name()
+) ::
+  {:ok, list()} | {:error, tuple()}
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

system_name_from(system_name, locale)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec system_name_from(
+  Cldr.Number.System.system_name(),
+  Cldr.Locale.locale_name() | Cldr.LanguageTag.t()
+) :: {:ok, atom()} | {:error, {module(), String.t()}}
+ +
+ +

Returns a number system name for a given locale and number system reference.

Number systems can be references in one of two ways:

  • As a number system type such as :default, :native, :traditional and +:finance. This allows references to a number system for a locale in a +consistent fashion for a given use

  • WIth the number system name directly, such as :latn, :arab or any of the +other 70 or so

This function dereferences the supplied system_name and returns the +actual system name.

+ +

examples

+
+ Examples +

+
ex> Plausible.Cldr.Number.System.system_name_from(:default, "en")
+{:ok, :latn}
+
+iex> Plausible.Cldr.Number.System.system_name_from("latn", "en")
+{:ok, :latn}
+
+iex> Plausible.Cldr.Number.System.system_name_from(:native, "en")
+{:ok, :latn}
+
+iex> Plausible.Cldr.Number.System.system_name_from(:nope, "en")
+{
+  :error,
+  {Cldr.UnknownNumberSystemError, "The number system :nope is unknown"}
+}

Note that return value is not guaranteed to be a valid +number system for the given locale as demonstrated in the third example.

+
+
+
+ +
+ + + Link to this function + +

to_system(number, system)

+ + + + View Source + + + +
+ +
+ +

Converts a number into the representation of +a non-latin number system.

This function converts numbers to a known +number system only, it does not provide number +formatting.

There are two types of number systems in CLDR:

  • :numeric in which the number system defines +a direct mapping between the latin digits 0..9 +into a the number system equivalent. In this case, +to_system/2 invokes Cldr.Number.Transliterate.transliterate_digits/3 +for the given number.

  • :algorithmic in which the number system +does not have the same structure as the :latn +number system and therefore the conversion is +done algorithmically. For CLDR the algorithm +is implemented through Cldr.Rbnf rulesets. +These rulesets are considered by CLDR to be +less rigorous than the :numeric number systems +and caution and testing for a specific use case +is recommended.

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Number.System.to_system 123456, :hebr
+{:ok, "קכ״ג׳תנ״ו"}
+
+iex> Plausible.Cldr.Number.System.to_system 123, :hans
+{:ok, "一百二十三"}
+
+iex> Plausible.Cldr.Number.System.to_system 123, :hant
+{:ok, "一百二十三"}
+
+iex> Plausible.Cldr.Number.System.to_system 123, :hansfin
+{:ok, "壹佰贰拾叁"}
+
+
+
+ +
+ + + Link to this function + +

to_system!(number, system_name)

+ + + + View Source + + + +
+ +
+ +

Converts a number into the representation of +a non-latin number system. Returns a converted +string or raises on error.

See Plausible.Cldr.Number.System.to_system/2 for further +information.

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Number.System.to_system! 123, :hans
+"一百二十三"
+
+iex> Plausible.Cldr.Number.System.to_system! 123, :hant
+"一百二十三"
+
+iex> Plausible.Cldr.Number.System.to_system! 123, :hansfin
+"壹佰贰拾叁"
+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Cldr.Number.Transliterate.html b/Plausible.Cldr.Number.Transliterate.html new file mode 100644 index 000000000..7647b3f46 --- /dev/null +++ b/Plausible.Cldr.Number.Transliterate.html @@ -0,0 +1,374 @@ + + + + + + + + + + Plausible.Cldr.Number.Transliterate — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Cldr.Number.Transliterate + (Plausible v0.0.1) + +

+ + +
+

Transliteration for digits and separators.

Transliterating a string is an expensive business. First the string has to +be exploded into its component graphemes. Then for each grapheme we have +to map to the equivalent in the other {locale, number_system}. Then we +have to reassemble the string.

Effort is made to short circuit where possible. Transliteration is not +required for any {locale, number_system} that is the same as {"en", "latn"} since the implementation uses this combination for the placeholders during +formatting already. When short circuiting is possible (typically the en-* +locales with "latn" number_system - the total number of short circuited +locales is 211 of the 537 in CLDR) the overall number formatting is twice as +fast than when formal transliteration is required.

+ +

configuring-precompilation-of-digit-transliterations

+
+ Configuring precompilation of digit transliterations +

+

This module includes Cldr.Number.Transliterate.transliterate_digits/3 which transliterates +digits between number systems. For example from :arabic to :latn. Since generating a +transliteration map is slow, pairs of transliterations can be configured so that the +transliteration map is created at compile time and therefore speeding up transliteration at +run time.

To configure these transliteration pairs, add the to the use Cldr configuration +in a backend module:

defmodule MyApp.Cldr do
+  use Cldr,
+  locale: ["en", "fr", "th"],
+  default_locale: "en",
+  precompile_transliterations: [{:latn, :thai}, {:arab, :thai}]
+end

Where each tuple in the list configures one transliteration map. In this example, two maps are +configured: from :latn to :thai and from :arab to :thai.

A list of configurable number systems is returned by Cldr.Number.System.systems_with_digits/0.

If a transliteration is requested between two number pairs that have not been configured for +precompilation, a warning is logged.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Transliterates from latin digits to another number system's digits.

+ +
+ + + +
+ + +

Transliterates digits from one number system to another number system

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + + + +
+ + + Link to this function + +

transliterate(sequence, locale \\ Plausible.Cldr.get_locale(), number_system \\ System.default_number_system_type())

+ + + + View Source + + + +
+ +
+ +
+ +
@spec transliterate(
+  String.t(),
+  Cldr.LanguageTag.t() | Cldr.Locale.locale_name(),
+  Cldr.Number.System.system_name() | Cldr.Number.System.types()
+) :: String.t() | {:error, {module(), String.t()}}
+ +
+ +

Transliterates from latin digits to another number system's digits.

Transliterates the latin digits 0..9 to their equivalents in +another number system. Also transliterates the decimal and grouping +separators as well as the plus, minus and exponent symbols. Any other character +in the string will be returned "as is".

+ +

arguments

+
+ Arguments +

+
  • sequence is the string to be transliterated.

  • locale is any known locale, defaulting to Plausible.Cldr.get_locale/0.

  • number_system is any known number system. If expressed as a string it +is the actual name of a known number system. If epressed as an atom it is +used as a key to look up a number system for the locale (the usual keys are +:default and :native but :traditional and :finance are also part of the +standard). See Plausible.Cldr.Number.System.number_systems_for/1 for a locale to +see what number system types are defined. The default is :default.

For available number systems see Cldr.Number.System.number_systems/0 +and Plausible.Cldr.Number.System.number_systems_for/1. Also see +Plausible.Cldr.Number.Symbol.number_symbols_for/1.

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Number.Transliterate.transliterate("123556")
+"123556"
+
+iex> Plausible.Cldr.Number.Transliterate.transliterate("123,556.000", "fr", :default)
+"123 556,000"
+
+iex> Plausible.Cldr.Number.Transliterate.transliterate("123556", "th", :default)
+"123556"
+
+iex> Plausible.Cldr.Number.Transliterate.transliterate("123556", "th", "thai")
+"๑๒๓๕๕๖"
+
+iex> Plausible.Cldr.Number.Transliterate.transliterate("123556", "th", :native)
+"๑๒๓๕๕๖"
+
+iex> Plausible.Cldr.Number.Transliterate.transliterate("Some number is: 123556", "th", "thai")
+"Some number is: ๑๒๓๕๕๖"
+
+
+
+ +
+ + + Link to this function + +

transliterate!(sequence, locale, number_system)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

transliterate_digits(digits, from_system, to_system)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec transliterate_digits(
+  String.t(),
+  Cldr.Number.System.system_name(),
+  Cldr.Number.System.system_name()
+) :: String.t()
+ +
+ +

Transliterates digits from one number system to another number system

+ +

example

+
+ Example +

+
iex> Plausible.Cldr.Number.Transliterate.transliterate_digits "٠١٢٣٤٥٦٧٨٩", :arab, :latn
+"0123456789"
+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Cldr.Number.html b/Plausible.Cldr.Number.html new file mode 100644 index 000000000..a080d069b --- /dev/null +++ b/Plausible.Cldr.Number.html @@ -0,0 +1,1370 @@ + + + + + + + + + + Plausible.Cldr.Number — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Cldr.Number + (Plausible v0.0.1) + +

+ + +
+

Formats numbers and currencies based upon CLDR's decimal formats specification.

The format specification is documentated in Unicode TR35. +There are several classes of formatting including non-scientific, scientific, +rules based (for spelling and ordinal formats), compact formats that display 1k +rather than 1,000 and so on. See Cldr.Number.to_string/2 for specific formatting +options.

+ +

non-scientific-notation-formatting

+
+ Non-Scientific Notation Formatting +

+

The following description applies to formats that do not use scientific +notation or significant digits:

  • If the number of actual integer digits exceeds the maximum integer digits, +then only the least significant digits are shown. For example, 1997 is +formatted as "97" if the maximum integer digits is set to 2.

  • If the number of actual integer digits is less than the minimum integer +digits, then leading zeros are added. For example, 1997 is formatted as +"01997" if the minimum integer digits is set to 5.

  • If the number of actual fraction digits exceeds the maximum fraction +digits, then half-even rounding it performed to the maximum fraction +digits. For example, 0.125 is formatted as "0.12" if the maximum fraction +digits is 2. This behavior can be changed by specifying a rounding +increment and a rounding mode.

  • If the number of actual fraction digits is less than the minimum fraction +digits, then trailing zeros are added. For example, 0.125 is formatted as +"0.1250" if the minimum fraction digits is set to 4.

  • Trailing fractional zeros are not displayed if they occur j positions after +the decimal, where j is less than the maximum fraction digits. For example, +0.10004 is formatted as "0.1" if the maximum fraction digits is four or +less.

+ +

scientific-notation-formatting

+
+ Scientific Notation Formatting +

+

Numbers in scientific notation are expressed as the product of a mantissa and +a power of ten, for example, 1234 can be expressed as 1.234 x 10^3. The +mantissa is typically in the half-open interval [1.0, 10.0) or sometimes +[0.0, 1.0), but it need not be. In a pattern, the exponent character +immediately followed by one or more digit characters indicates scientific +notation. Example: "0.###E0" formats the number 1234 as "1.234E3".

  • The number of digit characters after the exponent character gives the +minimum exponent digit count. There is no maximum. Negative exponents are +formatted using the localized minus sign, not the prefix and suffix from +the pattern. This allows patterns such as "0.###E0 m/s". To prefix positive +exponents with a localized plus sign, specify '+' between the exponent and +the digits: "0.###E+0" will produce formats "1E+1", "1E+0", "1E-1", and so +on. (In localized patterns, use the localized plus sign rather than '+'.)

  • The minimum number of integer digits is achieved by adjusting the exponent. +Example: 0.00123 formatted with "00.###E0" yields "12.3E-4". This only +happens if there is no maximum number of integer digits. If there is a +maximum, then the minimum number of integer digits is fixed at one.

  • The maximum number of integer digits, if present, specifies the exponent +grouping. The most common use of this is to generate engineering notation, +in which the exponent is a multiple of three, for example, "##0.###E0". The +number 12345 is formatted using "##0.####E0" as "12.345E3".

  • When using scientific notation, the formatter controls the digit counts +using significant digits logic. The maximum number of significant digits +limits the total number of integer and fraction digits that will be shown +in the mantissa; it does not affect parsing. For example, 12345 formatted +with "##0.##E0" is "12.3E3". Exponential patterns may not contain grouping +separators.

+ +

significant-digits

+
+ Significant Digits +

+

There are two ways of controlling how many digits are shows: (a) +significant digits counts, or (b) integer and fraction digit counts. Integer +and fraction digit counts are described above. When a formatter is using +significant digits counts, it uses however many integer and fraction digits +are required to display the specified number of significant digits. It may +ignore min/max integer/fraction digits, or it may use them to the extent +possible.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Parse a string locale-aware manner and return +a number.

+ +
+ +
+ + +

Resolve curencies from strings within +a list.

+ +
+ +
+ + +

Resolve a currency from a string

+ +
+ +
+ + +

Resolve and tokenize percent or permille +from the beginning and/or the end of a string

+ +
+ +
+ + +

Resolve and tokenize percent and permille +sybols from strings within a list.

+ +
+ +
+ + +

Scans a string locale-aware manner and returns +a list of strings and numbers.

+ +
+ +
+ + +

Formats a number and applies the :approximately format for +a locale and number system.

+ +
+ +
+ + +

Formats a number and applies the :at_least format for +a locale and number system.

+ +
+ +
+ + +

Formats a number and applies the :at_most format for +a locale and number system.

+ +
+ +
+ + +

Formats the first and last numbers of a range and applies +the :range format for a locale and number system.

+ +
+ +
+ + +

Returns a number formatted into a string according to a format pattern and options.

+ +
+ +
+ + +

Same as the execution of to_string/2 but raises an exception if an error would be +returned.

+ +
+ +
+ + +

Return a valid number system from a provided locale and number +system name or type.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + + Link to this function + +

parse(string, options \\ [])

+ + + + View Source + + + +
+ +
+ +

Parse a string locale-aware manner and return +a number.

+ +

arguments

+
+ Arguments +

+
  • string is any String.t

  • options is a keyword list of options

+ +

options

+
+ Options +

+

+ +

returns

+
+ Returns +

+
  • A number of the requested or default type or

  • {:error, {exception, error}} if no number could be determined

+ +

notes

+
+ Notes +

+

This function parses a string to return a number but +in a locale-aware manner. It will normalise grouping +characters and decimal separators, different forms of +the + and - symbols that appear in Unicode and +strips any _ characters that might be used for +formatting in a string. It then parses the number +using the Elixir standard library functions.

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Number.parse("+1.000,34", locale: "de")
+{:ok, 1000.34}
+
+iex> Plausible.Cldr.Number.parse("-1_000_000.34")
+{:ok, -1000000.34}
+
+iex> Plausible.Cldr.Number.parse("1.000", locale: "de", number: :integer)
+{:ok, 1000}
+
+iex> Plausible.Cldr.Number.parse("+1.000,34", locale: "de", number: :integer)
+{:error,
+  {Cldr.Number.ParseError,
+   "The string \"+1.000,34\" could not be parsed as a number"}}
+
+
+
+ + + +
+ + + Link to this function + +

resolve_currencies(list, options \\ [])

+ + + + View Source + + + +
+ +
+ +

Resolve curencies from strings within +a list.

+ +

arguments

+
+ Arguments +

+
  • list is any list in which currency +names and symbols are expected

  • options is a keyword list of options

+ +

options

+
+ Options +

+
  • :locale is any valid locale returned by Cldr.known_locale_names/1 +or a Cldr.LanguageTag struct returned by Cldr.Locale.new!/2 +The default is Plausible.Cldr.get_locale()

  • :only is an atom or list of atoms representing the +currencies or currency types to be considered for a match. +The equates to a list of acceptable currencies for parsing. +See the notes below for currency types.

  • :except is an atom or list of atoms representing the +currencies or currency types to be not considered for a match. +This equates to a list of unacceptable currencies for parsing. +See the notes below for currency types.

  • :fuzzy is a float greater than 0.0 and less than or +equal to 1.0 which is used as input to +String.jaro_distance/2 to determine is the provided +currency string is close enough to a known currency +string for it to identify definitively a currency code. +It is recommended to use numbers greater than 0.8 in +order to reduce false positives.

+ +

notes

+
+ Notes +

+

The :only and :except options accept a list of +currency codes and/or currency types. The following +types are recognised.

If both :only and :except are specified, +the :except entries take priority - that means +any entries in :except are removed from the :only +entries.

  • :all, the default, considers all currencies

  • :current considers those currencies that have a :to +date of nil and which also is a known ISO4217 currency

  • :historic is the opposite of :current

  • :tender considers currencies that are legal tender

  • :unannotated considers currencies that don't have +"(some string)" in their names. These are usually +financial instruments.

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Number.scan("100 US dollars")
+...> |> Plausible.Cldr.Number.resolve_currencies
+[100, :USD]
+
+iex> Plausible.Cldr.Number.scan("100 eurosports")
+...> |> Plausible.Cldr.Number.resolve_currencies(fuzzy: 0.75)
+[100, :EUR]
+
+iex> Plausible.Cldr.Number.scan("100 dollars des États-Unis")
+...> |> Plausible.Cldr.Number.resolve_currencies(locale: "fr")
+[100, :USD]
+
+
+
+ + + +
+ + + Link to this function + +

resolve_currency(string, options \\ [])

+ + + + View Source + + + +
+ +
+ +

Resolve a currency from a string

+ +

arguments

+
+ Arguments +

+
  • list is any list in which currency +names and symbols are expected

  • options is a keyword list of options

+ +

options

+
+ Options +

+
  • :locale is any valid locale returned by Cldr.known_locale_names/1 +or a Cldr.LanguageTag struct returned by Cldr.Locale.new!/2 +The default is Plausible.Cldr.get_locale()

  • :only is an atom or list of atoms representing the +currencies or currency types to be considered for a match. +The equates to a list of acceptable currencies for parsing. +See the notes below for currency types.

  • :except is an atom or list of atoms representing the +currencies or currency types to be not considered for a match. +This equates to a list of unacceptable currencies for parsing. +See the notes below for currency types.

  • :fuzzy is a float greater than 0.0 and less than or +equal to 1.0 which is used as input to +String.jaro_distance/2 to determine is the provided +currency string is close enough to a known currency +string for it to identify definitively a currency code. +It is recommended to use numbers greater than 0.8 in +order to reduce false positives.

+ +

returns

+
+ Returns +

+
  • An ISO4217 currency code as an atom or

  • {:error, {exception, message}}

+ +

notes

+
+ Notes +

+

The :only and :except options accept a list of +currency codes and/or currency types. The following +types are recognised.

If both :only and :except are specified, +the :except entries take priority - that means +any entries in :except are removed from the :only +entries.

  • :all, the default, considers all currencies

  • :current considers those currencies that have a :to +date of nil and which also is a known ISO4217 currency

  • :historic is the opposite of :current

  • :tender considers currencies that are legal tender

  • :unannotated considers currencies that don't have +"(some string)" in their names. These are usually +financial instruments.

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Number.resolve_currency("US dollars")
+[:USD]
+
+iex> Plausible.Cldr.Number.resolve_currency("100 eurosports", fuzzy: 0.75)
+[:EUR]
+
+iex> Plausible.Cldr.Number.resolve_currency("dollars des États-Unis", locale: "fr")
+[:USD]
+
+iex> Plausible.Cldr.Number.resolve_currency("not a known currency", locale: "fr")
+{:error,
+ {Cldr.UnknownCurrencyError,
+  "The currency \"not a known currency\" is unknown or not supported"}}
+
+
+
+ + + +
+ + + Link to this function + +

resolve_per(string, options \\ [])

+ + + + View Source + + + + (since 2.22.0) + +
+ +
+ +
+ +
@spec resolve_per(String.t(), Keyword.t()) ::
+  Cldr.Number.Parser.per()
+  | [Cldr.Number.Parser.per() | String.t()]
+  | {:error, {module(), String.t()}}
+ +
+ +

Resolve and tokenize percent or permille +from the beginning and/or the end of a string

+ +

arguments

+
+ Arguments +

+
  • list is any list in which percent +and permille symbols are expected

  • options is a keyword list of options

+ +

options

+
+ Options +

+

+ +

returns

+
+ Returns +

+
  • An :percent or permille or

  • {:error, {exception, message}}

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Number.resolve_per "11%"
+["11", :percent]
+
+iex> Plausible.Cldr.Number.resolve_per "% of linguists"
+[:percent, " of linguists"]
+
+iex> Plausible.Cldr.Number.resolve_per "% of linguists %"
+[:percent, " of linguists ", :percent]
+
+
+
+ + + +
+ + + Link to this function + +

resolve_pers(list, options \\ [])

+ + + + View Source + + + + (since 2.22.0) + +
+ +
+ +
+ +
@spec resolve_pers([String.t(), ...], Keyword.t()) :: [
+  Cldr.Number.Parser.per() | String.t()
+]
+ +
+ +

Resolve and tokenize percent and permille +sybols from strings within a list.

Percent and permille symbols can be identified +at the beginning and/or the end of a string.

+ +

arguments

+
+ Arguments +

+
  • list is any list in which percent and +permille symbols are expected

  • options is a keyword list of options

+ +

options

+
+ Options +

+

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Number.scan("100%")
+...> |> Plausible.Cldr.Number.resolve_pers()
+[100, :percent]
+
+
+
+ + + +
+ + + Link to this function + +

scan(string, options \\ [])

+ + + + View Source + + + +
+ +
+ +

Scans a string locale-aware manner and returns +a list of strings and numbers.

+ +

arguments

+
+ Arguments +

+
  • string is any String.t

  • options is a keyword list of options

+ +

options

+
+ Options +

+
  • :number is one of :integer, :float, +:decimal or nil. The default is nil +meaning that the type auto-detected as either +an integer or a float.

  • :locale is any locale returned by Cldr.known_locale_names/1 +or a Cldr.LanguageTag.t. The default is Plausible.Cldr.get_locale/0.

+ +

returns

+
+ Returns +

+
  • A list of strings and numbers

+ +

notes

+
+ Notes +

+

Number parsing is performed by Cldr.Number.Parser.parse/2 +and any options provided are passed to that function.

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Number.scan("£1_000_000.34")
+["£", 1000000.34]
+
+iex> Plausible.Cldr.Number.scan("I want £1_000_000 dollars")
+["I want £", 1000000, " dollars"]
+
+iex> Plausible.Cldr.Number.scan("The prize is 23")
+["The prize is ", 23]
+
+iex> Plausible.Cldr.Number.scan("The lottery number is 23 for the next draw")
+["The lottery number is ", 23, " for the next draw"]
+
+iex> Plausible.Cldr.Number.scan("The loss is -1.000 euros", locale: "de", number: :integer)
+["The loss is ", -1000, " euros"]
+
+
+
+ + + +
+ + + Link to this function + +

to_approx_string(number, options \\ [])

+ + + + View Source + + + +
+ +
+ +
+ +
@spec to_approx_string(number() | Decimal.t(), Keyword.t() | Keyword.t() | map()) ::
+  {:ok, String.t()} | {:error, {module(), String.t()}}
+ +
+ +

Formats a number and applies the :approximately format for +a locale and number system.

+ +

arguments

+
+ Arguments +

+
  • number is an integer, float or Decimal to be formatted

  • options is a keyword list defining how the number is to be formatted. +See Cldr.Number.to_string/3 for a description of the available +options.

+ +

example

+
+ Example +

+
iex> Plausible.Cldr.Number.to_approx_string 1234
+{:ok, "~1,234"}
+
+
+
+ + + +
+ + + Link to this function + +

to_at_least_string(number, options \\ [])

+ + + + View Source + + + +
+ +
+ +
+ +
@spec to_at_least_string(number() | Decimal.t(), Keyword.t() | Keyword.t() | map()) ::
+  {:ok, String.t()} | {:error, {module(), String.t()}}
+ +
+ +

Formats a number and applies the :at_least format for +a locale and number system.

+ +

arguments

+
+ Arguments +

+
  • number is an integer, float or Decimal to be formatted

  • options is a keyword list defining how the number is to be formatted. +See Plausible.Cldr.Number.to_string/2 for a description of the available +options.

+ +

example

+
+ Example +

+
iex> Plausible.Cldr.Number.to_at_least_string 1234
+{:ok, "1,234+"}
+
+
+
+ + + +
+ + + Link to this function + +

to_at_most_string(number, options \\ [])

+ + + + View Source + + + +
+ +
+ +
+ +
@spec to_at_most_string(number() | Decimal.t(), Keyword.t() | Keyword.t() | map()) ::
+  {:ok, String.t()} | {:error, {module(), String.t()}}
+ +
+ +

Formats a number and applies the :at_most format for +a locale and number system.

+ +

arguments

+
+ Arguments +

+
  • number is an integer, float or Decimal to be formatted

  • options is a keyword list defining how the number is to be formatted. +See Cldr.Number.to_string/3 for a description of the available +options.

+ +

example

+
+ Example +

+
iex> Plausible.Cldr.Number.to_at_most_string 1234
+{:ok, "≤1,234"}
+
+
+
+ + + +
+ + + Link to this function + +

to_range_string(range, options \\ [])

+ + + + View Source + + + +
+ +
+ +
+ +
@spec to_range_string(Range.t(), Keyword.t() | Keyword.t() | map()) ::
+  {:ok, String.t()} | {:error, {module(), String.t()}}
+ +
+ +

Formats the first and last numbers of a range and applies +the :range format for a locale and number system.

+ +

arguments

+
+ Arguments +

+
  • number is an integer, float or Decimal to be formatted

  • options is a keyword list defining how the number is to be formatted. +See Cldr.Number.to_string/3 for a description of the available +options.

+ +

example

+
+ Example +

+
iex> Plausible.Cldr.Number.to_range_string 1234..5678
+{:ok, "1,234–5,678"}
+
+
+
+ + + +
+ + + Link to this function + +

to_string(number, options \\ default_options())

+ + + + View Source + + + +
+ +
+ +
+ +
@spec to_string(number() | Decimal.t(), Keyword.t() | map()) ::
+  {:ok, String.t()} | {:error, {atom(), String.t()}}
+ +
+ +

Returns a number formatted into a string according to a format pattern and options.

+ +

arguments

+
+ Arguments +

+
  • number is an integer, float or Decimal to be formatted

  • options is a keyword list defining how the number is to be formatted.

+ +

options

+
+ Options +

+
  • format: the format style or a format string defining how the number is +formatted. See Cldr.Number.Format for how format strings can be constructed. +See Cldr.Number.Format.format_styles_for/3 to return available format styles +for a locale. The default format is :standard.

  • If :format is set to :long or :short then the formatting depends on +whether :currency is specified. If not specified then the number is +formatted as :decimal_long or :decimal_short. If :currency is +specified the number is formatted as :currency_long or +:currency_short and :fractional_digits is set to 0 as a default.

  • :format may also be a format defined by CLDR's Rules Based Number +Formats (RBNF). Further information is found in the module Cldr.Rbnf. +The most commonly used formats in this category are to spell out the +number in a the locales language. The applicable formats are :spellout, +:spellout_year, :ordinal. A number can also be formatted as roman +numbers by using the format :roman or :roman_lower.

  • currency: is the currency for which the number is formatted. For +available currencies see Cldr.Currency.known_currencies/0. This option +is required if :format is set to :currency. If currency is set +and no :format is set, :format will be set to :currency as well.

  • currency_symbol: Allows overriding a currency symbol. The alternatives +are:

    • :iso the ISO currency code will be used instead of the default +currency symbol.
    • :narrow uses the narrow symbol defined for the locale. The same +narrow symbol can be defined for more than one currency and therefore this +should be used with care. If no narrow symbol is defined, the standard +symbol is used.
    • :symbol uses the standard symbol defined in CLDR. A symbol is unique +for each currency and can be safely used.
    • "string" uses string as the currency symbol
    • :standard (the default and recommended) uses the CLDR-defined symbol +based upon the currency format for the locale.
  • :cash: a boolean which indicates whether a number being formatted as a +:currency is to be considered a cash value or not. Currencies can be +rounded differently depending on whether :cash is true or false. +*This option is deprecated in favour of currency_digits: :cash.

  • :currency_digits indicates which of the rounding and digits should be +used. The options are :accounting which is the default, :cash or +:iso

  • :rounding_mode: determines how a number is rounded to meet the precision +of the format requested. The available rounding modes are :down, +:half_up, :half_even, :ceiling, :floor, :half_down, :up. The default is +:half_even.

  • :number_system: determines which of the number systems for a locale +should be used to define the separators and digits for the formatted +number. If number_system is an atom then number_system is +interpreted as a number system. If the :number_system is +binary then it is interpreted as a number system name. See +Cldr.Number.System.number_system_names_for/2. The default is :default.

  • :locale: determines the locale in which the number is formatted. See +Cldr.known_locale_names/0. The default isCldr.get_locale/0 which is the +locale currently in affect for this Process and which is set by +Cldr.put_locale/1.

  • If :fractional_digits is set to a positive integer value then the number +will be rounded to that number of digits and displayed accordingly - overriding +settings that would be applied by default. For example, currencies have +fractional digits defined reflecting each currencies minor unit. Setting +:fractional_digits will override that setting.

  • If :maximum_integer_digits is set to a positive integer value then the +number is left truncated before formatting. For example if the number 1234 +is formatted with the option maximum_integer_digits: 2, the number is +truncated to 34 and formatted.

  • If :round_nearest is set to a positive integer value then the number +will be rounded to nearest increment of that value - overriding +settings that would be applied by default.

  • :minimum_grouping_digits overrides the CLDR definition of minimum grouping +digits. For example in the locale es the number 1234 is formatted by default +as 1345 because the locale defines the minimium_grouping_digits as 2. If +minimum_grouping_digits: 1 is set as an option the number is formatting as +1.345. The :minimum_grouping_digits is added to the grouping defined by +the number format. If the sum of these two digits is greater than the number +of digits in the integer (or fractional) part of the number then no grouping +is performed.

  • :wrapper is a 2-arity function that will be called for each number component +with parameters string and tag where tag is one of :number, +:currency_symbol, :currency_space, :literal, :quote, :percent, +:permille, :minus or :plus. The function must return a string. The +function can be used to wrap format elements in HTML or other tags.

+ +

locale-extensions-affecting-formatting

+
+ Locale extensions affecting formatting +

+

A locale identifier can specify options that affect number formatting. +These options are:

  • nu: defines the number system to be used if none is specified by the :number_system +option to to_string/2

This key is part of the u extension and +that document should be consulted for details on how to construct a locale identifier with these +extensions.

+ +

wrapping-format-elements

+
+ Wrapping format elements +

+

Wrapping elements is particularly useful when formatting a number with a +currency symbol and the requirement is to have different HTML formatting +applied to the symbol than the number. For example:

iex> Cldr.Number.to_string(100, format: :currency, currency: :USD, wrapper: fn
+...>   string, :currency_symbol -> "<span class=\"symbol\">" <> string <> "</span>"
+...>   string, :number -> "<span class=\"number\">" <> string <> "</span>"
+...>   string, :currency_space -> "<span>" <> string <> "</span>"
+...>   string, _other -> string
+...> end)
+{:ok, "<span class=\"symbol\">$</span><span class=\"number\">100.00</span>"}

It is also possible and recommended to use the Phoenix.HTML.Tag.content_tag/3 +function if wrapping HTML tags since these will ensure HTML entities are +correctly encoded. For example:

iex> Cldr.Number.to_string(100, format: :currency, currency: :USD, wrapper: fn
+...>   string, :currency_symbol -> Phoenix.HTML.Tag.content_tag(:span, string, class: "symbol")
+...>   string, :number -> Phoenix.HTML.Tag.content_tag(:span, string, class: "number")
+...>   string, :currency_space -> Phoenix.HTML.Tag.content_tag(:span, string)
+...>   string, _other -> string
+...> end)
+{:ok, "<span class=\"symbol\">$</span><span class=\"number\">100.00</span>"}

When formatting a number the format is parsed into format elements that might include +a currency symbol, a literal string, inserted text between a currency symbol and the +currency amount, a percent sign, the number itself and several other elements. In +some cases it is helpful to be apply specific formatting to each element. +This can be achieved by specifying a :wrapper option. This option takes a 2-arity +function as an argument. For each element of the format the wrapper function is called +with two parameters: the format element as a string and an atom representing the +element type. The wrapper function is required to return a string that is then +inserted in the final formatted number.

+ +

returns

+
+ Returns +

+
  • {:ok, string} or

  • {:error, {exception, message}}

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Number.to_string 12345
+{:ok, "12,345"}
+
+iex> Plausible.Cldr.Number.to_string 12345, locale: "fr"
+{:ok, "12 345"}
+
+iex> Plausible.Cldr.Number.to_string 1345.32, currency: :EUR, locale: "es", minimum_grouping_digits: 1
+{:ok, "1.345,32 €"}
+
+iex> Plausible.Cldr.Number.to_string 1345.32, currency: :EUR, locale: "es"
+{:ok, "1345,32 €"}
+
+iex> Plausible.Cldr.Number.to_string 12345, locale: "fr", currency: "USD"
+{:ok, "12 345,00 $US"}
+
+iex> Plausible.Cldr.Number.to_string 12345, format: "#E0"
+{:ok, "1.2345E4"}
+
+iex> Plausible.Cldr.Number.to_string 12345, format: :accounting, currency: "THB"
+{:ok, "THB 12,345.00"}
+
+iex> Plausible.Cldr.Number.to_string -12345, format: :accounting, currency: "THB"
+{:ok, "(THB 12,345.00)"}
+
+iex> Plausible.Cldr.Number.to_string 12345, format: :accounting, currency: "THB",
+...> locale: "th"
+{:ok, "฿12,345.00"}
+
+iex> Plausible.Cldr.Number.to_string 12345, format: :accounting, currency: "THB",
+...> locale: "th", number_system: :native
+{:ok, "฿๑๒,๓๔๕.๐๐"}
+
+iex> Plausible.Cldr.Number.to_string 1244.30, format: :long
+{:ok, "1 thousand"}
+
+iex> Plausible.Cldr.Number.to_string 1244.30, format: :long, currency: "USD"
+{:ok, "1,244 US dollars"}
+
+iex> Plausible.Cldr.Number.to_string 1244.30, format: :short
+{:ok, "1K"}
+
+iex> Plausible.Cldr.Number.to_string 1244.30, format: :short, currency: "EUR"
+{:ok, "€1K"}
+
+iex> Plausible.Cldr.Number.to_string 1234, format: :spellout
+{:ok, "one thousand two hundred thirty-four"}
+
+iex> Plausible.Cldr.Number.to_string 1234, format: :spellout_verbose
+{:ok, "one thousand two hundred and thirty-four"}
+
+iex> Plausible.Cldr.Number.to_string 1989, format: :spellout_year
+{:ok, "nineteen eighty-nine"}
+
+iex> Plausible.Cldr.Number.to_string 123, format: :ordinal
+{:ok, "123rd"}
+
+iex> Plausible.Cldr.Number.to_string 123, format: :roman
+{:ok, "CXXIII"}
+
+iex> Plausible.Cldr.Number.to_string 123, locale: "th-u-nu-thai"
+{:ok, "๑๒๓"}

+ +

errors

+
+ Errors +

+

An error tuple {:error, reason} will be returned if an error is detected. +The two most likely causes of an error return are:

  • A format cannot be compiled. In this case the error tuple will look like:
    iex> Plausible.Cldr.Number.to_string(12345, format: "0#")
+    {:error, {Cldr.FormatCompileError,
+      "Decimal format compiler: syntax error before: \"#\""}}
  • The format style requested is not defined for the locale and +number_system. This happens typically when the number system is +:algorithmic rather than the more common :numeric. In this case the error +return looks like:
    iex> Plausible.Cldr.Number.to_string(1234, locale: "he", number_system: "hebr")
+    {:error, {Cldr.UnknownFormatError,
+      "The locale :he with number system :hebr does not define a format :standard"}}
+
+
+
+ + + +
+ + + Link to this function + +

to_string!(number, options \\ default_options())

+ + + + View Source + + + +
+ +
+ +
+ +
@spec to_string!(number() | Decimal.t(), Keyword.t() | map()) :: String.t() | module()
+ +
+ +

Same as the execution of to_string/2 but raises an exception if an error would be +returned.

+ +

arguments

+
+ Arguments +

+

+ +

returns

+
+ Returns +

+
  • a formatted number as a string or

  • raises an exception

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Number.to_string! 12345
+"12,345"
+
+iex> Plausible.Cldr.Number.to_string! 12345, locale: "fr"
+"12 345"
+
+
+
+ +
+ + + Link to this function + +

validate_number_system(locale, number_system)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec validate_number_system(
+  Cldr.Locale.locale_name() | Cldr.LanguageTag.t(),
+  Cldr.Number.System.system_name() | Cldr.Number.System.types()
+) :: {:ok, Cldr.Number.System.system_name()} | {:error, {module(), String.t()}}
+ +
+ +

Return a valid number system from a provided locale and number +system name or type.

The number system or number system type must be valid for the +given locale. If a number system type is provided, the +underlying number system is returned.

+ +

arguments

+
+ Arguments +

+

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.Number.validate_number_system "en", :latn
+{:ok, :latn}
+
+iex> Plausible.Cldr.Number.validate_number_system "en", :default
+{:ok, :latn}
+
+iex> Plausible.Cldr.Number.validate_number_system "en", :unknown
+{:error,
+ {Cldr.UnknownNumberSystemError, "The number system :unknown is unknown"}}
+
+iex> Plausible.Cldr.Number.validate_number_system "zz", :default
+{:error, {Cldr.InvalidLanguageError, "The language \"zz\" is invalid"}}
+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Cldr.Rbnf.NumberSystem.html b/Plausible.Cldr.Rbnf.NumberSystem.html new file mode 100644 index 000000000..02365c93a --- /dev/null +++ b/Plausible.Cldr.Rbnf.NumberSystem.html @@ -0,0 +1,1481 @@ + + + + + + + + + + Plausible.Cldr.Rbnf.NumberSystem — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Cldr.Rbnf.NumberSystem + (Plausible v0.0.1) + +

+ + +
+

Functions to implement the number system rule-based-number-format rules of CLDR.

These rules are defined only on the "und" locale and represent specialised +number formatting.

The standard public API for RBNF is via the Cldr.Number.to_string/2 function.

The functions on this module are defined at compile time based upon the RBNF rules +defined in the Unicode CLDR data repository. Available rules are identified by:

iex> Plausible.Cldr.Rbnf.NumberSystem.rule_sets(:und)
+[:zz_default, :tamil, :roman_upper, :roman_lower, :hebrew_item,
+ :hebrew, :greek_upper, :greek_lower, :georgian,
+ :ethiopic, :cyrillic_lower, :armenian_upper, :armenian_lower]

A rule can then be invoked on an available rule_set. For example

iex> Plausible.Cldr.Rbnf.NumberSystem.roman_upper(123, :und)
+"CXXIII"

This particular call is equivalent to the call through the public API of:

iex> Plausible.Cldr.Number.to_string(123, format: :roman)
+{:ok, "CXXIII"}
+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+ + +
+ + + +
+ + +
+ + + + + + + +
+ + +
+ + + +
+ + +
+ + + + + +
+ + +
+ + + + + + + +
+ + +
+ + + +
+ + +
+ + + +
+
+ rule_sets() + +
+ +
+ + + +
+ + +
+ +
+ + +
+ + + +
+ + +
+ + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

armenian_lower(number)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

armenian_lower(number, locale)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

armenian_upper(number)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

armenian_upper(number, locale)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

cyrillic_lower(number)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

cyrillic_lower(number, locale)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

cyrillic_lower_1_10(number, language_tag)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

cyrillic_lower_final(number, language_tag)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

cyrillic_lower_post(number, language_tag)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

cyrillic_lower_thousands(number, language_tag)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

ethiopic(number, locale)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

ethiopic_p1(number, language_tag)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

ethiopic_p2(number, language_tag)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

ethiopic_p3(number, language_tag)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

ethiopic_p(number, language_tag)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

georgian(number, locale)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

greek_lower(number)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

greek_lower(number, locale)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

greek_numeral_majuscules(number, language_tag)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

greek_numeral_minuscules(number, language_tag)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

greek_upper(number)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

greek_upper(number, locale)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

hebrew(number, locale)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

hebrew_0_99(number, language_tag)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

hebrew_item(number)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

hebrew_item(number, locale)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

hebrew_item_hundreds(number, language_tag)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

hebrew_thousands(number, language_tag)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

roman_lower(number)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

roman_lower(number, locale)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

roman_upper(number)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

roman_upper(number, locale)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

rule_sets(rbnf_locale_name)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

tamil(number, locale)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

tamil_thousands(number, language_tag)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

zz_default(number)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

zz_default(number, locale)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Cldr.Rbnf.Ordinal.html b/Plausible.Cldr.Rbnf.Ordinal.html new file mode 100644 index 000000000..0d2a64690 --- /dev/null +++ b/Plausible.Cldr.Rbnf.Ordinal.html @@ -0,0 +1,318 @@ + + + + + + + + + + Plausible.Cldr.Rbnf.Ordinal — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Cldr.Rbnf.Ordinal + (Plausible v0.0.1) + +

+ + +
+

Functions to implement the ordinal rule-based-number-format rules of CLDR.

As CLDR notes, the data is incomplete or non-existent for many languages. It +is considered complete for English however.

The standard public API for RBNF is via the Cldr.Number.to_string/2 function.

The functions on this module are defined at compile time based upon the RBNF rules +defined in the Unicode CLDR data repository. Available rules are identified by:

iex> Plausible.Cldr.Rbnf.Ordinal.rule_sets(:en)
+[:digits_ordinal]
+
+iex> Plausible.Cldr.Rbnf.Ordinal.rule_sets("fr")
+[
+  :digits_ordinal_masculine_plural,
+  :digits_ordinal_masculine,
+  :digits_ordinal_feminine_plural,
+  :digits_ordinal_feminine,
+  :digits_ordinal
+]

A rule can then be invoked on an available rule_set. For example

iex> Plausible.Cldr.Rbnf.Ordinal.digits_ordinal(123, :en)
+"123rd"

This call is equivalent to the call through the public API of:

iex> Plausible.Cldr.Number.to_string(123, format: :ordinal)
+{:ok, "123rd"}
+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ + + +
+
+ rule_sets() + +
+ +
+ + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

digits_ordinal(number, locale)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

rule_sets(rbnf_locale_name)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Cldr.Rbnf.Spellout.html b/Plausible.Cldr.Rbnf.Spellout.html new file mode 100644 index 000000000..206ade8c0 --- /dev/null +++ b/Plausible.Cldr.Rbnf.Spellout.html @@ -0,0 +1,701 @@ + + + + + + + + + + Plausible.Cldr.Rbnf.Spellout — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Cldr.Rbnf.Spellout + (Plausible v0.0.1) + +

+ + +
+

Functions to implement the spellout rule-based-number-format rules of CLDR.

As CLDR notes, the data is incomplete or non-existent for many languages. It +is considered complete for English however.

The standard public API for RBNF is via the Cldr.Number.to_string/2 function.

The functions on this module are defined at compile time based upon the RBNF rules +defined in the Unicode CLDR data repository. Available rules are identified by:

iex> Plausible.Cldr.Rbnf.Spellout.rule_sets("en")
+[:spellout_ordinal_verbose, :spellout_ordinal, :spellout_numbering_year,
+  :spellout_numbering_verbose, :spellout_numbering, :spellout_cardinal_verbose,
+  :spellout_cardinal]

A rule can then be invoked on an available rule_set. For example:

iex> Plausible.Cldr.Rbnf.Spellout.spellout_ordinal(123, "en")
+"one hundred twenty-third"

This call is equivalent to the call through the public API of:

iex> Plausible.Cldr.Number.to_string(123, format: :spellout)
+{:ok, "one hundred twenty-three"}
+
+ + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

2d_year(number, language_tag)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

number and language_tag

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

and_o(number, language_tag)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

commas(number, language_tag)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

commas_o(number, language_tag)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

rule_sets(rbnf_locale_name)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

spellout_cardinal(number, locale)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

spellout_cardinal_verbose(number, locale)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

spellout_numbering(number, locale)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

spellout_numbering_verbose(number, locale)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

spellout_numbering_year(number, locale)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

spellout_ordinal(number, locale)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

spellout_ordinal_verbose(number, locale)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

th(number, language_tag)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

tieth(number, language_tag)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Cldr.html b/Plausible.Cldr.html new file mode 100644 index 000000000..46a3c7f5b --- /dev/null +++ b/Plausible.Cldr.html @@ -0,0 +1,1682 @@ + + + + + + + + + + Plausible.Cldr — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Cldr + (Plausible v0.0.1) + +

+ + +
+

Provides the core functions to retrieve and manage +the CLDR data that supports formatting and localisation.

It provides the core functions to access formatted +CLDR data, set and retrieve a current locale and validate +certain core data types such as locales, currencies and +territories.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + +
+ + +

Returns the default locale.

+ +
+ +
+ + +

Returns the default territory when a locale +does not specify one and none can be inferred.

+ +
+ +
+ + +

Add locale-specific ellipsis to a string.

+ +
+ +
+
+ get_locale() + +
+ +

Return the current locale to be used for Cldr functions that +take an optional locale parameter for which a locale is not supplied.

+ +
+ + + + + +
+ + +

Returns either the Gettext locale_name in Cldr format or +false based upon whether the locale name is configured in +Gettext.

+ +
+ +
+ + +

Returns a boolean indicating if the specified locale +name is configured and available in Gettext.

+ +
+ +
+ + +

Returns a list of Gettext locale names but in CLDR format with +underscore replaced by hyphen in order to facilitate comparisons +with Cldr locale names.

+ +
+ +
+ + +

Returns either the locale_name or false based upon +whether the locale name is configured in Cldr.

+ +
+ +
+ + +

Returns a boolean indicating if the specified locale +name is configured and available in Cldr.

+ +
+ +
+ + +

Returns a list of the known locale names.

+ +
+ +
+ + +

Returns a list of atoms representing the number systems types known to Cldr.

+ +
+ + + +
+ + +

Returns either the RBNF locale_name or false based upon +whether the locale name is configured in Cldr +and has RBNF rules defined.

+ +
+ +
+ + +

Returns a boolean indicating if the specified locale +name is configured and available in Cldr and supports +rules based number formats (RBNF).

+ +
+ +
+ + +

Returns a list of locale names which have rules-based number +formats (RBNF).

+ +
+ + + +
+ + +

Normalizes a string by applying transliteration +of common symbols in numbers, currencies and dates

+ +
+ +
+ + +

Set the current locale to be used for Cldr functions that +take an optional locale parameter for which a locale is not supplied.

+ +
+ +
+ + +

Add locale-specific quotation marks around a string.

+ +
+ +
+ + +

Returns a list of the locales names that are configured, +but not known in CLDR.

+ +
+ + + + + +
+ + +

Normalise and validate a locale name.

+ +
+ + + +
+ + +

Normalise and validate a number system type.

+ +
+ + + +
+ + +

Execute a function with a locale ensuring that the +current locale is restored after the function.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

available_locale_name?(locale_name)

+ + + + View Source + + + +
+ +
+ +

See Cldr.available_locale_name?/1.

+
+
+
+ + + +
+ +
+ +
@spec default_locale() :: Cldr.LanguageTag.t() | no_return()
+ +
+ +

Returns the default locale.

+ +

example

+
+ Example +

+
iex> Plausible.Cldr.default_locale()
+%Cldr.LanguageTag{
+  backend: Plausible.Cldr,
+  canonical_locale_name: "en-001",
+  cldr_locale_name: :"en-001",
+  language_subtags: [],
+  extensions: %{},
+  gettext_locale_name: "en",
+  language: "en",
+  locale: %{},
+  private_use: [],
+  rbnf_locale_name: :en,
+  requested_locale_name: "en-001",
+  script: :Latn,
+  territory: :"001",
+  transform: %{},
+  language_variants: []
+}
+
+
+
+ +
+ + + Link to this function + +

default_territory()

+ + + + View Source + + + +
+ +
+ +
+ +
@spec default_territory() :: Cldr.Locale.territory_code()
+ +
+ +

Returns the default territory when a locale +does not specify one and none can be inferred.

+ +

example

+
+ Example +

+
iex> Plausible.Cldr.default_territory()
+:"001"
+
+
+
+ + + +
+ + + Link to this function + +

ellipsis(string, options \\ [])

+ + + + View Source + + + +
+ +
+ +
+ +
@spec ellipsis(String.t() | [String.t()], Keyword.t()) :: String.t()
+ +
+ +

Add locale-specific ellipsis to a string.

+ +

arguments

+
+ Arguments +

+
  • string is any String.t or a 2-element list +of String.t between which the ellipsis is inserted.

  • backend is any module that includes use Cldr and therefore +is a Cldr backend module. The default is Cldr.default_backend!/0. +Note that Cldr.default_backend!/0 will raise an exception if +no :default_backend is configured under the :ex_cldr key in +config.exs.

  • options is a keyword list of options

+ +

options

+
+ Options +

+
  • :locale is any valid locale name returned by Cldr.known_locale_names/1. +The default is Cldr.get_locale/0.

  • :location determines where to place the ellipsis. The options are +:after (the default for a single string argument), :between +(the default and only valid location for an argument that is a list +of two strings) and :before.

  • :format formats based upon whether the ellipsis +is inserted between words or sentences. The valid options are +:word or :sentence. The default is :sentence.

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.ellipsis "And furthermore"
+"And furthermore…"
+
+iex> Plausible.Cldr.ellipsis ["And furthermore", "there is much to be done"], locale: :ja
+"And furthermore…there is much to be done"
+
+iex> Plausible.Cldr.ellipsis "And furthermore", format: :word
+"And furthermore …"
+
+iex> Plausible.Cldr.ellipsis ["And furthermore", "there is much to be done"], locale: :ja, format: :word
+"And furthermore … there is much to be done"
+
+
+
+ + + +
+ +
+ +
@spec get_locale() :: Cldr.LanguageTag.t()
+ +
+ +

Return the current locale to be used for Cldr functions that +take an optional locale parameter for which a locale is not supplied.

+ +

example

+
+ Example +

+
iex> Plausible.Cldr.put_locale("pl")
+iex> Plausible.Cldr.get_locale
+%Cldr.LanguageTag{
+   backend: Elixir.Plausible.Cldr,
+   canonical_locale_name: "pl",
+   cldr_locale_name: :pl,
+   extensions: %{},
+   language: "pl",
+   locale: %{},
+   private_use: [],
+   rbnf_locale_name: :pl,
+   territory: :PL,
+   requested_locale_name: "pl",
+   script: :Latn,
+   transform: %{},
+   language_variants: []
+ }
+
+
+
+ + + +
+ +

See Cldr.known_calendars/0.

+
+
+
+ +
+ + + Link to this function + +

known_currencies()

+ + + + View Source + + + +
+ +
+ +

See Cldr.known_currencies/0.

+
+
+
+ +
+ + + Link to this function + +

known_gettext_locale_name(locale_name)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec known_gettext_locale_name(String.t()) :: String.t() | false
+ +
+ +

Returns either the Gettext locale_name in Cldr format or +false based upon whether the locale name is configured in +Gettext.

+ +

arguments

+
+ Arguments +

+

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.known_gettext_locale_name "en"
+"en"
+
+iex> Plausible.Cldr.known_gettext_locale_name "en-SA"
+false
+
+
+
+ +
+ + + Link to this function + +

known_gettext_locale_name?(locale_name)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec known_gettext_locale_name?(String.t()) :: boolean()
+ +
+ +

Returns a boolean indicating if the specified locale +name is configured and available in Gettext.

+ +

arguments

+
+ Arguments +

+

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.known_gettext_locale_name?("en")
+true
+
+iex> Plausible.Cldr.known_gettext_locale_name?("!!")
+false
+
+
+
+ +
+ + + Link to this function + +

known_gettext_locale_names()

+ + + + View Source + + + +
+ +
+ +
+ +
@spec known_gettext_locale_names() :: [String.t()]
+ +
+ +

Returns a list of Gettext locale names but in CLDR format with +underscore replaced by hyphen in order to facilitate comparisons +with Cldr locale names.

+
+
+
+ +
+ + + Link to this function + +

known_locale_name(locale_name)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec known_locale_name(Cldr.Locale.locale_name()) :: String.t() | false
+ +
+ +

Returns either the locale_name or false based upon +whether the locale name is configured in Cldr.

This is helpful when building a list of or expressions +to return the first known locale name from a list.

+ +

arguments

+
+ Arguments +

+

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.known_locale_name :"en-AU"
+:"en-AU"
+
+iex> Plausible.Cldr.known_locale_name :"en-SA"
+false
+
+
+
+ +
+ + + Link to this function + +

known_locale_name?(locale_name)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec known_locale_name?(Cldr.Locale.locale_name()) :: boolean()
+ +
+ +

Returns a boolean indicating if the specified locale +name is configured and available in Cldr.

+ +

arguments

+
+ Arguments +

+

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.known_locale_name?(:en)
+true
+
+iex> Plausible.Cldr.known_locale_name?(:"!!")
+false
+
+
+
+ +
+ + + Link to this function + +

known_locale_names()

+ + + + View Source + + + +
+ +
+ +

Returns a list of the known locale names.

Known locales are those locales which +are the subset of all CLDR locales that +have been configured for use either +in this module or in Gettext.

+
+
+
+ +
+ + + Link to this function + +

known_number_system_types()

+ + + + View Source + + + +
+ +
+ +

Returns a list of atoms representing the number systems types known to Cldr.

+ +

example

+
+ Example +

+
iex> Plausible.Cldr.known_number_system_types
+[:default, :finance, :native, :traditional]
+
+
+
+ +
+ + + Link to this function + +

known_number_systems()

+ + + + View Source + + + +
+ +
+ +

See Cldr.known_number_systems/0.

+
+
+
+ +
+ + + Link to this function + +

known_rbnf_locale_name(locale_name)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec known_rbnf_locale_name(Cldr.Locale.locale_name()) :: String.t() | false
+ +
+ +

Returns either the RBNF locale_name or false based upon +whether the locale name is configured in Cldr +and has RBNF rules defined.

+ +

arguments

+
+ Arguments +

+

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.known_rbnf_locale_name :en
+:en
+
+iex> Plausible.Cldr.known_rbnf_locale_name :"en-SA"
+false
+
+
+
+ +
+ + + Link to this function + +

known_rbnf_locale_name?(locale_name)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec known_rbnf_locale_name?(Cldr.Locale.locale_name()) :: boolean()
+ +
+ +

Returns a boolean indicating if the specified locale +name is configured and available in Cldr and supports +rules based number formats (RBNF).

+ +

arguments

+
+ Arguments +

+

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.known_rbnf_locale_name?(:en)
+true
+
+iex> Plausible.Cldr.known_rbnf_locale_name?(:"!!")
+false
+
+
+
+ +
+ + + Link to this function + +

known_rbnf_locale_names()

+ + + + View Source + + + +
+ +
+ +
+ +
@spec known_rbnf_locale_names() :: [Cldr.Locale.locale_name()]
+ +
+ +

Returns a list of locale names which have rules-based number +formats (RBNF).

+
+
+
+ +
+ + + Link to this function + +

known_territories()

+ + + + View Source + + + +
+ +
+ +

See Cldr.known_territories/0.

+
+
+
+ + + +
+ + + Link to this function + +

normalize_lenient_parse(string, scope, locale \\ get_locale())

+ + + + View Source + + + +
+ +
+ +

Normalizes a string by applying transliteration +of common symbols in numbers, currencies and dates

+
+
+
+ +
+ + + Link to this function + +

put_locale(locale_name)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec put_locale(Cldr.Locale.locale_reference()) ::
+  {:ok, Cldr.LanguageTag.t()} | {:error, {module(), String.t()}}
+ +
+ +

Set the current locale to be used for Cldr functions that +take an optional locale parameter for which a locale is not supplied.

+ +

arguments

+
+ Arguments +

+

See rfc5646 for the specification +of a language tag.

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.put_locale("en")
+{:ok,
+ %Cldr.LanguageTag{
+   backend: Plausible.Cldr,
+   canonical_locale_name: "en",
+   cldr_locale_name: :en,
+   language_subtags: [],
+   extensions: %{},
+   gettext_locale_name: "en",
+   language: "en",
+   locale: %{},
+   private_use: [],
+   rbnf_locale_name: :en,
+   requested_locale_name: "en",
+   script: :Latn,
+   territory: :US,
+   transform: %{},
+   language_variants: []
+ }}
+
+iex> Plausible.Cldr.put_locale("invalid-locale!")
+{:error, {Cldr.LanguageTag.ParseError,
+  "Expected a BCP47 language tag. Could not parse the remaining \"!\" starting at position 15"}}
+
+
+
+ + + +
+ + + Link to this function + +

quote(string, options \\ [])

+ + + + View Source + + + +
+ +
+ +
+ +
@spec quote(String.t(), Keyword.t()) :: String.t()
+ +
+ +

Add locale-specific quotation marks around a string.

+ +

arguments

+
+ Arguments +

+
  • string is any valid Elixir string

  • options is a keyword list of options

+ +

options

+
+ Options +

+

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.quote "Quoted String"
+"“Quoted String”"
+
+iex> Plausible.Cldr.quote "Quoted String", locale: :ja
+"「Quoted String」"
+
+
+
+ +
+ + + Link to this function + +

unknown_locale_names()

+ + + + View Source + + + +
+ +
+ +
+ +
@spec unknown_locale_names() :: [Cldr.Locale.locale_name()]
+ +
+ +

Returns a list of the locales names that are configured, +but not known in CLDR.

Since there is a compile-time exception raised if there are +any unknown locales this function should always +return an empty list.

+
+
+
+ +
+ + + Link to this function + +

validate_calendar(calendar)

+ + + + View Source + + + +
+ +
+ +

See Cldr.validate_calendar/1.

+
+
+
+ +
+ + + Link to this function + +

validate_currency(currency)

+ + + + View Source + + + +
+ +
+ +

See Cldr.validate_currency/1.

+
+
+
+ +
+ + + Link to this function + +

validate_locale(locale)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec validate_locale(Cldr.Locale.locale_name() | Cldr.LanguageTag.t() | String.t()) ::
+  {:ok, Cldr.LanguageTag.t()} | {:error, {module(), String.t()}}
+ +
+ +

Normalise and validate a locale name.

+ +

arguments

+
+ Arguments +

+

+ +

returns

+
+ Returns +

+
  • {:ok, language_tag}

  • {:error, reason}

+ +

notes

+
+ Notes +

+

See rfc5646 for the specification +of a language tag.

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.validate_locale(:en)
+{:ok,
+%Cldr.LanguageTag{
+  backend: Plausible.Cldr,
+  canonical_locale_name: "en",
+  cldr_locale_name: :en,
+  extensions: %{},
+  gettext_locale_name: "en",
+  language: "en",
+  locale: %{},
+  private_use: [],
+  rbnf_locale_name: :en,
+  requested_locale_name: "en",
+  script: :Latn,
+  territory: :US,
+  transform: %{},
+  language_variants: []
+}}
+
+
+iex> Plausible.Cldr.validate_locale Plausible.Cldr.default_locale()
+{:ok,
+%Cldr.LanguageTag{
+  backend: Plausible.Cldr,
+  canonical_locale_name: "en-001",
+  cldr_locale_name: :"en-001",
+  extensions: %{},
+  gettext_locale_name: "en",
+  language: "en",
+  locale: %{},
+  private_use: [],
+  rbnf_locale_name: :en,
+  requested_locale_name: "en-001",
+  script: :Latn,
+  territory: :"001",
+  transform: %{},
+  language_variants: []
+}}
+
+iex> Plausible.Cldr.validate_locale("zzz")
+{:error, {Cldr.InvalidLanguageError, "The language \"zzz\" is invalid"}}
+
+
+
+ +
+ + + Link to this function + +

validate_number_system(number_system)

+ + + + View Source + + + +
+ +
+ +

See Cldr.validate_number_system/1.

+
+
+
+ +
+ + + Link to this function + +

validate_number_system_type(number_system_type)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec validate_number_system_type(String.t() | atom()) ::
+  {:ok, atom()} | {:error, {module(), String.t()}}
+ +
+ +

Normalise and validate a number system type.

+ +

arguments

+
+ Arguments +

+

+ +

returns

+
+ Returns +

+
  • {:ok, normalized_number_system_type} or

  • {:error, {exception, message}}

+ +

examples

+
+ Examples +

+
iex> Plausible.Cldr.validate_number_system_type :default
+{:ok, :default}
+
+iex> Plausible.Cldr.validate_number_system_type :traditional
+{:ok, :traditional}
+
+iex> Plausible.Cldr.validate_number_system_type :latn
+{
+  :error,
+  {Cldr.UnknownNumberSystemTypeError, "The number system type :latn is unknown"}
+}
+
+iex> Plausible.Cldr.validate_number_system_type "bork"
+{
+  :error,
+  {Cldr.UnknownNumberSystemTypeError, "The number system type \"bork\" is invalid"}
+}
+
+
+
+ +
+ + + Link to this function + +

validate_territory(territory)

+ + + + View Source + + + +
+ +
+ +

See Cldr.validate_territory/1.

+
+
+
+ +
+ + + Link to this function + +

with_locale(locale, fun)

+ + + + View Source + + + + (since 2.32.0) + +
+ +
+ +
+ +
@spec with_locale(Cldr.LanguageTag.t(), (... -> any())) :: any()
+ +
@spec with_locale(Cldr.Locale.locale_name(), (... -> any())) :: any()
+ +
+ +

Execute a function with a locale ensuring that the +current locale is restored after the function.

+ +

arguments

+
+ Arguments +

+

+ +

returns

+
+ Returns +

+
  • The value returned by the function fun/0 or

  • {:error, {exception, reason}} if the locale is invalid or

  • raises an exception if the current locale cannot be +identified.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.ClickhouseEventV2.html b/Plausible.ClickhouseEventV2.html new file mode 100644 index 000000000..96beb0257 --- /dev/null +++ b/Plausible.ClickhouseEventV2.html @@ -0,0 +1,214 @@ + + + + + + + + + + Plausible.ClickhouseEventV2 — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.ClickhouseEventV2 + (Plausible v0.0.1) + +

+ + +
+

Event schema for when NumericIDs migration is complete

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+
+ new(attrs) + +
+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.ClickhouseRepo.html b/Plausible.ClickhouseRepo.html new file mode 100644 index 000000000..caaf813dc --- /dev/null +++ b/Plausible.ClickhouseRepo.html @@ -0,0 +1,1230 @@ + + + + + + + + + + Plausible.ClickhouseRepo — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.ClickhouseRepo + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Callback implementation for Ecto.Repo.aggregate/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.aggregate/4.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.all/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.checked_out?/0.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.checkout/2.

+ +
+ +
+ + +
+ +
+
+ config() + +
+ +

Callback implementation for Ecto.Repo.config/0.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.default_options/1.

+ +
+ +
+ + +

A convenience function for SQL-based repositories that forces all connections in the +pool to disconnect within the given interval.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.exists?/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get!/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get_by/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get_by!/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get_dynamic_repo/0.

+ +
+ +
+ + +

Similar to insert_all/2 but with the following differences

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.load/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.one/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.one!/2.

+ +
+ + + + + +
+ + +

Callback implementation for Ecto.Repo.prepare_query/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.put_dynamic_repo/1.

+ +
+ +
+ + +

A convenience function for SQL-based repositories that executes the given query.

+ +
+ +
+ + +

A convenience function for SQL-based repositories that executes the given query.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.reload/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.reload!/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.start_link/1.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.stop/1.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.stream/2.

+ +
+ +
+ + +

A convenience function for SQL-based repositories that translates the given query to SQL.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + + Link to this function + +

aggregate(queryable, aggregate, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.aggregate/3.

+
+
+
+ +
+ + + Link to this function + +

aggregate(queryable, aggregate, field, opts)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.aggregate/4.

+
+
+
+ + + +
+ + + Link to this function + +

all(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.all/2.

+
+
+
+ + + +
+ +

Callback implementation for Ecto.Repo.checked_out?/0.

+
+
+
+ + + +
+ + + Link to this function + +

checkout(fun, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.checkout/2.

+
+
+
+ + + +
+ + +
+
+
+ + + +
+ +

Callback implementation for Ecto.Repo.config/0.

+
+
+
+ +
+ + + Link to this function + +

default_options(operation)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.default_options/1.

+
+
+
+ + + +
+ + + Link to this function + +

disconnect_all(interval, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

A convenience function for SQL-based repositories that forces all connections in the +pool to disconnect within the given interval.

See Ecto.Adapters.SQL.disconnect_all/3 for more information.

+
+
+
+ + + +
+ + + Link to this function + +

exists?(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.exists?/2.

+
+
+
+ + + +
+ + + Link to this function + +

get(queryable, id, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get/3.

+
+
+
+ + + +
+ + + Link to this function + +

get!(queryable, id, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get!/3.

+
+
+
+ + + +
+ + + Link to this function + +

get_by(queryable, clauses, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get_by/3.

+
+
+
+ + + +
+ + + Link to this function + +

get_by!(queryable, clauses, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get_by!/3.

+
+
+
+ +
+ + + Link to this function + +

get_dynamic_repo()

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get_dynamic_repo/0.

+
+
+
+ + + +
+ + + Link to this function + +

insert_stream(source_or_schema, rows, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Similar to insert_all/2 but with the following differences:

  • accepts rows as streams or lists
  • sends rows as a chunked request
  • doesn't autogenerate ids or does any other preprocessing

Example:

Repo.query!("create table ecto_ch_demo(a UInt64, b String) engine Null")
+
+defmodule Demo do
+  use Ecto.Schema
+
+  @primary_key false
+  schema "ecto_ch_demo" do
+    field :a, Ch, type: "UInt64"
+    field :b, :string
+  end
+end
+
+rows = Stream.map(1..100_000, fn i -> %{a: i, b: to_string(i)} end)
+{100_000, nil} = Repo.insert_stream(Demo, rows)
+
+# schemaless
+{100_000, nil} = Repo.insert_stream("ecto_ch_demo", rows, types: [a: Ch.Types.u64(), b: :string])
+
+
+
+ +
+ + + Link to this function + +

load(schema_or_types, data)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.load/2.

+
+
+
+ + + +
+ + + Link to this function + +

one(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.one/2.

+
+
+
+ + + +
+ + + Link to this function + +

one!(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.one!/2.

+
+
+
+ +
+ + + Link to this function + +

parallel_tasks(queries)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

preload(struct_or_structs_or_nil, preloads, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.preload/3.

+
+
+
+ +
+ + + Link to this function + +

prepare_query(operation, query, opts)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.prepare_query/3.

+
+
+
+ +
+ + + Link to this function + +

put_dynamic_repo(dynamic)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.put_dynamic_repo/1.

+
+
+
+ + + + + +
+ + + Link to this function + +

query(sql, params \\ [], opts \\ [])

+ + + + View Source + + + +
+ +
+ +

A convenience function for SQL-based repositories that executes the given query.

See Ecto.Adapters.SQL.query/4 for more information.

+
+
+
+ + + + + +
+ + + Link to this function + +

query!(sql, params \\ [], opts \\ [])

+ + + + View Source + + + +
+ +
+ +

A convenience function for SQL-based repositories that executes the given query.

See Ecto.Adapters.SQL.query!/4 for more information.

+
+
+
+ + + +
+ + + Link to this function + +

reload(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.reload/2.

+
+
+
+ + + +
+ + + Link to this function + +

reload!(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.reload!/2.

+
+
+
+ + + +
+ + + Link to this function + +

start_link(opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.start_link/1.

+
+
+
+ + + +
+ + + Link to this function + +

stop(timeout \\ 5000)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.stop/1.

+
+
+
+ + + +
+ + + Link to this function + +

stream(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.stream/2.

+
+
+
+ +
+ + + Link to this function + +

to_sql(operation, queryable)

+ + + + View Source + + + +
+ +
+ +

A convenience function for SQL-based repositories that translates the given query to SQL.

See Ecto.Adapters.SQL.to_sql/3 for more information.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.ClickhouseSessionV2.BoolUInt8.html b/Plausible.ClickhouseSessionV2.BoolUInt8.html new file mode 100644 index 000000000..232c20c5d --- /dev/null +++ b/Plausible.ClickhouseSessionV2.BoolUInt8.html @@ -0,0 +1,248 @@ + + + + + + + + + + Plausible.ClickhouseSessionV2.BoolUInt8 — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.ClickhouseSessionV2.BoolUInt8 + (Plausible v0.0.1) + +

+ + +
+

Custom type to cast Bool as UInt8

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+
+ embed_as(_) + +
+ +

Callback implementation for Ecto.Type.embed_as/1.

+ +
+ +
+ + +

Callback implementation for Ecto.Type.equal?/2.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +

Callback implementation for Ecto.Type.embed_as/1.

+
+
+
+ +
+ + + Link to this function + +

equal?(term1, term2)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Type.equal?/2.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.ClickhouseSessionV2.html b/Plausible.ClickhouseSessionV2.html new file mode 100644 index 000000000..41670b2a3 --- /dev/null +++ b/Plausible.ClickhouseSessionV2.html @@ -0,0 +1,214 @@ + + + + + + + + + + Plausible.ClickhouseSessionV2 — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.ClickhouseSessionV2 + (Plausible v0.0.1) + +

+ + +
+

Session schema for when NumericIDs migration is complete

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.ConfigHelpers.html b/Plausible.ConfigHelpers.html new file mode 100644 index 000000000..446e2ba82 --- /dev/null +++ b/Plausible.ConfigHelpers.html @@ -0,0 +1,244 @@ + + + + + + + + + + Plausible.ConfigHelpers — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.ConfigHelpers + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + + Link to this function + +

get_int_from_path_or_env(config_dir, var_name, default \\ nil)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

get_var_from_path_or_env(config_dir, var_name, default \\ nil)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.DataCase.html b/Plausible.DataCase.html new file mode 100644 index 000000000..e4ac98f6c --- /dev/null +++ b/Plausible.DataCase.html @@ -0,0 +1,159 @@ + + + + + + + + + + Plausible.DataCase — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.DataCase + (Plausible v0.0.1) + +

+ + +
+

This module defines the setup for tests requiring +access to the application's data layer.

You may define functions here to be used as helpers in +your tests.

Finally, if the test case interacts with the database, +it cannot be async. For this reason, every test runs +inside a transaction which is reset at the beginning +of the test unless the test case is marked as async.

+
+ + + + +
+
+
+
+ + + + + + diff --git a/Plausible.DataMigration.NumericIDs.html b/Plausible.DataMigration.NumericIDs.html new file mode 100644 index 000000000..4af147201 --- /dev/null +++ b/Plausible.DataMigration.NumericIDs.html @@ -0,0 +1,313 @@ + + + + + + + + + + Plausible.DataMigration.NumericIDs — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.DataMigration.NumericIDs + (Plausible v0.0.1) + +

+ + +
+

Numeric IDs migration, SQL files available at: +priv/data_migrations/NumericIDs/sql

+
+ + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + + Link to this function + +

confirm(message, func, default_choice \\ :yes)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + + + +
+ + +
+
+
+ + + +
+ + + Link to this function + +

run_sql(name, assigns \\ [])

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

run_sql_confirm(name, options \\ [])

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.DataMigration.Repo.html b/Plausible.DataMigration.Repo.html new file mode 100644 index 000000000..b89b24e9d --- /dev/null +++ b/Plausible.DataMigration.Repo.html @@ -0,0 +1,1609 @@ + + + + + + + + + + Plausible.DataMigration.Repo — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.DataMigration.Repo + (Plausible v0.0.1) + +

+ + +
+

Ecto.Repo for Clickhouse data migrations, to be started manually, +outside of the main application supervision tree.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Callback implementation for Ecto.Repo.aggregate/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.aggregate/4.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.all/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.checked_out?/0.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.checkout/2.

+ +
+ +
+ + +
+ +
+
+ config() + +
+ +

Callback implementation for Ecto.Repo.config/0.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.default_options/1.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.delete/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.delete!/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.delete_all/2.

+ +
+ +
+ + +

A convenience function for SQL-based repositories that forces all connections in the +pool to disconnect within the given interval.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.exists?/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get!/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get_by/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get_by!/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get_dynamic_repo/0.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.insert/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.insert!/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.insert_all/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.insert_or_update/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.insert_or_update!/2.

+ +
+ +
+ + +

Similar to insert_all/2 but with the following differences

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.load/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.one/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.one!/2.

+ +
+ + + +
+ + +

Callback implementation for Ecto.Repo.prepare_query/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.put_dynamic_repo/1.

+ +
+ +
+ + +

A convenience function for SQL-based repositories that executes the given query.

+ +
+ +
+ + +

A convenience function for SQL-based repositories that executes the given query.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.reload/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.reload!/2.

+ +
+ + + +
+ + +

Callback implementation for Ecto.Repo.start_link/1.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.stop/1.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.stream/2.

+ +
+ +
+ + +

A convenience function for SQL-based repositories that translates the given query to SQL.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.update/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.update!/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.update_all/3.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + + Link to this function + +

aggregate(queryable, aggregate, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.aggregate/3.

+
+
+
+ +
+ + + Link to this function + +

aggregate(queryable, aggregate, field, opts)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.aggregate/4.

+
+
+
+ + + +
+ + + Link to this function + +

all(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.all/2.

+
+
+
+ + + +
+ +

Callback implementation for Ecto.Repo.checked_out?/0.

+
+
+
+ + + +
+ + + Link to this function + +

checkout(fun, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.checkout/2.

+
+
+
+ + + +
+ + +
+
+
+ + + +
+ +

Callback implementation for Ecto.Repo.config/0.

+
+
+
+ +
+ + + Link to this function + +

default_options(operation)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.default_options/1.

+
+
+
+ + + +
+ + + Link to this function + +

delete(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.delete/2.

+
+
+
+ + + +
+ + + Link to this function + +

delete!(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.delete!/2.

+
+
+
+ + + +
+ + + Link to this function + +

delete_all(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.delete_all/2.

+
+
+
+ + + +
+ + + Link to this function + +

disconnect_all(interval, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

A convenience function for SQL-based repositories that forces all connections in the +pool to disconnect within the given interval.

See Ecto.Adapters.SQL.disconnect_all/3 for more information.

+
+
+
+ + + +
+ + + Link to this function + +

exists?(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.exists?/2.

+
+
+
+ + + +
+ + + Link to this function + +

get(queryable, id, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get/3.

+
+
+
+ + + +
+ + + Link to this function + +

get!(queryable, id, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get!/3.

+
+
+
+ + + +
+ + + Link to this function + +

get_by(queryable, clauses, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get_by/3.

+
+
+
+ + + +
+ + + Link to this function + +

get_by!(queryable, clauses, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get_by!/3.

+
+
+
+ +
+ + + Link to this function + +

get_dynamic_repo()

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get_dynamic_repo/0.

+
+
+
+ + + +
+ + + Link to this function + +

insert(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.insert/2.

+
+
+
+ + + +
+ + + Link to this function + +

insert!(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.insert!/2.

+
+
+
+ + + +
+ + + Link to this function + +

insert_all(schema_or_source, entries, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.insert_all/3.

+
+
+
+ + + +
+ + + Link to this function + +

insert_or_update(changeset, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.insert_or_update/2.

+
+
+
+ + + +
+ + + Link to this function + +

insert_or_update!(changeset, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.insert_or_update!/2.

+
+
+
+ + + +
+ + + Link to this function + +

insert_stream(source_or_schema, rows, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Similar to insert_all/2 but with the following differences:

  • accepts rows as streams or lists
  • sends rows as a chunked request
  • doesn't autogenerate ids or does any other preprocessing

Example:

Repo.query!("create table ecto_ch_demo(a UInt64, b String) engine Null")
+
+defmodule Demo do
+  use Ecto.Schema
+
+  @primary_key false
+  schema "ecto_ch_demo" do
+    field :a, Ch, type: "UInt64"
+    field :b, :string
+  end
+end
+
+rows = Stream.map(1..100_000, fn i -> %{a: i, b: to_string(i)} end)
+{100_000, nil} = Repo.insert_stream(Demo, rows)
+
+# schemaless
+{100_000, nil} = Repo.insert_stream("ecto_ch_demo", rows, types: [a: Ch.Types.u64(), b: :string])
+
+
+
+ +
+ + + Link to this function + +

load(schema_or_types, data)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.load/2.

+
+
+
+ + + +
+ + + Link to this function + +

one(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.one/2.

+
+
+
+ + + +
+ + + Link to this function + +

one!(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.one!/2.

+
+
+
+ + + +
+ + + Link to this function + +

preload(struct_or_structs_or_nil, preloads, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.preload/3.

+
+
+
+ +
+ + + Link to this function + +

prepare_query(operation, query, opts)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.prepare_query/3.

+
+
+
+ +
+ + + Link to this function + +

put_dynamic_repo(dynamic)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.put_dynamic_repo/1.

+
+
+
+ + + + + +
+ + + Link to this function + +

query(sql, params \\ [], opts \\ [])

+ + + + View Source + + + +
+ +
+ +

A convenience function for SQL-based repositories that executes the given query.

See Ecto.Adapters.SQL.query/4 for more information.

+
+
+
+ + + + + +
+ + + Link to this function + +

query!(sql, params \\ [], opts \\ [])

+ + + + View Source + + + +
+ +
+ +

A convenience function for SQL-based repositories that executes the given query.

See Ecto.Adapters.SQL.query!/4 for more information.

+
+
+
+ + + +
+ + + Link to this function + +

reload(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.reload/2.

+
+
+
+ + + +
+ + + Link to this function + +

reload!(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.reload!/2.

+
+
+
+ +
+ + + Link to this function + +

start(url, max_threads)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

start_link(opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.start_link/1.

+
+
+
+ + + +
+ + + Link to this function + +

stop(timeout \\ 5000)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.stop/1.

+
+
+
+ + + +
+ + + Link to this function + +

stream(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.stream/2.

+
+
+
+ +
+ + + Link to this function + +

to_sql(operation, queryable)

+ + + + View Source + + + +
+ +
+ +

A convenience function for SQL-based repositories that translates the given query to SQL.

See Ecto.Adapters.SQL.to_sql/3 for more information.

+
+
+
+ + + +
+ + + Link to this function + +

update(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.update/2.

+
+
+
+ + + +
+ + + Link to this function + +

update!(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.update!/2.

+
+
+
+ + + +
+ + + Link to this function + +

update_all(queryable, updates, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.update_all/3.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.DataMigration.html b/Plausible.DataMigration.html new file mode 100644 index 000000000..65a5c53e8 --- /dev/null +++ b/Plausible.DataMigration.html @@ -0,0 +1,155 @@ + + + + + + + + + + Plausible.DataMigration — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.DataMigration + (Plausible v0.0.1) + +

+ + +
+

Base module for coordinated Clickhouse data migrations +run via remote shell or otherwise (TBD).

+
+ + + + +
+
+
+
+ + + + + + diff --git a/Plausible.Ecto.EventName.html b/Plausible.Ecto.EventName.html new file mode 100644 index 000000000..fe9b3a7dc --- /dev/null +++ b/Plausible.Ecto.EventName.html @@ -0,0 +1,377 @@ + + + + + + + + + + Plausible.Ecto.EventName — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Ecto.EventName + (Plausible v0.0.1) + +

+ + +
+

Custom type for event name. Accepts Strings and Integers and stores them as String. Returns + cast error if any other type is provided. Accepting integers is important for 404 tracking.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+
+ cast(val) + +
+ +

Callback implementation for Ecto.Type.cast/1.

+ +
+ +
+
+ dump(val) + +
+ +

Callback implementation for Ecto.Type.dump/1.

+ +
+ +
+
+ embed_as(_) + +
+ +

Callback implementation for Ecto.Type.embed_as/1.

+ +
+ +
+ + +

Callback implementation for Ecto.Type.equal?/2.

+ +
+ +
+
+ load(val) + +
+ +

Callback implementation for Ecto.Type.load/1.

+ +
+ +
+
+ type() + +
+ +

Callback implementation for Ecto.Type.type/0.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +

Callback implementation for Ecto.Type.cast/1.

+
+
+
+ + + +
+ +

Callback implementation for Ecto.Type.dump/1.

+
+
+
+ + + +
+ +

Callback implementation for Ecto.Type.embed_as/1.

+
+
+
+ +
+ + + Link to this function + +

equal?(term1, term2)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Type.equal?/2.

+
+
+
+ + + +
+ +

Callback implementation for Ecto.Type.load/1.

+
+
+
+ + + +
+ +

Callback implementation for Ecto.Type.type/0.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Event.WriteBuffer.html b/Plausible.Event.WriteBuffer.html new file mode 100644 index 000000000..1734b563c --- /dev/null +++ b/Plausible.Event.WriteBuffer.html @@ -0,0 +1,334 @@ + + + + + + + + + + Plausible.Event.WriteBuffer — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Event.WriteBuffer + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Returns a specification to start this module under a supervisor.

+ +
+ +
+
+ flush() + +
+ +
+ +
+
+ init(buffer) + +
+ +

Callback implementation for GenServer.init/1.

+ +
+ +
+ + +
+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

child_spec(init_arg)

+ + + + View Source + + + +
+ +
+ +

Returns a specification to start this module under a supervisor.

See Supervisor.

+
+
+
+ + + +
+ + +
+
+
+ + + +
+ +

Callback implementation for GenServer.init/1.

+
+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Factory.html b/Plausible.Factory.html new file mode 100644 index 000000000..76b2e1a51 --- /dev/null +++ b/Plausible.Factory.html @@ -0,0 +1,1580 @@ + + + + + + + + + + Plausible.Factory — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Factory + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ + + + + + + +
+ + +
+ +
+
+ create(_) + +
+ +
+ +
+
+ create(_, _) + +
+ +
+ +
+ + +
+ +
+ + +
+ + + + + +
+ + +
+ +
+ + +

Raises a helpful error if no factory is defined.

+ +
+ +
+ + +
+ +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +
+ + +
+ + + + + +
+ + +
+ +
+ + +
+ + + + + + + + + + + +
+ + +
+ + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + +
+
+
+ + + +
+ + + Link to this function + +

build(factory_name, attrs \\ %{})

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

build_list(number_of_records, factory_name, attrs \\ %{})

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

build_pair(factory_name, attrs \\ %{})

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

ch_session_factory()

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ +
+ +
@spec create(any()) :: no_return()
+ +
+ + +
+
+
+ + + +
+ +
+ +
@spec create(any(), any()) :: no_return()
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

create_list(_, _, _)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec create_list(any(), any(), any()) :: no_return()
+ +
+ + +
+
+
+ + + +
+ +
+ +
@spec create_pair(any(), any()) :: no_return()
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

custom_domain_factory()

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

enterprise_plan_factory()

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

factory(factory_name)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec factory(any()) :: no_return()
+ +
+ +

Raises a helpful error if no factory is defined.

+
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

google_auth_factory()

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

imported_browsers_factory()

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

imported_devices_factory()

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

imported_entry_pages_factory()

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

imported_exit_pages_factory()

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

imported_locations_factory()

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

imported_operating_systems_factory()

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

imported_pages_factory()

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

imported_sources_factory()

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

imported_visitors_factory()

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

insert(already_built_record)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

insert(already_built_record, function_opts)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

insert(factory_name, attrs, opts)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

insert_list(number_of_records, factory_name, attrs \\ %{})

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

insert_list(number_of_records, factory_name, attrs, opts)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

insert_pair(factory_name, attrs \\ %{})

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

insert_pair(factory_name, attrs, opts)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

invitation_factory()

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

monthly_report_factory()

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

pageview_factory()

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

params_for(factory_name, attrs \\ %{})

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

params_with_assocs(factory_name, attrs \\ %{})

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

site_membership_factory()

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

spike_notification_factory()

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

string_params_for(factory_name, attrs \\ %{})

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

string_params_with_assocs(factory_name, attrs \\ %{})

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

subscription_factory()

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

user_factory(attrs)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

weekly_report_factory()

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Funnel.Step.html b/Plausible.Funnel.Step.html new file mode 100644 index 000000000..3114ef4e1 --- /dev/null +++ b/Plausible.Funnel.Step.html @@ -0,0 +1,282 @@ + + + + + + + + + + Plausible.Funnel.Step — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Funnel.Step + (Plausible v0.0.1) + +

+ + +
+

This module defines the database schema for a single Funnel step. +See: Plausible.Funnel for more information.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Types +

+ +
+
+ t() + +
+ +
+ +
+
+

+ Functions +

+ + + +
+ +
+ + +
+

+ + + Link to this section + +Types +

+
+
+ + + +
+ +
+ +
@type t() :: %Plausible.Funnel.Step{
+  __meta__: term(),
+  funnel: term(),
+  funnel_id: term(),
+  goal: term(),
+  goal_id: term(),
+  id: term(),
+  inserted_at: term(),
+  step_order: term(),
+  updated_at: term()
+}
+ +
+ + +
+
+ +
+
+ +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + + Link to this function + +

changeset(step, attrs \\ %{})

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Funnel.html b/Plausible.Funnel.html new file mode 100644 index 000000000..b1576755b --- /dev/null +++ b/Plausible.Funnel.html @@ -0,0 +1,380 @@ + + + + + + + + + + Plausible.Funnel — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Funnel + (Plausible v0.0.1) + +

+ + +
+

A funnel is a marketing term used to capture and describe the journey +that users go through, from initial step to conversion. +A funnel consists of several steps (here: 2..8).

This module defines the database schema for storing funnels +and changeset helpers for enumerating the steps within.

Each step references a goal (either a Custom Event or Visit)

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Types +

+ +
+
+ t() + +
+ +
+ +
+
+

+ Functions +

+ + + +
+
+ max_steps() + +
+ +
+ +
+
+ min_steps() + +
+ +
+ + + +
+ +
+ + +
+

+ + + Link to this section + +Types +

+
+
+ + + +
+ +
+ +
@type t() :: %Plausible.Funnel{
+  __meta__: term(),
+  goals: term(),
+  id: term(),
+  inserted_at: term(),
+  name: term(),
+  site: term(),
+  site_id: term(),
+  steps: term(),
+  updated_at: term()
+}
+ +
+ + +
+
+ +
+
+ +
+

+ + + Link to this section + +Functions +

+
+
+ + + + + +
+ + + Link to this function + +

changeset(funnel \\ %__MODULE__{}, attrs \\ %{})

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this macro + +

max_steps()

+ + + + View Source + + + + (macro) + +
+ +
+ + +
+
+
+ +
+ + + Link to this macro + +

min_steps()

+ + + + View Source + + + + (macro) + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

put_step_orders(changeset)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Funnels.html b/Plausible.Funnels.html new file mode 100644 index 000000000..cb9cee15f --- /dev/null +++ b/Plausible.Funnels.html @@ -0,0 +1,444 @@ + + + + + + + + + + Plausible.Funnels — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Funnels + (Plausible v0.0.1) + +

+ + +
+

This module implements contextual Funnel interface, allowing listing, +creating and deleting funnel definitions.

For brief explanation of what a Funnel is, please see Plausible.Funnel schema. +See Plausible.Stats.Funnel for the evaluation logic.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + + + + + +
+ + +
+ + + +
+ + +
+ +
+
+ list(site) + +
+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

create(site, name, steps)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec create(Plausible.Site.t(), String.t(), [map()]) ::
+  {:ok, Plausible.Funnel.t()}
+  | {:error, Ecto.Changeset.t() | :invalid_funnel_size}
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

create_changeset(site, name, steps)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec create_changeset(Plausible.Site.t(), String.t(), [map()]) :: Ecto.Changeset.t()
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

delete(site, funnel_id)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec delete(Plausible.Site.t(), pos_integer()) :: :ok
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

enabled_for?(actor)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec enabled_for?(any()) :: boolean()
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

ephemeral_definition(site, name, steps)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec ephemeral_definition(Plausible.Site.t(), String.t(), [map()]) ::
+  Plausible.Funnel.t()
+ +
+ + +
+
+
+ + + +
+ +
+ +
@spec get(Plausible.Site.t() | pos_integer(), pos_integer()) ::
+  Plausible.Funnel.t() | nil
+ +
+ + +
+
+
+ + + +
+ +
+ +
@spec list(Plausible.Site.t()) :: [
+  %{name: String.t(), id: pos_integer(), steps_count: pos_integer()}
+]
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Geo.html b/Plausible.Geo.html new file mode 100644 index 000000000..f03d8ee87 --- /dev/null +++ b/Plausible.Geo.html @@ -0,0 +1,423 @@ + + + + + + + + + + Plausible.Geo — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Geo + (Plausible v0.0.1) + +

+ + +
+

This module provides an API for fetching IP geolocation.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Waits for the database to start after calling load_db/1 with the async option.

+ +
+ +
+ + +

Returns geodatabase type.

+ +
+ +
+ + +

Starts the geodatabase loading process. Two modes are supported: local file +and MaxMind license key.

+ +
+ +
+ + +

Looks up geo info about an IP address.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +

Waits for the database to start after calling load_db/1 with the async option.

+
+
+
+ + + +
+ +

Returns geodatabase type.

Used for deciding whether to show the DB-IP disclaimer or not.

+ +

examples

+
+ Examples +

+

In the case of a DB-IP database:

iex> database_type()
+"DBIP-City-Lite"

In the case of a MaxMind database:

iex> database_type()
+"GeoLite2-City"
+
+
+
+ + + +
+ +

Starts the geodatabase loading process. Two modes are supported: local file +and MaxMind license key.

+ +

options

+
+ Options +

+
  • :path - the path to the .mmdb database local file. When present, +:license_key and :edition are not required.

  • :license_key - the license key +from MaxMind to authenticate requests to MaxMind.

  • :edition - the name of the MaxMind database to be downloaded from MaxMind +servers. Defaults to GeoLite2-City.

  • :async - when used, configures the database loading to run +asynchronously.

+ +

examples

+
+ Examples +

+

Loading from a local file:

iex> load_db(path: "/etc/plausible/dbip-city.mmdb")
+:ok

Downloading a MaxMind DB (this license key is no longer active):

iex> load_db(license_key: "LNpsJCCKPis6XvBP", edition: "GeoLite2-City", async: true)
+:ok
+
+
+
+ +
+ + + Link to this function + +

lookup(ip_address)

+ + + + View Source + + + +
+ +
+ +

Looks up geo info about an IP address.

+ +

examples

+
+ Examples +

+
iex> lookup("8.7.6.5")
+%{
+  "city" => %{
+    "geoname_id" => 5349755,
+    "names" => %{
+      "de" => "Fontana",
+      "en" => "Fontana",
+      "ja" => "フォンタナ",
+      "ru" => "Фонтана"
+    }
+  },
+  "continent" => %{
+    "code" => "NA",
+    "geoname_id" => 6255149,
+    "names" => %{
+      "de" => "Nordamerika",
+      "en" => "North America",
+      "es" => "Norteamérica",
+      "fr" => "Amérique du Nord",
+      "ja" => "北アメリカ",
+      "pt-BR" => "América do Norte",
+      "ru" => "Северная Америка",
+      "zh-CN" => "北美洲"
+    }
+  },
+  "country" => %{
+    "geoname_id" => 6252001,
+    "iso_code" => "US",
+    "names" => %{
+      "de" => "Vereinigte Staaten",
+      "en" => "United States",
+      "es" => "Estados Unidos",
+      "fr" => "États Unis",
+      "ja" => "アメリカ",
+      "pt-BR" => "EUA",
+      "ru" => "США",
+      "zh-CN" => "美国"
+    }
+  },
+  "location" => %{
+    "accuracy_radius" => 50,
+    "latitude" => 34.1211,
+    "longitude" => -117.4362,
+    "metro_code" => 803,
+    "time_zone" => "America/Los_Angeles"
+  },
+  "postal" => %{"code" => "92336"},
+  "registered_country" => %{
+    "geoname_id" => 6252001,
+    "iso_code" => "US",
+    "names" => %{
+      "de" => "Vereinigte Staaten",
+      "en" => "United States",
+      "es" => "Estados Unidos",
+      "fr" => "États Unis",
+      "ja" => "アメリカ",
+      "pt-BR" => "EUA",
+      "ru" => "США",
+      "zh-CN" => "美国"
+    }
+  },
+  "subdivisions" => [
+    %{
+      "geoname_id" => 5332921,
+      "iso_code" => "CA",
+      "names" => %{
+        "de" => "Kalifornien",
+        "en" => "California",
+        "es" => "California",
+        "fr" => "Californie",
+        "ja" => "カリフォルニア州",
+        "pt-BR" => "Califórnia",
+        "ru" => "Калифорния",
+        "zh-CN" => "加州"
+      }
+    }
+  ]
+}
+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Goal.html b/Plausible.Goal.html new file mode 100644 index 000000000..b7e926e2a --- /dev/null +++ b/Plausible.Goal.html @@ -0,0 +1,368 @@ + + + + + + + + + + Plausible.Goal — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Goal + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Types +

+ +
+
+ t() + +
+ +
+ +
+
+

+ Functions +

+ + + +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Types +

+
+
+ + + +
+ +
+ +
@type t() :: %Plausible.Goal{
+  __meta__: term(),
+  currency: term(),
+  event_name: term(),
+  funnels: term(),
+  id: term(),
+  inserted_at: term(),
+  page_path: term(),
+  site: term(),
+  site_id: term(),
+  updated_at: term()
+}
+ +
+ + +
+
+ +
+
+ +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + + Link to this function + +

changeset(goal, attrs \\ %{})

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

currency_options()

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

valid_currencies()

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Goals.html b/Plausible.Goals.html new file mode 100644 index 000000000..d59062598 --- /dev/null +++ b/Plausible.Goals.html @@ -0,0 +1,349 @@ + + + + + + + + + + Plausible.Goals — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Goals + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+
+ count(site) + +
+ +
+ +
+ + +

Creates a Goal for a site.

+ +
+ +
+ + +

If a goal belongs to funnel(s), we need to inspect their number of steps.

+ +
+ + + + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +
+ +
@spec count(Plausible.Site.t()) :: non_neg_integer()
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

create(site, params, now \\ DateTime.utc_now())

+ + + + View Source + + + +
+ +
+ +

Creates a Goal for a site.

If the created goal is a revenue goal, it sets site.updated_at to be +refreshed by the sites cache, as revenue goals are used during ingestion.

+
+
+
+ + + +
+ +

If a goal belongs to funnel(s), we need to inspect their number of steps.

If it exceeds the minimum allowed (defined via Plausible.Funnel.min_steps/0), +the funnel will be reduced (i.e. a step associated with the goal to be deleted +is removed), so that the minimum number of steps is preserved. This is done +implicitly, by postgres, as per on_delete: :delete_all.

Otherwise, for associated funnel(s) consisting of minimum number steps only, +funnel record(s) are removed completely along with the targeted goal.

+
+
+
+ +
+ + + Link to this function + +

find_or_create(site, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

for_site(site, opts \\ [])

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Google.Api.Mock.html b/Plausible.Google.Api.Mock.html new file mode 100644 index 000000000..31903b1b7 --- /dev/null +++ b/Plausible.Google.Api.Mock.html @@ -0,0 +1,210 @@ + + + + + + + + + + Plausible.Google.Api.Mock — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Google.Api.Mock + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

fetch_stats(auth, query, limit)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Google.Api.html b/Plausible.Google.Api.html new file mode 100644 index 000000000..30d2de27d --- /dev/null +++ b/Plausible.Google.Api.html @@ -0,0 +1,559 @@ + + + + + + + + + + Plausible.Google.Api — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Google.Api + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Types +

+ + + +
+ + +
+ +
+
+

+ Functions +

+ + + + + + + +
+ + +

Returns a single Google Analytics view if the user has access to it.

+ +
+ +
+ + +

Imports stats from a Google Analytics UA view to a Plausible site.

+ +
+ + + +
+ + +

Lists Google Analytics views grouped by hostname.

+ +
+ + + +
+ +
+ + +
+

+ + + Link to this section + +Types +

+
+
+ +
+ + + Link to this type + +

google_analytics_view()

+ + + + View Source + + + +
+ +
+ +
+ +
@type google_analytics_view() :: {view_name :: String.t(), view_id :: String.t()}
+ +
+ + +
+
+
+ + + +
+ +
+ +
@type import_auth() ::
+  {access_token :: String.t(), refresh_token :: String.t(),
+   expires_at :: String.t()}
+ +
+ + +
+
+ +
+
+ +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + + Link to this function + +

fetch_and_persist(site, report_request, opts \\ [])

+ + + + View Source + + + +
+ +
+ +
+ +
@spec fetch_and_persist(
+  Plausible.Site.t(),
+  Plausible.Google.ReportRequest.t(),
+  Keyword.t()
+) ::
+  :ok | {:error, term()}
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

fetch_stats(site, map, limit)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

fetch_verified_properties(auth)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

get_view(access_token, lookup_id)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec get_view(access_token :: String.t(), lookup_id :: String.t()) ::
+  {:ok, google_analytics_view()} | {:ok, nil} | {:error, term()}
+ +
+ +

Returns a single Google Analytics view if the user has access to it.

+
+
+
+ +
+ + + Link to this function + +

import_analytics(site, date_range, view_id, auth)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec import_analytics(Plausible.Site.t(), Date.Range.t(), String.t(), import_auth()) ::
+  :ok | {:error, term()}
+ +
+ +

Imports stats from a Google Analytics UA view to a Plausible site.

This function fetches Google Analytics reports in batches of 7500 per +request. The batches are then buffered to Clickhouse by the +Plausible.Google.Buffer process.

Requests to Google Analytics can fail, and are retried at most +5 times with an exponential backoff. Returns :ok when +importing has finished or {:error, term()} when a request to GA failed too +many times.

Useful links:

+
+
+
+ +
+ + + Link to this function + +

import_authorize_url(site_id, redirect_to)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

list_views(access_token)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec list_views(access_token :: String.t()) ::
+  {:ok, %{required(hostname :: String.t()) => [google_analytics_view()]}}
+  | {:error, term()}
+ +
+ +

Lists Google Analytics views grouped by hostname.

+
+
+
+ +
+ + + Link to this function + +

search_console_authorize_url(site_id, redirect_to)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Google.Buffer.html b/Plausible.Google.Buffer.html new file mode 100644 index 000000000..60bc13493 --- /dev/null +++ b/Plausible.Google.Buffer.html @@ -0,0 +1,452 @@ + + + + + + + + + + Plausible.Google.Buffer — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Google.Buffer + (Plausible v0.0.1) + +

+ + +
+

This GenServer inserts records into Clickhouse imported_* tables. Multiple buffers are +automatically created for each table. Records are flushed when the table buffer reaches the +maximum size, defined by max_buffer_size/0.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Returns a specification to start this module under a supervisor.

+ +
+ +
+ + +

Flushes all table buffers to Clickhouse.

+ +
+ +
+ + +

Callback implementation for GenServer.handle_continue/2.

+ +
+ +
+
+ init(opts) + +
+ +

Callback implementation for GenServer.init/1.

+ +
+ +
+ + +

Puts the given records into the table buffer.

+ +
+ +
+ + +

Returns the total count of items in the given table buffer.

+ +
+ +
+
+ start_link() + +
+ +
+ +
+
+ stop(pid) + +
+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

child_spec(init_arg)

+ + + + View Source + + + +
+ +
+ +

Returns a specification to start this module under a supervisor.

See Supervisor.

+
+
+
+ + + +
+ + + Link to this function + +

flush(pid, timeout \\ :infinity)

+ + + + View Source + + + +
+ +
+ +

Flushes all table buffers to Clickhouse.

+
+
+
+ +
+ + + Link to this function + +

handle_continue(arg, state)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for GenServer.handle_continue/2.

+
+
+
+ + + +
+ +

Callback implementation for GenServer.init/1.

+
+
+
+ +
+ + + Link to this function + +

insert_many(pid, table_name, records)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec insert_many(pid(), term(), [map()]) :: :ok
+ +
+ +

Puts the given records into the table buffer.

+
+
+
+ +
+ + + Link to this function + +

size(pid, table_name)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec size(pid(), term()) :: non_neg_integer()
+ +
+ +

Returns the total count of items in the given table buffer.

+
+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Google.HTTP.html b/Plausible.Google.HTTP.html new file mode 100644 index 000000000..eae9110d3 --- /dev/null +++ b/Plausible.Google.HTTP.html @@ -0,0 +1,399 @@ + + + + + + + + + + Plausible.Google.HTTP — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Google.HTTP + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

fetch_access_token(code)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

get_analytics_start_date(view_id, access_token)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

get_report(report_request)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec get_report(Plausible.Google.ReportRequest.t()) ::
+  {:ok, {[map()], String.t() | nil}} | {:error, any()}
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

list_sites(access_token)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

list_stats(access_token, property, date_range, limit, page \\ nil)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

list_views_for_user(access_token)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

refresh_auth_token(refresh_token)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Google.ReportRequest.html b/Plausible.Google.ReportRequest.html new file mode 100644 index 000000000..dc7b3f004 --- /dev/null +++ b/Plausible.Google.ReportRequest.html @@ -0,0 +1,274 @@ + + + + + + + + + + Plausible.Google.ReportRequest — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Google.ReportRequest + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Types +

+ +
+
+ t() + +
+ +
+ +
+
+

+ Functions +

+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Types +

+
+
+ + + +
+ +
+ +
@type t() :: %Plausible.Google.ReportRequest{
+  access_token: String.t(),
+  dataset: String.t(),
+  date_range: Date.Range.t(),
+  dimensions: [String.t()],
+  metrics: [String.t()],
+  page_size: non_neg_integer(),
+  page_token: String.t() | nil,
+  view_id: term()
+}
+ +
+ + +
+
+ +
+
+ +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.HTTPClient.Interface.html b/Plausible.HTTPClient.Interface.html new file mode 100644 index 000000000..9d5f762f0 --- /dev/null +++ b/Plausible.HTTPClient.Interface.html @@ -0,0 +1,526 @@ + + + + + + + + + + Plausible.HTTPClient.Interface — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.HTTPClient.Interface behaviour + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Types +

+ +
+ + +
+ +
+
+ headers() + +
+ +
+ +
+
+ params() + +
+ +
+ +
+
+ response() + +
+ +
+ +
+
+ url() + +
+ +
+ +
+
+

+ Callbacks +

+ +
+
+ get(url) + +
+ +
+ +
+ + +
+ + + + + +
+ +
+ + +
+

+ + + Link to this section + +Types +

+
+
+ +
+ + + Link to this type + +

finch_request_opts()

+ + + + View Source + + + +
+ +
+ +
+ +
@type finch_request_opts() :: Keyword.t()
+ +
+ + +
+
+
+ + + +
+ +
+ +
@type headers() :: Finch.Request.headers()
+ +
+ + +
+
+
+ + + +
+ +
+ +
@type params() :: Finch.Request.body() | map()
+ +
+ + +
+
+
+ + + +
+ +
+ +
@type response() ::
+  {:ok, Finch.Response.t()}
+  | {:error,
+     Mint.Types.error() | Finch.Error.t() | Plausible.HTTPClient.Non200Error.t()}
+ +
+ + +
+
+
+ + + +
+ +
+ +
@type url() :: Finch.Request.url()
+ +
+ + +
+
+ +
+
+ +
+

+ + + Link to this section + +Callbacks +

+
+
+ + + +
+ +
+ +
@callback get(url()) :: response()
+ +
+ + +
+
+
+ + + +
+ +
+ +
@callback get(url(), headers()) :: response()
+ +
+ + +
+
+
+ +
+ + + Link to this callback + +

post(url, headers, params)

+ + + + View Source + + + +
+ +
+ +
+ +
@callback post(url(), headers(), params()) :: response()
+ +
+ + +
+
+
+ +
+ + + Link to this callback + +

post(url, headers, params, finch_request_opts)

+ + + + View Source + + + +
+ +
+ +
+ +
@callback post(url(), headers(), params(), finch_request_opts()) :: response()
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.HTTPClient.Non200Error.html b/Plausible.HTTPClient.Non200Error.html new file mode 100644 index 000000000..276d97409 --- /dev/null +++ b/Plausible.HTTPClient.Non200Error.html @@ -0,0 +1,271 @@ + + + + + + + + + + Plausible.HTTPClient.Non200Error — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.HTTPClient.Non200Error + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Types +

+ +
+
+ t() + +
+ +
+ +
+
+

+ Functions +

+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Types +

+
+
+ + + +
+ +
+ +
@type t() :: %Plausible.HTTPClient.Non200Error{reason: Finch.Response.t()}
+ +
+ + +
+
+ +
+
+ +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +
+ +
@spec new(Finch.Response.t()) :: t()
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.HTTPClient.html b/Plausible.HTTPClient.html new file mode 100644 index 000000000..d7aea04e5 --- /dev/null +++ b/Plausible.HTTPClient.html @@ -0,0 +1,294 @@ + + + + + + + + + + Plausible.HTTPClient — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.HTTPClient + (Plausible v0.0.1) + +

+ + +
+

HTTP Client built on top of Finch.

By default, request parameters are json-encoded.

If a raw binary value is supplied, no encoding is performed. +If x-www-form-urlencoded content-type is set in headers, +URL encoding is invoked.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Make a GET request

+ +
+ +
+
+ impl() + +
+ +
+ + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + + Link to this function + +

get(url, headers \\ [])

+ + + + View Source + + + +
+ +
+ +

Make a GET request

+
+
+
+ + + +
+ +
+ +
@spec impl() :: Plausible.HTTPClient
+ +
+ + +
+
+
+ + + + + + + +
+ + + Link to this function + +

post(url, headers \\ [], params \\ nil, finch_req_opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Make a POST request

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.ImportDeletionRepo.html b/Plausible.ImportDeletionRepo.html new file mode 100644 index 000000000..b34939dc1 --- /dev/null +++ b/Plausible.ImportDeletionRepo.html @@ -0,0 +1,1578 @@ + + + + + + + + + + Plausible.ImportDeletionRepo — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.ImportDeletionRepo + (Plausible v0.0.1) + +

+ + +
+

A dedicated repo for import related mutations

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Callback implementation for Ecto.Repo.aggregate/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.aggregate/4.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.all/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.checked_out?/0.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.checkout/2.

+ +
+ +
+ + +
+ +
+
+ config() + +
+ +

Callback implementation for Ecto.Repo.config/0.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.default_options/1.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.delete/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.delete!/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.delete_all/2.

+ +
+ +
+ + +

A convenience function for SQL-based repositories that forces all connections in the +pool to disconnect within the given interval.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.exists?/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get!/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get_by/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get_by!/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get_dynamic_repo/0.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.insert/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.insert!/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.insert_all/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.insert_or_update/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.insert_or_update!/2.

+ +
+ +
+ + +

Similar to insert_all/2 but with the following differences

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.load/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.one/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.one!/2.

+ +
+ + + +
+ + +

Callback implementation for Ecto.Repo.prepare_query/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.put_dynamic_repo/1.

+ +
+ +
+ + +

A convenience function for SQL-based repositories that executes the given query.

+ +
+ +
+ + +

A convenience function for SQL-based repositories that executes the given query.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.reload/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.reload!/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.start_link/1.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.stop/1.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.stream/2.

+ +
+ +
+ + +

A convenience function for SQL-based repositories that translates the given query to SQL.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.update/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.update!/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.update_all/3.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + + Link to this function + +

aggregate(queryable, aggregate, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.aggregate/3.

+
+
+
+ +
+ + + Link to this function + +

aggregate(queryable, aggregate, field, opts)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.aggregate/4.

+
+
+
+ + + +
+ + + Link to this function + +

all(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.all/2.

+
+
+
+ + + +
+ +

Callback implementation for Ecto.Repo.checked_out?/0.

+
+
+
+ + + +
+ + + Link to this function + +

checkout(fun, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.checkout/2.

+
+
+
+ + + +
+ + +
+
+
+ + + +
+ +

Callback implementation for Ecto.Repo.config/0.

+
+
+
+ +
+ + + Link to this function + +

default_options(operation)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.default_options/1.

+
+
+
+ + + +
+ + + Link to this function + +

delete(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.delete/2.

+
+
+
+ + + +
+ + + Link to this function + +

delete!(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.delete!/2.

+
+
+
+ + + +
+ + + Link to this function + +

delete_all(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.delete_all/2.

+
+
+
+ + + +
+ + + Link to this function + +

disconnect_all(interval, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

A convenience function for SQL-based repositories that forces all connections in the +pool to disconnect within the given interval.

See Ecto.Adapters.SQL.disconnect_all/3 for more information.

+
+
+
+ + + +
+ + + Link to this function + +

exists?(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.exists?/2.

+
+
+
+ + + +
+ + + Link to this function + +

get(queryable, id, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get/3.

+
+
+
+ + + +
+ + + Link to this function + +

get!(queryable, id, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get!/3.

+
+
+
+ + + +
+ + + Link to this function + +

get_by(queryable, clauses, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get_by/3.

+
+
+
+ + + +
+ + + Link to this function + +

get_by!(queryable, clauses, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get_by!/3.

+
+
+
+ +
+ + + Link to this function + +

get_dynamic_repo()

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get_dynamic_repo/0.

+
+
+
+ + + +
+ + + Link to this function + +

insert(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.insert/2.

+
+
+
+ + + +
+ + + Link to this function + +

insert!(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.insert!/2.

+
+
+
+ + + +
+ + + Link to this function + +

insert_all(schema_or_source, entries, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.insert_all/3.

+
+
+
+ + + +
+ + + Link to this function + +

insert_or_update(changeset, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.insert_or_update/2.

+
+
+
+ + + +
+ + + Link to this function + +

insert_or_update!(changeset, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.insert_or_update!/2.

+
+
+
+ + + +
+ + + Link to this function + +

insert_stream(source_or_schema, rows, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Similar to insert_all/2 but with the following differences:

  • accepts rows as streams or lists
  • sends rows as a chunked request
  • doesn't autogenerate ids or does any other preprocessing

Example:

Repo.query!("create table ecto_ch_demo(a UInt64, b String) engine Null")
+
+defmodule Demo do
+  use Ecto.Schema
+
+  @primary_key false
+  schema "ecto_ch_demo" do
+    field :a, Ch, type: "UInt64"
+    field :b, :string
+  end
+end
+
+rows = Stream.map(1..100_000, fn i -> %{a: i, b: to_string(i)} end)
+{100_000, nil} = Repo.insert_stream(Demo, rows)
+
+# schemaless
+{100_000, nil} = Repo.insert_stream("ecto_ch_demo", rows, types: [a: Ch.Types.u64(), b: :string])
+
+
+
+ +
+ + + Link to this function + +

load(schema_or_types, data)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.load/2.

+
+
+
+ + + +
+ + + Link to this function + +

one(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.one/2.

+
+
+
+ + + +
+ + + Link to this function + +

one!(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.one!/2.

+
+
+
+ + + +
+ + + Link to this function + +

preload(struct_or_structs_or_nil, preloads, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.preload/3.

+
+
+
+ +
+ + + Link to this function + +

prepare_query(operation, query, opts)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.prepare_query/3.

+
+
+
+ +
+ + + Link to this function + +

put_dynamic_repo(dynamic)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.put_dynamic_repo/1.

+
+
+
+ + + + + +
+ + + Link to this function + +

query(sql, params \\ [], opts \\ [])

+ + + + View Source + + + +
+ +
+ +

A convenience function for SQL-based repositories that executes the given query.

See Ecto.Adapters.SQL.query/4 for more information.

+
+
+
+ + + + + +
+ + + Link to this function + +

query!(sql, params \\ [], opts \\ [])

+ + + + View Source + + + +
+ +
+ +

A convenience function for SQL-based repositories that executes the given query.

See Ecto.Adapters.SQL.query!/4 for more information.

+
+
+
+ + + +
+ + + Link to this function + +

reload(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.reload/2.

+
+
+
+ + + +
+ + + Link to this function + +

reload!(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.reload!/2.

+
+
+
+ + + +
+ + + Link to this function + +

start_link(opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.start_link/1.

+
+
+
+ + + +
+ + + Link to this function + +

stop(timeout \\ 5000)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.stop/1.

+
+
+
+ + + +
+ + + Link to this function + +

stream(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.stream/2.

+
+
+
+ +
+ + + Link to this function + +

to_sql(operation, queryable)

+ + + + View Source + + + +
+ +
+ +

A convenience function for SQL-based repositories that translates the given query to SQL.

See Ecto.Adapters.SQL.to_sql/3 for more information.

+
+
+
+ + + +
+ + + Link to this function + +

update(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.update/2.

+
+
+
+ + + +
+ + + Link to this function + +

update!(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.update!/2.

+
+
+
+ + + +
+ + + Link to this function + +

update_all(queryable, updates, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.update_all/3.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Imported.html b/Plausible.Imported.html new file mode 100644 index 000000000..0ecb32f62 --- /dev/null +++ b/Plausible.Imported.html @@ -0,0 +1,276 @@ + + + + + + + + + + Plausible.Imported — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Imported + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+
+ forget(site) + +
+ +
+ + + +
+
+ tables() + +
+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

from_google_analytics(data, site_id, table)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ +
+ +
@spec tables() :: [String.t()]
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.IngestRepo.html b/Plausible.IngestRepo.html new file mode 100644 index 000000000..7cb0ec722 --- /dev/null +++ b/Plausible.IngestRepo.html @@ -0,0 +1,1578 @@ + + + + + + + + + + Plausible.IngestRepo — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.IngestRepo + (Plausible v0.0.1) + +

+ + +
+

Write-centric Clickhouse access interface

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Callback implementation for Ecto.Repo.aggregate/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.aggregate/4.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.all/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.checked_out?/0.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.checkout/2.

+ +
+ +
+ + +
+ +
+
+ config() + +
+ +

Callback implementation for Ecto.Repo.config/0.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.default_options/1.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.delete/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.delete!/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.delete_all/2.

+ +
+ +
+ + +

A convenience function for SQL-based repositories that forces all connections in the +pool to disconnect within the given interval.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.exists?/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get!/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get_by/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get_by!/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get_dynamic_repo/0.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.insert/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.insert!/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.insert_all/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.insert_or_update/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.insert_or_update!/2.

+ +
+ +
+ + +

Similar to insert_all/2 but with the following differences

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.load/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.one/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.one!/2.

+ +
+ + + +
+ + +

Callback implementation for Ecto.Repo.prepare_query/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.put_dynamic_repo/1.

+ +
+ +
+ + +

A convenience function for SQL-based repositories that executes the given query.

+ +
+ +
+ + +

A convenience function for SQL-based repositories that executes the given query.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.reload/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.reload!/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.start_link/1.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.stop/1.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.stream/2.

+ +
+ +
+ + +

A convenience function for SQL-based repositories that translates the given query to SQL.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.update/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.update!/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.update_all/3.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + + Link to this function + +

aggregate(queryable, aggregate, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.aggregate/3.

+
+
+
+ +
+ + + Link to this function + +

aggregate(queryable, aggregate, field, opts)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.aggregate/4.

+
+
+
+ + + +
+ + + Link to this function + +

all(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.all/2.

+
+
+
+ + + +
+ +

Callback implementation for Ecto.Repo.checked_out?/0.

+
+
+
+ + + +
+ + + Link to this function + +

checkout(fun, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.checkout/2.

+
+
+
+ + + +
+ + +
+
+
+ + + +
+ +

Callback implementation for Ecto.Repo.config/0.

+
+
+
+ +
+ + + Link to this function + +

default_options(operation)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.default_options/1.

+
+
+
+ + + +
+ + + Link to this function + +

delete(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.delete/2.

+
+
+
+ + + +
+ + + Link to this function + +

delete!(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.delete!/2.

+
+
+
+ + + +
+ + + Link to this function + +

delete_all(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.delete_all/2.

+
+
+
+ + + +
+ + + Link to this function + +

disconnect_all(interval, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

A convenience function for SQL-based repositories that forces all connections in the +pool to disconnect within the given interval.

See Ecto.Adapters.SQL.disconnect_all/3 for more information.

+
+
+
+ + + +
+ + + Link to this function + +

exists?(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.exists?/2.

+
+
+
+ + + +
+ + + Link to this function + +

get(queryable, id, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get/3.

+
+
+
+ + + +
+ + + Link to this function + +

get!(queryable, id, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get!/3.

+
+
+
+ + + +
+ + + Link to this function + +

get_by(queryable, clauses, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get_by/3.

+
+
+
+ + + +
+ + + Link to this function + +

get_by!(queryable, clauses, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get_by!/3.

+
+
+
+ +
+ + + Link to this function + +

get_dynamic_repo()

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get_dynamic_repo/0.

+
+
+
+ + + +
+ + + Link to this function + +

insert(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.insert/2.

+
+
+
+ + + +
+ + + Link to this function + +

insert!(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.insert!/2.

+
+
+
+ + + +
+ + + Link to this function + +

insert_all(schema_or_source, entries, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.insert_all/3.

+
+
+
+ + + +
+ + + Link to this function + +

insert_or_update(changeset, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.insert_or_update/2.

+
+
+
+ + + +
+ + + Link to this function + +

insert_or_update!(changeset, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.insert_or_update!/2.

+
+
+
+ + + +
+ + + Link to this function + +

insert_stream(source_or_schema, rows, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Similar to insert_all/2 but with the following differences:

  • accepts rows as streams or lists
  • sends rows as a chunked request
  • doesn't autogenerate ids or does any other preprocessing

Example:

Repo.query!("create table ecto_ch_demo(a UInt64, b String) engine Null")
+
+defmodule Demo do
+  use Ecto.Schema
+
+  @primary_key false
+  schema "ecto_ch_demo" do
+    field :a, Ch, type: "UInt64"
+    field :b, :string
+  end
+end
+
+rows = Stream.map(1..100_000, fn i -> %{a: i, b: to_string(i)} end)
+{100_000, nil} = Repo.insert_stream(Demo, rows)
+
+# schemaless
+{100_000, nil} = Repo.insert_stream("ecto_ch_demo", rows, types: [a: Ch.Types.u64(), b: :string])
+
+
+
+ +
+ + + Link to this function + +

load(schema_or_types, data)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.load/2.

+
+
+
+ + + +
+ + + Link to this function + +

one(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.one/2.

+
+
+
+ + + +
+ + + Link to this function + +

one!(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.one!/2.

+
+
+
+ + + +
+ + + Link to this function + +

preload(struct_or_structs_or_nil, preloads, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.preload/3.

+
+
+
+ +
+ + + Link to this function + +

prepare_query(operation, query, opts)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.prepare_query/3.

+
+
+
+ +
+ + + Link to this function + +

put_dynamic_repo(dynamic)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.put_dynamic_repo/1.

+
+
+
+ + + + + +
+ + + Link to this function + +

query(sql, params \\ [], opts \\ [])

+ + + + View Source + + + +
+ +
+ +

A convenience function for SQL-based repositories that executes the given query.

See Ecto.Adapters.SQL.query/4 for more information.

+
+
+
+ + + + + +
+ + + Link to this function + +

query!(sql, params \\ [], opts \\ [])

+ + + + View Source + + + +
+ +
+ +

A convenience function for SQL-based repositories that executes the given query.

See Ecto.Adapters.SQL.query!/4 for more information.

+
+
+
+ + + +
+ + + Link to this function + +

reload(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.reload/2.

+
+
+
+ + + +
+ + + Link to this function + +

reload!(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.reload!/2.

+
+
+
+ + + +
+ + + Link to this function + +

start_link(opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.start_link/1.

+
+
+
+ + + +
+ + + Link to this function + +

stop(timeout \\ 5000)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.stop/1.

+
+
+
+ + + +
+ + + Link to this function + +

stream(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.stream/2.

+
+
+
+ +
+ + + Link to this function + +

to_sql(operation, queryable)

+ + + + View Source + + + +
+ +
+ +

A convenience function for SQL-based repositories that translates the given query to SQL.

See Ecto.Adapters.SQL.to_sql/3 for more information.

+
+
+
+ + + +
+ + + Link to this function + +

update(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.update/2.

+
+
+
+ + + +
+ + + Link to this function + +

update!(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.update!/2.

+
+
+
+ + + +
+ + + Link to this function + +

update_all(queryable, updates, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.update_all/3.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Ingestion.Counters.Buffer.html b/Plausible.Ingestion.Counters.Buffer.html new file mode 100644 index 000000000..68ae7a153 --- /dev/null +++ b/Plausible.Ingestion.Counters.Buffer.html @@ -0,0 +1,506 @@ + + + + + + + + + + Plausible.Ingestion.Counters.Buffer — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Ingestion.Counters.Buffer + (Plausible v0.0.1) + +

+ + +
+

A buffer aggregating counters for internal metrics, within 10 seconds time buckets.

See Plausible.Ingestion.Counters for integration.

Flushing is by default possible only once the 10s bucket is complete +(its window has moved). This is to avoid race conditions +when clearing up the buffer on dequeue - because there is no atomic "get and delete", +and items are buffered concurrently, there is a gap between get and delete +in which items written may disappear otherwise.

aggregate_bucket_fn and flush_boundary_fn control that semantics and +are configurable only for test purposes.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Types +

+ +
+ + +
+ +
+
+ t() + +
+ +
+ +
+ + +
+ +
+ + +
+ + +
+

+ + + Link to this section + +Types +

+
+
+ + + +
+ +
+ +
@type bucket_fn_opt() ::
+  {:aggregate_bucket_fn, (NaiveDateTime.t() -> unix_timestamp())}
+  | {:flush_boundary_fn, (DateTime.t() -> unix_timestamp())}
+ +
+ + +
+
+
+ + + +
+ +
+ +
@type t() :: %Plausible.Ingestion.Counters.Buffer{
+  aggregate_bucket_fn: term(),
+  buffer_name: term(),
+  flush_boundary_fn: term()
+}
+ +
+ + +
+
+
+ +
+ + + Link to this type + +

unix_timestamp()

+ + + + View Source + + + +
+ +
+ +
+ +
@type unix_timestamp() :: pos_integer()
+ +
+ + +
+
+ +
+
+ +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

aggregate(buffer, metric, domain, timestamp)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec aggregate(t(), binary(), binary(), timestamp :: NaiveDateTime.t()) :: t()
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

bucket_10s(datetime)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec bucket_10s(NaiveDateTime.t()) :: unix_timestamp()
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

flush(buffer, now \\ DateTime.utc_now())

+ + + + View Source + + + +
+ +
+ +
+ +
@spec flush(t(), now :: DateTime.t()) :: [Plausible.Ingestion.Counters.Record.t()]
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

new(buffer_name, opts \\ [])

+ + + + View Source + + + +
+ +
+ +
+ +
@spec new(atom(), [bucket_fn_opt()]) :: t()
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

previous_10s(datetime)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec previous_10s(DateTime.t()) :: unix_timestamp()
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Ingestion.Counters.Record.html b/Plausible.Ingestion.Counters.Record.html new file mode 100644 index 000000000..632b1e3a9 --- /dev/null +++ b/Plausible.Ingestion.Counters.Record.html @@ -0,0 +1,227 @@ + + + + + + + + + + Plausible.Ingestion.Counters.Record — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Ingestion.Counters.Record + (Plausible v0.0.1) + +

+ + +
+

Clickhouse schema for storing ingest counter metrics

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Types +

+ +
+
+ t() + +
+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Types +

+
+
+ + + +
+ +
+ +
@type t() :: %Plausible.Ingestion.Counters.Record{
+  __meta__: term(),
+  domain: term(),
+  event_timebucket: term(),
+  metric: term(),
+  site_id: term(),
+  value: term()
+}
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Ingestion.Counters.TelemetryHandler.html b/Plausible.Ingestion.Counters.TelemetryHandler.html new file mode 100644 index 000000000..0e15df834 --- /dev/null +++ b/Plausible.Ingestion.Counters.TelemetryHandler.html @@ -0,0 +1,261 @@ + + + + + + + + + + Plausible.Ingestion.Counters.TelemetryHandler — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Ingestion.Counters.TelemetryHandler + (Plausible v0.0.1) + +

+ + +
+

Susbcribes to telemetry events emitted by Plausible.Ingestion.Event. +Every time a request derived event is either dispatched to clickhouse or dropped, +a telemetry event is emitted respectively. That event is captured here, +its metadata is extracted and sent for internal stats aggregation via +Counters.Buffer interface.

+
+ + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

handle_event(list, measurements, map, buffer)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec handle_event([atom()], any(), map(), Plausible.Ingestion.Counters.Buffer.t()) ::
+  :ok
+ +
+ + +
+
+
+ + + +
+ +
+ +
@spec install(Plausible.Ingestion.Counters.Buffer.t()) :: :ok
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Ingestion.Counters.html b/Plausible.Ingestion.Counters.html new file mode 100644 index 000000000..5b7755ee5 --- /dev/null +++ b/Plausible.Ingestion.Counters.html @@ -0,0 +1,301 @@ + + + + + + + + + + Plausible.Ingestion.Counters — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Ingestion.Counters + (Plausible v0.0.1) + +

+ + +
+

This is instrumentation necessary for keeping track of per-domain +internal metrics. Due to metric labels cardinality (domain x metric_name), +these statistics are not suitable for prometheus/grafana exposure, +hence an internal storage is used.

The module installs Counters.TelemetryHandler and periodically +flushes the internal counter aggregates via Counters.Buffer interface.

The underlying database schema is running SummingMergeTree engine. +To take advantage of automatic roll-ups it provides, upon dispatching the +buffered records to Clickhouse this module transforms each event_timebucket +aggregate into a 1-minute resolution.

Clickhouse connection is set to insert counters asynchronously every time +a pool checkout is made. Those properties are reverted once the insert is done +(or naturally, if the connection crashes).

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ +
+
+ enabled?() + +
+ +
+ +
+
+ stop(pid) + +
+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +
+ +
@spec child_spec(Keyword.t()) :: Supervisor.child_spec() | :ignore
+ +
+ + +
+
+
+ + + +
+ +
+ +
@spec enabled?() :: boolean()
+ +
+ + +
+
+
+ + + +
+ +
+ +
@spec stop(pid()) :: :ok
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Ingestion.Event.html b/Plausible.Ingestion.Event.html new file mode 100644 index 000000000..178c9a22e --- /dev/null +++ b/Plausible.Ingestion.Event.html @@ -0,0 +1,553 @@ + + + + + + + + + + Plausible.Ingestion.Event — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Ingestion.Event + (Plausible v0.0.1) + +

+ + +
+

This module exposes the build_and_buffer/1 function capable of +turning %Plausible.Ingestion.Request{} into a series of events that in turn +are uniformly either buffered in batches (to Clickhouse) or dropped +(e.g. due to spam blocklist) from the processing pipeline.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Types +

+ +
+ + +
+ +
+
+ t() + +
+ +
+ +
+ + +
+ + +
+

+ + + Link to this section + +Types +

+
+
+ + + +
+ +
+ +
@type drop_reason() ::
+  :bot | :spam_referrer | Plausible.Site.GateKeeper.policy() | :invalid
+ +
+ + +
+
+
+ + + +
+ +
+ +
@type t() :: %Plausible.Ingestion.Event{
+  changeset: %Ecto.Changeset{
+    action: term(),
+    changes: term(),
+    constraints: term(),
+    data: term(),
+    empty_values: term(),
+    errors: term(),
+    filters: term(),
+    params: term(),
+    prepare: term(),
+    repo: term(),
+    repo_opts: term(),
+    required: term(),
+    types: term(),
+    valid?: term(),
+    validations: term()
+  },
+  clickhouse_event:
+    %Plausible.ClickhouseEventV2{
+      __meta__: term(),
+      browser: term(),
+      browser_version: term(),
+      city_geoname_id: term(),
+      country_code: term(),
+      hostname: term(),
+      "meta.key": term(),
+      "meta.value": term(),
+      name: term(),
+      operating_system: term(),
+      operating_system_version: term(),
+      pathname: term(),
+      referrer: term(),
+      referrer_source: term(),
+      revenue_reporting_amount: term(),
+      revenue_reporting_currency: term(),
+      revenue_source_amount: term(),
+      revenue_source_currency: term(),
+      screen_size: term(),
+      session_id: term(),
+      site_id: term(),
+      subdivision1_code: term(),
+      subdivision2_code: term(),
+      timestamp: term(),
+      transferred_from: term(),
+      user_id: term(),
+      utm_campaign: term(),
+      utm_content: term(),
+      utm_medium: term(),
+      utm_source: term(),
+      utm_term: term()
+    }
+    | nil,
+  clickhouse_event_attrs: map(),
+  domain: String.t() | nil,
+  drop_reason: drop_reason(),
+  dropped?: boolean(),
+  request: Plausible.Ingestion.Request.t(),
+  salts: map(),
+  site:
+    %Plausible.Site{
+      __meta__: term(),
+      allowed_event_props: term(),
+      conversions_enabled: term(),
+      custom_domain: term(),
+      domain: term(),
+      domain_changed_at: term(),
+      domain_changed_from: term(),
+      from_cache?: term(),
+      funnels_enabled: term(),
+      goals: term(),
+      google_auth: term(),
+      id: term(),
+      imported_data: term(),
+      ingest_rate_limit_scale_seconds: term(),
+      ingest_rate_limit_threshold: term(),
+      inserted_at: term(),
+      invitations: term(),
+      locked: term(),
+      members: term(),
+      memberships: term(),
+      monthly_report: term(),
+      native_stats_start_at: term(),
+      props_enabled: term(),
+      public: term(),
+      revenue_goals: term(),
+      spike_notification: term(),
+      stats_start_date: term(),
+      timezone: term(),
+      updated_at: term(),
+      weekly_report: term()
+    }
+    | nil
+}
+ +
+ + +
+
+ +
+
+ +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

build_and_buffer(request)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec build_and_buffer(Plausible.Ingestion.Request.t()) ::
+  {:ok, %{buffered: [t()], dropped: [t()]}}
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

emit_telemetry_buffered(event)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec emit_telemetry_buffered(t()) :: :ok
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

emit_telemetry_dropped(event, reason)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec emit_telemetry_dropped(t(), drop_reason()) :: :ok
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

telemetry_event_buffered()

+ + + + View Source + + + +
+ +
+ +
+ +
@spec telemetry_event_buffered() :: [atom()]
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

telemetry_event_dropped()

+ + + + View Source + + + +
+ +
+ +
+ +
@spec telemetry_event_dropped() :: [atom()]
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Ingestion.Request.html b/Plausible.Ingestion.Request.html new file mode 100644 index 000000000..6cef723d9 --- /dev/null +++ b/Plausible.Ingestion.Request.html @@ -0,0 +1,329 @@ + + + + + + + + + + Plausible.Ingestion.Request — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Ingestion.Request + (Plausible v0.0.1) + +

+ + +
+

The %Plausible.Ingestion.Request{} struct stores all needed fields +to create an event downstream. Pre-eliminary validation is made +to detect user errors early.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Types +

+ +
+
+ t() + +
+ +
+ +
+
+

+ Functions +

+ +
+ + +

Builds and initially validates %Plausible.Ingestion.Request{} struct from %Plug.Conn{}.

+ +
+ +
+ + +

Removes the "www" part of a hostname.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Types +

+
+
+ + + +
+ +
+ +
@type t() :: %Plausible.Ingestion.Request{
+  domains: term(),
+  event_name: term(),
+  hash_mode: term(),
+  hostname: term(),
+  id: term(),
+  pathname: term(),
+  props: term(),
+  query_params: term(),
+  referrer: term(),
+  remote_ip: term(),
+  revenue_source: term(),
+  timestamp: term(),
+  uri: term(),
+  user_agent: term()
+}
+ +
+ + +
+
+ +
+
+ +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + + Link to this function + +

build(conn, now \\ NaiveDateTime.utc_now())

+ + + + View Source + + + +
+ +
+ +
+ +
@spec build(Plug.Conn.t(), NaiveDateTime.t()) ::
+  {:ok, t()} | {:error, Ecto.Changeset.t()}
+ +
+ +

Builds and initially validates %Plausible.Ingestion.Request{} struct from %Plug.Conn{}.

+
+
+
+ +
+ + + Link to this function + +

sanitize_hostname(hostname)

+ + + + View Source + + + +
+ +
+ +

Removes the "www" part of a hostname.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Mailer.html b/Plausible.Mailer.html new file mode 100644 index 000000000..0eed73d80 --- /dev/null +++ b/Plausible.Mailer.html @@ -0,0 +1,397 @@ + + + + + + + + + + Plausible.Mailer — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Mailer + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ + + + + + + + + +
+
+ send(email) + +
+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +
+ +
@spec deliver(any()) :: no_return()
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

deliver_later(email, opts \\ [])

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

deliver_later!(email, opts \\ [])

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

deliver_now(email, opts \\ [])

+ + + + View Source + + + +
+ +
+ +
+ +
@spec deliver_now(Bamboo.Email.t(), Enum.t()) ::
+  {:ok, Bamboo.Email.t()}
+  | {:ok, Bamboo.Email.t(), any()}
+  | {:error, Exception.t() | String.t()}
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

deliver_now!(email, opts \\ [])

+ + + + View Source + + + +
+ +
+ +
+ +
@spec deliver_now!(Bamboo.Email.t(), Enum.t()) ::
+  Bamboo.Email.t() | {Bamboo.Email.t(), any()}
+ +
+ + +
+
+
+ + + +
+ +
+ +
@spec send(Bamboo.Email.t()) ::
+  :ok | {:error, :hard_bounce} | {:error, :unknown_error}
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.OpenTelemetry.Sampler.html b/Plausible.OpenTelemetry.Sampler.html new file mode 100644 index 000000000..74f15e0f3 --- /dev/null +++ b/Plausible.OpenTelemetry.Sampler.html @@ -0,0 +1,156 @@ + + + + + + + + + + Plausible.OpenTelemetry.Sampler — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.OpenTelemetry.Sampler + (Plausible v0.0.1) + +

+ + +
+

Custom OpenTelemetry sampler +implementation that ignores particular traces to reduce noise. Ingestion +HTTP requests and queries to Oban tables are ignored, for example.

+
+ + + + +
+
+
+
+ + + + + + diff --git a/Plausible.PaddleApi.Mock.html b/Plausible.PaddleApi.Mock.html new file mode 100644 index 000000000..27b4a2a4b --- /dev/null +++ b/Plausible.PaddleApi.Mock.html @@ -0,0 +1,270 @@ + + + + + + + + + + Plausible.PaddleApi.Mock — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.PaddleApi.Mock + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + +
+ + +
+ + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

get_invoices(subscription)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

get_subscription(_)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

update_subscription(_, map)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.PromEx.Plugins.PlausibleMetrics.html b/Plausible.PromEx.Plugins.PlausibleMetrics.html new file mode 100644 index 000000000..7288c7a39 --- /dev/null +++ b/Plausible.PromEx.Plugins.PlausibleMetrics.html @@ -0,0 +1,248 @@ + + + + + + + + + + Plausible.PromEx.Plugins.PlausibleMetrics — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.PromEx.Plugins.PlausibleMetrics + (Plausible v0.0.1) + +

+ + +
+

Custom PromEx plugin for instrumenting code within Plausible app.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Add telemetry events for Cachex user agents and sessions

+ +
+ +
+ + +

Add telemetry events for Session and Event write buffers

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

execute_cache_metrics()

+ + + + View Source + + + +
+ +
+ +

Add telemetry events for Cachex user agents and sessions

+
+
+
+ +
+ + + Link to this function + +

execute_write_buffer_metrics()

+ + + + View Source + + + +
+ +
+ +

Add telemetry events for Session and Event write buffers

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.PromEx.html b/Plausible.PromEx.html new file mode 100644 index 000000000..cff20555d --- /dev/null +++ b/Plausible.PromEx.html @@ -0,0 +1,212 @@ + + + + + + + + + + Plausible.PromEx — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.PromEx + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Returns a specification to start this module under a supervisor.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

child_spec(init_arg)

+ + + + View Source + + + +
+ +
+ +

Returns a specification to start this module under a supervisor.

See Supervisor.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Purge.html b/Plausible.Purge.html new file mode 100644 index 000000000..69e88d46e --- /dev/null +++ b/Plausible.Purge.html @@ -0,0 +1,293 @@ + + + + + + + + + + Plausible.Purge — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Purge + (Plausible v0.0.1) + +

+ + +
+

Deletes data from a site.

Stats are stored on Clickhouse, and unlike other databases data deletion is +done asynchronously.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Deletes imported stats from Google Analytics, and clears the +stats_start_date field.

+ +
+ +
+ + +

Move stats pointers so that no historical stats are available.

+ +
+ +
+
+ reset!(site) + +
+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

delete_imported_stats!(site)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec delete_imported_stats!(Plausible.Site.t()) :: :ok
+ +
+ +

Deletes imported stats from Google Analytics, and clears the +stats_start_date field.

+
+
+
+ +
+ + + Link to this function + +

delete_native_stats!(site)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec delete_native_stats!(Plausible.Site.t()) :: :ok
+ +
+ +

Move stats pointers so that no historical stats are available.

+
+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Release.html b/Plausible.Release.html new file mode 100644 index 000000000..ecae357d7 --- /dev/null +++ b/Plausible.Release.html @@ -0,0 +1,426 @@ + + + + + + + + + + Plausible.Release — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Release + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + + + +
+
+ createdb() + +
+ +
+ +
+
+ migrate() + +
+ +
+ +
+
+ rollback() + +
+ +
+ +
+
+ seed() + +
+ +
+ +
+
+ selfhost?() + +
+ +
+ + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

configure_ref_inspector()

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

configure_ua_inspector()

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+
+ + + +
+ +
+ +
@spec selfhost?() :: boolean()
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

should_be_first_launch?()

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Repo.html b/Plausible.Repo.html new file mode 100644 index 000000000..b93665756 --- /dev/null +++ b/Plausible.Repo.html @@ -0,0 +1,1770 @@ + + + + + + + + + + Plausible.Repo — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Repo + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Callback implementation for Ecto.Repo.aggregate/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.aggregate/4.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.all/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.checked_out?/0.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.checkout/2.

+ +
+ +
+ + +
+ +
+
+ config() + +
+ +

Callback implementation for Ecto.Repo.config/0.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.default_options/1.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.delete/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.delete!/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.delete_all/2.

+ +
+ +
+ + +

A convenience function for SQL-based repositories that forces all connections in the +pool to disconnect within the given interval.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.exists?/2.

+ +
+ +
+ + +

A convenience function for SQL-based repositories that executes an EXPLAIN statement or similar +depending on the adapter to obtain statistics for the given query.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get!/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get_by/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get_by!/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.get_dynamic_repo/0.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.in_transaction?/0.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.insert/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.insert!/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.insert_all/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.insert_or_update/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.insert_or_update!/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.load/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.one/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.one!/2.

+ +
+ + + + + +
+ + +

Callback implementation for Ecto.Repo.prepare_query/3.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.put_dynamic_repo/1.

+ +
+ +
+ + +

A convenience function for SQL-based repositories that executes the given query.

+ +
+ +
+ + +

A convenience function for SQL-based repositories that executes the given query.

+ +
+ +
+ + +

A convenience function for SQL-based repositories that executes the given multi-result query.

+ +
+ +
+ + +

A convenience function for SQL-based repositories that executes the given multi-result query.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.reload/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.reload!/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.rollback/1.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.start_link/1.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.stop/1.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.stream/2.

+ +
+ +
+ + +

A convenience function for SQL-based repositories that translates the given query to SQL.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.transaction/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.update/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.update!/2.

+ +
+ +
+ + +

Callback implementation for Ecto.Repo.update_all/3.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + + Link to this function + +

aggregate(queryable, aggregate, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.aggregate/3.

+
+
+
+ +
+ + + Link to this function + +

aggregate(queryable, aggregate, field, opts)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.aggregate/4.

+
+
+
+ + + +
+ + + Link to this function + +

all(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.all/2.

+
+
+
+ + + +
+ +

Callback implementation for Ecto.Repo.checked_out?/0.

+
+
+
+ + + +
+ + + Link to this function + +

checkout(fun, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.checkout/2.

+
+
+
+ + + +
+ + +
+
+
+ + + +
+ +

Callback implementation for Ecto.Repo.config/0.

+
+
+
+ +
+ + + Link to this function + +

default_options(operation)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.default_options/1.

+
+
+
+ + + +
+ + + Link to this function + +

delete(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.delete/2.

+
+
+
+ + + +
+ + + Link to this function + +

delete!(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.delete!/2.

+
+
+
+ + + +
+ + + Link to this function + +

delete_all(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.delete_all/2.

+
+
+
+ + + +
+ + + Link to this function + +

disconnect_all(interval, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

A convenience function for SQL-based repositories that forces all connections in the +pool to disconnect within the given interval.

See Ecto.Adapters.SQL.disconnect_all/3 for more information.

+
+
+
+ + + +
+ + + Link to this function + +

exists?(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.exists?/2.

+
+
+
+ + + +
+ + + Link to this function + +

explain(operation, queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

A convenience function for SQL-based repositories that executes an EXPLAIN statement or similar +depending on the adapter to obtain statistics for the given query.

See Ecto.Adapters.SQL.explain/4 for more information.

+
+
+
+ + + +
+ + + Link to this function + +

get(queryable, id, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get/3.

+
+
+
+ + + +
+ + + Link to this function + +

get!(queryable, id, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get!/3.

+
+
+
+ + + +
+ + + Link to this function + +

get_by(queryable, clauses, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get_by/3.

+
+
+
+ + + +
+ + + Link to this function + +

get_by!(queryable, clauses, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get_by!/3.

+
+
+
+ +
+ + + Link to this function + +

get_dynamic_repo()

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.get_dynamic_repo/0.

+
+
+
+ + + +
+ +

Callback implementation for Ecto.Repo.in_transaction?/0.

+
+
+
+ + + +
+ + + Link to this function + +

insert(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.insert/2.

+
+
+
+ + + +
+ + + Link to this function + +

insert!(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.insert!/2.

+
+
+
+ + + +
+ + + Link to this function + +

insert_all(schema_or_source, entries, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.insert_all/3.

+
+
+
+ + + +
+ + + Link to this function + +

insert_or_update(changeset, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.insert_or_update/2.

+
+
+
+ + + +
+ + + Link to this function + +

insert_or_update!(changeset, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.insert_or_update!/2.

+
+
+
+ +
+ + + Link to this function + +

load(schema_or_types, data)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.load/2.

+
+
+
+ + + +
+ + + Link to this function + +

one(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.one/2.

+
+
+
+ + + +
+ + + Link to this function + +

one!(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.one!/2.

+
+
+
+ + + + + +
+ + + Link to this function + +

paginate(query, params \\ %{}, options \\ [])

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

preload(struct_or_structs_or_nil, preloads, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.preload/3.

+
+
+
+ +
+ + + Link to this function + +

prepare_query(operation, query, opts)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.prepare_query/3.

+
+
+
+ +
+ + + Link to this function + +

put_dynamic_repo(dynamic)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.put_dynamic_repo/1.

+
+
+
+ + + + + +
+ + + Link to this function + +

query(sql, params \\ [], opts \\ [])

+ + + + View Source + + + +
+ +
+ +

A convenience function for SQL-based repositories that executes the given query.

See Ecto.Adapters.SQL.query/4 for more information.

+
+
+
+ + + + + +
+ + + Link to this function + +

query!(sql, params \\ [], opts \\ [])

+ + + + View Source + + + +
+ +
+ +

A convenience function for SQL-based repositories that executes the given query.

See Ecto.Adapters.SQL.query!/4 for more information.

+
+
+
+ + + + + +
+ + + Link to this function + +

query_many(sql, params \\ [], opts \\ [])

+ + + + View Source + + + +
+ +
+ +

A convenience function for SQL-based repositories that executes the given multi-result query.

See Ecto.Adapters.SQL.query_many/4 for more information.

+
+
+
+ + + + + +
+ + + Link to this function + +

query_many!(sql, params \\ [], opts \\ [])

+ + + + View Source + + + +
+ +
+ +

A convenience function for SQL-based repositories that executes the given multi-result query.

See Ecto.Adapters.SQL.query_many!/4 for more information.

+
+
+
+ + + +
+ + + Link to this function + +

reload(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.reload/2.

+
+
+
+ + + +
+ + + Link to this function + +

reload!(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.reload!/2.

+
+
+
+ + + +
+ +
+ +
@spec rollback(term()) :: no_return()
+ +
+ +

Callback implementation for Ecto.Repo.rollback/1.

+
+
+
+ + + +
+ + + Link to this function + +

start_link(opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.start_link/1.

+
+
+
+ + + +
+ + + Link to this function + +

stop(timeout \\ 5000)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.stop/1.

+
+
+
+ + + +
+ + + Link to this function + +

stream(queryable, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.stream/2.

+
+
+
+ +
+ + + Link to this function + +

to_sql(operation, queryable)

+ + + + View Source + + + +
+ +
+ +

A convenience function for SQL-based repositories that translates the given query to SQL.

See Ecto.Adapters.SQL.to_sql/3 for more information.

+
+
+
+ + + +
+ + + Link to this function + +

transaction(fun_or_multi, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.transaction/2.

+
+
+
+ + + +
+ + + Link to this function + +

update(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.update/2.

+
+
+
+ + + +
+ + + Link to this function + +

update!(struct, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.update!/2.

+
+
+
+ + + +
+ + + Link to this function + +

update_all(queryable, updates, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Ecto.Repo.update_all/3.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Sentry.Client.html b/Plausible.Sentry.Client.html new file mode 100644 index 000000000..5ccd6c420 --- /dev/null +++ b/Plausible.Sentry.Client.html @@ -0,0 +1,248 @@ + + + + + + + + + + Plausible.Sentry.Client — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Sentry.Client + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+
+ child_spec() + +
+ +

The Sentry.HTTPClient behaviour requires a child spec to be supplied. +In this case we don't want Sentry to manage our Finch instances, hence it's fed +with a dummy module for the sake of the contract.

+ +
+ +
+ + +

Callback implementation for Sentry.HTTPClient.post/3.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +

The Sentry.HTTPClient behaviour requires a child spec to be supplied. +In this case we don't want Sentry to manage our Finch instances, hence it's fed +with a dummy module for the sake of the contract.

XXX: Submit a Sentry PR making the child spec callback optional.

+
+
+
+ +
+ + + Link to this function + +

post(url, headers, body)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Sentry.HTTPClient.post/3.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.SentryFilter.html b/Plausible.SentryFilter.html new file mode 100644 index 000000000..407c707c5 --- /dev/null +++ b/Plausible.SentryFilter.html @@ -0,0 +1,252 @@ + + + + + + + + + + Plausible.SentryFilter — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.SentryFilter + (Plausible v0.0.1) + +

+ + +
+

Sentry callbacks for filtering and grouping events

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

before_send(event)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec before_send(Sentry.Event.t()) :: Sentry.Event.t()
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

exclude_exception?(exception, source)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Sentry.EventFilter.exclude_exception?/2.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Session.CacheStore.html b/Plausible.Session.CacheStore.html new file mode 100644 index 000000000..316f55eea --- /dev/null +++ b/Plausible.Session.CacheStore.html @@ -0,0 +1,212 @@ + + + + + + + + + + Plausible.Session.CacheStore — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Session.CacheStore + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + + Link to this function + +

on_event(event, prev_user_id, buffer \\ WriteBuffer)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Session.Salts.html b/Plausible.Session.Salts.html new file mode 100644 index 000000000..ffb7984b8 --- /dev/null +++ b/Plausible.Session.Salts.html @@ -0,0 +1,302 @@ + + + + + + + + + + Plausible.Session.Salts — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Session.Salts + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Returns a specification to start this module under a supervisor.

+ +
+ +
+
+ fetch() + +
+ +
+ +
+
+ rotate() + +
+ +
+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +

Returns a specification to start this module under a supervisor.

See Supervisor.

+
+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Session.WriteBuffer.html b/Plausible.Session.WriteBuffer.html new file mode 100644 index 000000000..8fa444c86 --- /dev/null +++ b/Plausible.Session.WriteBuffer.html @@ -0,0 +1,334 @@ + + + + + + + + + + Plausible.Session.WriteBuffer — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Session.WriteBuffer + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Returns a specification to start this module under a supervisor.

+ +
+ +
+
+ flush() + +
+ +
+ +
+
+ init(buffer) + +
+ +

Callback implementation for GenServer.init/1.

+ +
+ +
+ + +
+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

child_spec(init_arg)

+ + + + View Source + + + +
+ +
+ +

Returns a specification to start this module under a supervisor.

See Supervisor.

+
+
+
+ + + +
+ + +
+
+
+ + + +
+ +

Callback implementation for GenServer.init/1.

+
+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Site.Cache.Warmer.All.html b/Plausible.Site.Cache.Warmer.All.html new file mode 100644 index 000000000..1e2e7da59 --- /dev/null +++ b/Plausible.Site.Cache.Warmer.All.html @@ -0,0 +1,218 @@ + + + + + + + + + + Plausible.Site.Cache.Warmer.All — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Site.Cache.Warmer.All + (Plausible v0.0.1) + +

+ + +
+

A Cache.Warmer adapter that refreshes the Sites Cache fully. +This module exists only to make it explicit what the warmer +refreshes, to be used in the supervisor tree.

+
+ + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+ +
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Site.Cache.Warmer.RecentlyUpdated.html b/Plausible.Site.Cache.Warmer.RecentlyUpdated.html new file mode 100644 index 000000000..0a2175856 --- /dev/null +++ b/Plausible.Site.Cache.Warmer.RecentlyUpdated.html @@ -0,0 +1,221 @@ + + + + + + + + + + Plausible.Site.Cache.Warmer.RecentlyUpdated — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Site.Cache.Warmer.RecentlyUpdated + (Plausible v0.0.1) + +

+ + +
+

A Cache.Warmer adapter that only refreshes the Cache +with recently updated sites every 30 seconds.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +
+ +
@spec child_spec(Keyword.t()) :: Supervisor.child_spec() | :ignore
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Site.Cache.Warmer.html b/Plausible.Site.Cache.Warmer.html new file mode 100644 index 000000000..b80cc9cf1 --- /dev/null +++ b/Plausible.Site.Cache.Warmer.html @@ -0,0 +1,264 @@ + + + + + + + + + + Plausible.Site.Cache.Warmer — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Site.Cache.Warmer + (Plausible v0.0.1) + +

+ + +
+

A periodic cache warmer. +Queries all Sites from Postgres, every interval and pre-populates the cache. +After each run the process is hibernated, triggering garbage collection.

Currently Cachex is used, but the underlying implementation can be transparently swapped.

Child specification options available:

  • interval - the number of milliseconds for each warm-up cycle, defaults +to :sites_by_domain_cache_refresh_interval application env value +with random jitter added, for which the maximum is stored under +:sites_by_domain_cache_refresh_interval_max_jitter key.
  • cache_name - defaults to Cache.name() but can be overriden for testing
  • force_start? - enforcess process startup for testing, even if it's barred +by Cache.enabled?. This is useful for avoiding issues with DB ownership +and async tests.
  • warmer_fn - used for testing, a custom function to retrieve the items meant +to be cached during the warm-up cycle.

See tests for more comprehensive examples.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ +
+
+ interval() + +
+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +
+ +
@spec child_spec(Keyword.t()) :: Supervisor.child_spec() | :ignore
+ +
+ + +
+
+
+ + + +
+ +
+ +
@spec interval() :: pos_integer()
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Site.Cache.html b/Plausible.Site.Cache.html new file mode 100644 index 000000000..5a10a5278 --- /dev/null +++ b/Plausible.Site.Cache.html @@ -0,0 +1,694 @@ + + + + + + + + + + Plausible.Site.Cache — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Site.Cache + (Plausible v0.0.1) + +

+ + +
+

A "sites by domain" caching interface.

Serves as a thin wrapper around Cachex, but the underlying +implementation can be transparently swapped.

Even though the Cachex process is started, cache access is disabled +during tests via the :sites_by_domain_cache_enabled application env key. +This can be overridden on case by case basis, using the child specs options.

NOTE: the cache allows lookups by both domain and domain_changed_from +fields - this is to allow traffic from sites whose domains changed within a certain +grace period (see: Plausible.Site.Transfer).

When Cache is disabled via application env, the get/1 function +falls back to pure database lookups. This should help with introducing +cached lookups in existing code, so that no existing tests should break.

To differentiate cached Site structs from those retrieved directly from the +database, a virtual schema field from_cache?: true is set. +This indicates the Plausible.Site struct is incomplete in comparison to its +database counterpart -- to spare bandwidth and query execution time, +only selected database columns are retrieved and cached.

There are two modes of refreshing the cache: :all and :updated_recently.

  • :all means querying the database for all Site entries and should be done +periodically (via Cache.Warmer). All stale Cache entries are cleared +upon persisting the new batch.

  • :updated_recently attempts to re-query sites updated within the last +15 minutes only, to account for most recent changes. This refresh +is lighter on the database and is meant to be executed more frequently +(via Cache.Warmer.RecentlyUpdated).

Refreshing the cache emits telemetry event defined as per telemetry_event_refresh/2.

The @cached_schema_fields attribute defines the list of DB columns +queried on each cache refresh.

Also see tests for more comprehensive examples.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Types +

+ +
+
+ t() + +
+ +
+ +
+
+

+ Functions +

+ +
+ + +
+ +
+
+ enabled?() + +
+ +
+ + + + + + + + + +
+
+ name() + +
+ +
+ +
+ + +

Ensures the cache has non-zero size unless no sites exist. +Useful for orchestrating app startup to prevent the service +going up asynchronously with an empty cache.

+ +
+ + + + + + + + + +
+ +
+ + +
+

+ + + Link to this section + +Types +

+
+
+ + + +
+ +
+ +
@type t() :: Plausible.Site.t()
+ +
+ + +
+
+ +
+
+ +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +
+ +
@spec child_spec(Keyword.t()) :: Supervisor.child_spec()
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ + + +
+ + + Link to this function + +

get(domain, opts \\ [])

+ + + + View Source + + + +
+ +
+ +
+ +
@spec get(String.t(), Keyword.t()) :: t() | nil
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

get_site_id(domain, opts \\ [])

+ + + + View Source + + + +
+ +
+ +
+ +
@spec get_site_id(String.t(), Keyword.t()) :: pos_integer() | nil
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

hit_rate(cache_name \\ :sites_by_domain)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

merge(new_items, opts \\ [])

+ + + + View Source + + + +
+ +
+ +
+ +
@spec merge(new_items :: [Plausible.Site.t()], opts :: Keyword.t()) :: :ok
+ +
+ + +
+
+
+ + + +
+ +
+ +
@spec name() :: atom()
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

ready?(cache_name \\ :sites_by_domain)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec ready?(atom()) :: boolean()
+ +
+ +

Ensures the cache has non-zero size unless no sites exist. +Useful for orchestrating app startup to prevent the service +going up asynchronously with an empty cache.

+
+
+
+ + + +
+ + + Link to this function + +

refresh_all(opts \\ [])

+ + + + View Source + + + +
+ +
+ +
+ +
@spec refresh_all(Keyword.t()) :: :ok
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

refresh_updated_recently(opts \\ [])

+ + + + View Source + + + +
+ +
+ +
+ +
@spec refresh_updated_recently(Keyword.t()) :: :ok
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

size(cache_name \\ :sites_by_domain)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

telemetry_event_refresh(cache_name \\ :sites_by_domain, mode)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec telemetry_event_refresh(atom(), atom()) :: [atom()]
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Site.CustomDomain.html b/Plausible.Site.CustomDomain.html new file mode 100644 index 000000000..4d431671c --- /dev/null +++ b/Plausible.Site.CustomDomain.html @@ -0,0 +1,150 @@ + + + + + + + + + + Plausible.Site.CustomDomain — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Site.CustomDomain + (Plausible v0.0.1) + +

+ + + + + +
+
+
+
+ + + + + + diff --git a/Plausible.Site.Domain.html b/Plausible.Site.Domain.html new file mode 100644 index 000000000..224544daf --- /dev/null +++ b/Plausible.Site.Domain.html @@ -0,0 +1,268 @@ + + + + + + + + + + Plausible.Site.Domain — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Site.Domain + (Plausible v0.0.1) + +

+ + +
+

Basic interface for domain changes.

Once Plausible.DataMigration.NumericIDs schema migration is ready, +domain change operation will be enabled, accessible to the users.

We will set a transition period of 72 hours +during which, both old and new domains, will be accepted as traffic +identifiers to the same site.

A periodic worker will call the expire/0 function to end it where applicable. +See: Plausible.Workers.ExpireDomainChangeTransitions.

The underlying changeset for domain change (see: Plausible.Site) relies +on database trigger installed via Plausible.Repo.Migrations.AllowDomainChange +Postgres migration. The trigger checks if either domain or domain_changed_from +exist to ensure unicity.

+
+ + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + + Link to this function + +

change(site, new_domain, opts \\ [])

+ + + + View Source + + + +
+ +
+ +
+ +
@spec change(Plausible.Site.t(), String.t(), Keyword.t()) ::
+  {:ok, Plausible.Site.t()} | {:error, Ecto.Changeset.t()}
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

expire_change_transitions(expire_threshold_hours \\ 72)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec expire_change_transitions(integer()) :: {:ok, non_neg_integer()}
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Site.GateKeeper.html b/Plausible.Site.GateKeeper.html new file mode 100644 index 000000000..b3c5a37c5 --- /dev/null +++ b/Plausible.Site.GateKeeper.html @@ -0,0 +1,355 @@ + + + + + + + + + + Plausible.Site.GateKeeper — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Site.GateKeeper + (Plausible v0.0.1) + +

+ + +
+

Thin wrapper around Hammer for gate keeping domain-specific events +during the ingestion phase. When the site is allowed, gate keeping +check returns :allow, otherwise a :deny tagged tuple is returned +with one of the following policy markers:

  • :not_found (indicates site not found in cache)
  • :block (indicates disabled sites)
  • :throttle (indicates rate limiting)

Rate Limiting buckets are configured per site (externally via the CRM). +See: Plausible.Site

To look up each site's configuration, the RateLimiter fetches +a Site by domain using Plausible.Cache interface.

The module defines two policies outside the regular bucket inspection:

  • when the the site is not found in cache: not_found
  • when the underlying rate limiting mechanism returns +an internal error: :allow
+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Types +

+ +
+
+ policy() + +
+ +
+ +
+
+ t() + +
+ +
+ +
+
+

+ Functions +

+ + + +
+
+ key(domain) + +
+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Types +

+
+
+ + + +
+ +
+ +
@type policy() :: :allow | :not_found | :block | :throttle
+ +
+ + +
+
+
+ + + +
+ +
+ +
@type t() :: {:allow, Plausible.Site.t()} | {:deny, policy()}
+ +
+ + +
+
+ +
+
+ +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + + Link to this function + +

check(domain, opts \\ [])

+ + + + View Source + + + +
+ +
+ +
+ +
@spec check(String.t(), Keyword.t()) :: t()
+ +
+ + +
+
+
+ + + +
+ +
+ +
@spec key(String.t()) :: String.t()
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Site.GoogleAuth.html b/Plausible.Site.GoogleAuth.html new file mode 100644 index 000000000..c048426f8 --- /dev/null +++ b/Plausible.Site.GoogleAuth.html @@ -0,0 +1,244 @@ + + + + + + + + + + Plausible.Site.GoogleAuth — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Site.GoogleAuth + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + + Link to this function + +

changeset(auth, attrs \\ %{})

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

set_property(auth, attrs \\ %{})

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Site.ImportedData.html b/Plausible.Site.ImportedData.html new file mode 100644 index 000000000..4c7bc111c --- /dev/null +++ b/Plausible.Site.ImportedData.html @@ -0,0 +1,154 @@ + + + + + + + + + + Plausible.Site.ImportedData — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Site.ImportedData + (Plausible v0.0.1) + +

+ + +
+

Embedded schema for Google Analytics imports

+
+ + + + +
+
+
+
+ + + + + + diff --git a/Plausible.Site.Membership.html b/Plausible.Site.Membership.html new file mode 100644 index 000000000..b26426e6a --- /dev/null +++ b/Plausible.Site.Membership.html @@ -0,0 +1,210 @@ + + + + + + + + + + Plausible.Site.Membership — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Site.Membership + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

changeset(schema, attrs)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Site.MonthlyReport.html b/Plausible.Site.MonthlyReport.html new file mode 100644 index 000000000..0e1fa9213 --- /dev/null +++ b/Plausible.Site.MonthlyReport.html @@ -0,0 +1,272 @@ + + + + + + + + + + Plausible.Site.MonthlyReport — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Site.MonthlyReport + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

add_recipient(report, recipient)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

changeset(settings, attrs \\ %{})

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

remove_recipient(report, recipient)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Site.Removal.html b/Plausible.Site.Removal.html new file mode 100644 index 000000000..2cb74b863 --- /dev/null +++ b/Plausible.Site.Removal.html @@ -0,0 +1,220 @@ + + + + + + + + + + Plausible.Site.Removal — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Site.Removal + (Plausible v0.0.1) + +

+ + +
+

A site deletion service stub.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+
+ run(domain) + +
+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +
+ +
@spec run(String.t()) :: {:ok, map()}
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Site.SharedLink.html b/Plausible.Site.SharedLink.html new file mode 100644 index 000000000..e09771de2 --- /dev/null +++ b/Plausible.Site.SharedLink.html @@ -0,0 +1,212 @@ + + + + + + + + + + Plausible.Site.SharedLink — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Site.SharedLink + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + + Link to this function + +

changeset(link, attrs \\ %{})

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Site.SpikeNotification.html b/Plausible.Site.SpikeNotification.html new file mode 100644 index 000000000..5aafe81df --- /dev/null +++ b/Plausible.Site.SpikeNotification.html @@ -0,0 +1,300 @@ + + + + + + + + + + Plausible.Site.SpikeNotification — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Site.SpikeNotification + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + + + + + +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

add_recipient(schema, recipient)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

changeset(schema, attrs)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

remove_recipient(schema, recipient)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Site.WeeklyReport.html b/Plausible.Site.WeeklyReport.html new file mode 100644 index 000000000..c2b0275e6 --- /dev/null +++ b/Plausible.Site.WeeklyReport.html @@ -0,0 +1,272 @@ + + + + + + + + + + Plausible.Site.WeeklyReport — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Site.WeeklyReport + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

add_recipient(report, recipient)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

changeset(settings, attrs \\ %{})

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

remove_recipient(report, recipient)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Site.html b/Plausible.Site.html new file mode 100644 index 000000000..b9cd39b06 --- /dev/null +++ b/Plausible.Site.html @@ -0,0 +1,783 @@ + + + + + + + + + + Plausible.Site — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Site + (Plausible v0.0.1) + +

+ + +
+

Site schema

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Types +

+ +
+
+ t() + +
+ +
+ +
+
+

+ Functions +

+ + + + + + + +
+ + +
+ +
+ + +
+ +
+ + +

Returns the date of the first recorded stat in the timezone configured by the user. +This function does 2 transformations: + UTC %NaiveDateTime{} -> Local %DateTime{} -> Local %Date

+ +
+ +
+ + +
+ +
+ + +
+ + + + + + + + + + + + + + + + + +
+ +
+ + +
+

+ + + Link to this section + +Types +

+
+
+ + + +
+ +
+ +
@type t() :: %Plausible.Site{
+  __meta__: term(),
+  allowed_event_props: term(),
+  conversions_enabled: term(),
+  custom_domain: term(),
+  domain: term(),
+  domain_changed_at: term(),
+  domain_changed_from: term(),
+  from_cache?: term(),
+  funnels_enabled: term(),
+  goals: term(),
+  google_auth: term(),
+  id: term(),
+  imported_data: term(),
+  ingest_rate_limit_scale_seconds: term(),
+  ingest_rate_limit_threshold: term(),
+  inserted_at: term(),
+  invitations: term(),
+  locked: term(),
+  members: term(),
+  memberships: term(),
+  monthly_report: term(),
+  native_stats_start_at: term(),
+  props_enabled: term(),
+  public: term(),
+  revenue_goals: term(),
+  spike_notification: term(),
+  stats_start_date: term(),
+  timezone: term(),
+  updated_at: term(),
+  weekly_report: term()
+}
+ +
+ + +
+
+ +
+
+ +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + + Link to this function + +

changeset(site, attrs \\ %{})

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

crm_changeset(site, attrs)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

feature_toggle_change(site, property, opts \\ [])

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

import_failure(site)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

import_success(site)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

local_start_date(site)

+ + + + View Source + + + +
+ +
+ +

Returns the date of the first recorded stat in the timezone configured by the user. +This function does 2 transformations: + UTC %NaiveDateTime{} -> Local %DateTime{} -> Local %Date

+ +

examples

+
+ Examples +

+

iex> Plausible.Site.local_start_date(%Plausible.Site{stats_start_date: nil}) + nil

iex> utc_start = ~N[2022-09-28 00:00:00] + iex> tz = "Europe/Helsinki" + iex> site = %Plausible.Site{stats_start_date: utc_start, timezone: tz} + iex> Plausible.Site.local_start_date(site) + ~D[2022-09-28]

iex> utc_start = ~N[2022-09-28 00:00:00] + iex> tz = "America/Los_Angeles" + iex> site = %Plausible.Site{stats_start_date: utc_start, timezone: tz} + iex> Plausible.Site.local_start_date(site) + ~D[2022-09-27]

+
+
+
+ +
+ + + Link to this function + +

make_private(site)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

remove_imported_data(site)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

set_allowed_event_props(site, list)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

set_imported_source(site, imported_source)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

set_native_stats_start_at(site, val)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

set_stats_start_date(site, val)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

start_import(site, start_date, end_date, imported_source, status \\ "importing")

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

tz_offset(site, utc_now \\ DateTime.utc_now())

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + + + +
+ + + Link to this function + +

update_changeset(site, attrs \\ %{}, opts \\ [])

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.SiteAdmin.html b/Plausible.SiteAdmin.html new file mode 100644 index 000000000..22e7f6291 --- /dev/null +++ b/Plausible.SiteAdmin.html @@ -0,0 +1,480 @@ + + + + + + + + + + Plausible.SiteAdmin — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.SiteAdmin + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + + + +
+ + +
+ + + +
+
+ index(_) + +
+ +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + + + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

create_changeset(schema, attrs)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

custom_index_query(conn, schema, query)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

get_struct_fields(module)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

list_actions(conn)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

search_fields(schema)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

set_allowed_props_for_site(arg1, arg2, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

update_changeset(schema, attrs)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Sites.html b/Plausible.Sites.html new file mode 100644 index 000000000..e4769cbef --- /dev/null +++ b/Plausible.Sites.html @@ -0,0 +1,707 @@ + + + + + + + + + + Plausible.Sites — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Sites + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ + + +
+ + +
+ + + + + + + +
+ + +
+ +
+ + +
+ + + +
+ + +
+ +
+ + +
+ + + + + +
+ + +
+ +
+ + +
+ + + +
+ + +

Returns the date of the first event of the given site, or nil if the site +does not have stats yet.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

create(user, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

create_shared_link(site, name, password \\ nil)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

get_by_domain(domain)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

get_for_user(user_id, domain, roles \\ [:owner, :admin, :viewer])

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

get_for_user!(user_id, domain, roles \\ [:owner, :admin, :viewer])

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

has_admin_access?(user_id, site)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

is_member?(user_id, site)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

owned_site_ids(user)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

owned_sites_count(user)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

owned_sites_domains(user)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

role(user_id, site)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+ +
+ + + Link to this function + +

stats_start_date(site)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec stats_start_date(Plausible.Site.t()) :: Date.t() | nil
+ +
+ +

Returns the date of the first event of the given site, or nil if the site +does not have stats yet.

If this is the first time the function is called for the site, it queries +Clickhouse and saves the date in the sites table.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Stats.Aggregate.html b/Plausible.Stats.Aggregate.html new file mode 100644 index 000000000..463ccf06d --- /dev/null +++ b/Plausible.Stats.Aggregate.html @@ -0,0 +1,210 @@ + + + + + + + + + + Plausible.Stats.Aggregate — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Stats.Aggregate + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

aggregate(site, query, metrics)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Stats.Base.html b/Plausible.Stats.Base.html new file mode 100644 index 000000000..640660bfb --- /dev/null +++ b/Plausible.Stats.Base.html @@ -0,0 +1,480 @@ + + + + + + + + + + Plausible.Stats.Base — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Stats.Base + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

apply_entry_prop_filter(sessions_q, prop_name, arg3)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

base_event_query(site, query)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

filter_by_entry_props(sessions_q, query)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

filter_converted_sessions(db_query, site, query)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

query_events(site, query)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

query_sessions(site, query)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

select_event_metrics(q, list)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

select_session_metrics(q, list, query)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

utc_boundaries(query, site)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Stats.Breakdown.html b/Plausible.Stats.Breakdown.html new file mode 100644 index 000000000..e4553469f --- /dev/null +++ b/Plausible.Stats.Breakdown.html @@ -0,0 +1,210 @@ + + + + + + + + + + Plausible.Stats.Breakdown — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Stats.Breakdown + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

breakdown(site, query, property, metrics, pagination)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Stats.Clickhouse.html b/Plausible.Stats.Clickhouse.html new file mode 100644 index 000000000..f966c2009 --- /dev/null +++ b/Plausible.Stats.Clickhouse.html @@ -0,0 +1,428 @@ + + + + + + + + + + Plausible.Stats.Clickhouse — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Stats.Clickhouse + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

current_visitors(site, query)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

has_pageviews?(site)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

imported_pageview_count(site)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

last_24h_visitors(sites)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

pageview_start_date_local(site)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec pageview_start_date_local(Plausible.Site.t()) :: Date.t() | nil
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

top_sources(site, query, limit, page, show_noref \\ false, include_details)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

usage_breakdown(domains_or_site_ids)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

usage_breakdown(domains, date_range)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Stats.Compare.html b/Plausible.Stats.Compare.html new file mode 100644 index 000000000..8b14a90cb --- /dev/null +++ b/Plausible.Stats.Compare.html @@ -0,0 +1,210 @@ + + + + + + + + + + Plausible.Stats.Compare — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Stats.Compare + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

calculate_change(metric, old_stats, new_stats)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Stats.Comparisons.html b/Plausible.Stats.Comparisons.html new file mode 100644 index 000000000..e0ae71d99 --- /dev/null +++ b/Plausible.Stats.Comparisons.html @@ -0,0 +1,303 @@ + + + + + + + + + + Plausible.Stats.Comparisons — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Stats.Comparisons + (Plausible v0.0.1) + +

+ + +
+

This module provides functions for comparing query periods.

It allows you to compare a given period with a previous period or with the +same period from the previous year. For example, you can compare this month's +main graph with last month or with the same month from last year.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Types +

+ +
+
+ mode() + +
+ +
+ +
+
+

+ Functions +

+ +
+ + +

Generates a comparison query based on the source query and comparison mode.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Types +

+
+
+ + + +
+ +
+ +
@type mode() :: String.t() | nil
+ +
+ + +
+
+ +
+
+ +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + + Link to this function + +

compare(site, source_query, mode, opts \\ [])

+ + + + View Source + + + +
+ +
+ +
+ +
@spec compare(Plausible.Site.t(), Plausible.Stats.Query.t(), mode(), [option()]) ::
+  {:ok, Plausible.Stats.Query.t()}
+  | {:error, :not_supported}
+  | {:error, :invalid_dates}
+ +
+ +

Generates a comparison query based on the source query and comparison mode.

The mode parameter specifies the type of comparison and can be one of the +following:

  • "previous_period" - shifts back the query by the same number of days the +source query has.

  • "year_over_year" - shifts back the query by 1 year.

  • "custom" - compares the query using a custom date range. See options for +more details.

The comparison query returned by the function has its end date restricted to +the current day. This can be overriden by the now option, described below.

+ +

options

+
+ Options +

+
  • :now - a NaiveDateTime struct with the current date and time. This is +optional and used for testing purposes.

  • :from - a ISO-8601 date string used when mode is "custom".

  • :to - a ISO-8601 date string used when mode is "custom". Must be +after from.

  • :match_day_of_week? - determines whether the comparison query should be +adjusted to match the day of the week of the source query. When this option +is set to true, the comparison query is shifted to start on the same day of +the week as the source query, rather than on the exact same date. For +example, if the source query starts on Sunday, January 1st, 2023 and the +year_over_year comparison query is configured to match_day_of_week?, +it will be shifted to start on Sunday, January 2nd, 2022 instead of +January 1st. Defaults to false.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Stats.CurrentVisitors.html b/Plausible.Stats.CurrentVisitors.html new file mode 100644 index 000000000..eb54fd0f8 --- /dev/null +++ b/Plausible.Stats.CurrentVisitors.html @@ -0,0 +1,210 @@ + + + + + + + + + + Plausible.Stats.CurrentVisitors — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Stats.CurrentVisitors + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

current_visitors(site)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Stats.CustomProps.html b/Plausible.Stats.CustomProps.html new file mode 100644 index 000000000..a132bf5ed --- /dev/null +++ b/Plausible.Stats.CustomProps.html @@ -0,0 +1,282 @@ + + + + + + + + + + Plausible.Stats.CustomProps — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Stats.CustomProps + (Plausible v0.0.1) + +

+ + +
+

Module for querying user defined 'custom properties'.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + +
+ + +

Returns a breakdown of event names with all existing custom +properties for each event name.

+ +
+ +
+ + +

Expects a single goal filter in the query. Returns a list of custom +props for that goal. Works for both custom event and pageview goals.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

maybe_allowed_props_only(q, allowed_props)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

props_for_all_event_names(site, query)

+ + + + View Source + + + +
+ +
+ +

Returns a breakdown of event names with all existing custom +properties for each event name.

+
+
+
+ +
+ + + Link to this function + +

props_for_goal(site, query)

+ + + + View Source + + + +
+ +
+ +

Expects a single goal filter in the query. Returns a list of custom +props for that goal. Works for both custom event and pageview goals.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Stats.FilterParser.html b/Plausible.Stats.FilterParser.html new file mode 100644 index 000000000..ea9739159 --- /dev/null +++ b/Plausible.Stats.FilterParser.html @@ -0,0 +1,229 @@ + + + + + + + + + + Plausible.Stats.FilterParser — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Stats.FilterParser + (Plausible v0.0.1) + +

+ + +
+

A module for parsing filters used in stat queries.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Parses different filter formats.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

parse_filters(filters)

+ + + + View Source + + + +
+ +
+ +

Parses different filter formats.

Depending on the format and type of the filters argument, returns:

  • a decoded map, when filters is encoded JSON
  • a parsed filter map, when filters is a filter expression string
  • the same map, when filters is a map

Returns an empty map when argument type is unexpected (e.g. nil).

+ +

examples

+
+ Examples: +

+
iex> FilterParser.parse_filters("{\"page\":\"/blog/**\"}")
+%{"page" => "/blog/**"}
+
+iex> FilterParser.parse_filters("visit:browser!=Chrome")
+%{"visit:browser" => {:is_not, "Chrome"}}
+
+iex> FilterParser.parse_filters(nil)
+%{}
+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Stats.FilterSuggestions.html b/Plausible.Stats.FilterSuggestions.html new file mode 100644 index 000000000..71032ec33 --- /dev/null +++ b/Plausible.Stats.FilterSuggestions.html @@ -0,0 +1,210 @@ + + + + + + + + + + Plausible.Stats.FilterSuggestions — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Stats.FilterSuggestions + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

filter_suggestions(site, query, filter_name, filter_search)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Stats.Filters.html b/Plausible.Stats.Filters.html new file mode 100644 index 000000000..87120ba83 --- /dev/null +++ b/Plausible.Stats.Filters.html @@ -0,0 +1,240 @@ + + + + + + + + + + Plausible.Stats.Filters — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Stats.Filters + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Stats.Fragments.html b/Plausible.Stats.Fragments.html new file mode 100644 index 000000000..28de55473 --- /dev/null +++ b/Plausible.Stats.Fragments.html @@ -0,0 +1,494 @@ + + + + + + + + + + Plausible.Stats.Fragments — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Stats.Fragments + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ + + +
+ + +
+ +
+ + +

Converts time or date and time to the specified timezone.

+ +
+ +
+
+ total() + +
+ +
+ +
+ + +
+ +
+ + +
+ +
+ + +

Returns the weekstart for date. If the weekstart is before the not_before +boundary, not_before is returned.

+ +
+ +
+ + +

Same as Plausible.Stats.Fragments.weekstart_not_before/2 but converts dates to +the specified timezone.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this macro + +

bounce_rate()

+ + + + View Source + + + + (macro) + +
+ +
+ + +
+
+
+ +
+ + + Link to this macro + +

coalesce_string(fieldA, fieldB)

+ + + + View Source + + + + (macro) + +
+ +
+ + +
+
+
+ +
+ + + Link to this macro + +

sample_percent()

+ + + + View Source + + + + (macro) + +
+ +
+ + +
+
+
+ +
+ + + Link to this macro + +

to_timezone(date, timezone)

+ + + + View Source + + + + (macro) + +
+ +
+ +

Converts time or date and time to the specified timezone.

Reference: https://clickhouse.com/docs/en/sql-reference/functions/date-time-functions/#totimezone

+
+
+
+ +
+ + + Link to this macro + +

total()

+ + + + View Source + + + + (macro) + +
+ +
+ + +
+
+
+ +
+ + + Link to this macro + +

uniq(user_id)

+ + + + View Source + + + + (macro) + +
+ +
+ + +
+
+
+ +
+ + + Link to this macro + +

visit_duration()

+ + + + View Source + + + + (macro) + +
+ +
+ + +
+
+
+ +
+ + + Link to this macro + +

weekstart_not_before(date, not_before)

+ + + + View Source + + + + (macro) + +
+ +
+ +

Returns the weekstart for date. If the weekstart is before the not_before +boundary, not_before is returned.

+ +

examples

+
+ Examples +

+

In this pseudo-code example, the fragment returns the weekstart. The +not_before boundary is set to the past Saturday, which is before the +weekstart, therefore the cap does not apply.

iex> this_wednesday = ~D[2022-11-09] + ...> past_saturday = ~D[2022-11-05] + ...> weekstart_not_before(this_wednesday, past_saturday) + ~D[2022-11-07]

In this other example, the fragment returns Tuesday and not the weekstart. +The not_before boundary is set to Tuesday, which is past the weekstart, +therefore the cap applies.

iex> this_wednesday = ~D[2022-11-09] + ...> this_tuesday = ~D[2022-11-08] + ...> weekstart_not_before(this_wednesday, this_tuesday) + ~D[2022-11-08]

+
+
+
+ +
+ + + Link to this macro + +

weekstart_not_before(date, not_before, timezone)

+ + + + View Source + + + + (macro) + +
+ +
+ +

Same as Plausible.Stats.Fragments.weekstart_not_before/2 but converts dates to +the specified timezone.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Stats.Funnel.html b/Plausible.Stats.Funnel.html new file mode 100644 index 000000000..e1f9ed001 --- /dev/null +++ b/Plausible.Stats.Funnel.html @@ -0,0 +1,226 @@ + + + + + + + + + + Plausible.Stats.Funnel — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Stats.Funnel + (Plausible v0.0.1) + +

+ + +
+

Module responsible for funnel evaluation, i.e. building and executing +ClickHouse funnel query based on Plausible.Funnel definition.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

funnel(site, query, funnel_id)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec funnel(
+  Plausible.Site.t(),
+  Plausible.Stats.Query.t(),
+  Plausible.Funnel.t() | pos_integer()
+) ::
+  {:ok, map()} | {:error, :funnel_not_found}
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Stats.Imported.html b/Plausible.Stats.Imported.html new file mode 100644 index 000000000..09a94ecfa --- /dev/null +++ b/Plausible.Stats.Imported.html @@ -0,0 +1,240 @@ + + + + + + + + + + Plausible.Stats.Imported — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Stats.Imported + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

merge_imported(q, site, query, property, metrics)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

merge_imported_timeseries(native_q, site, query, metrics)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Stats.Interval.html b/Plausible.Stats.Interval.html new file mode 100644 index 000000000..16e35edae --- /dev/null +++ b/Plausible.Stats.Interval.html @@ -0,0 +1,477 @@ + + + + + + + + + + Plausible.Stats.Interval — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Stats.Interval + (Plausible v0.0.1) + +

+ + +
+

Collection of functions to work with intervals.

The interval of a query defines the granularity of the data. You can think of +it as a GROUP BY clause. Possible values are minute, hour, date, +week, and month.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Types +

+ +
+
+ t() + +
+ +
+ +
+
+

+ Functions +

+ +
+ + +

Returns the suggested interval for the given Date.Range struct.

+ +
+ +
+ + +

Returns the suggested interval for the given time period.

+ +
+ +
+
+ list() + +
+ +
+ +
+ + +
+ +
+ + +
+ +
+ + +

Returns whether the given interval is valid for a time period.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Types +

+
+
+ + + +
+ +
+ +
@type t() :: String.t()
+ +
+ + +
+
+ +
+
+ +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

default_for_date_range(range)

+ + + + View Source + + + +
+ +
+ +

Returns the suggested interval for the given Date.Range struct.

+ +

examples

+
+ Examples +

+

iex> Plausible.Stats.Interval.default_for_date_range(Date.range(~D[2022-01-01], ~D[2023-01-01])) + "month"

iex> Plausible.Stats.Interval.default_for_date_range(Date.range(~D[2022-01-01], ~D[2022-01-15])) + "date"

iex> Plausible.Stats.Interval.default_for_date_range(Date.range(~D[2022-01-01], ~D[2022-01-01])) + "hour"

+
+
+
+ +
+ + + Link to this function + +

default_for_period(period)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec default_for_period(period()) :: t()
+ +
+ +

Returns the suggested interval for the given time period.

+ +

examples

+
+ Examples +

+

iex> Plausible.Stats.Interval.default_for_period("7d") + "date"

+
+
+
+ + + +
+ +
+ +
@spec list() :: [t()]
+ +
+ + +
+
+
+ + + +
+ +
+ +
@spec valid?(term()) :: boolean()
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

valid_for_period?(period, interval)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec valid_for_period?(period(), t()) :: boolean()
+ +
+ +

Returns whether the given interval is valid for a time period.

Intervals longer than periods are not supported, e.g. current month stats with +a month interval, or today stats with a week interval.

+ +

examples

+
+ Examples +

+

iex> Plausible.Stats.Interval.valid_for_period?("month", "date") + true

iex> Plausible.Stats.Interval.valid_for_period?("30d", "month") + false

iex> Plausible.Stats.Interval.valid_for_period?("realtime", "week") + false

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Stats.Props.html b/Plausible.Stats.Props.html new file mode 100644 index 000000000..96d085663 --- /dev/null +++ b/Plausible.Stats.Props.html @@ -0,0 +1,240 @@ + + + + + + + + + + Plausible.Stats.Props — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Stats.Props + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Stats.Query.html b/Plausible.Stats.Query.html new file mode 100644 index 000000000..753517008 --- /dev/null +++ b/Plausible.Stats.Query.html @@ -0,0 +1,481 @@ + + + + + + + + + + Plausible.Stats.Query — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Stats.Query + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Types +

+ +
+
+ t() + +
+ +
+ +
+ + +
+ + +
+

+ + + Link to this section + +Types +

+
+
+ + + +
+ +
+ +
@type t() :: %Plausible.Stats.Query{
+  date_range: term(),
+  filters: term(),
+  imported_data_requested: term(),
+  include_imported: term(),
+  interval: term(),
+  period: term(),
+  sample_threshold: term()
+}
+ +
+ + +
+
+ +
+
+ +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

from(site, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

get_filter_by_prefix(query, prefix)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

has_event_filters?(query)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

include_imported?(query, site, requested?)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec include_imported?(t(), Plausible.Site.t(), boolean()) :: boolean()
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

put_filter(query, key, val)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

remove_event_filters(query, opts)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ +
+ +
@spec trace(%Plausible.Stats.Query{
+  date_range: term(),
+  filters: term(),
+  imported_data_requested: term(),
+  include_imported: term(),
+  interval: term(),
+  period: term(),
+  sample_threshold: term()
+}) :: %Plausible.Stats.Query{
+  date_range: term(),
+  filters: term(),
+  imported_data_requested: term(),
+  include_imported: term(),
+  interval: term(),
+  period: term(),
+  sample_threshold: term()
+}
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Stats.Timeseries.html b/Plausible.Stats.Timeseries.html new file mode 100644 index 000000000..dbdb47b58 --- /dev/null +++ b/Plausible.Stats.Timeseries.html @@ -0,0 +1,265 @@ + + + + + + + + + + Plausible.Stats.Timeseries — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Stats.Timeseries + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Types +

+ +
+
+ results() + +
+ +
+ +
+
+

+ Functions +

+ + + +
+ +
+ + +
+

+ + + Link to this section + +Types +

+
+
+ + + +
+ +
+ +
@type results() :: [%{:date => Date.t(), required(metric()) => value()}, ...]
+ +
+ + +
+
+ +
+
+ +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

timeseries(site, query, metrics)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Stats.Util.html b/Plausible.Stats.Util.html new file mode 100644 index 000000000..fc1a3e2d7 --- /dev/null +++ b/Plausible.Stats.Util.html @@ -0,0 +1,250 @@ + + + + + + + + + + Plausible.Stats.Util — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Stats.Util + (Plausible v0.0.1) + +

+ + +
+

Utilities for modifying stat results

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + +
+ + +

__internal_visits is fetched when querying bounce rate and visit duration, as it +is needed to calculate these from imported data. This function removes that metric +from all entries in the results list.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

remove_internal_visits_metric(result)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

remove_internal_visits_metric(results, metrics)

+ + + + View Source + + + +
+ +
+ +

__internal_visits is fetched when querying bounce rate and visit duration, as it +is needed to calculate these from imported data. This function removes that metric +from all entries in the results list.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Stats.html b/Plausible.Stats.html new file mode 100644 index 000000000..d649a0329 --- /dev/null +++ b/Plausible.Stats.html @@ -0,0 +1,372 @@ + + + + + + + + + + Plausible.Stats — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Stats + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

aggregate(site, query, metrics)

+ + + + View Source + + + +
+ +
+ +

See Plausible.Stats.Aggregate.aggregate/3.

+
+
+
+ +
+ + + Link to this function + +

breakdown(site, query, prop, metrics, pagination)

+ + + + View Source + + + +
+ +
+ +

See Plausible.Stats.Breakdown.breakdown/5.

+
+
+
+ +
+ + + Link to this function + +

current_visitors(site)

+ + + + View Source + + + +
+ +
+ +

See Plausible.Stats.CurrentVisitors.current_visitors/1.

+
+
+
+ +
+ + + Link to this function + +

filter_suggestions(site, query, filter_name, filter_search)

+ + + + View Source + + + +
+ +
+ +

See Plausible.Stats.FilterSuggestions.filter_suggestions/4.

+
+
+
+ +
+ + + Link to this function + +

funnel(site, query, funnel)

+ + + + View Source + + + +
+ +
+ +

See Plausible.Stats.Funnel.funnel/3.

+
+
+
+ +
+ + + Link to this function + +

timeseries(site, query, metrics)

+ + + + View Source + + + +
+ +
+ +

See Plausible.Stats.Timeseries.timeseries/3.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Test.Support.HTML.html b/Plausible.Test.Support.HTML.html new file mode 100644 index 000000000..9bce251f1 --- /dev/null +++ b/Plausible.Test.Support.HTML.html @@ -0,0 +1,364 @@ + + + + + + + + + + Plausible.Test.Support.HTML — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Test.Support.HTML + (Plausible v0.0.1) + +

+ + +
+

Floki wrappers to help make assertions about HTML/DOM structures

+
+ + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

element_exists?(html, selector)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

form_exists?(html, action_path)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

submit_button(html, form)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

text_of_attr(element, attr)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

text_of_element(html, element)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.TestUtils.html b/Plausible.TestUtils.html new file mode 100644 index 000000000..de7239b18 --- /dev/null +++ b/Plausible.TestUtils.html @@ -0,0 +1,758 @@ + + + + + + + + + + Plausible.TestUtils — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.TestUtils + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + + + +
+ + +
+ +
+ + +
+ +
+ + +
+ + + + + +
+ + +
+ +
+ + +
+ + + +
+ + +
+ +
+
+ log_in(map) + +
+ +
+ + + + + + + +
+ + +
+ + + +
+ + +
+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

add_imported_data(map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

await_clickhouse_count(query, expected)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

create_api_key(map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

create_events(events)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

create_new_site(map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

create_pageviews(pageviews)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

create_sessions(sessions)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+
+ + + + + +
+ + + Link to this function + +

eventually(expectation, wait_time_ms \\ 50, retries \\ 10)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

init_session(conn)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this macro + +

patch_env(env_key, value)

+ + + + View Source + + + + (macro) + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

populate_stats(events)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

populate_stats(site, events)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

relative_time(shifts)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this macro + +

setup_patch_env(env_key, value)

+ + + + View Source + + + + (macro) + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

to_naive_truncate(dt)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Themes.html b/Plausible.Themes.html new file mode 100644 index 000000000..8cfbaa84c --- /dev/null +++ b/Plausible.Themes.html @@ -0,0 +1,210 @@ + + + + + + + + + + Plausible.Themes — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Themes + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+
+ options() + +
+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Timezones.html b/Plausible.Timezones.html new file mode 100644 index 000000000..a6c8bb23f --- /dev/null +++ b/Plausible.Timezones.html @@ -0,0 +1,218 @@ + + + + + + + + + + Plausible.Timezones — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Timezones + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + + Link to this function + +

options(now \\ DateTime.utc_now())

+ + + + View Source + + + +
+ +
+ +
+ +
@spec options(DateTime.t()) :: [key: String.t(), value: String.t(), offset: integer()]
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Workers.CheckUsage.html b/Plausible.Workers.CheckUsage.html new file mode 100644 index 000000000..bde49be6d --- /dev/null +++ b/Plausible.Workers.CheckUsage.html @@ -0,0 +1,338 @@ + + + + + + + + + + Plausible.Workers.CheckUsage — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Workers.CheckUsage + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + +
+ + +
+ + + +
+ + +
+ +
+
+ yesterday() + +
+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

check_enterprise_subscriber(subscriber, billing_mod)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this macro + +

day_of_month(date)

+ + + + View Source + + + + (macro) + +
+ +
+ + +
+
+
+ +
+ + + Link to this macro + +

last_day_of_month(day)

+ + + + View Source + + + + (macro) + +
+ +
+ + +
+
+
+ +
+ + + Link to this macro + +

least(left, right)

+ + + + View Source + + + + (macro) + +
+ +
+ + +
+
+
+ +
+ + + Link to this macro + +

yesterday()

+ + + + View Source + + + + (macro) + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Workers.CleanEmailVerificationCodes.html b/Plausible.Workers.CleanEmailVerificationCodes.html new file mode 100644 index 000000000..6216615f5 --- /dev/null +++ b/Plausible.Workers.CleanEmailVerificationCodes.html @@ -0,0 +1,150 @@ + + + + + + + + + + Plausible.Workers.CleanEmailVerificationCodes — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Workers.CleanEmailVerificationCodes + (Plausible v0.0.1) + +

+ + + + + +
+
+
+
+ + + + + + diff --git a/Plausible.Workers.CleanInvitations.html b/Plausible.Workers.CleanInvitations.html new file mode 100644 index 000000000..2cc026107 --- /dev/null +++ b/Plausible.Workers.CleanInvitations.html @@ -0,0 +1,150 @@ + + + + + + + + + + Plausible.Workers.CleanInvitations — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Workers.CleanInvitations + (Plausible v0.0.1) + +

+ + + + + +
+
+
+
+ + + + + + diff --git a/Plausible.Workers.ExpireDomainChangeTransitions.html b/Plausible.Workers.ExpireDomainChangeTransitions.html new file mode 100644 index 000000000..017d1c3c5 --- /dev/null +++ b/Plausible.Workers.ExpireDomainChangeTransitions.html @@ -0,0 +1,156 @@ + + + + + + + + + + Plausible.Workers.ExpireDomainChangeTransitions — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Workers.ExpireDomainChangeTransitions + (Plausible v0.0.1) + +

+ + +
+

Periodic worker that expires domain change transition period. +Old domains are frozen for a given time, so users can still access them +before redeploying their scripts and integrations.

+
+ + + + +
+
+
+
+ + + + + + diff --git a/Plausible.Workers.ImportGoogleAnalytics.html b/Plausible.Workers.ImportGoogleAnalytics.html new file mode 100644 index 000000000..9c5753cf0 --- /dev/null +++ b/Plausible.Workers.ImportGoogleAnalytics.html @@ -0,0 +1,210 @@ + + + + + + + + + + Plausible.Workers.ImportGoogleAnalytics — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Workers.ImportGoogleAnalytics + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

import_failed(site)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Workers.LockSites.html b/Plausible.Workers.LockSites.html new file mode 100644 index 000000000..1d22407e0 --- /dev/null +++ b/Plausible.Workers.LockSites.html @@ -0,0 +1,150 @@ + + + + + + + + + + Plausible.Workers.LockSites — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Workers.LockSites + (Plausible v0.0.1) + +

+ + + + + +
+
+
+
+ + + + + + diff --git a/Plausible.Workers.NotifyAnnualRenewal.html b/Plausible.Workers.NotifyAnnualRenewal.html new file mode 100644 index 000000000..5fcbfb294 --- /dev/null +++ b/Plausible.Workers.NotifyAnnualRenewal.html @@ -0,0 +1,212 @@ + + + + + + + + + + Plausible.Workers.NotifyAnnualRenewal — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Workers.NotifyAnnualRenewal + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+
+ perform(job) + +
+ +

Sends a notification at most 7 days and at least 1 day before the renewal of an annual subscription

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +

Sends a notification at most 7 days and at least 1 day before the renewal of an annual subscription

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Workers.RotateSalts.html b/Plausible.Workers.RotateSalts.html new file mode 100644 index 000000000..db18f81bb --- /dev/null +++ b/Plausible.Workers.RotateSalts.html @@ -0,0 +1,150 @@ + + + + + + + + + + Plausible.Workers.RotateSalts — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Workers.RotateSalts + (Plausible v0.0.1) + +

+ + + + + +
+
+
+
+ + + + + + diff --git a/Plausible.Workers.ScheduleEmailReports.html b/Plausible.Workers.ScheduleEmailReports.html new file mode 100644 index 000000000..9547bb10c --- /dev/null +++ b/Plausible.Workers.ScheduleEmailReports.html @@ -0,0 +1,276 @@ + + + + + + + + + + Plausible.Workers.ScheduleEmailReports — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Workers.ScheduleEmailReports + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + +
+ + +
+ +
+
+ perform(job) + +
+ +

Email reports should be sent on Monday at 9am according to the timezone +of a site. This job runs every day at midnight to ensure that all sites +have a scheduled job for email reports.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

first_of_month_9am(timezone)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

monday_9am(timezone)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ +

Email reports should be sent on Monday at 9am according to the timezone +of a site. This job runs every day at midnight to ensure that all sites +have a scheduled job for email reports.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/Plausible.Workers.SendCheckStatsEmails.html b/Plausible.Workers.SendCheckStatsEmails.html new file mode 100644 index 000000000..6c1320a3b --- /dev/null +++ b/Plausible.Workers.SendCheckStatsEmails.html @@ -0,0 +1,150 @@ + + + + + + + + + + Plausible.Workers.SendCheckStatsEmails — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Workers.SendCheckStatsEmails + (Plausible v0.0.1) + +

+ + + + + +
+
+
+
+ + + + + + diff --git a/Plausible.Workers.SendEmailReport.html b/Plausible.Workers.SendEmailReport.html new file mode 100644 index 000000000..dda013695 --- /dev/null +++ b/Plausible.Workers.SendEmailReport.html @@ -0,0 +1,150 @@ + + + + + + + + + + Plausible.Workers.SendEmailReport — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Workers.SendEmailReport + (Plausible v0.0.1) + +

+ + + + + +
+
+
+
+ + + + + + diff --git a/Plausible.Workers.SendSiteSetupEmails.html b/Plausible.Workers.SendSiteSetupEmails.html new file mode 100644 index 000000000..e9fa19d0f --- /dev/null +++ b/Plausible.Workers.SendSiteSetupEmails.html @@ -0,0 +1,150 @@ + + + + + + + + + + Plausible.Workers.SendSiteSetupEmails — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Workers.SendSiteSetupEmails + (Plausible v0.0.1) + +

+ + + + + +
+
+
+
+ + + + + + diff --git a/Plausible.Workers.SendTrialNotifications.html b/Plausible.Workers.SendTrialNotifications.html new file mode 100644 index 000000000..bdeef70b5 --- /dev/null +++ b/Plausible.Workers.SendTrialNotifications.html @@ -0,0 +1,150 @@ + + + + + + + + + + Plausible.Workers.SendTrialNotifications — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Workers.SendTrialNotifications + (Plausible v0.0.1) + +

+ + + + + +
+
+
+
+ + + + + + diff --git a/Plausible.Workers.SpikeNotifier.html b/Plausible.Workers.SpikeNotifier.html new file mode 100644 index 000000000..ccedca341 --- /dev/null +++ b/Plausible.Workers.SpikeNotifier.html @@ -0,0 +1,150 @@ + + + + + + + + + + Plausible.Workers.SpikeNotifier — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible.Workers.SpikeNotifier + (Plausible v0.0.1) + +

+ + + + + +
+
+
+
+ + + + + + diff --git a/Plausible.epub b/Plausible.epub new file mode 100644 index 000000000..4ea3c14a4 Binary files /dev/null and b/Plausible.epub differ diff --git a/Plausible.html b/Plausible.html new file mode 100644 index 000000000..6dcf3bbf3 --- /dev/null +++ b/Plausible.html @@ -0,0 +1,156 @@ + + + + + + + + + + Plausible — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + Plausible + (Plausible v0.0.1) + +

+ + +
+

Plausible keeps the contexts that define your domain +and business logic.

Contexts are also responsible for managing your data, regardless +if it comes from the database, an external API or others.

+
+ + + + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.Api.ExternalController.html b/PlausibleWeb.Api.ExternalController.html new file mode 100644 index 000000000..7ceb7c536 --- /dev/null +++ b/PlausibleWeb.Api.ExternalController.html @@ -0,0 +1,300 @@ + + + + + + + + + + PlausibleWeb.Api.ExternalController — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.Api.ExternalController + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

error(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

event(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

health(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

info(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.Api.ExternalSitesController.html b/PlausibleWeb.Api.ExternalSitesController.html new file mode 100644 index 000000000..a5040e8db --- /dev/null +++ b/PlausibleWeb.Api.ExternalSitesController.html @@ -0,0 +1,390 @@ + + + + + + + + + + PlausibleWeb.Api.ExternalSitesController — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.Api.ExternalSitesController + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

create_site(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

delete_goal(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

delete_site(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

find_or_create_goal(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

find_or_create_shared_link(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

get_site(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

update_site(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.Api.ExternalStatsController.html b/PlausibleWeb.Api.ExternalStatsController.html new file mode 100644 index 000000000..b7dd5b1cd --- /dev/null +++ b/PlausibleWeb.Api.ExternalStatsController.html @@ -0,0 +1,300 @@ + + + + + + + + + + PlausibleWeb.Api.ExternalStatsController — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.Api.ExternalStatsController + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + + + + + + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

aggregate(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

breakdown(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

realtime_visitors(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

timeseries(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.Api.Helpers.html b/PlausibleWeb.Api.Helpers.html new file mode 100644 index 000000000..97760de73 --- /dev/null +++ b/PlausibleWeb.Api.Helpers.html @@ -0,0 +1,330 @@ + + + + + + + + + + PlausibleWeb.Api.Helpers — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.Api.Helpers + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + +
+ + +
+ + + + + + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

bad_request(conn, msg)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

not_found(conn, msg)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

payment_required(conn, msg)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

too_many_requests(conn, msg)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

unauthorized(conn, msg)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.Api.InternalController.html b/PlausibleWeb.Api.InternalController.html new file mode 100644 index 000000000..3e563a4a8 --- /dev/null +++ b/PlausibleWeb.Api.InternalController.html @@ -0,0 +1,270 @@ + + + + + + + + + + PlausibleWeb.Api.InternalController — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.Api.InternalController + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + + + +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

disable_feature(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

domain_status(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

sites(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.Api.PaddleController.html b/PlausibleWeb.Api.PaddleController.html new file mode 100644 index 000000000..f84ca364e --- /dev/null +++ b/PlausibleWeb.Api.PaddleController.html @@ -0,0 +1,270 @@ + + + + + + + + + + PlausibleWeb.Api.PaddleController — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.Api.PaddleController + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + + + +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

verified_signature?(params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

verify_signature(conn, opts)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

webhook(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.Api.StatsController.html b/PlausibleWeb.Api.StatsController.html new file mode 100644 index 000000000..92e64604d --- /dev/null +++ b/PlausibleWeb.Api.StatsController.html @@ -0,0 +1,1010 @@ + + + + + + + + + + PlausibleWeb.Api.StatsController — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.Api.StatsController + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + + + + + +
+ + +
+ + + + + + + + + + + + + +
+ + +
+ +
+ + +

Returns a time-series based on given parameters.

+ +
+ + + + + +
+ + +
+ + + + + +
+ + +
+ + + +
+ + +
+ + + + + + + + + + + + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

all_props_breakdown(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

browser_versions(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

browsers(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

cities(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

conversions(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

countries(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

current_visitors(conn, _)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

entry_pages(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

exit_pages(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

filter_suggestions(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

funnel(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

main_graph(conn, params)

+ + + + View Source + + + +
+ +
+ +

Returns a time-series based on given parameters.

+ +

parameters

+
+ Parameters +

+

This API accepts the following parameters:

  • period - x-axis of the graph, e.g. 12mo, day, custom.

  • metric - y-axis of the graph, e.g. visits, visitors, pageviews. +See the Stats API "Metrics" +section for more details. Defaults to visitors.

  • interval - granularity of the time-series data. You can think of it as +a GROUP BY clause. Possible values are minute, hour, date, week, +and month. The default depends on the period parameter. Check +Plausible.Query.from/2 for each default.

  • filters - optional filters to drill down data. See the Stats API +"Filtering" section for +more details.

  • with_imported - boolean indicating whether to include Google Analytics +imported data or not. Defaults to false.

Full example:

%{
+  "from" => "2021-09-06",
+  "interval" => "month",
+  "metric" => "visitors",
+  "period" => "custom",
+  "to" => "2021-12-13"
+}

+ +

response

+
+ Response +

+

Returns a map with the following keys:

  • plot - list of values for the requested metric representing the y-axis +of the graph.

  • labels - list of date times representing the x-axis of the graph.

  • present_index - index of the element representing the current date in +labels and plot lists.

  • interval - the interval used for querying.

  • with_imported - boolean indicating whether the Google Analytics data +was queried or not.

  • imported_source - the source of the imported data, when applicable. +Currently only Google Analytics is supported.

  • full_intervals - map of dates indicating whether the interval has been +cut off by the requested date range or not. For example, if looking at a +month week-by-week, some weeks may be cut off by the month boundaries. +It's useful to adjust the graph display slightly in case the interval is +not 'full' so that the user understands why the numbers might be lower for +those partial periods.

Full example:

%{
+  "full_intervals" => %{
+    "2021-09-01" => false,
+    "2021-10-01" => true,
+    "2021-11-01" => true,
+    "2021-12-01" => false
+  },
+  "imported_source" => nil,
+  "interval" => "month",
+  "labels" => ["2021-09-01", "2021-10-01", "2021-11-01", "2021-12-01"],
+  "plot" => [0, 0, 0, 0],
+  "present_index" => nil,
+  "with_imported" => false
+}
+
+
+
+ +
+ + + Link to this function + +

operating_system_versions(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

operating_systems(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

pages(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

prop_breakdown(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

referrer_drilldown(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

regions(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

screen_sizes(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

sources(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

top_stats(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

utm_campaigns(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

utm_contents(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

utm_mediums(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

utm_sources(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

utm_terms(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.AuthController.html b/PlausibleWeb.AuthController.html new file mode 100644 index 000000000..f177eb6ac --- /dev/null +++ b/PlausibleWeb.AuthController.html @@ -0,0 +1,870 @@ + + + + + + + + + + PlausibleWeb.AuthController — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.AuthController + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

activate(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

activate_form(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

create_api_key(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

delete_api_key(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

delete_me(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

google_auth_callback(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

login_form(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

logout(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

new_api_key(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

password_form(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

password_reset(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

password_reset_form(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

password_reset_request(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

password_reset_request_form(conn, _)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

register(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

register_form(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

register_from_invitation(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

register_from_invitation_form(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

request_activation_code(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

save_settings(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

set_password(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

user_settings(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.AuthPlug.html b/PlausibleWeb.AuthPlug.html new file mode 100644 index 000000000..0f01b23ab --- /dev/null +++ b/PlausibleWeb.AuthPlug.html @@ -0,0 +1,240 @@ + + + + + + + + + + PlausibleWeb.AuthPlug — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.AuthPlug + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.AuthView.html b/PlausibleWeb.AuthView.html new file mode 100644 index 000000000..e612d0625 --- /dev/null +++ b/PlausibleWeb.AuthView.html @@ -0,0 +1,888 @@ + + + + + + + + + + PlausibleWeb.AuthView — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.AuthView + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

The resource name, as an atom, for this view

+ +
+ + + +
+ + +
+ + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + +
+ + +

Renders the given template locally.

+ +
+ + + + + + + +
+ + +

Callback invoked when no template is found. +By default it raises but can be customized +to render a particular template.

+ +
+ + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +

The resource name, as an atom, for this view

+
+
+
+ +
+ + + Link to this function + +

activate.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

delimit_integer(number)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

format_invoices(invoice_list)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

invitation_expired.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

login_form.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

new_api_key.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

password_form.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

password_reset_form.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

password_reset_request_form.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

password_reset_request_success.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

present_subscription_status(status)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

register_form.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

register_from_invitation_form.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

register_success.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

render(template, assigns \\ %{})

+ + + + View Source + + + +
+ +
+ +

Renders the given template locally.

+
+
+
+ +
+ + + Link to this function + +

subscription_colors(_)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

subscription_interval(subscription)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

subscription_quota(subscription)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

template_not_found(template, assigns)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec template_not_found(binary(), map()) :: no_return()
+ +
+ +

Callback invoked when no template is found. +By default it raises but can be customized +to render a particular template.

+
+
+
+ +
+ + + Link to this function + +

user_settings.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.AuthorizeSiteAccess.html b/PlausibleWeb.AuthorizeSiteAccess.html new file mode 100644 index 000000000..a9665ca8a --- /dev/null +++ b/PlausibleWeb.AuthorizeSiteAccess.html @@ -0,0 +1,240 @@ + + + + + + + + + + PlausibleWeb.AuthorizeSiteAccess — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.AuthorizeSiteAccess + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

call(conn, allowed_roles)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

init(allowed_roles)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.AuthorizeSitesApiPlug.html b/PlausibleWeb.AuthorizeSitesApiPlug.html new file mode 100644 index 000000000..4185e99b5 --- /dev/null +++ b/PlausibleWeb.AuthorizeSitesApiPlug.html @@ -0,0 +1,240 @@ + + + + + + + + + + PlausibleWeb.AuthorizeSitesApiPlug — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.AuthorizeSitesApiPlug + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.AuthorizeStatsApiPlug.html b/PlausibleWeb.AuthorizeStatsApiPlug.html new file mode 100644 index 000000000..803aee381 --- /dev/null +++ b/PlausibleWeb.AuthorizeStatsApiPlug.html @@ -0,0 +1,240 @@ + + + + + + + + + + PlausibleWeb.AuthorizeStatsApiPlug — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.AuthorizeStatsApiPlug + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.BillingController.html b/PlausibleWeb.BillingController.html new file mode 100644 index 000000000..2b28148e4 --- /dev/null +++ b/PlausibleWeb.BillingController.html @@ -0,0 +1,450 @@ + + + + + + + + + + PlausibleWeb.BillingController — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.BillingController + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

change_enterprise_plan(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

change_plan(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

change_plan_form(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

change_plan_preview(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

ping_subscription(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

preview_susbcription(_, _)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

upgrade(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

upgrade_enterprise_plan(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

upgrade_success(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.BillingView.html b/PlausibleWeb.BillingView.html new file mode 100644 index 000000000..ecfd2973d --- /dev/null +++ b/PlausibleWeb.BillingView.html @@ -0,0 +1,648 @@ + + + + + + + + + + PlausibleWeb.BillingView — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.BillingView + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

The resource name, as an atom, for this view

+ +
+ +
+ + +
+ + + + + + + + + +
+ + +
+ +
+ + +
+ +
+ + +
+ + + +
+ + +

Renders the given template locally.

+ +
+ +
+ + +

Callback invoked when no template is found. +By default it raises but can be customized +to render a particular template.

+ +
+ +
+ + +
+ + + + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +

The resource name, as an atom, for this view

+
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

change_enterprise_plan.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

change_enterprise_plan_contact_us.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

change_plan.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

change_plan_preview.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

present_currency(arg)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

present_date(date)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

reccommended_plan(usage)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

render(template, assigns \\ %{})

+ + + + View Source + + + +
+ +
+ +

Renders the given template locally.

+
+
+
+ +
+ + + Link to this function + +

template_not_found(template, assigns)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec template_not_found(binary(), map()) :: no_return()
+ +
+ +

Callback invoked when no template is found. +By default it raises but can be customized +to render a particular template.

+
+
+
+ +
+ + + Link to this function + +

upgrade.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

upgrade_success.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

upgrade_to_plan.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.CRMAuthPlug.html b/PlausibleWeb.CRMAuthPlug.html new file mode 100644 index 000000000..b2af8a888 --- /dev/null +++ b/PlausibleWeb.CRMAuthPlug.html @@ -0,0 +1,240 @@ + + + + + + + + + + PlausibleWeb.CRMAuthPlug — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.CRMAuthPlug + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.Captcha.html b/PlausibleWeb.Captcha.html new file mode 100644 index 000000000..c2446432c --- /dev/null +++ b/PlausibleWeb.Captcha.html @@ -0,0 +1,270 @@ + + + + + + + + + + PlausibleWeb.Captcha — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.Captcha + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+
+ enabled?() + +
+ +
+ +
+
+ sitekey() + +
+ +
+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.Components.Generic.html b/PlausibleWeb.Components.Generic.html new file mode 100644 index 000000000..6053d6d93 --- /dev/null +++ b/PlausibleWeb.Components.Generic.html @@ -0,0 +1,228 @@ + + + + + + + + + + PlausibleWeb.Components.Generic — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.Components.Generic + (Plausible v0.0.1) + +

+ + +
+

Generic reusable components

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Attributes

  • title (:string) - Defaults to "Notice".
  • class (:string) - Defaults to "".

Slots

  • inner_block
+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +

+ +

attributes

+
+ Attributes +

+
  • title (:string) - Defaults to "Notice".
  • class (:string) - Defaults to "".

+ +

slots

+
+ Slots +

+
  • inner_block
+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.Components.Site.Feature.html b/PlausibleWeb.Components.Site.Feature.html new file mode 100644 index 000000000..f81788e42 --- /dev/null +++ b/PlausibleWeb.Components.Site.Feature.html @@ -0,0 +1,427 @@ + + + + + + + + + + PlausibleWeb.Components.Site.Feature — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.Components.Site.Feature + (Plausible v0.0.1) + +

+ + +
+

Phoenix Component for rendering a user-facing feature toggle +capable of flipping booleans in Plausible.Site via the toggle_feature controller action.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

The resource name, as an atom, for this view

+ +
+ + + + + +
+ + +

Renders the given template locally.

+ +
+ + + +
+ + +

Callback invoked when no template is found. +By default it raises but can be customized +to render a particular template.

+ +
+ +
+ + +

Attributes

Slots

  • inner_block
+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +

The resource name, as an atom, for this view

+
+
+
+ +
+ + + Link to this function + +

button_active(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

button_inactive(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

render(template, assigns \\ %{})

+ + + + View Source + + + +
+ +
+ +

Renders the given template locally.

+
+
+
+ +
+ + + Link to this function + +

target(site, setting, conn, set_to)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

template_not_found(template, assigns)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec template_not_found(binary(), map()) :: no_return()
+ +
+ +

Callback invoked when no template is found. +By default it raises but can be customized +to render a particular template.

+
+
+
+ + + +
+ +

+ +

attributes

+
+ Attributes +

+

+ +

slots

+
+ Slots +

+
  • inner_block
+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.ConnCase.html b/PlausibleWeb.ConnCase.html new file mode 100644 index 000000000..877df44ed --- /dev/null +++ b/PlausibleWeb.ConnCase.html @@ -0,0 +1,160 @@ + + + + + + + + + + PlausibleWeb.ConnCase — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.ConnCase + (Plausible v0.0.1) + +

+ + +
+

This module defines the test case to be used by +tests that require setting up a connection.

Such tests rely on Phoenix.ConnTest and also +import other functionality to make it easier +to build common data structures and query the data layer.

Finally, if the test case interacts with the database, +it cannot be async. For this reason, every test runs +inside a transaction which is reset at the beginning +of the test unless the test case is marked as async.

+
+ + + + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.ControllerHelpers.html b/PlausibleWeb.ControllerHelpers.html new file mode 100644 index 000000000..c763e3874 --- /dev/null +++ b/PlausibleWeb.ControllerHelpers.html @@ -0,0 +1,240 @@ + + + + + + + + + + PlausibleWeb.ControllerHelpers — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.ControllerHelpers + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

render_error(conn, status)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

render_error(conn, status, message)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.Email.html b/PlausibleWeb.Email.html new file mode 100644 index 000000000..40c73f6b6 --- /dev/null +++ b/PlausibleWeb.Email.html @@ -0,0 +1,1176 @@ + + + + + + + + + + PlausibleWeb.Email — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.Email + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + +
+
+ base_email() + +
+ +
+ +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + +
+ + +

Render an Phoenix template and set the body on the email.

+ +
+ + + + + + + + + + + + + + + + + +
+ + +
+ + + + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

activation_email(user, code)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

cancellation_email(user)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

check_stats_email(user)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

create_site_email(user)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

dashboard_locked(user, usage, last_cycle, suggested_plan)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

enterprise_over_limit_internal_email(user, usage, last_cycle, site_usage, site_allowance)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

error_report(reported_by, trace_id, feedback)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

existing_user_invitation(invitation)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

import_failure(user, site)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

import_success(user, site)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

invitation_accepted(invitation)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

invitation_rejected(invitation)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

mailer_email_from()

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

new_user_invitation(invitation)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

over_limit_email(user, usage, last_cycle, suggested_plan)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

ownership_transfer_accepted(invitation)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

ownership_transfer_rejected(invitation)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

ownership_transfer_request(invitation, new_owner_account)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

password_reset_email(email, reset_link)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

render(email, template, assigns \\ [])

+ + + + View Source + + + +
+ +
+ +

Render an Phoenix template and set the body on the email.

Pass an atom as the template name (:welcome_email) to render HTML and plain +text emails. Use a string if you only want to render one type, e.g. +"welcome_email.text" or "welcome_email.html". Scroll to the top for more examples.

+
+
+
+ +
+ + + Link to this function + +

site_member_removed(membership)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

site_setup_help(user, site)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

site_setup_success(user, site)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

spike_notification(email, site, current_visitors, sources, dashboard_link)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

trial_one_week_reminder(user)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

trial_over_email(user)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

trial_upgrade_email(user, day, arg)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

weekly_report(email, site, assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

welcome_email(user)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

yearly_expiration_notification(user)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

yearly_renewal_notification(user)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.EmailView.html b/PlausibleWeb.EmailView.html new file mode 100644 index 000000000..e518132d9 --- /dev/null +++ b/PlausibleWeb.EmailView.html @@ -0,0 +1,1280 @@ + + + + + + + + + + PlausibleWeb.EmailView — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.EmailView + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

The resource name, as an atom, for this view

+ +
+ + + +
+ + +
+ + + + + + + + + +
+ + +
+ + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +

Renders the given template locally.

+ +
+ + + + + + + + + + + +
+ + +

Callback invoked when no template is found. +By default it raises but can be customized +to render a particular template.

+ +
+ + + + + + + + + + + + + + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +

The resource name, as an atom, for this view

+
+
+
+ +
+ + + Link to this function + +

activation_email.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

cancellation_email.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

check_stats_email.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

create_site_email.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

dashboard_locked.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

enterprise_over_limit_internal.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

error_report_email.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

existing_user_invitation.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

google_analytics_import.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

greet_recipient(_)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

invitation_accepted.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

invitation_rejected.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

new_user_invitation.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

over_limit.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

ownership_transfer_accepted.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

ownership_transfer_rejected.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

ownership_transfer_request.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

password_reset_email.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ + + +
+ + + Link to this function + +

render(template, assigns \\ %{})

+ + + + View Source + + + +
+ +
+ +

Renders the given template locally.

+
+
+
+ + + +
+ + + Link to this function + +

sentry_link(trace_id, dsn \\ Sentry.Config.dsn())

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

site_member_removed.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

site_setup_help_email.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

site_setup_success_email.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

spike_notification.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

template_not_found(template, assigns)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec template_not_found(binary(), map()) :: no_return()
+ +
+ +

Callback invoked when no template is found. +By default it raises but can be customized +to render a particular template.

+
+
+
+ +
+ + + Link to this function + +

trial_one_week_reminder.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

trial_over_email.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

trial_upgrade_email.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

weekly_report.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

welcome_email.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

yearly_expiration_notification.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

yearly_renewal_notification.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.Endpoint.html b/PlausibleWeb.Endpoint.html new file mode 100644 index 000000000..388355489 --- /dev/null +++ b/PlausibleWeb.Endpoint.html @@ -0,0 +1,991 @@ + + + + + + + + + + PlausibleWeb.Endpoint — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.Endpoint + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Callback implementation for Phoenix.Endpoint.broadcast/3.

+ +
+ +
+ + +

Callback implementation for Phoenix.Endpoint.broadcast!/3.

+ +
+ +
+ + +

Callback implementation for Phoenix.Endpoint.broadcast_from/4.

+ +
+ + + +
+ + +

Callback implementation for Plug.call/2.

+ +
+ +
+ + +

Returns the child specification to start the endpoint +under a supervision tree.

+ +
+ +
+ + +

Returns the endpoint configuration for key

+ +
+ +
+ + +

Reloads the configuration given the application environment changes.

+ +
+ +
+
+ host() + +
+ +

Returns the host for the given endpoint.

+ +
+ +
+
+ init(opts) + +
+ +

Callback implementation for Plug.init/1.

+ +
+ +
+ + +

Callback implementation for Phoenix.Endpoint.local_broadcast/3.

+ +
+ + + +
+ + +
+ +
+
+ path(path) + +
+ +

Generates the path information when routing to this endpoint.

+ +
+ +
+ + +

Generates the script name.

+ +
+ +
+ + +

Starts the endpoint supervision tree.

+ +
+ +
+ + +

Generates a base64-encoded cryptographic hash (sha512) to a static file +in priv/static. Meant to be used for Subresource Integrity with CDNs.

+ +
+ +
+ + +

Returns a two item tuple with the first item being the static_path +and the second item being the static_integrity.

+ +
+ +
+ + +

Generates a route to a static file in priv/static.

+ +
+ +
+
+ static_url() + +
+ +

Generates the static URL without any path information.

+ +
+ +
+
+ struct_url() + +
+ +

Generates the endpoint base URL but as a URI struct.

+ +
+ +
+ + +

Callback implementation for Phoenix.Endpoint.subscribe/2.

+ +
+ +
+ + +

Callback implementation for Phoenix.Endpoint.unsubscribe/1.

+ +
+ +
+
+ url() + +
+ +

Generates the endpoint base URL without any path information.

+ +
+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

broadcast(topic, event, msg)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Phoenix.Endpoint.broadcast/3.

+
+
+
+ +
+ + + Link to this function + +

broadcast!(topic, event, msg)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Phoenix.Endpoint.broadcast!/3.

+
+
+
+ +
+ + + Link to this function + +

broadcast_from(from, topic, event, msg)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Phoenix.Endpoint.broadcast_from/4.

+
+
+
+ +
+ + + Link to this function + +

broadcast_from!(from, topic, event, msg)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Phoenix.Endpoint.broadcast_from!/4.

+
+
+
+ + + +
+ +

Callback implementation for Plug.call/2.

+
+
+
+ + + +
+ +

Returns the child specification to start the endpoint +under a supervision tree.

+
+
+
+ + + +
+ + + Link to this function + +

config(key, default \\ nil)

+ + + + View Source + + + +
+ +
+ +

Returns the endpoint configuration for key

Returns default if the key does not exist.

+
+
+
+ +
+ + + Link to this function + +

config_change(changed, removed)

+ + + + View Source + + + +
+ +
+ +

Reloads the configuration given the application environment changes.

+
+
+
+ + + +
+ +

Returns the host for the given endpoint.

+
+
+
+ + + +
+ +

Callback implementation for Plug.init/1.

+
+
+
+ +
+ + + Link to this function + +

local_broadcast(topic, event, msg)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Phoenix.Endpoint.local_broadcast/3.

+
+
+
+ +
+ + + Link to this function + +

local_broadcast_from(from, topic, event, msg)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Phoenix.Endpoint.local_broadcast_from/4.

+
+
+
+ +
+ + + Link to this function + +

patch_session_opts()

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ +

Generates the path information when routing to this endpoint.

+
+
+
+ + + +
+ +

Generates the script name.

+
+
+
+ + + +
+ + + Link to this function + +

start_link(opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Starts the endpoint supervision tree.

All other options are merged into the endpoint configuration.

+
+
+
+ +
+ + + Link to this function + +

static_integrity(path)

+ + + + View Source + + + +
+ +
+ +

Generates a base64-encoded cryptographic hash (sha512) to a static file +in priv/static. Meant to be used for Subresource Integrity with CDNs.

+
+
+
+ +
+ + + Link to this function + +

static_lookup(path)

+ + + + View Source + + + +
+ +
+ +

Returns a two item tuple with the first item being the static_path +and the second item being the static_integrity.

+
+
+
+ + + +
+ +

Generates a route to a static file in priv/static.

+
+
+
+ + + +
+ +

Generates the static URL without any path information.

It uses the configuration under :static_url to generate +such. It falls back to :url if :static_url is not set.

+
+
+
+ + + +
+ +

Generates the endpoint base URL but as a URI struct.

It uses the configuration under :url to generate such. +Useful for manipulating the URL data and passing it to +URL helpers.

+
+
+
+ + + +
+ + + Link to this function + +

subscribe(topic, opts \\ [])

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Phoenix.Endpoint.subscribe/2.

+
+
+
+ +
+ + + Link to this function + +

unsubscribe(topic)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Phoenix.Endpoint.unsubscribe/1.

+
+
+
+ + + +
+ +

Generates the endpoint base URL without any path information.

It uses the configuration under :url to generate such.

+
+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.ErrorHelpers.html b/PlausibleWeb.ErrorHelpers.html new file mode 100644 index 000000000..de7b2afb9 --- /dev/null +++ b/PlausibleWeb.ErrorHelpers.html @@ -0,0 +1,210 @@ + + + + + + + + + + PlausibleWeb.ErrorHelpers — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.ErrorHelpers + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

error_tag(form, field)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.ErrorReportController.html b/PlausibleWeb.ErrorReportController.html new file mode 100644 index 000000000..2514cd157 --- /dev/null +++ b/PlausibleWeb.ErrorReportController.html @@ -0,0 +1,210 @@ + + + + + + + + + + PlausibleWeb.ErrorReportController — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.ErrorReportController + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

submit_error_report(conn, arg2)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.ErrorView.html b/PlausibleWeb.ErrorView.html new file mode 100644 index 000000000..02cbee23e --- /dev/null +++ b/PlausibleWeb.ErrorView.html @@ -0,0 +1,378 @@ + + + + + + + + + + PlausibleWeb.ErrorView — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.ErrorView + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

The resource name, as an atom, for this view

+ +
+ + + +
+ + +

Renders the given template locally.

+ +
+ + + + + +
+ + +

Callback invoked when no template is found. +By default it raises but can be customized +to render a particular template.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +

The resource name, as an atom, for this view

+
+
+
+ +
+ + + Link to this function + +

generic_error.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

render(template, assigns \\ %{})

+ + + + View Source + + + +
+ +
+ +

Renders the given template locally.

+
+
+
+ +
+ + + Link to this function + +

server_error.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

server_error_report_thanks.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

template_not_found(template, assigns)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec template_not_found(binary(), map()) :: no_return()
+ +
+ +

Callback invoked when no template is found. +By default it raises but can be customized +to render a particular template.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.Favicon.html b/PlausibleWeb.Favicon.html new file mode 100644 index 000000000..af277f130 --- /dev/null +++ b/PlausibleWeb.Favicon.html @@ -0,0 +1,282 @@ + + + + + + + + + + PlausibleWeb.Favicon — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.Favicon + (Plausible v0.0.1) + +

+ + +
+

A Plug that fetches favicon images from DuckDuckGo and returns them +to the Plausible frontend.

The proxying is there so we can reduce the number of third-party domains that +the browser clients need to connect to. Our goal is to have 0 third-party domain +connections on the website for privacy reasons.

This module also maps between categorized sources and their respective URLs for favicons. +What does that mean exactly? During ingestion we use PlausibleWeb.RefInspector.parse/1 to +categorize our referrer sources like so:

google.com -> Google +google.co.uk -> Google +google.com.au -> Google

So when we show Google as a source in the dashboard, the request to this plug will come as: +https://plausible/io/favicon/sources/Google

Now, when we want to show a favicon for Google, we need to convert Google -> google.com or +some other hostname owned by Google: +https://icons.duckduckgo.com/ip3/google.com.ico

The mapping from source category -> source hostname is stored in "priv/referer_favicon_domains.json" and +managed by Mix.Tasks.GenerateReferrerFavicons.run/1

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Proxies HTTP request to DuckDuckGo favicon service. Swallows hop-by-hop HTTP +headers that should not be forwarded as defined in RFC 2616

+ +
+ +
+
+ init(_) + +
+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +

Proxies HTTP request to DuckDuckGo favicon service. Swallows hop-by-hop HTTP +headers that should not be forwarded as defined in RFC 2616

+ +

placeholder

+
+ Placeholder +

+

Cases where we show a placeholder icon instead:

  1. In case of network error to DuckDuckGo
  2. In case of non-2xx status code from DuckDuckGo
  3. In case of broken image response body from DuckDuckGo

I'm not sure why DDG sometimes returns a broken PNG image in their response +but we filter that out. When the icon request fails, we show a placeholder +favicon instead. The placeholder is an emoji from +https://favicon.io/emoji-favicons/

DuckDuckGo favicon service has some issues with SVG favicons. +For some reason, they return them with content-type=image/x-icon whereas SVG +icons should be returned with content-type=image/svg+xml. This Plug detects +when the response body starts with <svg and will override the Content-Type +to correct it.

+ +

preventing-xss-vulnerabilities

+
+ Preventing XSS vulnerabilities +

+

SVGs may contain <script> tags, and as these SVGs come from external +sources, we need to prevent untrusted code from running on the browser.

  • This Plug sets a strict Content-Security-Policy header telling the browser +not to run scripts.

  • This Plug sets Content-Disposition=attachment to prevent the SVG from +rendering when navigating to /favicon/sources/:domain directly.

  • Browsers do not execute scripts from <img> tags, therefore it is safe to +use <img src="https://plausible.io/favicon/sources/dummy.site"></img>

+
+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.FirstLaunchPlug.html b/PlausibleWeb.FirstLaunchPlug.html new file mode 100644 index 000000000..3ddf2aad0 --- /dev/null +++ b/PlausibleWeb.FirstLaunchPlug.html @@ -0,0 +1,154 @@ + + + + + + + + + + PlausibleWeb.FirstLaunchPlug — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.FirstLaunchPlug + (Plausible v0.0.1) + +

+ + +
+

Redirects first-launch users to registration page.

+
+ + + + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.FormHelpers.html b/PlausibleWeb.FormHelpers.html new file mode 100644 index 000000000..9dfd55b9f --- /dev/null +++ b/PlausibleWeb.FormHelpers.html @@ -0,0 +1,306 @@ + + + + + + + + + + PlausibleWeb.FormHelpers — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.FormHelpers + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+ + +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

styled_error(error)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

styled_label(form, field, text, opts \\ [])

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

styled_select(form, field, options, opts \\ [])

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

styled_text_input(form, field, opts \\ [])

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.InvitationController.html b/PlausibleWeb.InvitationController.html new file mode 100644 index 000000000..8fbd385b0 --- /dev/null +++ b/PlausibleWeb.InvitationController.html @@ -0,0 +1,270 @@ + + + + + + + + + + PlausibleWeb.InvitationController — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.InvitationController + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + + + + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

accept_invitation(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

reject_invitation(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

remove_invitation(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.LastSeenPlug.html b/PlausibleWeb.LastSeenPlug.html new file mode 100644 index 000000000..5e9bd0063 --- /dev/null +++ b/PlausibleWeb.LastSeenPlug.html @@ -0,0 +1,240 @@ + + + + + + + + + + PlausibleWeb.LastSeenPlug — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.LastSeenPlug + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ +
+
+ init(opts) + +
+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.LayoutView.html b/PlausibleWeb.LayoutView.html new file mode 100644 index 000000000..c931f1456 --- /dev/null +++ b/PlausibleWeb.LayoutView.html @@ -0,0 +1,740 @@ + + + + + + + + + + PlausibleWeb.LayoutView — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.LayoutView + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

The resource name, as an atom, for this view

+ +
+ +
+ + +
+ +
+ + +
+ + + + + + + +
+ + +
+ + + +
+ + +
+ + + +
+ + +
+ +
+ + +

Renders the given template locally.

+ +
+ + + +
+ + +
+ + + +
+ + +

Callback invoked when no template is found. +By default it raises but can be customized +to render a particular template.

+ +
+ + + +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +

The resource name, as an atom, for this view

+
+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

base_email.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

base_error.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

embedded.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

focus.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

grace_period_end(user)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

is_current_tab(conn, tab)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ + + +
+ + + Link to this function + +

render(template, assigns \\ %{})

+ + + + View Source + + + +
+ +
+ +

Renders the given template locally.

+
+
+
+ +
+ + + Link to this function + +

render_layout(layout, assigns, list)

+ + + + View Source + + + +
+ +
+ +

http://blog.plataformatec.com.br/2018/05/nested-layouts-with-phoenix/

+
+
+
+ +
+ + + Link to this function + +

settings_tabs(conn)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

site_settings.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

template_not_found(template, assigns)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec template_not_found(binary(), map()) :: no_return()
+ +
+ +

Callback invoked when no template is found. +By default it raises but can be customized +to render a particular template.

+
+
+
+ +
+ + + Link to this function + +

trial_notificaton(user)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.Live.Flash.html b/PlausibleWeb.Live.Flash.html new file mode 100644 index 000000000..2fef7edda --- /dev/null +++ b/PlausibleWeb.Live.Flash.html @@ -0,0 +1,350 @@ + + + + + + + + + + PlausibleWeb.Live.Flash — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.Live.Flash + (Plausible v0.0.1) + +

+ + +
+

Flash component for LiveViews - works also when embedded within dead views

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + +
+ + +

Attributes

  • on_close (:any) - Defaults to "lv:clear-flash".

Slots

  • icon (required)
  • title
  • message (required)
+ +
+ +
+ + +
+ +
+ + +
+ +
+ + +

Callback implementation for Phoenix.LiveComponent.render/1.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

clear_flash_button(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ +

+ +

attributes

+
+ Attributes +

+
  • on_close (:any) - Defaults to "lv:clear-flash".

+ +

slots

+
+ Slots +

+
  • icon (required)
  • title
  • message (required)
+
+
+
+ +
+ + + Link to this function + +

icon_error(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

icon_success(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ +

Callback implementation for Phoenix.LiveComponent.render/1.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.Live.FunnelSettings.ComboBox.html b/PlausibleWeb.Live.FunnelSettings.ComboBox.html new file mode 100644 index 000000000..c3f9cffe7 --- /dev/null +++ b/PlausibleWeb.Live.FunnelSettings.ComboBox.html @@ -0,0 +1,468 @@ + + + + + + + + + + PlausibleWeb.Live.FunnelSettings.ComboBox — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.Live.FunnelSettings.ComboBox + (Plausible v0.0.1) + +

+ + +
+

Phoenix LiveComponent for a combobox UI element with search and selection +functionality.

The component allows users to select an option from a list of options, +which can be searched by typing in the input field.

The component renders an input field with a dropdown anchor and a +hidden input field for submitting the selected value.

The number of options displayed in the dropdown is limited to 15 +by default but can be customized. When a user types into the input +field, the component searches the available options and provides +suggestions based on the input.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Attributes

  • ref (:string) (required)
  • options (:list) - Defaults to [].
  • suggestions (:list) - Defaults to [].
  • target (:any)
+ +
+ +
+ + +

Attributes

  • id (:any) (required)
+ +
+ +
+ + +

Callback implementation for Phoenix.LiveComponent.handle_event/3.

+ +
+ +
+ + +

Attributes

  • display_value (:string) (required)
  • submit_value (:integer) (required)
  • ref (:string) (required)
  • target (:any)
  • idx (:integer) (required)
+ +
+ +
+ + +

Attributes

  • placeholder (:string) - Defaults to "Select option or search by typing".
  • id (:any) (required)
  • options (:list) (required)
  • submit_name (:string) (required)
  • display_value (:string) - Defaults to "".
  • submit_value (:string) - Defaults to "".
+ +
+ + + + + +
+ + +

Callback implementation for Phoenix.LiveComponent.update/2.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+ + +
+ +
+ + + Link to this function + +

handle_event(binary, params, socket)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Phoenix.LiveComponent.handle_event/3.

+
+
+
+ + + +
+ +

+ +

attributes

+
+ Attributes +

+
  • display_value (:string) (required)
  • submit_value (:integer) (required)
  • ref (:string) (required)
  • target (:any)
  • idx (:integer) (required)
+
+
+
+ + + +
+ +

+ +

attributes

+
+ Attributes +

+
  • placeholder (:string) - Defaults to "Select option or search by typing".
  • id (:any) (required)
  • options (:list) (required)
  • submit_name (:string) (required)
  • display_value (:string) - Defaults to "".
  • submit_value (:string) - Defaults to "".
+
+
+
+ + + +
+ + + Link to this function + +

select_option(js \\ %JS{}, id, submit_value, display_value)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

suggest(input, options)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

update(assigns, socket)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Phoenix.LiveComponent.update/2.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.Live.FunnelSettings.Form.html b/PlausibleWeb.Live.FunnelSettings.Form.html new file mode 100644 index 000000000..51aea711e --- /dev/null +++ b/PlausibleWeb.Live.FunnelSettings.Form.html @@ -0,0 +1,578 @@ + + + + + + + + + + PlausibleWeb.Live.FunnelSettings.Form — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.Live.FunnelSettings.Form + (Plausible v0.0.1) + +

+ + +
+

Phoenix LiveComponent that renders a form used for setting up funnels. +Makes use of dynamically placed PlausibleWeb.Live.FunnelSettings.ComboBox components +to allow building searchable funnel definitions out of list of goals available.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + + + +
+ + +
+ +
+ + +

Attributes

  • at (:integer) (required)
  • result (:map) (required)
+ +
+ +
+ + +

Callback implementation for Phoenix.LiveView.handle_event/3.

+ +
+ +
+ + +

Callback implementation for Phoenix.LiveView.handle_info/2.

+ +
+ +
+ + +

Attributes

+ +
+ +
+ + +

Callback implementation for Phoenix.LiveView.mount/3.

+ +
+ +
+ + +

Attributes

  • step_idx (:integer) (required)
+ +
+ +
+ + +

Callback implementation for Phoenix.LiveView.render/1.

+ +
+ + + + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

add_step_button(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

cancel_button(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

evaluation(assigns)

+ + + + View Source + + + +
+ +
+ +

+ +

attributes

+
+ Attributes +

+
  • at (:integer) (required)
  • result (:map) (required)
+
+
+
+ +
+ + + Link to this function + +

handle_event(binary, arg2, socket)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Phoenix.LiveView.handle_event/3.

+
+
+
+ +
+ + + Link to this function + +

handle_info(arg1, socket)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Phoenix.LiveView.handle_info/2.

+
+
+
+ + + +
+ +

+ +

attributes

+
+ Attributes +

+ +
+
+
+ +
+ + + Link to this function + +

mount(params, map, socket)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Phoenix.LiveView.mount/3.

+
+
+
+ +
+ + + Link to this function + +

remove_step_button(assigns)

+ + + + View Source + + + +
+ +
+ +

+ +

attributes

+
+ Attributes +

+
  • step_idx (:integer) (required)
+
+
+
+ + + +
+ +

Callback implementation for Phoenix.LiveView.render/1.

+
+
+
+ +
+ + + Link to this function + +

submit_button(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

submit_button_inactive(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.Live.FunnelSettings.List.html b/PlausibleWeb.Live.FunnelSettings.List.html new file mode 100644 index 000000000..c295a0d18 --- /dev/null +++ b/PlausibleWeb.Live.FunnelSettings.List.html @@ -0,0 +1,219 @@ + + + + + + + + + + PlausibleWeb.Live.FunnelSettings.List — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.Live.FunnelSettings.List + (Plausible v0.0.1) + +

+ + +
+

Phoenix LiveComponent module that renders a list of funnels with their names +and the number of steps they have.

Each funnel is displayed with a delete button, which triggers a confirmation +message before deleting the funnel from the UI. If there are no funnels +configured for the site, a message is displayed indicating so.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Callback implementation for Phoenix.LiveComponent.render/1.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +

Callback implementation for Phoenix.LiveComponent.render/1.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.Live.FunnelSettings.html b/PlausibleWeb.Live.FunnelSettings.html new file mode 100644 index 000000000..95cc93287 --- /dev/null +++ b/PlausibleWeb.Live.FunnelSettings.html @@ -0,0 +1,312 @@ + + + + + + + + + + PlausibleWeb.Live.FunnelSettings — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.Live.FunnelSettings + (Plausible v0.0.1) + +

+ + +
+

LiveView allowing listing, creating and deleting funnels.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

Callback implementation for Phoenix.LiveView.handle_event/3.

+ +
+ +
+ + +

Callback implementation for Phoenix.LiveView.handle_info/2.

+ +
+ +
+ + +

Callback implementation for Phoenix.LiveView.mount/3.

+ +
+ +
+ + +

Callback implementation for Phoenix.LiveView.render/1.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

handle_event(binary, arg2, socket)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Phoenix.LiveView.handle_event/3.

+
+
+
+ +
+ + + Link to this function + +

handle_info(arg1, socket)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Phoenix.LiveView.handle_info/2.

+
+
+
+ +
+ + + Link to this function + +

mount(params, map, socket)

+ + + + View Source + + + +
+ +
+ +

Callback implementation for Phoenix.LiveView.mount/3.

+
+
+
+ + + +
+ +

Callback implementation for Phoenix.LiveView.render/1.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.PageController.html b/PlausibleWeb.PageController.html new file mode 100644 index 000000000..9b4cb2a2c --- /dev/null +++ b/PlausibleWeb.PageController.html @@ -0,0 +1,212 @@ + + + + + + + + + + PlausibleWeb.PageController — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.PageController + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

The root path is never accessible in Plausible.Cloud because it is handled by the upstream reverse proxy.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

index(conn, params)

+ + + + View Source + + + +
+ +
+ +

The root path is never accessible in Plausible.Cloud because it is handled by the upstream reverse proxy.

This controller action is only ever triggered in self-hosted Plausible.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.PageView.html b/PlausibleWeb.PageView.html new file mode 100644 index 000000000..2b77607d8 --- /dev/null +++ b/PlausibleWeb.PageView.html @@ -0,0 +1,318 @@ + + + + + + + + + + PlausibleWeb.PageView — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.PageView + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

The resource name, as an atom, for this view

+ +
+ +
+ + +
+ +
+ + +

Renders the given template locally.

+ +
+ +
+ + +

Callback invoked when no template is found. +By default it raises but can be customized +to render a particular template.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +

The resource name, as an atom, for this view

+
+
+
+ +
+ + + Link to this function + +

index.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

render(template, assigns \\ %{})

+ + + + View Source + + + +
+ +
+ +

Renders the given template locally.

+
+
+
+ +
+ + + Link to this function + +

template_not_found(template, assigns)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec template_not_found(binary(), map()) :: no_return()
+ +
+ +

Callback invoked when no template is found. +By default it raises but can be customized +to render a particular template.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.Plugs.NoRobots.html b/PlausibleWeb.Plugs.NoRobots.html new file mode 100644 index 000000000..a7533f1c9 --- /dev/null +++ b/PlausibleWeb.Plugs.NoRobots.html @@ -0,0 +1,157 @@ + + + + + + + + + + PlausibleWeb.Plugs.NoRobots — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.Plugs.NoRobots + (Plausible v0.0.1) + +

+ + +
+

Rejects bot requests by any means available.

We're adding x-robots-tag to the response header and annotate the conn +with "noindex, nofollow" under private.robots key.

The only exception is, if the request is trying to access our live demo +at plausible.io/plausible.io - in which case we'll allow indexing, but deny +following links and skip the bot detection, in kind robots we trust.

+
+ + + + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.Plugs.RuntimeSessionAdapter.html b/PlausibleWeb.Plugs.RuntimeSessionAdapter.html new file mode 100644 index 000000000..2b337ebcb --- /dev/null +++ b/PlausibleWeb.Plugs.RuntimeSessionAdapter.html @@ -0,0 +1,157 @@ + + + + + + + + + + PlausibleWeb.Plugs.RuntimeSessionAdapter — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.Plugs.RuntimeSessionAdapter + (Plausible v0.0.1) + +

+ + +
+

A Plug.Session adapter that allows configuration at runtime. +Sadly, the plug being wrapped has no MFA option for dynamic +configuration.

This is currently used so we can dynamically pass the :domain +and have cookies planted across one root domain.

+
+ + + + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.RefInspector.html b/PlausibleWeb.RefInspector.html new file mode 100644 index 000000000..12a7f8fb0 --- /dev/null +++ b/PlausibleWeb.RefInspector.html @@ -0,0 +1,240 @@ + + + + + + + + + + PlausibleWeb.RefInspector — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.RefInspector + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+
+ parse(ref) + +
+ +
+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.RemoteIp.html b/PlausibleWeb.RemoteIp.html new file mode 100644 index 000000000..da6410476 --- /dev/null +++ b/PlausibleWeb.RemoteIp.html @@ -0,0 +1,210 @@ + + + + + + + + + + PlausibleWeb.RemoteIp — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.RemoteIp + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+
+ get(conn) + +
+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.RequireAccountPlug.html b/PlausibleWeb.RequireAccountPlug.html new file mode 100644 index 000000000..7d1c2aa53 --- /dev/null +++ b/PlausibleWeb.RequireAccountPlug.html @@ -0,0 +1,240 @@ + + + + + + + + + + PlausibleWeb.RequireAccountPlug — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.RequireAccountPlug + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.RequireLoggedOutPlug.html b/PlausibleWeb.RequireLoggedOutPlug.html new file mode 100644 index 000000000..ceb6c676a --- /dev/null +++ b/PlausibleWeb.RequireLoggedOutPlug.html @@ -0,0 +1,240 @@ + + + + + + + + + + PlausibleWeb.RequireLoggedOutPlug — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.RequireLoggedOutPlug + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.Router.html b/PlausibleWeb.Router.html new file mode 100644 index 000000000..fa74a8600 --- /dev/null +++ b/PlausibleWeb.Router.html @@ -0,0 +1,486 @@ + + + + + + + + + + PlausibleWeb.Router — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.Router + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+
+ api(conn, _) + +
+ +
+ +
+ + +
+ +
+ + +

Callback invoked by Plug on every request.

+ +
+ +
+ + +
+ +
+ + +
+ +
+
+ init(opts) + +
+ +

Callback required by Plug that initializes the router +for serving web requests.

+ +
+ + + + + +
+ + +
+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+
+ + + +
+ +

Callback invoked by Plug on every request.

+
+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+
+ + + +
+ +

Callback required by Plug that initializes the router +for serving web requests.

+
+
+
+ +
+ + + Link to this function + +

internal_stats_api(conn, _)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

kaffy_browser(conn, _)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

public_api(conn, _)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

shared_link(conn, _)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.SessionTimeoutPlug.html b/PlausibleWeb.SessionTimeoutPlug.html new file mode 100644 index 000000000..417de2236 --- /dev/null +++ b/PlausibleWeb.SessionTimeoutPlug.html @@ -0,0 +1,242 @@ + + + + + + + + + + PlausibleWeb.SessionTimeoutPlug — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.SessionTimeoutPlug + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + +
+
+
+ + + + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.Site.MembershipController.html b/PlausibleWeb.Site.MembershipController.html new file mode 100644 index 000000000..83cdfdc1c --- /dev/null +++ b/PlausibleWeb.Site.MembershipController.html @@ -0,0 +1,372 @@ + + + + + + + + + + PlausibleWeb.Site.MembershipController — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.Site.MembershipController + (Plausible v0.0.1) + +

+ + +
+

This controller deals with user management via the UI in Site Settings -> People. It's important to enforce permissions in this controller.

Owner - Can manage users, can trigger a 'transfer ownership' request + Admin - Can manage users + Viewer - Can not access user management settings + Anyone - Can accept invitations

Everything else should be explicitly disallowed.

+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + + + + + + + + + +
+ + +

Updates the role of a user. The user being updated could be the same or different from the user taking + the action. When updating the role, it's important to enforce permissions

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

invite_member(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

invite_member_form(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

remove_member(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

transfer_ownership(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

transfer_ownership_form(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

update_role(conn, map)

+ + + + View Source + + + +
+ +
+ +

Updates the role of a user. The user being updated could be the same or different from the user taking + the action. When updating the role, it's important to enforce permissions:

Owner - Can update anyone's role except for themselves. If they want to change their own role, they have to use the 'transfer ownership' feature. + Admin - Can update anyone's role except for owners. Can downgrade their own access to 'viewer'. Can promote a viewer to admin.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.Site.MembershipView.html b/PlausibleWeb.Site.MembershipView.html new file mode 100644 index 000000000..8fc0270a7 --- /dev/null +++ b/PlausibleWeb.Site.MembershipView.html @@ -0,0 +1,348 @@ + + + + + + + + + + PlausibleWeb.Site.MembershipView — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.Site.MembershipView + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

The resource name, as an atom, for this view

+ +
+ + + +
+ + +

Renders the given template locally.

+ +
+ +
+ + +

Callback invoked when no template is found. +By default it raises but can be customized +to render a particular template.

+ +
+ + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +

The resource name, as an atom, for this view

+
+
+
+ +
+ + + Link to this function + +

invite_member_form.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + + Link to this function + +

render(template, assigns \\ %{})

+ + + + View Source + + + +
+ +
+ +

Renders the given template locally.

+
+
+
+ +
+ + + Link to this function + +

template_not_found(template, assigns)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec template_not_found(binary(), map()) :: no_return()
+ +
+ +

Callback invoked when no template is found. +By default it raises but can be customized +to render a particular template.

+
+
+
+ +
+ + + Link to this function + +

transfer_ownership_form.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.SiteController.html b/PlausibleWeb.SiteController.html new file mode 100644 index 000000000..17e5ea556 --- /dev/null +++ b/PlausibleWeb.SiteController.html @@ -0,0 +1,1770 @@ + + + + + + + + + + PlausibleWeb.SiteController — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.SiteController + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + +
+ + +
+ + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

add_monthly_report_recipient(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

add_snippet(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

add_snippet_after_domain_change(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

add_spike_notification_recipient(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

add_weekly_report_recipient(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

change_domain(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

change_domain_submit(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

create_goal(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

create_shared_link(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

create_site(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

delete_custom_domain(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

delete_goal(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

delete_google_auth(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

delete_shared_link(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

delete_site(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

disable_monthly_report(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

disable_spike_notification(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

disable_weekly_report(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

edit_shared_link(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

enable_monthly_report(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

enable_spike_notification(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

enable_weekly_report(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

forget_imported(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

import_from_google(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

import_from_google_confirm(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

import_from_google_user_metric_notice(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

import_from_google_view_id(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

import_from_google_view_id_form(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

index(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

make_private(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

make_public(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

new_goal(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

new_shared_link(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

remove_monthly_report_recipient(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

remove_spike_notification_recipient(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

remove_weekly_report_recipient(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

reset_stats(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

settings(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

settings_custom_domain(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

settings_danger_zone(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

settings_email_reports(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

settings_funnels(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

settings_general(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

settings_goals(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

settings_people(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

settings_search_console(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

settings_visibility(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

update_feature_visibility(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

update_google_auth(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

update_settings(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

update_shared_link(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

update_spike_notification(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.SiteView.html b/PlausibleWeb.SiteView.html new file mode 100644 index 000000000..d650b1c4b --- /dev/null +++ b/PlausibleWeb.SiteView.html @@ -0,0 +1,1130 @@ + + + + + + + + + + PlausibleWeb.SiteView — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.SiteView + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

The resource name, as an atom, for this view

+ +
+ +
+ + +
+ + + + + +
+ + +
+ + + +
+ + +
+ + + + + + + +
+ + +
+ +
+ + +
+ + + + + +
+ + +
+ +
+ + +

Renders the given template locally.

+ +
+ +
+ + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +
+ + +

Callback invoked when no template is found. +By default it raises but can be customized +to render a particular template.

+ +
+ + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +

The resource name, as an atom, for this view

+
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

change_domain.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

edit_shared_link.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ + + +
+ + + Link to this function + +

google_logo(assigns \\ %{})

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

gravatar(email, opts)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

import_from_google_confirm.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

import_from_google_user_metric_form.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

import_from_google_view_id_form.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

index.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

new_goal.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

new_shared_link.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ + + +
+ + + Link to this function + +

render(template, assigns \\ %{})

+ + + + View Source + + + +
+ +
+ +

Renders the given template locally.

+
+
+
+ +
+ + + Link to this function + +

render_snippet(site)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

settings_custom_domain.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

settings_danger_zone.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

settings_email_reports.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

settings_funnels.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

settings_general.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

settings_goals.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

settings_people.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

settings_search_console.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

settings_visibility.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+ +
+ + + Link to this function + +

snippet.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

snippet_after_domain_change.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

template_not_found(template, assigns)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec template_not_found(binary(), map()) :: no_return()
+ +
+ +

Callback invoked when no template is found. +By default it raises but can be customized +to render a particular template.

+
+
+
+ +
+ + + Link to this function + +

with_indefinite_article(word)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.StatsController.html b/PlausibleWeb.StatsController.html new file mode 100644 index 000000000..ac922fca7 --- /dev/null +++ b/PlausibleWeb.StatsController.html @@ -0,0 +1,339 @@ + + + + + + + + + + PlausibleWeb.StatsController — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.StatsController + (Plausible v0.0.1) + +

+ + +
+

This controller is responsible for rendering stats dashboards.

The stats dashboards are currently the only part of the app that uses client-side +rendering. Since the dashboards are heavily interactive, they are built with React +which is an appropriate choice for highly interactive browser UIs.

sequenceDiagram + Browser->>StatsController: GET /mydomain.com + StatsController-->>Browser: StatsView.render("stats.html") + Note left of Browser: ReactDom.render(Dashboard) + + Browser -) Api.StatsController: GET /api/stats/mydomain.com/top-stats + Api.StatsController --) Browser: {"top_stats": [...]} + Note left of Browser: TopStats.render() + + Browser -) Api.StatsController: GET /api/stats/mydomain.com/main-graph + Api.StatsController --) Browser: [{"plot": [...], "labels": [...]}, ...] + Note left of Browser: VisitorGraph.render() + + Browser -) Api.StatsController: GET /api/stats/mydomain.com/sources + Api.StatsController --) Browser: [{"name": "Google", "visitors": 292150}, ...] + Note left of Browser: Sources.render() + + Note over Browser,StatsController: And so on, for all reports in the viewport

This reasoning for this sequence is as follows:

  1. First paint is fast because it doesn't do any data aggregation yet - good UX
  2. The basic structure of the dashboard is rendered with spinners before reports are ready - good UX
  3. Rendering on the frontend allows for maximum interactivity. Re-rendering and re-fetching can be as granular as needed.
  4. Routing on the frontend allows the user to navigate the dashboard without reloading the page and losing context
  5. Rendering on the frontend allows caching results in the browser to reduce pressure on backends and storage +3.1 No client-side caching has been implemented yet. This is still theoretical. See https://github.com/plausible/analytics/discussions/1278 +3.2 This is a big potential opportunity, because analytics data is mostly immutable. Clients can cache all historical data.
  6. Since frontend rendering & navigation is harder to build and maintain than regular server-rendered HTML, we don't use SPA-style rendering anywhere else +.The only place currently where the benefits outweigh the costs is the dashboard.
+
+ + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + +
+ + +

The export is limited to 300 entries for other reports and 100 entries for pages because bigger result sets +start causing failures. Since we request data like time on page or bounce_rate for pages in a separate query +using the IN filter, it causes the requests to balloon in payload size.

+ +
+ +
+ + +

Authorizes and renders a shared link

+ +
+ +
+ + +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

authenticate_shared_link(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

csv_export(conn, params)

+ + + + View Source + + + +
+ +
+ +

The export is limited to 300 entries for other reports and 100 entries for pages because bigger result sets +start causing failures. Since we request data like time on page or bounce_rate for pages in a separate query +using the IN filter, it causes the requests to balloon in payload size.

+
+
+
+ +
+ + + Link to this function + +

shared_link(conn, arg2)

+ + + + View Source + + + +
+ +
+ +

Authorizes and renders a shared link:

  1. Shared link with no password protection: needs to just make sure the shared link entry is still +in our database. This check makes sure shared link access can be revoked by the site admins. If the +shared link exists, render it directly.

  2. Shared link with password protection: Same checks as without the password, but an extra step is taken to +protect the page with a password. When the user passes the password challenge, a cookie is set with Plausible.Auth.Token.sign_shared_link(). +The cookie allows the user to access the dashboard for 24 hours without entering the password again.

### Backwards compatibility

The URL format for shared links was changed in this pull request in order + to make the URLs easier to bookmark. The old format is supported along with the new in order to not break old links.

See: https://plausible.io/docs/shared-links

+
+
+
+ +
+ + + Link to this function + +

stats(conn, params)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.StatsView.html b/PlausibleWeb.StatsView.html new file mode 100644 index 000000000..58e059e25 --- /dev/null +++ b/PlausibleWeb.StatsView.html @@ -0,0 +1,571 @@ + + + + + + + + + + PlausibleWeb.StatsView — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.StatsView + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

The resource name, as an atom, for this view

+ +
+ +
+ + +
+ + + +
+ + +
+ +
+ + +

Returns a readable stats URL.

+ +
+ +
+ + +

Renders the given template locally.

+ +
+ + + + + +
+ + +
+ + + +
+ + +

Callback invoked when no template is found. +By default it raises but can be customized +to render a particular template.

+ +
+ + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +

The resource name, as an atom, for this view

+
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

large_number_format(n)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ + + +
+ + +
+
+
+ +
+ + + Link to this function + +

pretty_stats_url(arg)

+ + + + View Source + + + +
+ +
+ +

Returns a readable stats URL.

Native Phoenix router functions percent-encode all diacritics, resulting in +ugly URLs, e.g. https://plausible.io/café.com transforms into +https://plausible.io/caf%C3%A9.com.

This function encodes only the slash (/) character from the site's domain.

+ +

examples

+
+ Examples +

+

iex> PlausibleWeb.StatsView.pretty_stats_url(%Plausible.Site{domain: "user.gittea.io/repo"}) + "http://localhost:8000/user.gittea.io%2Frepo"

iex> PlausibleWeb.StatsView.pretty_stats_url(%Plausible.Site{domain: "anakin.test"}) + "http://localhost:8000/anakin.test"

iex> PlausibleWeb.StatsView.pretty_stats_url(%Plausible.Site{domain: "café.test"}) + "http://localhost:8000/café.test"

+
+
+
+ + + +
+ + + Link to this function + +

render(template, assigns \\ %{})

+ + + + View Source + + + +
+ +
+ +

Renders the given template locally.

+
+
+ +
+ +
+ + + Link to this function + +

site_locked.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

stats.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

stats_container_class(conn)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

template_not_found(template, assigns)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec template_not_found(binary(), map()) :: no_return()
+ +
+ +

Callback invoked when no template is found. +By default it raises but can be customized +to render a particular template.

+
+
+
+ +
+ + + Link to this function + +

waiting_first_pageview.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.Tracker.html b/PlausibleWeb.Tracker.html new file mode 100644 index 000000000..250c72324 --- /dev/null +++ b/PlausibleWeb.Tracker.html @@ -0,0 +1,272 @@ + + + + + + + + + + PlausibleWeb.Tracker — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.Tracker + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +
+ +
+ + +

Returns a specification to start this module under a supervisor.

+ +
+ +
+
+ init(opts) + +
+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ + +
+
+
+ + + +
+ +

Returns a specification to start this module under a supervisor.

See Supervisor.

+
+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.UnsubscribeController.html b/PlausibleWeb.UnsubscribeController.html new file mode 100644 index 000000000..2ed798d5e --- /dev/null +++ b/PlausibleWeb.UnsubscribeController.html @@ -0,0 +1,240 @@ + + + + + + + + + + PlausibleWeb.UnsubscribeController — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.UnsubscribeController + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ + + + + +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this function + +

monthly_report(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

weekly_report(conn, map)

+ + + + View Source + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.UnsubscribeView.html b/PlausibleWeb.UnsubscribeView.html new file mode 100644 index 000000000..d1421aae0 --- /dev/null +++ b/PlausibleWeb.UnsubscribeView.html @@ -0,0 +1,318 @@ + + + + + + + + + + PlausibleWeb.UnsubscribeView — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb.UnsubscribeView + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

The resource name, as an atom, for this view

+ +
+ +
+ + +

Renders the given template locally.

+ +
+ +
+ + +
+ +
+ + +

Callback invoked when no template is found. +By default it raises but can be customized +to render a particular template.

+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ + + +
+ +

The resource name, as an atom, for this view

+
+
+
+ + + +
+ + + Link to this function + +

render(template, assigns \\ %{})

+ + + + View Source + + + +
+ +
+ +

Renders the given template locally.

+
+
+
+ +
+ + + Link to this function + +

success.html(assigns)

+ + + + View Source + + + +
+ +
+ + +
+
+
+ +
+ + + Link to this function + +

template_not_found(template, assigns)

+ + + + View Source + + + +
+ +
+ +
+ +
@spec template_not_found(binary(), map()) :: no_return()
+ +
+ +

Callback invoked when no template is found. +By default it raises but can be customized +to render a particular template.

+
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/PlausibleWeb.html b/PlausibleWeb.html new file mode 100644 index 000000000..38afa4bf9 --- /dev/null +++ b/PlausibleWeb.html @@ -0,0 +1,334 @@ + + + + + + + + + + PlausibleWeb — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + PlausibleWeb + (Plausible v0.0.1) + +

+ + + +
+

+ + + Link to this section + + Summary +

+
+

+ Functions +

+ +
+ + +

When used, dispatch to the appropriate controller/view/etc.

+ +
+ +
+
+ channel() + +
+ +
+ +
+
+ controller() + +
+ +
+ +
+
+ router() + +
+ +
+ +
+
+ view() + +
+ +
+ +
+ +
+ + +
+

+ + + Link to this section + +Functions +

+
+
+ +
+ + + Link to this macro + +

__using__(which)

+ + + + View Source + + + + (macro) + +
+ +
+ +

When used, dispatch to the appropriate controller/view/etc.

+
+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+
+ + + +
+ + +
+
+ +
+
+ + +
+
+
+
+ + + + + + diff --git a/account-locking.html b/account-locking.html new file mode 100644 index 000000000..80e71308d --- /dev/null +++ b/account-locking.html @@ -0,0 +1,184 @@ + + + + + + + + + + Account locking — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + + Account locking +

+ +

This document explains the account locking feature from a technical perspective. Account locking happens when users have outgrown their accounts, and despite e-mail and dashboard alerts, don't upgrade after a grace period.

+ +

usage-alert-and-grace-period

+
+ Usage alert and grace period +

+

The Plausible.Workers.CheckUsage daily background job alerts users they have reached their subscription limits. This runs for outgrown users one day after their last billing date.

When users reach the number of sites limit, or use >110% of their pageview limit for 2 consecutive billing cycles, the background job sends them an e-mail alert. The e-mail suggests a suitable subscription plan based on usage. For enterprise users, only an internal e-mail is sent to enterprise@plausible.io.

The user is given 7 days to upgrade their account after the alert, and this is called grace period. The background starts this grace period by adding a users.grace_period JSON to the user record:

// SELECT grace_period FROM users LIMIT 1
+
+{
+  "id": "1aa855bd-022d-4dfc-b572-6853442c3f19",
+  "is_over": true,
+  "end_date": "2022-03-09",
+  "allowance_required": 100,
+  "manual_lock": false
+}

During this period, the following alert pops up on the dashboard for both standard and enterprise users:

If the user upgrades to a suitable plan, the grace period is removed (check Plausible.Billing.subscription_updated/1), otherwise Account locking) follows. For enterprise users, the grace period has a manual lock flag set to true, meaning enterprise accounts can only be locked/unlocked through the internal CRM.

+ +

account-locking

+
+ Account locking +

+

The grace period is checked daily by the Plausible.Workers.LockSites background job.

For users that expired their grace period, sites.locked is is set to true, restricting access to dashboards. This does not stop event ingestion, so users can have their stats up to date when they finally upgrade.

+ + +
+
+
+
+ + + + + + diff --git a/api-reference.html b/api-reference.html new file mode 100644 index 000000000..bbc2e7ef2 --- /dev/null +++ b/api-reference.html @@ -0,0 +1,1817 @@ + + + + + + + + + + API Reference — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + API Reference Plausible v0.0.1 +

+ + +
+

+ +

modules

+
+ Modules +

+ +
+
+ + +
+
+
+ Plausible + +
+ +

Plausible keeps the contexts that define your domain +and business logic.

+ +
+
+ + +

Clickhouse access with async inserts enabled

+ +
+
+ + +
+ + +
+ + +

This embedded schema stores information about the account locking grace +period.

+ +
+ + + +
+ + +
+ +
+ + +
+ + + + + +
+ + +

Helper function for working with Ecto changesets

+ +
+
+ + +

Provides the core functions to retrieve and manage +the CLDR data that supports formatting and localisation.

+ +
+
+ + +

Parses HTTP Accept-Language header values as defined in +rfc2616.

+ +
+ +
+ + +

Backend module that provides functions +to define new locales and display human-readable +locale names for presentation purposes.

+ +
+
+ + +

Formats numbers and currencies based upon CLDR's decimal formats specification.

+ +
+
+ + +

Implements cardinal plural rules for numbers.

+ +
+
+ + +

Functions to manage the collection of number patterns defined in Cldr.

+ +
+ +
+ + +

Implements ordinal plural rules for numbers.

+ +
+
+ + +

Implements plural rules for ranges

+ +
+ + +
+ + +

Transliteration for digits and separators.

+ +
+
+ + +

Functions to implement the number system rule-based-number-format rules of CLDR.

+ +
+
+ + +

Functions to implement the ordinal rule-based-number-format rules of CLDR.

+ +
+
+ + +

Functions to implement the spellout rule-based-number-format rules of CLDR.

+ +
+
+ + +

Event schema for when NumericIDs migration is complete

+ +
+ +
+ + +

Session schema for when NumericIDs migration is complete

+ +
+
+ + +

Custom type to cast Bool as UInt8

+ +
+ +
+ + +

This module defines the setup for tests requiring +access to the application's data layer.

+ +
+
+ + +

Base module for coordinated Clickhouse data migrations +run via remote shell or otherwise (TBD).

+ +
+
+ + +

Numeric IDs migration, SQL files available at: +priv/data_migrations/NumericIDs/sql

+ +
+
+ + +

Ecto.Repo for Clickhouse data migrations, to be started manually, +outside of the main application supervision tree.

+ +
+
+ + +

Custom type for event name. Accepts Strings and Integers and stores them as String. Returns + cast error if any other type is provided. Accepting integers is important for 404 tracking.

+ +
+ +
+ + +
+
+ + +

A funnel is a marketing term used to capture and describe the journey +that users go through, from initial step to conversion. +A funnel consists of several steps (here: 2..8).

+ +
+
+ + +

This module defines the database schema for a single Funnel step. +See: Plausible.Funnel for more information.

+ +
+
+ + +

This module implements contextual Funnel interface, allowing listing, +creating and deleting funnel definitions.

+ +
+
+ + +

This module provides an API for fetching IP geolocation.

+ +
+
+ + +
+
+ + +
+ + +
+ + +

This GenServer inserts records into Clickhouse imported_* tables. Multiple buffers are +automatically created for each table. Records are flushed when the table buffer reaches the +maximum size, defined by max_buffer_size/0.

+ +
+ + +
+ + +

HTTP Client built on top of Finch.

+ +
+ + +
+ + +

A dedicated repo for import related mutations

+ +
+
+ + +
+
+ + +

Write-centric Clickhouse access interface

+ +
+
+ + +

This is instrumentation necessary for keeping track of per-domain +internal metrics. Due to metric labels cardinality (domain x metric_name), +these statistics are not suitable for prometheus/grafana exposure, +hence an internal storage is used.

+ +
+
+ + +

A buffer aggregating counters for internal metrics, within 10 seconds time buckets.

+ +
+
+ + +

Clickhouse schema for storing ingest counter metrics

+ +
+
+ + +

Susbcribes to telemetry events emitted by Plausible.Ingestion.Event. +Every time a request derived event is either dispatched to clickhouse or dropped, +a telemetry event is emitted respectively. That event is captured here, +its metadata is extracted and sent for internal stats aggregation via +Counters.Buffer interface.

+ +
+
+ + +

This module exposes the build_and_buffer/1 function capable of +turning %Plausible.Ingestion.Request{} into a series of events that in turn +are uniformly either buffered in batches (to Clickhouse) or dropped +(e.g. due to spam blocklist) from the processing pipeline.

+ +
+
+ + +

The %Plausible.Ingestion.Request{} struct stores all needed fields +to create an event downstream. Pre-eliminary validation is made +to detect user errors early.

+ +
+
+ + +
+
+ + +

Custom OpenTelemetry sampler +implementation that ignores particular traces to reduce noise. Ingestion +HTTP requests and queries to Oban tables are ignored, for example.

+ +
+ +
+ + +
+
+ + +

Custom PromEx plugin for instrumenting code within Plausible app.

+ +
+
+ + +

Deletes data from a site.

+ +
+
+ + +
+
+ + +
+ +
+ + +

Sentry callbacks for filtering and grouping events

+ +
+ + + +
+ + +

Site schema

+ +
+
+ + +

A "sites by domain" caching interface.

+ +
+
+ + +

A periodic cache warmer. +Queries all Sites from Postgres, every interval and pre-populates the cache. +After each run the process is hibernated, triggering garbage collection.

+ +
+
+ + +

A Cache.Warmer adapter that refreshes the Sites Cache fully. +This module exists only to make it explicit what the warmer +refreshes, to be used in the supervisor tree.

+ +
+
+ + +

A Cache.Warmer adapter that only refreshes the Cache +with recently updated sites every 30 seconds.

+ +
+ +
+ + +

Basic interface for domain changes.

+ +
+
+ + +

Thin wrapper around Hammer for gate keeping domain-specific events +during the ingestion phase. When the site is allowed, gate keeping +check returns :allow, otherwise a :deny tagged tuple is returned +with one of the following policy markers

+ +
+ +
+ + +

Embedded schema for Google Analytics imports

+ +
+ + +
+ + +

A site deletion service stub.

+ +
+ + + +
+ + +
+
+ + +
+
+ + +
+ + + + + +
+ + +

This module provides functions for comparing query periods.

+ +
+ +
+ + +

Module for querying user defined 'custom properties'.

+ +
+
+ + +

A module for parsing filters used in stat queries.

+ +
+ + + +
+ + +

Module responsible for funnel evaluation, i.e. building and executing +ClickHouse funnel query based on Plausible.Funnel definition.

+ +
+ +
+ + +

Collection of functions to work with intervals.

+ +
+ + + +
+ + +

Utilities for modifying stat results

+ +
+
+ + +

Floki wrappers to help make assertions about HTML/DOM structures

+ +
+
+ + +
+
+ + +
+
+ + +
+ + + +
+ + +

Periodic worker that expires domain change transition period. +Old domains are frozen for a given time, so users can still access them +before redeploying their scripts and integrations.

+ +
+ + + + + + + + + + +
+
+ PlausibleWeb + +
+ +
+ + + + + + + + + + + + + + + + + +
+ + +

Generic reusable components

+ +
+
+ + +

Phoenix Component for rendering a user-facing feature toggle +capable of flipping booleans in Plausible.Site via the toggle_feature controller action.

+ +
+
+ + +

This module defines the test case to be used by +tests that require setting up a connection.

+ +
+ +
+ + +
+ + + + + +
+ + +

A Plug that fetches favicon images from DuckDuckGo and returns them +to the Plausible frontend.

+ +
+
+ + +

Redirects first-launch users to registration page.

+ +
+ + + + +
+ + +

Flash component for LiveViews - works also when embedded within dead views

+ +
+
+ + +

LiveView allowing listing, creating and deleting funnels.

+ +
+
+ + +

Phoenix LiveComponent for a combobox UI element with search and selection +functionality.

+ +
+
+ + +

Phoenix LiveComponent that renders a form used for setting up funnels. +Makes use of dynamically placed PlausibleWeb.Live.FunnelSettings.ComboBox components +to allow building searchable funnel definitions out of list of goals available.

+ +
+
+ + +

Phoenix LiveComponent module that renders a list of funnels with their names +and the number of steps they have.

+ +
+ + +
+ + +

Rejects bot requests by any means available.

+ +
+
+ + +

A Plug.Session adapter that allows configuration at runtime. +Sadly, the plug being wrapped has no MFA option for dynamic +configuration.

+ +
+ + + + +
+ + +
+ +
+ + +

This controller deals with user management via the UI in Site Settings -> People. It's important to enforce permissions in this controller.

+ +
+ + + +
+ + +

This controller is responsible for rendering stats dashboards.

+ +
+ + + + + +
+
+ + +
+

+ +

mix-tasks

+
+ Mix Tasks +

+ +
+
+ + +
+ + +
+ + +

This task downloads the Country Lite database from DB-IP for self-hosted or development purposes. +Plausible Cloud runs a paid version of DB-IP with more detailed geolocation data.

+ +
+ + +
+ + +

It's often necessary to generate fake events for development and testing purposes. This Mix Task provides a quick and easy +way to generate a pageview or custom event, either in your development environment or a remote Plausible instance.

+ +
+ +
+
+ + + +
+
+
+
+ + + + + + diff --git a/assets/logo.png b/assets/logo.png new file mode 100644 index 000000000..6e9ba0861 Binary files /dev/null and b/assets/logo.png differ diff --git a/contributing.html b/contributing.html new file mode 100644 index 000000000..8d6e44b39 --- /dev/null +++ b/contributing.html @@ -0,0 +1,209 @@ + + + + + + + + + + Contributing — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+ +

+ + + + + + View Source + + + + Contributing +

+ +

We welcome everyone to contribute to Plausible. This document is to help you on setting up your environment, finding a task, and opening pull requests.

+ +

development-setup

+
+ Development setup +

+

The easiest way to get up and running is to install and use Docker for running both Postgres and Clickhouse.

Make sure Docker, Elixir, Erlang and Node.js are all installed on your development machine. The .tool-versions file is available to use with asdf or similar tools.

+ +

start-the-environment

+
+ Start the environment +

+
  1. Run both make postgres and make clickhouse.
  2. You can set up everything with make install, alternatively run each command separately:
    1. Run mix deps.get. This will download the required Elixir dependencies.
    2. Run mix ecto.create. This will create the required databases in both Postgres and Clickhouse.
    3. Run mix ecto.migrate to build the database schema.
    4. Run mix run priv/repo/seeds.exs to seed the database. Check the Seeds section for more.
    5. Run npm ci --prefix assets to install the required client-side dependencies.
    6. Run npm ci --prefix tracker to install the required tracker dependencies.
    7. Run npm run deploy --prefix tracker to generate tracker files in priv/tracker/js
    8. Run mix download_country_database to fetch geolocation database
  3. Run make server or mix phx.server to start the Phoenix server.
  4. The system is now available on localhost:8000.

+ +

seeds

+
+ Seeds +

+

You can optionally seed your database to automatically create an account and a site with stats:

  1. Run mix run priv/repo/seeds.exs to seed the database.
  2. Start the server with make server and navigate to http://localhost:8000/login.
  3. Log in with the following e-mail and password combination: user@plausible.test and plausible.
  4. You should now have a dummy.site site with generated stats.

Alternatively, you can manually create a new account:

  1. Navigate to http://localhost:8000/register and fill in the form.
  2. Fill in the rest of the forms and for the domain use dummy.site
  3. Skip the JS snippet and click start collecting data.
  4. Run mix send_pageview from the terminal to generate a fake pageview event for the dummy site.
  5. You should now be all set!

+ +

stopping-docker-containers

+
+ Stopping Docker containers +

+
  1. Stop and remove the Postgres container with make postgres-stop.
  2. Stop and remove the Clickhouse container with make clickhouse-stop.

Volumes are preserved. You'll find that the Postgres and Clickhouse state are retained when you bring them up again the next time: no need to re-register and so on.

Note: Since we are deleting the containers, be careful when deleting volumes with docker volume prune. You might accidentally delete the database and would have to go through re-registration process.

+ +

pre-commit-hooks

+
+ Pre-commit hooks +

+

pre-commit requires Python to be available locally and covers Elixir, JavaScript, and CSS. Set up with pip install --user pre-commit followed by pre-commit install. Conversely, if the prompts are far too bothersome, remove with pre-commit uninstall.

+ +

finding-a-task

+
+ Finding a task +

+

Bugs can be found in our issue tracker. Issues are usually up for grabs.

New features need to be discussed with the core team and the community first. If you're tackling a feature, please make sure it has been already discussed in the Discussions tab. We kindly ask contributors to use the discussion comment section to propose a solution before opening a pull request.

Pull requests without an associated issue or discussion may still be merged, but we will focus on changes that have already been talked through.

+ + +
+
+
+
+ + + + + + diff --git a/dist/handlebars.runtime-NWIB6V2M.js b/dist/handlebars.runtime-NWIB6V2M.js new file mode 100644 index 000000000..117dc6c96 --- /dev/null +++ b/dist/handlebars.runtime-NWIB6V2M.js @@ -0,0 +1,30 @@ +/**! + + @license + handlebars v4.7.7 + +Copyright (C) 2011-2019 by Yehuda Katz + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +*/(function(r,e){typeof exports=="object"&&typeof module=="object"?module.exports=e():typeof define=="function"&&define.amd?define([],e):typeof exports=="object"?exports.Handlebars=e():r.Handlebars=e()})(this,function(){return function(u){var r={};function e(n){if(r[n])return r[n].exports;var t=r[n]={exports:{},id:n,loaded:!1};return u[n].call(t.exports,t,t.exports,e),t.loaded=!0,t.exports}return e.m=u,e.c=r,e.p="",e(0)}([function(u,r,e){"use strict";var n=e(1).default,t=e(2).default;r.__esModule=!0;var f=e(3),a=n(f),i=e(36),l=t(i),h=e(5),v=t(h),P=e(4),H=n(P),C=e(37),E=n(C),I=e(43),o=t(I);function g(){var y=new a.HandlebarsEnvironment;return H.extend(y,a),y.SafeString=l.default,y.Exception=v.default,y.Utils=H,y.escapeExpression=H.escapeExpression,y.VM=E,y.template=function(p){return E.template(p,y)},y}var w=g();w.create=g,o.default(w),w.default=w,r.default=w,u.exports=r.default},function(u,r){"use strict";r.default=function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n.default=e,n},r.__esModule=!0},function(u,r){"use strict";r.default=function(e){return e&&e.__esModule?e:{default:e}},r.__esModule=!0},function(u,r,e){"use strict";var n=e(2).default;r.__esModule=!0,r.HandlebarsEnvironment=g;var t=e(4),f=e(5),a=n(f),i=e(9),l=e(29),h=e(31),v=n(h),P=e(32),H="4.7.7";r.VERSION=H;var C=8;r.COMPILER_REVISION=C;var E=7;r.LAST_COMPATIBLE_COMPILER_REVISION=E;var I={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};r.REVISION_CHANGES=I;var o="[object Object]";function g(y,p,R){this.helpers=y||{},this.partials=p||{},this.decorators=R||{},i.registerDefaultHelpers(this),l.registerDefaultDecorators(this)}g.prototype={constructor:g,logger:v.default,log:v.default.log,registerHelper:function(p,R){if(t.toString.call(p)===o){if(R)throw new a.default("Arg not supported with multiple helpers");t.extend(this.helpers,p)}else this.helpers[p]=R},unregisterHelper:function(p){delete this.helpers[p]},registerPartial:function(p,R){if(t.toString.call(p)===o)t.extend(this.partials,p);else{if(typeof R>"u")throw new a.default('Attempting to register a partial called "'+p+'" as undefined');this.partials[p]=R}},unregisterPartial:function(p){delete this.partials[p]},registerDecorator:function(p,R){if(t.toString.call(p)===o){if(R)throw new a.default("Arg not supported with multiple decorators");t.extend(this.decorators,p)}else this.decorators[p]=R},unregisterDecorator:function(p){delete this.decorators[p]},resetLoggedPropertyAccesses:function(){P.resetLoggedProperties()}};var w=v.default.log;r.log=w,r.createFrame=t.createFrame,r.logger=v.default},function(u,r){"use strict";r.__esModule=!0,r.extend=a,r.indexOf=v,r.escapeExpression=P,r.isEmpty=H,r.createFrame=C,r.blockParams=E,r.appendContextPath=I;var e={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},n=/[&<>"'`=]/g,t=/[&<>"'`=]/;function f(o){return e[o]}function a(o){for(var g=1;g0?(a.ids&&(a.ids=[a.name]),t.helpers.each(f,a)):i(this);if(a.data&&a.ids){var h=n.createFrame(a.data);h.contextPath=n.appendContextPath(a.data.contextPath,a.name),a={data:h}}return l(f,a)})},u.exports=r.default},function(u,r,e){(function(n){"use strict";var t=e(12).default,f=e(2).default;r.__esModule=!0;var a=e(4),i=e(5),l=f(i);r.default=function(h){h.registerHelper("each",function(v,P){if(!P)throw new l.default("Must pass iterator to #each");var H=P.fn,C=P.inverse,E=0,I="",o=void 0,g=void 0;P.data&&P.ids&&(g=a.appendContextPath(P.data.contextPath,P.ids[0])+"."),a.isFunction(v)&&(v=v.call(this)),P.data&&(o=a.createFrame(P.data));function w(b,F,c){o&&(o.key=b,o.index=F,o.first=F===0,o.last=!!c,g&&(o.contextPath=g+b)),I=I+H(v[b],{data:o,blockParams:a.blockParams([v[b],b],[g+b,null])})}if(v&&typeof v=="object")if(a.isArray(v))for(var y=v.length;E=0?a=i:a=parseInt(a,10)}return a},log:function(a){if(a=t.lookupLevel(a),typeof console<"u"&&t.lookupLevel(t.level)<=a){var i=t.methodMap[a];console[i]||(i="log");for(var l=arguments.length,h=Array(l>1?l-1:0),v=1;v=P.LAST_COMPATIBLE_COMPILER_REVISION&&O<=P.COMPILER_REVISION))if(O{(function(){var y=Handlebars.template,d=Handlebars.templates=Handlebars.templates||{};d["autocomplete-suggestions"]=y({1:function(n,l,a,c,r){var e,o,u=l??(n.nullContext||{}),s=n.hooks.helperMissing,i="function",t=n.escapeExpression,f=n.lookupProperty||function(p,m){if(Object.prototype.hasOwnProperty.call(p,m))return p[m]};return' +
+ `+((e=(o=(o=f(a,"title")||(l!=null?f(l,"title"):l))!=null?o:s,typeof o===i?o.call(u,{name:"title",hash:{},data:r,loc:{start:{line:9,column:29},end:{line:9,column:40}}}):o))!=null?e:"")+` +`+((e=f(a,"if").call(u,l!=null?f(l,"label"):l,{name:"if",hash:{},fn:n.program(2,r,0),inverse:n.noop,data:r,loc:{start:{line:10,column:8},end:{line:12,column:15}}}))!=null?e:"")+`
+ +`+((e=f(a,"if").call(u,l!=null?f(l,"description"):l,{name:"if",hash:{},fn:n.program(4,r,0),inverse:n.noop,data:r,loc:{start:{line:15,column:6},end:{line:19,column:13}}}))!=null?e:"")+`
+`},2:function(n,l,a,c,r){var e,o=n.lookupProperty||function(u,s){if(Object.prototype.hasOwnProperty.call(u,s))return u[s]};return' ('+n.escapeExpression((e=(e=o(a,"label")||(l!=null?o(l,"label"):l))!=null?e:n.hooks.helperMissing,typeof e=="function"?e.call(l??(n.nullContext||{}),{name:"label",hash:{},data:r,loc:{start:{line:11,column:31},end:{line:11,column:40}}}):e))+`) +`},4:function(n,l,a,c,r){var e,o,u=n.lookupProperty||function(s,i){if(Object.prototype.hasOwnProperty.call(s,i))return s[i]};return`
+ `+((e=(o=(o=u(a,"description")||(l!=null?u(l,"description"):l))!=null?o:n.hooks.helperMissing,typeof o=="function"?o.call(l??(n.nullContext||{}),{name:"description",hash:{},data:r,loc:{start:{line:17,column:10},end:{line:17,column:27}}}):o))!=null?e:"")+` +
+`},compiler:[8,">= 4.3.0"],main:function(n,l,a,c,r){var e,o,u=l??(n.nullContext||{}),s=n.hooks.helperMissing,i="function",t=n.escapeExpression,f=n.lookupProperty||function(p,m){if(Object.prototype.hasOwnProperty.call(p,m))return p[m]};return`
+ +
"`+t((o=(o=f(a,"term")||(l!=null?f(l,"term"):l))!=null?o:s,typeof o===i?o.call(u,{name:"term",hash:{},data:r,loc:{start:{line:3,column:28},end:{line:3,column:36}}}):o))+`"
+
Search the documentation
+
+`+((e=f(a,"each").call(u,l!=null?f(l,"suggestions"):l,{name:"each",hash:{},fn:n.program(1,r,0),inverse:n.noop,data:r,loc:{start:{line:6,column:2},end:{line:21,column:11}}}))!=null?e:"")+`
+`},useData:!0}),d["modal-layout"]=y({compiler:[8,">= 4.3.0"],main:function(n,l,a,c,r){return` +`},useData:!0}),d["quick-switch-modal-body"]=y({compiler:[8,">= 4.3.0"],main:function(n,l,a,c,r){return`
+ + +
+
+`},useData:!0}),d["quick-switch-results"]=y({1:function(n,l,a,c,r){var e,o=l??(n.nullContext||{}),u=n.hooks.helperMissing,s="function",i=n.escapeExpression,t=n.lookupProperty||function(f,p){if(Object.prototype.hasOwnProperty.call(f,p))return f[p]};return'
+ `+i((e=(e=t(a,"name")||(l!=null?t(l,"name"):l))!=null?e:u,typeof e===s?e.call(o,{name:"name",hash:{},data:r,loc:{start:{line:3,column:4},end:{line:3,column:12}}}):e))+` +
+`},compiler:[8,">= 4.3.0"],main:function(n,l,a,c,r){var e,o=n.lookupProperty||function(u,s){if(Object.prototype.hasOwnProperty.call(u,s))return u[s]};return(e=o(a,"each").call(l??(n.nullContext||{}),l!=null?o(l,"results"):l,{name:"each",hash:{},fn:n.program(1,r,0),inverse:n.noop,data:r,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))!=null?e:""},useData:!0}),d["search-results"]=y({1:function(n,l,a,c,r){var e,o=n.lookupProperty||function(u,s){if(Object.prototype.hasOwnProperty.call(u,s))return u[s]};return" Search results for "+n.escapeExpression((e=(e=o(a,"value")||(l!=null?o(l,"value"):l))!=null?e:n.hooks.helperMissing,typeof e=="function"?e.call(l??(n.nullContext||{}),{name:"value",hash:{},data:r,loc:{start:{line:3,column:27},end:{line:3,column:36}}}):e))+` +`},3:function(n,l,a,c,r){return` Invalid search +`},5:function(n,l,a,c,r){var e,o=n.lookupProperty||function(u,s){if(Object.prototype.hasOwnProperty.call(u,s))return u[s]};return(e=o(a,"each").call(l??(n.nullContext||{}),l!=null?o(l,"results"):l,{name:"each",hash:{},fn:n.program(6,r,0),inverse:n.noop,data:r,loc:{start:{line:15,column:2},end:{line:26,column:11}}}))!=null?e:""},6:function(n,l,a,c,r){var e,o=n.lambda,u=n.escapeExpression,s=n.lookupProperty||function(i,t){if(Object.prototype.hasOwnProperty.call(i,t))return i[t]};return`
+

+ + `+u(o(l!=null?s(l,"title"):l,l))+" ("+u(o(l!=null?s(l,"type"):l,l))+`) + +

+`+((e=s(a,"each").call(l??(n.nullContext||{}),l!=null?s(l,"excerpts"):l,{name:"each",hash:{},fn:n.program(7,r,0),inverse:n.noop,data:r,loc:{start:{line:22,column:8},end:{line:24,column:17}}}))!=null?e:"")+`
+`},7:function(n,l,a,c,r){var e;return'

'+((e=n.lambda(l,l))!=null?e:"")+`

+`},9:function(n,l,a,c,r){var e,o=n.lookupProperty||function(u,s){if(Object.prototype.hasOwnProperty.call(u,s))return u[s]};return((e=(o(a,"isArray")||l&&o(l,"isArray")||n.hooks.helperMissing).call(l??(n.nullContext||{}),l!=null?o(l,"results"):l,{name:"isArray",hash:{},fn:n.program(10,r,0),inverse:n.program(12,r,0),data:r,loc:{start:{line:28,column:2},end:{line:34,column:14}}}))!=null?e:"")+` +

The search functionality is full-text based. Here are some tips:

+ +
    +
  • Multiple words (such as foo bar) are searched as OR
  • +
  • Use * anywhere (such as fo*) as wildcard
  • +
  • Use + before a word (such as +foo) to make its presence required
  • +
  • Use - before a word (such as -foo) to make its absence required
  • +
  • Use : to search on a particular field (such as field:word). The available fields are title and doc
  • +
  • Use WORD^NUMBER (such as foo^2) to boost the given word
  • +
  • Use WORD~NUMBER (such as foo~2) to do a search with edit distance on word
  • +
+ +

To quickly go to a module, type, or function, use the autocompletion feature in the sidebar search.

+`},10:function(n,l,a,c,r){var e,o=n.lookupProperty||function(u,s){if(Object.prototype.hasOwnProperty.call(u,s))return u[s]};return"

Sorry, we couldn't find anything for "+n.escapeExpression((e=(e=o(a,"value")||(l!=null?o(l,"value"):l))!=null?e:n.hooks.helperMissing,typeof e=="function"?e.call(l??(n.nullContext||{}),{name:"value",hash:{},data:r,loc:{start:{line:29,column:48},end:{line:29,column:57}}}):e))+`.

+`},12:function(n,l,a,c,r){var e,o=n.lookupProperty||function(u,s){if(Object.prototype.hasOwnProperty.call(u,s))return u[s]};return(e=o(a,"if").call(l??(n.nullContext||{}),l!=null?o(l,"value"):l,{name:"if",hash:{},fn:n.program(13,r,0),inverse:n.program(15,r,0),data:r,loc:{start:{line:30,column:2},end:{line:34,column:2}}}))!=null?e:""},13:function(n,l,a,c,r){var e,o=n.lookupProperty||function(u,s){if(Object.prototype.hasOwnProperty.call(u,s))return u[s]};return"

Invalid search: "+n.escapeExpression((e=(e=o(a,"errorMessage")||(l!=null?o(l,"errorMessage"):l))!=null?e:n.hooks.helperMissing,typeof e=="function"?e.call(l??(n.nullContext||{}),{name:"errorMessage",hash:{},data:r,loc:{start:{line:31,column:23},end:{line:31,column:39}}}):e))+`.

+`},15:function(n,l,a,c,r){return`

Please type something into the search bar to perform a search.

+ `},compiler:[8,">= 4.3.0"],main:function(n,l,a,c,r){var e,o=l??(n.nullContext||{}),u=n.lookupProperty||function(s,i){if(Object.prototype.hasOwnProperty.call(s,i))return s[i]};return`

+`+((e=u(a,"if").call(o,l!=null?u(l,"value"):l,{name:"if",hash:{},fn:n.program(1,r,0),inverse:n.program(3,r,0),data:r,loc:{start:{line:2,column:2},end:{line:6,column:9}}}))!=null?e:"")+` + +

+ +`+((e=(u(a,"isNonEmptyArray")||l&&u(l,"isNonEmptyArray")||n.hooks.helperMissing).call(o,l!=null?u(l,"results"):l,{name:"isNonEmptyArray",hash:{},fn:n.program(5,r,0),inverse:n.program(9,r,0),data:r,loc:{start:{line:14,column:0},end:{line:49,column:20}}}))!=null?e:"")},useData:!0}),d["settings-modal-body"]=y({1:function(n,l,a,c,r){var e,o=n.lookupProperty||function(u,s){if(Object.prototype.hasOwnProperty.call(u,s))return u[s]};return(e=o(a,"if").call(l??(n.nullContext||{}),l!=null?o(l,"description"):l,{name:"if",hash:{},fn:n.program(2,r,0),inverse:n.noop,data:r,loc:{start:{line:40,column:6},end:{line:53,column:13}}}))!=null?e:""},2:function(n,l,a,c,r){var e,o=n.lookupProperty||function(u,s){if(Object.prototype.hasOwnProperty.call(u,s))return u[s]};return`
+
+ `+n.escapeExpression(n.lambda(l!=null?o(l,"description"):l,l))+` +
+
+`+((e=o(a,"if").call(l??(n.nullContext||{}),l!=null?o(l,"displayAs"):l,{name:"if",hash:{},fn:n.program(3,r,0),inverse:n.program(5,r,0),data:r,loc:{start:{line:46,column:12},end:{line:50,column:19}}}))!=null?e:"")+`
+
+`},3:function(n,l,a,c,r){var e,o=n.lookupProperty||function(u,s){if(Object.prototype.hasOwnProperty.call(u,s))return u[s]};return" "+((e=n.lambda(l!=null?o(l,"displayAs"):l,l))!=null?e:"")+` +`},5:function(n,l,a,c,r){var e=n.lookupProperty||function(o,u){if(Object.prototype.hasOwnProperty.call(o,u))return o[u]};return" "+n.escapeExpression(n.lambda(l!=null?e(l,"key"):l,l))+` +`},compiler:[8,">= 4.3.0"],main:function(n,l,a,c,r){var e,o=n.lookupProperty||function(u,s){if(Object.prototype.hasOwnProperty.call(u,s))return u[s]};return`
+
+ + + + +
+ +
+`},useData:!0}),d["sidebar-items"]=y({1:function(n,l,a,c,r,e,o){var u,s=l??(n.nullContext||{}),i=n.hooks.helperMissing,t=n.lookupProperty||function(f,p){if(Object.prototype.hasOwnProperty.call(f,p))return f[p]};return((u=(t(a,"groupChanged")||l&&t(l,"groupChanged")||i).call(s,o[1],(u=e[0][0])!=null?t(u,"group"):u,{name:"groupChanged",hash:{},fn:n.program(2,r,0,e,o),inverse:n.noop,data:r,blockParams:e,loc:{start:{line:2,column:2},end:{line:6,column:19}}}))!=null?u:"")+` +`+((u=(t(a,"nestingChanged")||l&&t(l,"nestingChanged")||i).call(s,o[1],e[0][0],{name:"nestingChanged",hash:{},fn:n.program(7,r,0,e,o),inverse:n.noop,data:r,blockParams:e,loc:{start:{line:8,column:2},end:{line:10,column:21}}}))!=null?u:"")+` +
  • + +`+((u=t(a,"if").call(s,(u=e[0][0])!=null?t(u,"nested_title"):u,{name:"if",hash:{},fn:n.program(13,r,0,e,o),inverse:n.program(15,r,0,e,o),data:r,blockParams:e,loc:{start:{line:14,column:6},end:{line:18,column:13}}}))!=null?u:"")+((u=(t(a,"isEmptyArray")||l&&t(l,"isEmptyArray")||i).call(s,(u=e[0][0])!=null?t(u,"headers"):u,{name:"isEmptyArray",hash:{},fn:n.program(3,r,0,e,o),inverse:n.program(17,r,0,e,o),data:r,blockParams:e,loc:{start:{line:19,column:6},end:{line:22,column:23}}}))!=null?u:"")+` + +`+((u=(t(a,"isArray")||l&&t(l,"isArray")||i).call(s,(u=e[0][0])!=null?t(u,"headers"):u,{name:"isArray",hash:{},fn:n.program(19,r,0,e,o),inverse:n.program(23,r,0,e,o),data:r,blockParams:e,loc:{start:{line:25,column:4},end:{line:73,column:16}}}))!=null?u:"")+`
  • +`},2:function(n,l,a,c,r,e){var o,u=n.lookupProperty||function(s,i){if(Object.prototype.hasOwnProperty.call(s,i))return s[i]};return'
  • + `+n.escapeExpression(n.lambda((o=e[1][0])!=null?u(o,"group"):o,l))+` +
  • +`},3:function(n,l,a,c,r){return""},5:function(n,l,a,c,r){return'translate="no"'},7:function(n,l,a,c,r,e){var o,u=n.lookupProperty||function(s,i){if(Object.prototype.hasOwnProperty.call(s,i))return s[i]};return' +`},9:function(n,l,a,c,r){return"current-page open"},11:function(n,l,a,c,r){return"#content"},13:function(n,l,a,c,r,e){var o,u=n.lookupProperty||function(s,i){if(Object.prototype.hasOwnProperty.call(s,i))return s[i]};return" "+((o=n.lambda((o=e[1][0])!=null?u(o,"nested_title"):o,l))!=null?o:"")+` +`},15:function(n,l,a,c,r,e){var o,u=n.lookupProperty||function(s,i){if(Object.prototype.hasOwnProperty.call(s,i))return s[i]};return" "+((o=n.lambda((o=e[1][0])!=null?u(o,"title"):o,l))!=null?o:"")+` +`},17:function(n,l,a,c,r){return` +`},19:function(n,l,a,c,r,e){var o,u=n.lookupProperty||function(s,i){if(Object.prototype.hasOwnProperty.call(s,i))return s[i]};return(o=(u(a,"isNonEmptyArray")||l&&u(l,"isNonEmptyArray")||n.hooks.helperMissing).call(l??(n.nullContext||{}),(o=e[1][0])!=null?u(o,"headers"):o,{name:"isNonEmptyArray",hash:{},fn:n.program(20,r,0,e),inverse:n.noop,data:r,blockParams:e,loc:{start:{line:26,column:6},end:{line:34,column:26}}}))!=null?o:""},20:function(n,l,a,c,r,e){var o,u=n.lookupProperty||function(s,i){if(Object.prototype.hasOwnProperty.call(s,i))return s[i]};return`
      +`+((o=u(a,"each").call(l??(n.nullContext||{}),(o=e[2][0])!=null?u(o,"headers"):o,{name:"each",hash:{},fn:n.program(21,r,0,e),inverse:n.noop,data:r,blockParams:e,loc:{start:{line:28,column:10},end:{line:32,column:19}}}))!=null?o:"")+`
    +`},21:function(n,l,a,c,r,e){var o,u,s=l??(n.nullContext||{}),i=n.hooks.helperMissing,t="function",f=n.lookupProperty||function(p,m){if(Object.prototype.hasOwnProperty.call(p,m))return p[m]};return`
  • + '+((o=(u=(u=f(a,"id")||(l!=null?f(l,"id"):l))!=null?u:i,typeof u===t?u.call(s,{name:"id",hash:{},data:r,blockParams:e,loc:{start:{line:30,column:54},end:{line:30,column:62}}}):u))!=null?o:"")+` +
  • +`},23:function(n,l,a,c,r,e){var o,u=l??(n.nullContext||{}),s=n.hooks.helperMissing,i=n.lookupProperty||function(t,f){if(Object.prototype.hasOwnProperty.call(t,f))return t[f]};return`
      +`+((o=(i(a,"showSections")||l&&i(l,"showSections")||s).call(u,e[1][0],{name:"showSections",hash:{},fn:n.program(24,r,0,e),inverse:n.noop,data:r,blockParams:e,loc:{start:{line:37,column:8},end:{line:51,column:25}}}))!=null?o:"")+((o=(i(a,"showSummary")||l&&i(l,"showSummary")||s).call(u,e[1][0],{name:"showSummary",hash:{},fn:n.program(29,r,0,e),inverse:n.noop,data:r,blockParams:e,loc:{start:{line:52,column:8},end:{line:56,column:24}}}))!=null?o:"")+((o=i(a,"each").call(u,(o=e[1][0])!=null?i(o,"nodeGroups"):o,{name:"each",hash:{},fn:n.program(31,r,1,e),inverse:n.noop,data:r,blockParams:e,loc:{start:{line:57,column:8},end:{line:71,column:17}}}))!=null?o:"")+`
    +`},24:function(n,l,a,c,r,e){var o,u=l??(n.nullContext||{}),s=n.lookupProperty||function(i,t){if(Object.prototype.hasOwnProperty.call(i,t))return i[t]};return'
  • + + Sections + + +
      +`+((o=s(a,"each").call(u,l!=null?s(l,"sections"):l,{name:"each",hash:{},fn:n.program(27,r,0,e),inverse:n.noop,data:r,blockParams:e,loc:{start:{line:44,column:14},end:{line:48,column:23}}}))!=null?o:"")+`
    +
  • +`},25:function(n,l,a,c,r){return"open"},27:function(n,l,a,c,r,e){var o,u,s=n.escapeExpression,i=l??(n.nullContext||{}),t=n.hooks.helperMissing,f="function",p=n.lookupProperty||function(m,v){if(Object.prototype.hasOwnProperty.call(m,v))return m[v]};return`
  • + '+((o=(u=(u=p(a,"id")||(l!=null?p(l,"id"):l))!=null?u:t,typeof u===f?u.call(i,{name:"id",hash:{},data:r,blockParams:e,loc:{start:{line:46,column:56},end:{line:46,column:64}}}):u))!=null?o:"")+` +
  • +`},29:function(n,l,a,c,r,e){var o,u=n.lookupProperty||function(s,i){if(Object.prototype.hasOwnProperty.call(s,i))return s[i]};return`
  • + Summary +
  • +`},31:function(n,l,a,c,r,e){var o,u=n.lambda,s=n.escapeExpression,i=n.lookupProperty||function(t,f){if(Object.prototype.hasOwnProperty.call(t,f))return t[f]};return`
  • + + `+s(u((o=e[0][0])!=null?i(o,"name"):o,l))+` + + +
      +`+((o=i(a,"each").call(l??(n.nullContext||{}),(o=e[0][0])!=null?i(o,"nodes"):o,{name:"each",hash:{},fn:n.program(32,r,0,e),inverse:n.noop,data:r,blockParams:e,loc:{start:{line:64,column:14},end:{line:68,column:23}}}))!=null?o:"")+`
    +
  • +`},32:function(n,l,a,c,r,e){var o,u,s=n.escapeExpression,i=l??(n.nullContext||{}),t=n.hooks.helperMissing,f="function",p=n.lookupProperty||function(m,v){if(Object.prototype.hasOwnProperty.call(m,v))return m[v]};return`
  • + '+s((u=(u=p(a,"id")||(l!=null?p(l,"id"):l))!=null?u:t,typeof u===f?u.call(i,{name:"id",hash:{},data:r,blockParams:e,loc:{start:{line:66,column:89},end:{line:66,column:95}}}):u))+` +
  • +`},compiler:[8,">= 4.3.0"],main:function(n,l,a,c,r,e,o){var u,s=n.lookupProperty||function(i,t){if(Object.prototype.hasOwnProperty.call(i,t))return i[t]};return(u=s(a,"each").call(l??(n.nullContext||{}),l!=null?s(l,"nodes"):l,{name:"each",hash:{},fn:n.program(1,r,2,e,o),inverse:n.noop,data:r,blockParams:e,loc:{start:{line:1,column:0},end:{line:75,column:9}}}))!=null?u:""},useData:!0,useDepths:!0,useBlockParams:!0}),d["tooltip-body"]=y({1:function(n,l,a,c,r){var e,o=n.lookupProperty||function(u,s){if(Object.prototype.hasOwnProperty.call(u,s))return u[s]};return`
    + `+n.escapeExpression(n.lambda((e=l!=null?o(l,"hint"):l)!=null?o(e,"description"):e,l))+` +
    +`},3:function(n,l,a,c,r){var e,o=n.lambda,u=n.escapeExpression,s=n.lookupProperty||function(i,t){if(Object.prototype.hasOwnProperty.call(i,t))return i[t]};return`
    +

    + `+u(o((e=l!=null?s(l,"hint"):l)!=null?s(e,"title"):e,l))+` +
    `+u(o((e=l!=null?s(l,"hint"):l)!=null?s(e,"version"):e,l))+`
    +

    +
    +`+((e=s(a,"if").call(l??(n.nullContext||{}),(e=l!=null?s(l,"hint"):l)!=null?s(e,"description"):e,{name:"if",hash:{},fn:n.program(4,r,0),inverse:n.noop,data:r,loc:{start:{line:12,column:2},end:{line:16,column:9}}}))!=null?e:"")},4:function(n,l,a,c,r){var e,o=n.lookupProperty||function(u,s){if(Object.prototype.hasOwnProperty.call(u,s))return u[s]};return`
    + `+((e=n.lambda((e=l!=null?o(l,"hint"):l)!=null?o(e,"description"):e,l))!=null?e:"")+` +
    +`},compiler:[8,">= 4.3.0"],main:function(n,l,a,c,r){var e,o=n.lookupProperty||function(u,s){if(Object.prototype.hasOwnProperty.call(u,s))return u[s]};return(e=o(a,"if").call(l??(n.nullContext||{}),l!=null?o(l,"isPlain"):l,{name:"if",hash:{},fn:n.program(1,r,0),inverse:n.program(3,r,0),data:r,loc:{start:{line:1,column:0},end:{line:17,column:7}}}))!=null?e:""},useData:!0}),d["tooltip-layout"]=y({compiler:[8,">= 4.3.0"],main:function(n,l,a,c,r){return`
    +
    +
    +`},useData:!0}),d["versions-dropdown"]=y({1:function(n,l,a,c,r){var e,o,u=l??(n.nullContext||{}),s=n.hooks.helperMissing,i="function",t=n.escapeExpression,f=n.lookupProperty||function(p,m){if(Object.prototype.hasOwnProperty.call(p,m))return p[m]};return' +`},2:function(n,l,a,c,r){return" selected disabled"},compiler:[8,">= 4.3.0"],main:function(n,l,a,c,r){var e,o=n.lookupProperty||function(u,s){if(Object.prototype.hasOwnProperty.call(u,s))return u[s]};return`
    + +
    +`},useData:!0})})();})(); diff --git a/dist/html-JDI3AVDD.js b/dist/html-JDI3AVDD.js new file mode 100644 index 000000000..f4a3053ae --- /dev/null +++ b/dist/html-JDI3AVDD.js @@ -0,0 +1,56 @@ +(()=>{var An=Object.create;var et=Object.defineProperty;var Qn=Object.getOwnPropertyDescriptor;var Nn=Object.getOwnPropertyNames;var Hn=Object.getPrototypeOf,Dn=Object.prototype.hasOwnProperty;var tt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Fn=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Nn(t))!Dn.call(e,r)&&r!==n&&et(e,r,{get:()=>t[r],enumerable:!(i=Qn(t,r))||i.enumerable});return e};var nt=(e,t,n)=>(n=e!=null?An(Hn(e)):{},Fn(t||!e||!e.__esModule?et(n,"default",{value:e,enumerable:!0}):n,e));var gt=tt((ms,mt)=>{var pt="Expected a function",ft=NaN,Gn="[object Symbol]",Kn=/^\s+|\s+$/g,Yn=/^[-+]0x[0-9a-f]+$/i,Jn=/^0b[01]+$/i,Xn=/^0o[0-7]+$/i,Zn=parseInt,ei=typeof global=="object"&&global&&global.Object===Object&&global,ti=typeof self=="object"&&self&&self.Object===Object&&self,ni=ei||ti||Function("return this")(),ii=Object.prototype,ri=ii.toString,si=Math.max,oi=Math.min,Oe=function(){return ni.Date.now()};function ai(e,t,n){var i,r,s,o,a,u,l=0,f=!1,y=!1,g=!0;if(typeof e!="function")throw new TypeError(pt);t=ht(t)||0,pe(n)&&(f=!!n.leading,y="maxWait"in n,s=y?si(ht(n.maxWait)||0,t):s,g="trailing"in n?!!n.trailing:g);function L(x){var C=i,H=r;return i=r=void 0,l=x,o=e.apply(H,C),o}function S(x){return l=x,a=setTimeout(p,t),f?L(x):o}function T(x){var C=x-u,H=x-l,z=t-C;return y?oi(z,s-H):z}function m(x){var C=x-u,H=x-l;return u===void 0||C>=t||C<0||y&&H>=s}function p(){var x=Oe();if(m(x))return _(x);a=setTimeout(p,T(x))}function _(x){return a=void 0,g&&i?L(x):(i=r=void 0,o)}function w(){a!==void 0&&clearTimeout(a),l=0,i=u=r=a=void 0}function Q(){return a===void 0?o:_(Oe())}function N(){var x=Oe(),C=m(x);if(i=arguments,r=this,u=x,C){if(a===void 0)return S(u);if(y)return a=setTimeout(p,t),L(u)}return a===void 0&&(a=setTimeout(p,t)),o}return N.cancel=w,N.flush=Q,N}function ci(e,t,n){var i=!0,r=!0;if(typeof e!="function")throw new TypeError(pt);return pe(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),ai(e,t,{leading:i,maxWait:t,trailing:r})}function pe(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function li(e){return!!e&&typeof e=="object"}function ui(e){return typeof e=="symbol"||li(e)&&ri.call(e)==Gn}function ht(e){if(typeof e=="number")return e;if(ui(e))return ft;if(pe(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=pe(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(Kn,"");var n=Jn.test(e);return n||Xn.test(e)?Zn(e.slice(2),n?2:8):Yn.test(e)?ft:+e}mt.exports=ci});var $t=tt((Vt,zt)=>{(function(){var e=function(t){var n=new e.Builder;return n.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),n.searchPipeline.add(e.stemmer),t.call(n,n),n.build()};e.version="2.3.9";e.utils={},e.utils.warn=function(t){return function(n){t.console&&console.warn&&console.warn(n)}}(this),e.utils.asString=function(t){return t==null?"":t.toString()},e.utils.clone=function(t){if(t==null)return t;for(var n=Object.create(null),i=Object.keys(t),r=0;r0){var f=e.utils.clone(n)||{};f.position=[a,l],f.index=s.length,s.push(new e.Token(i.slice(a,o),f))}a=o+1}}return s},e.tokenizer.separator=/[\s\-]+/;e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,n){n in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+n),t.label=n,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var n=t.label&&t.label in this.registeredFunctions;n||e.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. +`,t)},e.Pipeline.load=function(t){var n=new e.Pipeline;return t.forEach(function(i){var r=e.Pipeline.registeredFunctions[i];if(r)n.add(r);else throw new Error("Cannot load unregistered function: "+i)}),n},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(n){e.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},e.Pipeline.prototype.after=function(t,n){e.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i=i+1,this._stack.splice(i,0,n)},e.Pipeline.prototype.before=function(t,n){e.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,0,n)},e.Pipeline.prototype.remove=function(t){var n=this._stack.indexOf(t);n!=-1&&this._stack.splice(n,1)},e.Pipeline.prototype.run=function(t){for(var n=this._stack.length,i=0;i1&&(ot&&(i=s),o!=t);)r=i-n,s=n+Math.floor(r/2),o=this.elements[s*2];if(o==t||o>t)return s*2;if(ou?f+=2:a==u&&(n+=i[l+1]*r[f+1],l+=2,f+=2);return n},e.Vector.prototype.similarity=function(t){return this.dot(t)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var t=new Array(this.elements.length/2),n=1,i=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new e.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),r.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new e.TokenSet;s.node.edges["*"]=u}if(s.str.length==0&&(u.final=!0),r.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&r.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new e.TokenSet;s.node.edges["*"]=l}s.str.length==1&&(l.final=!0),r.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var f=s.str.charAt(0),y=s.str.charAt(1),g;y in s.node.edges?g=s.node.edges[y]:(g=new e.TokenSet,s.node.edges[y]=g),s.str.length==1&&(g.final=!0),r.push({node:g,editsRemaining:s.editsRemaining-1,str:f+s.str.slice(2)})}}}return i},e.TokenSet.fromString=function(t){for(var n=new e.TokenSet,i=n,r=0,s=t.length;r=t;n--){var i=this.uncheckedNodes[n],r=i.child.toString();r in this.minimizedNodes?i.parent.edges[i.char]=this.minimizedNodes[r]:(i.child._str=r,this.minimizedNodes[r]=i.child),this.uncheckedNodes.pop()}};e.Index=function(t){this.invertedIndex=t.invertedIndex,this.fieldVectors=t.fieldVectors,this.tokenSet=t.tokenSet,this.fields=t.fields,this.pipeline=t.pipeline},e.Index.prototype.search=function(t){return this.query(function(n){var i=new e.QueryParser(t,n);i.parse()})},e.Index.prototype.query=function(t){for(var n=new e.Query(this.fields),i=Object.create(null),r=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u1?this._b=1:this._b=t},e.Builder.prototype.k1=function(t){this._k1=t},e.Builder.prototype.add=function(t,n){var i=t[this._ref],r=Object.keys(this._fields);this._documents[i]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,n;do t=this.next(),n=t.charCodeAt(0);while(n>47&&n<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var n=t.next();if(n==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){t.escapeCharacter();continue}if(n==":")return e.QueryLexer.lexField;if(n=="~")return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if(n=="^")return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if(n=="+"&&t.width()===1||n=="-"&&t.width()===1)return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(n.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}},e.QueryParser=function(t,n){this.lexer=new e.QueryLexer(t),this.query=n,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var t=this.peekLexeme();return this.lexemeIdx+=1,t},e.QueryParser.prototype.nextClause=function(){var t=this.currentClause;this.query.clause(t),this.currentClause={}},e.QueryParser.parseClause=function(t){var n=t.peekLexeme();if(n!=null)switch(n.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(i+=" with value '"+n.str+"'"),new e.QueryParseError(i,n.start,n.end)}},e.QueryParser.parsePresence=function(t){var n=t.consumeLexeme();if(n!=null){switch(n.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var i="unrecognised presence operator'"+n.str+"'";throw new e.QueryParseError(i,n.start,n.end)}var r=t.peekLexeme();if(r==null){var i="expecting term or field, found nothing";throw new e.QueryParseError(i,n.start,n.end)}switch(r.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term or field, found '"+r.type+"'";throw new e.QueryParseError(i,r.start,r.end)}}},e.QueryParser.parseField=function(t){var n=t.consumeLexeme();if(n!=null){if(t.query.allFields.indexOf(n.str)==-1){var i=t.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),r="unrecognised field '"+n.str+"', possible fields: "+i;throw new e.QueryParseError(r,n.start,n.end)}t.currentClause.fields=[n.str];var s=t.peekLexeme();if(s==null){var r="expecting term, found nothing";throw new e.QueryParseError(r,n.start,n.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var r="expecting term, found '"+s.type+"'";throw new e.QueryParseError(r,s.start,s.end)}}},e.QueryParser.parseTerm=function(t){var n=t.consumeLexeme();if(n!=null){t.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(t.currentClause.usePipeline=!1);var i=t.peekLexeme();if(i==null){t.nextClause();return}switch(i.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var r="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(r,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var n=t.consumeLexeme();if(n!=null){var i=parseInt(n.str,10);if(isNaN(i)){var r="edit distance must be numeric";throw new e.QueryParseError(r,n.start,n.end)}t.currentClause.editDistance=i;var s=t.peekLexeme();if(s==null){t.nextClause();return}switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var r="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(r,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var n=t.consumeLexeme();if(n!=null){var i=parseInt(n.str,10);if(isNaN(i)){var r="boost must be numeric";throw new e.QueryParseError(r,n.start,n.end)}t.currentClause.boost=i;var s=t.peekLexeme();if(s==null){t.nextClause();return}switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var r="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(r,s.start,s.end)}}},function(t,n){typeof define=="function"&&define.amd?define(n):typeof Vt=="object"?zt.exports=n():t.lunr=n()}(this,function(){return e})})()});Handlebars.registerHelper("groupChanged",function(e,t,n){let i=t||"";if(e.group!==i)return delete e.nestedContext,e.group=i,n.fn(this)});Handlebars.registerHelper("nestingChanged",function(e,t,n){if(t.nested_context&&t.nested_context!==e.nestedContext){if(e.nestedContext=t.nested_context,e.lastModuleSeenInGroup!==t.nested_context)return n.fn(this)}else e.lastModuleSeenInGroup=t.title});Handlebars.registerHelper("showSections",function(e,t){if(e.sections.length>0)return t.fn(this)});Handlebars.registerHelper("showSummary",function(e,t){if(e.nodeGroups)return t.fn(this)});Handlebars.registerHelper("isArray",function(e,t){return Array.isArray(e)?t.fn(this):t.inverse(this)});Handlebars.registerHelper("isNonEmptyArray",function(e,t){return Array.isArray(e)&&e.length>0?t.fn(this):t.inverse(this)});Handlebars.registerHelper("isEmptyArray",function(e,t){return Array.isArray(e)&&e.length===0?t.fn(this):t.inverse(this)});Handlebars.registerHelper("isLocal",function(e,t){let n=window.location.pathname.split("/").pop();return e+".html"===n?t.fn(this):t.inverse(this)});var c=document.querySelector.bind(document),k=document.querySelectorAll.bind(document);function it(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function de(e){return String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}function re(){return document.body.dataset.type}function rt(e,t){if(e){for(let n of e){let i=n.nodeGroups&&n.nodeGroups.find(r=>r.nodes.some(s=>s.anchor===t));if(i)return i.key}return null}}function fe(){return window.location.hash.replace(/^#/,"")}function st(e){return new URLSearchParams(window.location.search).get(e)}function ot(e){return fetch(e).then(t=>t.ok).catch(()=>!1)}function at(e){document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e)}function K(e){return!e||e.trim()===""}function ct(e,t){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{n=null,e(...r)},t)}}function he(){return document.head.querySelector("meta[name=project][content]").content}var lt="ex_doc:settings",Mn={tooltips:!0,theme:null,livebookUrl:null},_e=class{constructor(){this._subscribers=[],this._settings=Mn,this._loadSettings()}get(){return this._settings}update(t){let n=this._settings;this._settings={...this._settings,...t},this._subscribers.forEach(i=>i(this._settings,n)),this._storeSettings()}getAndSubscribe(t){this._subscribers.push(t),t(this._settings)}_loadSettings(){try{let t=localStorage.getItem(lt);if(t){let n=JSON.parse(t);this._settings={...this._settings,...n}}this._loadSettingsLegacy()}catch(t){console.error(`Failed to load settings: ${t}`)}}_storeSettings(){try{this._storeSettingsLegacy(),localStorage.setItem(lt,JSON.stringify(this._settings))}catch(t){console.error(`Failed to persist settings: ${t}`)}}_loadSettingsLegacy(){localStorage.getItem("tooltipsDisabled")!==null&&(this._settings={...this._settings,tooltips:!1}),localStorage.getItem("night-mode")==="true"&&(this._settings={...this._settings,nightMode:!0}),this._settings.nightMode===!0&&(this._settings={...this._settings,theme:"dark"})}_storeSettingsLegacy(){this._settings.tooltips?localStorage.removeItem("tooltipsDisabled"):localStorage.setItem("tooltipsDisabled","true"),this._settings.nightMode!==null?localStorage.setItem("night-mode",this._settings.nightMode===!0?"true":"false"):localStorage.removeItem("night-mode"),this._settings.theme!==null?(localStorage.setItem("night-mode",this._settings.theme==="dark"?"true":"false"),this._settings.nightMode=this._settings.theme==="dark"):(delete this._settings.nightMode,localStorage.removeItem("night-mode"))}},O=new _e;var Bn=".content",ut=".content-inner",Vn=".livebook-badge";function dt(){zn(),jn(),Un(),$n()}function zn(){c(Bn).querySelectorAll("a").forEach(e=>{e.querySelector("code, img")&&e.classList.add("no-underline")})}function $n(){["warning","info","error","neutral","tip"].forEach(t=>{k(`blockquote h3.${t}, blockquote h4.${t}`).forEach(n=>{n.closest("blockquote").classList.add(t)})})}function jn(){c(ut).setAttribute("tabindex",-1),c(ut).focus()}function Un(){let t=window.location.pathname.replace(/\.html$/,".livemd"),n=new URL(t,window.location.href).toString();O.getAndSubscribe(i=>{let r=i.livebookUrl?Wn(i.livebookUrl,n):qn(n);for(let s of k(Vn))s.href=r})}function qn(e){return`https://livebook.dev/run?url=${encodeURIComponent(e)}`}function Wn(e,t){return`${e}/import?url=${encodeURIComponent(t)}`}var yt=nt(gt());var di=768,vt=300,fi=".sidebar-toggle",hi=".content",D={CLOSED:"closed",OPEN:"open",NO_PREF:"no_pref"},F={opened:"sidebar-opened",opening:"sidebar-opening",closed:"sidebar-closed",closing:"sidebar-closing"},pi=Object.values(F),P={togglingTimeout:null,lastWindowWidth:window.innerWidth,sidebarPreference:D.NO_PREF};function St(){xt(),mi()}function xt(){if(sessionStorage.getItem("sidebar_state")==="closed")return Y(F.closed);Y(Et()?F.closed:F.opened)}function Et(){return window.matchMedia(`screen and (max-width: ${di}px)`).matches}function Y(...e){document.body.classList.remove(...pi),document.body.classList.add(...e)}function mi(){c(fi).addEventListener("click",e=>{Ie(),vi()}),c(hi).addEventListener("click",e=>{yi()}),window.addEventListener("resize",(0,yt.default)(e=>{gi()},100))}function Ie(){return Ce()?bt():Pe()}function Ce(){return document.body.classList.contains(F.opened)||document.body.classList.contains(F.opening)}function Pe(){return Lt(),Y(F.opening),sessionStorage.setItem("sidebar_state","opened"),new Promise((e,t)=>{P.togglingTimeout=setTimeout(()=>{Y(F.opened),e()},vt)})}function bt(){return Lt(),Y(F.closing),sessionStorage.setItem("sidebar_state","closed"),new Promise((e,t)=>{P.togglingTimeout=setTimeout(()=>{Y(F.closed),e()},vt)})}function Lt(){P.togglingTimeout&&(clearTimeout(P.togglingTimeout),P.togglingTimeout=null)}function gi(){P.lastWindowWidth!==window.innerWidth&&(P.lastWindowWidth=window.innerWidth,(P.sidebarPreference===D.OPEN||P.sidebarPreference===D.NO_PREF)&&xt())}function yi(){Et()&&Ce()&&bt()}function vi(){switch(P.sidebarPreference){case D.OPEN:P.sidebarPreference=D.CLOSED;break;case D.CLOSED:P.sidebarPreference=D.OPEN;break;case D.NO_PREF:Ce()?P.sidebarPreference=D.OPEN:P.sidebarPreference=D.CLOSED}}function J(){return window.sidebarNodes||{}}function Tt(){return window.versionNodes||[]}var Re={search:"search",extras:"extras",modules:"modules",tasks:"tasks"},wt=[Re.extras,Re.modules,Re.tasks],me="#full-list";function kt(){_t(J(),re()),It(),Ot(),xi()}function _t(e,t){let n=e[t]||[],i=c(me),r=Handlebars.templates["sidebar-items"]({nodes:n,group:""});i.innerHTML=r,Si(t),i.querySelectorAll("ul").forEach(s=>{if(s.innerHTML.trim()===""){let o=s.previousElementSibling;o.classList.contains("expand")&&o.classList.remove("expand"),s.remove()}}),i.querySelectorAll("li a").forEach(s=>{s.addEventListener("click",o=>{let a=o.target,u=a.closest("li"),l=i.querySelector(".current-section");if(a.matches(".icon-expand")){o.preventDefault(),u.classList.toggle("open");return}l&&l.classList.remove("current-section"),s.matches(".expand")&&s.pathname===window.location.pathname&&u.classList.add("open")})})}function Si(e){wt.forEach(t=>{let n=c(`#${t}-list-link`);n&&n.parentElement.classList.toggle("selected",t===e)})}function Ot(){let e=c(me),t=e.querySelector("li.current-page");t&&(t.scrollIntoView(),e.scrollTop-=40)}function It(){let e=fe()||"content",n=J()[re()]||[],i=rt(n,e),r=c(me),s=r.querySelector(`li.current-page a.expand[href$="#${i}"]`);s&&s.closest("li").classList.add("open");let o=r.querySelector(`li.current-page a[href$="#${e}"]`);if(o){let a=o.closest("ul");a.classList.contains("deflist")&&a.closest("li").classList.add("current-section"),o.closest("li").classList.add("current-hash")}}function xi(){wt.forEach(e=>{let t=c(`#${e}-list-link`);t&&t.addEventListener("click",n=>{n.preventDefault(),_t(J(),e),Ot()})}),window.addEventListener("hashchange",e=>{let n=c(me).querySelector("li.current-page li.current-hash");n&&n.classList.remove("current-hash"),It()})}var M={module:"module",moduleChild:"module-child",mixTask:"mix-task",extra:"extra",section:"section"};function Pt(e,t=5){if(K(e))return[];let n=J(),i=[...Ae(n.modules,e,M.module),...Ei(n.modules,e,M.moduleChild),...Ae(n.tasks,e,M.mixTask),...Ae(n.extras,e,M.extra),...Qe(n.modules,e,M.section),...Qe(n.tasks,e,M.section),...Qe(n.extras,e,M.section)].filter(r=>r!==null);return Oi(i).slice(0,t)}function Ae(e,t,n){return e.map(i=>Li(i,t,n))}function Ei(e,t,n){return e.filter(i=>i.nodeGroups).flatMap(i=>i.nodeGroups.flatMap(({key:r,nodes:s})=>{let o=_i(r);return s.map(a=>Ti(a,i.id,t,n,o)||ki(a,i.id,t,n,o))}))}function Qe(e,t,n){return e.flatMap(i=>bi(i).map(r=>wi(i,r,t,n)))}function bi(e){return(e.sections||[]).concat(e.headers||[])}function Li(e,t,n){return Ne(e.title,t)?{link:`${e.id}.html`,title:Se(e.title,t),label:null,description:null,matchQuality:ye(e.title,t),category:n}:null}function Ti(e,t,n,i,r){return Ne(e.id,n)?{link:`${t}.html#${e.anchor}`,title:Se(e.id,n),label:r,description:t,matchQuality:ye(e.id,n),category:i}:null}function wi(e,t,n,i){return Rt(t.id,n)?{link:`${e.id}.html#${t.anchor}`,title:Se(t.id,n),label:null,description:e.title,matchQuality:ye(t.id,n),category:i}:null}function ki(e,t,n,i,r){let s=`${t}.${e.id}`;if(!Ne(s,n))return null;let o=n.replace(/\./g," ");return Rt(e.id,o)?{link:`${t}.html#${e.anchor}`,title:Se(e.id,o),label:r,description:t,matchQuality:ye(s,n),category:i}:null}function _i(e){switch(e){case"callbacks":return"callback";case"types":return"type";default:return null}}function Oi(e){return e.slice().sort((t,n)=>t.matchQuality!==n.matchQuality?n.matchQuality-t.matchQuality:Ct(t.category)-Ct(n.category))}function Ct(e){switch(e){case M.module:return 1;case M.moduleChild:return 2;case M.mixTask:return 3;default:return 4}}function Rt(e,t){return ve(t).some(i=>At(e,i))}function Ne(e,t){return ve(t).every(i=>At(e,i))}function At(e,t){return e.toLowerCase().includes(t.toLowerCase())}function ye(e,t){let n=ve(t),r=n.map(o=>o.length).reduce((o,a)=>o+a,0)/e.length,s=Ii(e,n[0])?1:0;return r+s}function Ii(e,t){return e.toLowerCase().startsWith(t.toLowerCase())}function ve(e){return e.trim().split(/\s+/)}function Se(e,t){let n=ve(t).sort((i,r)=>r.length-i.length);return ge(e,n)}function ge(e,t){if(t.length===0)return e;let[n,...i]=t,r=e.match(new RegExp(`(.*)(${it(n)})(.*)`,"i"));if(r){let[,s,o,a]=r;return ge(s,t)+""+de(o)+""+ge(a,t)}else return ge(e,i)}var X=".autocomplete",xe=".autocomplete-suggestion",B={autocompleteSuggestions:[],selectedIdx:-1};function Ci(){c(X).classList.add("shown")}function He(){c(X).classList.remove("shown")}function Qt(){return c(X).classList.contains("shown")}function De(e){B.autocompleteSuggestions=Pt(e),B.selectedIdx=-1,K(e)?He():(Pi({term:e,suggestions:B.autocompleteSuggestions}),Ee(0),Ci())}function Pi({term:e,suggestions:t}){let n=Handlebars.templates["autocomplete-suggestions"]({suggestions:t,term:e}),i=c(X);i.innerHTML=n}function Nt(){return B.selectedIdx===-1?null:B.autocompleteSuggestions[B.selectedIdx]}function Ee(e){B.selectedIdx=Ri(e);let t=c(`${xe}.selected`),n=c(`${xe}[data-index="${B.selectedIdx}"]`);t&&t.classList.remove("selected"),n&&n.classList.add("selected")}function Ri(e){let t=B.autocompleteSuggestions.length+1;return(B.selectedIdx+e+1+t)%t-1}var se="form.sidebar-search input",Ai="form.sidebar-search .search-close-button";function Ht(){Qi()}function Dt(e){let t=c(se);t.value=e}function Ft(){c(se).focus()}function Qi(){let e=c(se);e.addEventListener("keydown",t=>{t.key==="Escape"?(be(),e.blur()):t.key==="Enter"?Ni(t):t.key==="ArrowUp"?(Ee(-1),t.preventDefault()):t.key==="ArrowDown"&&(Ee(1),t.preventDefault())}),e.addEventListener("input",t=>{De(t.target.value)}),e.addEventListener("focus",t=>{document.body.classList.add("search-focused"),De(t.target.value)}),e.addEventListener("blur",t=>{let n=t.relatedTarget;if(n){if(n.matches(xe))return setTimeout(()=>{Qt()&&e.focus()},1e3),null;n.matches(Ai)&&be()}Fe()}),c(X).addEventListener("click",t=>{t.shiftKey||t.ctrlKey?e.focus():(be(),Fe())})}function Ni(e){let t=c(se),n=e.shiftKey||e.ctrlKey,i=Nt();e.preventDefault();let r=n?"_blank":"_self",s=document.createElement("a");s.setAttribute("target",r),i?s.setAttribute("href",i.link):s.setAttribute("href",`search.html?q=${encodeURIComponent(t.value)}`),s.click(),n||(be(),Fe())}function be(){let e=c(se);e.value=""}function Fe(){document.body.classList.remove("search-focused"),He()}var Mt=".sidebar-projectVersion",Hi=".sidebar-projectVersionsDropdown";function Bt(){let e=Tt();if(e.length>0){let n=c(Mt).textContent.trim(),i=Fi(e,n);Di({nodes:i})}}function Di({nodes:e}){let t=c(Mt),n=Handlebars.templates["versions-dropdown"]({nodes:e});t.innerHTML=n,c(Hi).addEventListener("change",Bi)}function Fi(e,t){return Mi(e,t).map(i=>({...i,isCurrentVersion:i.version===t}))}function Mi(e,t){return e.some(i=>i.version===t)?e:[{version:t,url:"#"},...e]}function Bi(e){let t=e.target.value,n=window.location.pathname.split("/").pop()+window.location.hash,i=`${t}/${n}`;ot(i).then(r=>{r?window.location.href=i:window.location.href=t})}var I=nt($t());var Le=80,Vi="#search";function Ut(){if(window.location.pathname.endsWith("/search.html")){let e=st("q");zi(e)}}function zi(e){if(K(e))Me({value:e});else{Dt(e);let t=$i();try{let n=Yi(t.search(e));Me({value:e,results:n})}catch(n){Me({value:e,errorMessage:n.message})}}}function Me({value:e,results:t,errorMessage:n}){let i=c(Vi),r=Handlebars.templates["search-results"]({value:e,results:t,errorMessage:n});i.innerHTML=r}function $i(){I.default.QueryLexer.termSeparator=/\s+/,I.default.Pipeline.registerFunction(Be,"elixirTokenSplitter"),I.default.Pipeline.registerFunction(Ve,"elixirTrimmer"),I.default.Pipeline.registerFunction(ze,"hyphenSearch");let e=ji();if(e)return e;let t=qi();return Ui(t),t}function ji(){try{let e=sessionStorage.getItem(qt());return e?I.default.Index.load(JSON.parse(e)):null}catch(e){return console.error("Failed to load index: ",e),null}}function Ui(e){try{let t=JSON.stringify(e);sessionStorage.setItem(qt(),t)}catch(t){console.error("Failed to save index: ",t)}}function qt(){return`index:${he()}`}function qi(){return(0,I.default)(function(){this.tokenizer.separator=/\s+/,this.ref("ref"),this.field("title",{boost:3}),this.field("doc"),this.metadataWhitelist=["position"],this.pipeline.remove(I.default.stopWordFilter),this.use(Ki),this.use(Wi),this.pipeline.remove(I.default.trimmer),this.use(Gi),searchNodes.forEach(e=>{this.add(e)})})}function Wi(e){e.pipeline.before(I.default.stemmer,Be),e.searchPipeline.before(I.default.stemmer,Be)}function Be(e){let t=e.toString().split(/\.|\/|_/).map(n=>e.clone().update(()=>n));return t.length>1?[...t,e]:t}function Gi(e){e.pipeline.after(I.default.stemmer,Ve),e.searchPipeline.after(I.default.stemmer,Ve)}function Ve(e){return e.update(function(t){return t.replace(/^@?\W+/,"").replace(/\W+$/,"")})}function ze(e){if(e.toString().indexOf("-")<0)return e;let n=[];return n.push(e.clone(function(i){return i.replace("-","")})),n.push(e),n}function Ki(e){e.pipeline.before(I.default.stemmer,ze),e.searchPipeline.before(I.default.stemmer,ze)}function Yi(e){return e.filter(t=>jt(t.ref)).map(t=>{let n=jt(t.ref),i=t.matchData.metadata;return{...n,metadata:i,excerpts:Ji(n,i)}})}function jt(e){return searchNodes.find(t=>t.ref===e)||null}function Ji(e,t){let{doc:n}=e,r=Object.keys(t).filter(s=>"doc"in t[s]).map(s=>t[s].doc.position.map(([o,a])=>Xi(n,o,a))).reduce((s,o)=>s.concat(o),[]);return r.length===0?[n.slice(0,Le*2)+(Le*20?"...":"",e.slice(i,t),""+de(e.slice(t,t+n))+"",e.slice(t+n,r),r{clearTimeout(Te),e.target.classList.remove("show")});function $e(e){Z&&(clearTimeout(Te),Z.innerText=e,Z.classList.add("show"),Te=setTimeout(()=>{Z.classList.remove("show"),Te=setTimeout(function(){Z.innerText=""},1e3)},5e3))}var Wt="dark",je=["system","dark","light"];function Gt(){O.getAndSubscribe(e=>{document.body.classList.toggle(Wt,Yt(e))}),er()}function Kt(){let t=O.get().theme||"system",n=je[je.indexOf(t)+1]||je[0];O.update({theme:n}),$e(`Set theme to "${n}"`)}function Yt(e){return e.theme==="dark"||Zi()&&(e.theme==null||e.theme==="system")}function Zi(){return window.matchMedia("(prefers-color-scheme: dark)").matches}function er(){window.matchMedia("(prefers-color-scheme: dark)").addListener(e=>{let t=O.get(),n=Yt(t);(t.theme==null||t.theme==="system")&&(document.body.classList.toggle(Wt,n),$e(`Browser changed theme to "${n?"dark":"light"}"`))})}var tr="hll";function Xt(){nr()}function nr(){k("[data-group-id]").forEach(t=>{let n=t.getAttribute("data-group-id");t.addEventListener("mouseenter",i=>{Jt(n,!0)}),t.addEventListener("mouseleave",i=>{Jt(n,!1)})})}function Jt(e,t){k(`[data-group-id="${e}"]`).forEach(i=>{i.classList.toggle(tr,t)})}var ee="#modal",ir="#modal .modal-close",rr="#modal .modal-title",sr="#modal .modal-body",Zt='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',V={prevFocus:null,lastFocus:null,ignoreFocusChanges:!1};function en(){or()}function or(){let e=Handlebars.templates["modal-layout"]();document.body.insertAdjacentHTML("beforeend",e),c(ee).addEventListener("keydown",t=>{t.key==="Escape"&&oe()}),c(ir).addEventListener("click",t=>{oe()})}function tn(e){if(V.ignoreFocusChanges)return;let t=c(ee);if(t.contains(e.target))V.lastFocus=e.target;else{V.ignoreFocusChanges=!0;let n=ar(t);V.lastFocus===n?cr(t).focus():n.focus(),V.ignoreFocusChanges=!1,V.lastFocus=document.activeElement}}function ar(e){return e.querySelector(Zt)}function cr(e){let t=e.querySelectorAll(Zt);return t[t.length-1]}function we({title:e,body:t}){V.prevFocus=document.activeElement,document.addEventListener("focus",tn,!0),c(rr).innerHTML=e,c(sr).innerHTML=t,c(ee).classList.add("shown"),c(ee).focus()}function oe(){c(ee).classList.remove("shown"),document.addEventListener("focus",tn,!0),V.prevFocus&&V.prevFocus.focus(),V.prevFocus=null}function nn(){return c(ee).classList.contains("shown")}var lr="https://hexdocs.pm/%%",ur="https://hex.pm/api/packages?search=name:%%*",dr=".display-quick-switch",Ue="#quick-switch-input",sn="#quick-switch-results",fr=".quick-switch-result",hr=300,pr=9,mr=["elixir","eex","ex_unit","hex","iex","logger","mix"].map(e=>({name:e})),on=2,R={autocompleteResults:[],selectedIdx:null};function an(){gr()}function gr(){k(dr).forEach(e=>{e.addEventListener("click",t=>{We()})})}function yr(e){if(e.key==="Enter"){let t=e.target.value;Sr(t),e.preventDefault()}else e.key==="ArrowUp"?(rn(-1),e.preventDefault()):e.key==="ArrowDown"&&(rn(1),e.preventDefault())}function vr(e){let t=e.target.value;if(t.lengthn.json()).then(n=>{Array.isArray(n)&&(R.autocompleteResults=Lr(e,n),R.selectedIdx=null,c(Ue).value.length>=on&&br({results:R.autocompleteResults}))})}function br({results:e}){let t=c(sn),n=Handlebars.templates["quick-switch-results"]({results:e});t.innerHTML=n,k(fr).forEach(i=>{i.addEventListener("click",r=>{let s=i.getAttribute("data-index"),o=R.autocompleteResults[s];qe(o.name)})})}function Lr(e,t){return mr.concat(t).filter(n=>n.name.toLowerCase().includes(e.toLowerCase())).filter(n=>n.releases===void 0||n.releases[0].has_docs===!0).slice(0,pr)}function rn(e){R.selectedIdx=Tr(e);let t=c(".quick-switch-result.selected"),n=c(`.quick-switch-result[data-index="${R.selectedIdx}"]`);t&&t.classList.remove("selected"),n&&n.classList.add("selected")}function Tr(e){let t=R.autocompleteResults.length;if(R.selectedIdx===null){if(e>=0)return 0;if(e<0)return t-1}return(R.selectedIdx+e+t)%t}var wr=".display-settings",kr="#settings-modal-content",Ge="#modal-settings-tab",Ke="#modal-keyboard-shortcuts-tab",ln="#settings-content",un="#keyboard-shortcuts-content",_r=[{title:"Settings",id:"modal-settings-tab"},{title:"Keyboard shortcuts",id:"modal-keyboard-shortcuts-tab"}];function dn(){Or()}function Or(){k(wr).forEach(e=>{e.addEventListener("click",t=>{Ye()})})}function cn(){c(Ke).classList.remove("active"),c(Ge).classList.add("active"),c(ln).classList.remove("hidden"),c(un).classList.add("hidden")}function Ir(){c(Ke).classList.add("active"),c(Ge).classList.remove("active"),c(un).classList.remove("hidden"),c(ln).classList.add("hidden")}function Ye(){we({title:_r.map(({id:s,title:o})=>``).join(""),body:Handlebars.templates["settings-modal-body"]({shortcuts:Je})});let e=c(kr),t=e.querySelector('[name="theme"]'),n=e.querySelector('[name="tooltips"]'),i=e.querySelector('[name="direct_livebook_url"]'),r=e.querySelector('[name="livebook_url"]');O.getAndSubscribe(s=>{t.value=s.theme||"system",n.checked=s.tooltips,s.livebookUrl===null?(i.checked=!1,r.classList.add("hidden"),r.tabIndex=-1):(i.checked=!0,r.classList.remove("hidden"),r.tabIndex=0,r.value=s.livebookUrl)}),t.addEventListener("change",s=>{O.update({theme:s.target.value})}),n.addEventListener("change",s=>{O.update({tooltips:s.target.checked})}),i.addEventListener("change",s=>{let o=s.target.checked?r.value:null;O.update({livebookUrl:o})}),r.addEventListener("input",s=>{O.update({livebookUrl:s.target.value})}),c(Ge).addEventListener("click",s=>{cn()}),c(Ke).addEventListener("click",s=>{Ir()}),cn()}var Cr="#settings-modal-content",Je=[{key:"c",description:"Toggle sidebar",action:Ie},{key:"n",description:"Cycle themes",action:Kt},{key:"s",description:"Focus search bar",displayAs:"/ or s",action:fn},{key:"/",action:fn},{key:"g",description:"Search HexDocs package",displayAs:"g",action:We},{key:"?",displayAs:"?",description:"Bring up this modal",action:Qr}],Xe={shortcutBeingPressed:null};function hn(){Pr()}function Pr(){document.addEventListener("keydown",Rr),document.addEventListener("keyup",Ar)}function Rr(e){if(Xe.shortcutBeingPressed||e.target.matches("input, textarea")||e.ctrlKey||e.metaKey||e.altKey)return;let t=Je.find(n=>n.key===e.key);t&&(Xe.shortcutBeingPressed=t,e.preventDefault(),t.action(e))}function Ar(e){Xe.shortcutBeingPressed=null}function fn(e){oe(),Pe(),Ft()}function Qr(){Nr()?oe():Ye()}function Nr(){return nn()&&c(Cr)}var q={plain:"plain",function:"function",module:"module"},Hr=[{href:"typespecs.html#basic-types",hint:{kind:q.plain,description:"Basic type"}},{href:"typespecs.html#literals",hint:{kind:q.plain,description:"Literal"}},{href:"typespecs.html#built-in-types",hint:{kind:q.plain,description:"Built-in type"}}],ke={cancelHintFetching:null};function pn(e){if(gn(e))return!0;let t=/#.*\//;return e.includes("#")&&!t.test(e)?!1:e.includes(".html")}function mn(e){let t=gn(e);return t?Promise.resolve(t):Dr(e)}function gn(e){let t=Hr.find(n=>e.includes(n.href));return t?t.hint:null}function Dr(e){let t=e.replace(".html",".html?hint=true");return new Promise((n,i)=>{let r=document.createElement("iframe");r.setAttribute("sandbox","allow-scripts allow-same-origin"),r.setAttribute("src",t),r.style.display="none";function s(a){let{href:u,hint:l}=a.data;t===u&&(o(),n(l))}ke.cancelHintFetching=()=>{o(),i(new Error("cancelled"))};function o(){r.remove(),window.removeEventListener("message",s),ke.cancelHintFetching=null}window.addEventListener("message",s),document.body.appendChild(r)})}function yn(){ke.cancelHintFetching&&ke.cancelHintFetching()}function vn(e){let n=e.querySelector("h1").textContent,i=e.querySelector(".docstring > p"),r=i?i.innerHTML:"";return{kind:q.function,title:n.trim(),description:r.trim()}}function Sn(e){let n=e.querySelector("h1 > span").textContent,i=e.querySelector("#moduledoc p"),r=i?i.innerHTML:"";return{kind:q.module,title:n.trim(),description:r.trim()}}var Fr=".content a",Ze="#tooltip",Mr="#tooltip .tooltip-body",En="body .content-inner",Br="#content",bn="tooltip-shown",ae=10,Vr=ae*4,xn={height:450,width:768},zr=100,te={currentLinkElement:null,hoverDelayTimeout:null};function Ln(){$r(),jr()}function $r(){let e=Handlebars.templates["tooltip-layout"]();c(En).insertAdjacentHTML("beforeend",e)}function jr(){k(Fr).forEach(e=>{Ur(e)&&(e.addEventListener("mouseenter",t=>{Wr(e)}),e.addEventListener("mouseleave",t=>{Jr(e)}))})}function Ur(e){return!(e.classList.contains("detail-link")||qr(e.href)||!pn(e.href))}function qr(e){let t=e.replace(Br,"");return window.location.href.split("#")[0]===t}function Wr(e){Gr()&&(te.currentLinkElement=e,te.hoverDelayTimeout=setTimeout(()=>{mn(e.href).then(t=>{Kr(t),Yr()}).catch(()=>{})},zr))}function Gr(){let e=window.innerWidthe.firstElementChild&&e.firstElementChild.tagName==="CODE").forEach(e=>e.insertAdjacentHTML("beforeend",as)),Array.from(k(".copy-button")).forEach(e=>{let t;e.addEventListener("click",()=>{t&&clearTimeout(t);let n=Array.from(e.parentElement.querySelector("code").childNodes).filter(i=>!(i.tagName==="SPAN"&&i.classList.contains("unselectable"))).map(i=>i.textContent).join("");navigator.clipboard.writeText(n),e.classList.add("clicked"),t=setTimeout(()=>e.classList.remove("clicked"),3e3)})})}function On(){let t=/(Macintosh|iPhone|iPad|iPod)/.test(window.navigator.userAgent)?"apple-os":"non-apple-os";document.documentElement.classList.add(t)}at(()=>{Gt(),St(),kt(),Ht(),Bt(),dt(),Xt(),en(),hn(),an(),Ln(),kn(),Ut(),_n(),dn(),On()});})(); +/*! Bundled license information: + +lunr/lunr.js: + (** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 + * Copyright (C) 2020 Oliver Nightingale + * @license MIT + *) + (*! + * lunr.utils + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Set + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.tokenizer + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Pipeline + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Vector + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.stemmer + * Copyright (C) 2020 Oliver Nightingale + * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt + *) + (*! + * lunr.stopWordFilter + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.trimmer + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.TokenSet + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Index + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Builder + * Copyright (C) 2020 Oliver Nightingale + *) +*/ diff --git a/dist/html-elixir-HHVY3JYD.css b/dist/html-elixir-HHVY3JYD.css new file mode 100644 index 000000000..0affec2a6 --- /dev/null +++ b/dist/html-elixir-HHVY3JYD.css @@ -0,0 +1,6 @@ +:root{--main: hsl(250, 68%, 69%);--main-darkened-10: hsl(250, 68%, 59%);--main-darkened-20: hsl(250, 68%, 49%);--main-lightened-05: hsl(250, 68%, 74%);--main-lightened-10: hsl(250, 68%, 79%)}@font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:300;src:url(./lato-latin-ext-300-normal-VPGGJKJL.woff2) format("woff2"),url(./lato-all-300-normal-GIV56FBX.woff) format("woff");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:300;src:url(./lato-latin-300-normal-YUMVEFOL.woff2) format("woff2"),url(./lato-all-300-normal-GIV56FBX.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:400;src:url(./lato-latin-ext-400-normal-N27NCBWW.woff2) format("woff2"),url(./lato-all-400-normal-MNITWADU.woff) format("woff");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:400;src:url(./lato-latin-400-normal-W7754I4D.woff2) format("woff2"),url(./lato-all-400-normal-MNITWADU.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:700;src:url(./lato-latin-ext-700-normal-Q2L5DVMW.woff2) format("woff2"),url(./lato-all-700-normal-XMT5XFBS.woff) format("woff");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:700;src:url(./lato-latin-700-normal-2XVSBPG4.woff2) format("woff2"),url(./lato-all-700-normal-XMT5XFBS.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Merriweather;font-style:normal;font-display:swap;font-weight:300;src:url(./merriweather-cyrillic-ext-300-normal-5LF5LCEK.woff2) format("woff2"),url(./merriweather-all-300-normal-VL6BT3UN.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Merriweather;font-style:normal;font-display:swap;font-weight:300;src:url(./merriweather-cyrillic-300-normal-7PAAHU3N.woff2) format("woff2"),url(./merriweather-all-300-normal-VL6BT3UN.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Merriweather;font-style:normal;font-display:swap;font-weight:300;src:url(./merriweather-vietnamese-300-normal-U376L4Z4.woff2) format("woff2"),url(./merriweather-all-300-normal-VL6BT3UN.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:Merriweather;font-style:normal;font-display:swap;font-weight:300;src:url(./merriweather-latin-ext-300-normal-K6L27CZ5.woff2) format("woff2"),url(./merriweather-all-300-normal-VL6BT3UN.woff) format("woff");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Merriweather;font-style:normal;font-display:swap;font-weight:300;src:url(./merriweather-latin-300-normal-RWDJH4FN.woff2) format("woff2"),url(./merriweather-all-300-normal-VL6BT3UN.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Merriweather;font-style:italic;font-display:swap;font-weight:300;src:url(./merriweather-cyrillic-ext-300-italic-JP3ZEV2P.woff2) format("woff2"),url(./merriweather-all-300-italic-CMQNB6FA.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Merriweather;font-style:italic;font-display:swap;font-weight:300;src:url(./merriweather-cyrillic-300-italic-M6KMXZSZ.woff2) format("woff2"),url(./merriweather-all-300-italic-CMQNB6FA.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Merriweather;font-style:italic;font-display:swap;font-weight:300;src:url(./merriweather-vietnamese-300-italic-EHHNZPUO.woff2) format("woff2"),url(./merriweather-all-300-italic-CMQNB6FA.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:Merriweather;font-style:italic;font-display:swap;font-weight:300;src:url(./merriweather-latin-ext-300-italic-MWCA36KE.woff2) format("woff2"),url(./merriweather-all-300-italic-CMQNB6FA.woff) format("woff");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Merriweather;font-style:italic;font-display:swap;font-weight:300;src:url(./merriweather-latin-300-italic-353COS6Q.woff2) format("woff2"),url(./merriweather-all-300-italic-CMQNB6FA.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inconsolata;font-style:normal;font-display:swap;font-weight:400;src:url(./inconsolata-vietnamese-400-normal-IGQPHHJH.woff2) format("woff2"),url(./inconsolata-all-400-normal-HMVRHNDU.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inconsolata;font-style:normal;font-display:swap;font-weight:400;src:url(./inconsolata-latin-ext-400-normal-K7HVGTP7.woff2) format("woff2"),url(./inconsolata-all-400-normal-HMVRHNDU.woff) format("woff");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inconsolata;font-style:normal;font-display:swap;font-weight:400;src:url(./inconsolata-latin-400-normal-RGKDDNDD.woff2) format("woff2"),url(./inconsolata-all-400-normal-HMVRHNDU.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inconsolata;font-style:normal;font-display:swap;font-weight:700;src:url(./inconsolata-vietnamese-700-normal-LHEGSN35.woff2) format("woff2"),url(./inconsolata-all-700-normal-WFUKXZPS.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inconsolata;font-style:normal;font-display:swap;font-weight:700;src:url(./inconsolata-latin-ext-700-normal-4MPBLFZC.woff2) format("woff2"),url(./inconsolata-all-700-normal-WFUKXZPS.woff) format("woff");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inconsolata;font-style:normal;font-display:swap;font-weight:700;src:url(./inconsolata-latin-700-normal-DTS2D7TO.woff2) format("woff2"),url(./inconsolata-all-700-normal-WFUKXZPS.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}:root{--content-width: 949px;--content-gutter: 60px;--serifFontFamily: "Merriweather", "Book Antiqua", Georgia, "Century Schoolbook", serif;--sansFontFamily: "Lato", sans-serif;--monoFontFamily: "Inconsolata", Menlo, Courier, monospace;--baseFontSize: 18px;--baseLineHeight: 1.5em;--gray25: hsl(207, 43%, 98% );--gray50: hsl(207, 43%, 96% );--gray100: hsl(212, 33%, 91% );--gray200: hsl(210, 29%, 88% );--gray300: hsl(210, 26%, 84% );--gray400: hsl(210, 21%, 64% );--gray500: hsl(210, 21%, 34% );--gray600: hsl(210, 27%, 26% );--gray700: hsl(212, 35%, 17% );--gray800: hsl(216, 52%, 11% );--gray800-opacity-0: hsla(216, 52%, 11%, 0%);--gray900: hsl(218, 73%, 4% );--gray900-opacity-50: hsla(218, 73%, 4%, 50%);--gray900-opacity-0: hsla(218, 73%, 4%, 0%);--coldGrayFaint: hsl(240, 5%, 97% );--coldGrayLight: hsl(240, 5%, 88% );--coldGray-lightened-10: hsl(240, 5%, 56% );--coldGray: hsl(240, 5%, 46% );--coldGrayDark: hsl(240, 5%, 28% );--coldGrayDim: hsl(240, 5%, 18% );--yellowLight: hsl( 60, 100%, 81% );--yellowDark: hsl( 60, 100%, 43%, 62%);--yellow: hsl( 60, 100%, 43% );--green-lightened-10: hsl( 90, 100%, 45% );--green: hsl( 90, 100%, 35% );--white: hsl( 0, 0%, 100% );--white-opacity-50: hsla( 0, 0%, 100%, 50%);--white-opacity-10: hsla( 0, 0%, 100%, 10%);--white-opacity-0: hsla( 0, 0%, 100%, 0%);--black: hsl( 0, 0%, 0% );--black-opacity-10: hsla( 0, 0%, 0%, 10%);--black-opacity-50: hsla( 0, 0%, 0%, 50%)}@media screen and (max-width: 768px){:root{--content-width: 100%;--content-gutter: 20px}}:root{--background: var(--white);--contrast: var(--black);--textBody: var(--gray700);--textHeaders: var(--gray800);--textDetailBackground: var(--coldGrayFaint);--textFooter: var(--gray600);--links: var(--black);--linksVisited: var(--black);--linksNoUnderline: var(--main-darkened-10);--linksNoUnderlineVisited: var(--main-darkened-20);--iconAction: var(--coldGray);--iconActionHover: var(--gray800);--blockquoteBackground: var(--coldGrayFaint);--blockquoteBorder: var(--coldGrayLight);--warningBackground: hsl( 33, 100%, 97%);--warningHeadingBackground: hsl( 33, 87%, 64%);--warningHeading: var(--black);--errorBackground: hsl( 7, 81%, 96%);--errorHeadingBackground: hsl( 6, 80%, 60%);--errorHeading: var(--white);--infoBackground: hsl(206, 91%, 96%);--infoHeadingBackground: hsl(213, 92%, 62%);--infoHeading: var(--white);--neutralBackground: hsl(212, 29%, 92%);--neutralHeadingBackground: hsl(220, 43%, 11%);--neutralHeading: var(--white);--tipBackground: hsl(142, 31%, 93%);--tipHeadingBackground: hsl(134, 39%, 36%);--tipHeading: var(--white);--fnSpecAttr: var(--coldGray);--fnDeprecated: var(--yellowLight);--blink: var(--yellowLight);--codeBackground: var(--gray25);--codeBorder: var(--gray100);--inlineCodeBackground: var(--codeBackground);--inlineCodeBorder: var(--codeBorder);--codeScrollThumb: var(--gray400);--codeScrollBackground: var(--codeBorder);--bottomActionsBtnBorder: var(--black-opacity-10);--bottomActionsBtnSubheader: var(--main-darkened-10);--modalBackground: var(--white);--settingsInput: var(--gray500);--settingsInputBackground: var(--white);--settingsInputBorder: var(--gray300);--settingsSectionBorder: var(--gray300);--quickSwitchInput: var(--gray500);--quickSwitchContour: var(--coldGray);--success: var(--green);--sidebarButtonBackground: linear-gradient(180deg, var(--gray900) 20%, var(--gray900-opacity-50) 70%, var(--gray900-opacity-0) 100%);--sidebarAccentMain: var(--gray50);--sidebarBackground: var(--gray800);--sidebarGradient: linear-gradient(var(--sidebarBackground), var(gray800-opacity-0));--sidebarHeader: var(--gray700);--sidebarMuted: var(--gray300);--sidebarHover: var(--white);--sidebarScrollbarThumb: var(--coldGray);--sidebarScrollbarTrack: var(--sidebarBackground);--sidebarSearch: var(--gray700);--sidebarSubheadings: var(--gray400);--sidebarItem: var(--gray200);--sidebarInactiveItemMarker: var(--gray600);--sidebarLanguageAccentBar: var(--main);--sidebarActiveItem: var(--main-lightened-10)}body.dark{--background: var(--gray900);--contrast: var(--white);--textBody: var(--gray200);--textHeaders: var(--gray100);--textDetailBackground: var(--gray700);--textFooter: var(--gray300);--links: var(--gray100);--linksVisited: var(--gray100);--linksNoUnderline: var(--main-lightened-10);--linksNoUnderlineVisited: var(--main-lightened-05);--iconAction: var(--coldGray-lightened-10);--iconActionHover: var(--white);--blockquoteBackground: var(--coldGrayDim);--blockquoteBorder: var(--coldGrayDark);--warningBackground: hsl( 40, 67%, 79%);--warningHeadingBackground: hsl( 27, 66%, 29%);--warningHeading: var(--white);--errorBackground: hsl(358, 52%, 78%);--errorHeadingBackground: hsl(349, 55%, 34%);--errorHeading: var(--white);--infoBackground: hsl(222, 57%, 77%);--infoHeadingBackground: hsl(243, 65%, 26%);--infoHeading: var(--white);--neutralBackground: hsl(220, 23%, 82%);--neutralHeadingBackground: hsl(224, 24%, 16%);--neutralHeading: var(--white);--tipBackground: hsl(139, 26%, 69%);--tipHeadingBackground: hsl(158, 35%, 17%);--tipHeading: var(--white);--fnSpecAttr: var(--gray500);--fnDeprecated: var(--yellowDark);--blink: var(--gray600);--codeBackground: var(--gray800);--codeBorder: var(--gray700);--inlineCodeBackground: var(--gray50);--inlineCodeBorder: var(--gray100);--codeScrollThumb: var(--gray500);--codeScrollBackground: var(--codeBorder);--bottomActionsBtnBorder: var(--white-opacity-10);--bottomActionsBtnSubheader: var(--main);--modalBackground: var(--gray800);--settingsInput: var(--white);--settingsInputBackground: var(--gray700);--settingsInputBorder: var(--gray700);--settingsSectionBorder: var(--gray700);--quickSwitchInput: var(--gray300);--quickSwitchContour: var(--gray500);--success: var(--green-lightened-10);--sidebarButtonBackground: linear-gradient(180deg, var(--gray900) 20%, var(--gray900-opacity-50) 70%, var(--gray900-opacity-0) 100%);--sidebarAccentMain: var(--gray50);--sidebarBackground: var(--gray800);--sidebarGradient: linear-gradient(var(--sidebarBackground), var(gray800-opacity-0));--sidebarHeader: var(--gray700);--sidebarMuted: var(--gray300);--sidebarHover: var(--white);--sidebarScrollbarThumb: var(--coldGray);--sidebarScrollbarTrack: var(--sidebarBackground);--sidebarSearch: var(--gray700);--sidebarSubheadings: var(--gray400);--sidebarItem: var(--gray200);--sidebarInactiveItemMarker: var(--gray600);--sidebarLanguageAccentBar: var(--main);--sidebarActiveItem: var(--main-lightened-10)}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}@font-face{font-family:remixicon;src:url(./remixicon-NKANDIL5.woff2) format("woff2");font-display:swap}[class^=ri-],[class*=" ri-"],.remix-icon{font-family:remixicon;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:root{--icon-arrow-up-s: "\ea78";--icon-arrow-down-s: "\ea4e";--icon-arrow-right-s: "\ea6e";--icon-add: "\ea13";--icon-subtract: "\f1af";--icon-error-warning: "\eca1";--icon-information: "\ee59";--icon-alert: "\ea21";--icon-double-quotes-l: "\ec51";--icon-link-m: "\eeaf";--icon-close-line: "\eb99";--icon-code-s-slash-line: "\ebad";--icon-menu-line: "\ef3e";--icon-search-2-line: "\f0cd";--icon-settings-3-line: "\f0e6";--icon-printer-line: "\f029"}.ri-lg{font-size:1.3333em;line-height:.75em;vertical-align:-.0667em}.ri-settings-3-line:before{content:var(--icon-settings-3-line)}.ri-add-line:before{content:var(--icon-add)}.ri-subtract-line:before{content:var(--icon-subtract)}.ri-arrow-up-s-line:before{content:var(--icon-arrow-up-s)}.ri-arrow-down-s-line:before{content:var(--icon-arrow-down-s)}.ri-arrow-right-s-line:before{content:var(--icon-arrow-right-s)}.ri-search-2-line:before{content:var(--icon-search-2-line)}.ri-menu-line:before{content:var(--icon-menu-line)}.ri-close-line:before{content:var(--icon-close-line)}.ri-link-m:before{content:var(--icon-link-m)}.ri-code-s-slash-line:before{content:var(--icon-code-s-slash-line)}.ri-error-warning-line:before{content:var(--icon-error-warning)}.ri-information-line:before{content:var(--icon-information)}.ri-alert-line:before{content:var(--icon-alert)}.ri-double-quotes-l:before{content:var(--icon-double-quotes-l)}.ri-printer-line:before{content:var(--icon-printer-line)}html,body{box-sizing:border-box;height:100%;width:100%}body{background-color:var(--background);color:var(--textBody);font-size:16px;font-family:var(--sansFontFamily);line-height:1.6875em}*,*:before,*:after{box-sizing:inherit}.main{display:flex;justify-content:flex-end;height:100%}.sidebar{display:flex;flex-direction:column;width:300px;height:100%;position:fixed;top:0;left:0;z-index:4}.sidebar-button{--sidebarButtonTopOpen: 6px;position:fixed;z-index:99;left:0;top:0;transition:all .3s ease-in-out;will-change:transform}.content{width:calc(100% - 300px);left:300px;height:100%;position:absolute;z-index:3}@media screen and (max-width: 768px){.content{overflow:auto;scroll-padding-top:45px}}body:is(.sidebar-opening,.sidebar-opened) .sidebar-button{transform:translate(250px);top:var(--sidebarButtonTopOpen)}body.sidebar-opening .sidebar{left:0;transition:left .3s ease-in-out}body.sidebar-opening .content{width:calc(100% - 300px);left:300px;transition:all .3s ease-in-out}body.sidebar-closing .sidebar-button{transform:translate(0)}body.sidebar-closing .sidebar{left:-300px;transition:left .3s ease-in-out}body.sidebar-closing .content{width:100%;left:0;transition:all .3s ease-in-out}body.sidebar-closed .sidebar{left:-300px}body.sidebar-closed .content{width:100%;left:0}@media screen and (max-width: 768px){.sidebar-button:before{--sidebarButtonHeight: 60px;content:"";display:block;z-index:-1;pointer-events:none;position:fixed;left:-1px;top:0;height:var(--sidebarButtonHeight);width:calc(100vw + 2px);background:var(--sidebarButtonBackground);transition:top .3s ease-in-out}body:is(.sidebar-closed,.sidebar-closing) .sidebar-button:before{top:0}body:is(.sidebar-opening,.sidebar-opened) .sidebar-button:before{top:calc(-1 * var(--sidebarButtonHeight) - var(--sidebarButtonTopOpen))}body.sidebar-opened .sidebar-button:before{opacity:0}}body.search-focused .sidebar-button{transform:translate(250px) scaleY(0);transition:all .15s ease-out;opacity:0}body.search-focused .sidebar-search .search-close-button{transform:scaleY(1);transition:transform .15s ease-out .15s}.content-inner{max-width:var(--content-width);margin:0 auto;padding:3px var(--content-gutter)}.content-inner:focus{outline:none}.content-outer{min-height:100%}@media screen and (max-width: 768px){.content,body.sidebar-opening .content{left:0;width:100%}.content-inner{padding-top:10px;padding-bottom:27px;overflow-x:auto}}.sidebar{font-family:var(--sansFontFamily);font-size:16px;font-weight:300;line-height:18px;background-color:var(--sidebarBackground);color:var(--sidebarAccentMain);overflow:hidden;scrollbar-color:var(--sidebarScrollbarThumb) var(--sidebarScrollbarTrack)}.non-apple-os .sidebar{font-weight:400}.sidebar .gradient{background:var(--sidebarGradient);height:20px;margin-top:-20px;pointer-events:none;position:relative;top:20px;z-index:100}.sidebar ul{list-style:none}.sidebar ul li{margin:0;padding:0 10px}.sidebar a{color:var(--sidebarAccentMain);text-decoration:none;transition:color .3s ease-in-out}.sidebar a:hover{color:var(--sidebarHover)}.sidebar .sidebar-header{margin:12px;border-radius:4px;background-color:var(--sidebarHeader);width:276px}.sidebar .sidebar-projectDetails{display:inline-block;text-align:left;vertical-align:top;margin:6px 0 0 10px}.sidebar .sidebar-projectImage{display:inline-block;max-width:48px;max-height:48px;margin:0 0 0 10px;vertical-align:bottom}.sidebar .sidebar-projectName{font-weight:700;font-size:20px;line-height:30px;color:var(--sidebarAccentMain);margin:0;padding:0;max-width:230px;word-wrap:break-word}.sidebar .sidebar-projectVersion{display:block;position:relative;margin:0;padding:0;font-size:16px;line-height:20px;color:var(--sidebarMuted)}.sidebar .sidebar-projectVersionsDropdown{cursor:pointer;position:relative;margin:0;padding:0 0 0 12px;border:none;-webkit-appearance:none;appearance:none;background-color:transparent;color:var(--sidebarMuted);z-index:2}.sidebar .sidebar-projectVersionsDropdown option{color:initial}.sidebar .sidebar-projectVersionsDropdown:focus{outline:none}.sidebar .sidebar-projectVersion form:after{position:absolute;left:0;top:2px;content:"\25bc";z-index:1;font-size:8px;color:var(--sidebarMuted)}.sidebar .sidebar-projectVersionsDropdown::-ms-expand{display:none}.sidebar .sidebar-listNav{padding:12px 0 0;margin:0}.sidebar .sidebar-listNav :is(li,li a){text-transform:uppercase;font-size:14px;color:var(--sidebarMuted)}.sidebar .sidebar-listNav li{display:inline-block;padding:0}.sidebar .sidebar-listNav li a{display:inline-block;line-height:27px;border-bottom:3px solid transparent;padding:0 10px}.sidebar .sidebar-listNav li:is(:hover,.selected) a{border-color:var(--sidebarLanguageAccentBar)}.sidebar .sidebar-listNav li:is(:hover,.selected) a{color:var(--sidebarAccentMain)}.sidebar .sidebar-search{margin-top:12px}.sidebar .sidebar-search.selected .search-button,.sidebar .sidebar-search .search-button:hover{color:var(--sidebarLanguageAccentBar);opacity:1}.sidebar .sidebar-search .search-label{position:relative;width:100%}.sidebar .sidebar-search .search-button{font-size:14px;color:var(--sidebarAccentMain);background-color:transparent;border:none;cursor:pointer;left:22px;margin:0;opacity:.5;padding:3px 1px 3px 0;position:absolute;top:18px;z-index:2}.sidebar .sidebar-search .search-close-button{font-size:16px;color:var(--sidebarAccentMain);background-color:transparent;border:none;cursor:pointer;right:18px;margin:0;opacity:.5;padding:5px 1px 5px 0;position:absolute;transform:scaleY(0);top:17px;transition:.15s transform ease-out;z-index:2}.sidebar .sidebar-search .search-close-button:hover{opacity:.7}.sidebar .sidebar-search .search-close-button:is(:focus,:hover){outline:none}.sidebar .sidebar-search .search-input{background-color:var(--sidebarSearch);border:none;border-radius:4px;color:var(--sidebarAccentMain);margin-left:12px;padding:8px 6px 8px 38px;width:276px}.sidebar .sidebar-search .search-input:is(:focus,:hover){outline:none}.sidebar .sidebar-search .ri-search-2-line{font-weight:700}.sidebar #full-list{margin:0;padding:20px 0;overflow-y:auto;overscroll-behavior:contain;position:relative;-webkit-overflow-scrolling:touch;flex:1 1 .01%}.sidebar #full-list li{padding:0;margin-right:30px;line-height:27px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidebar #full-list li.docs{margin-right:0}.sidebar #full-list li.open>ul{display:block;margin-left:10px}.sidebar #full-list li a span.icon-expand:after{font-family:remixicon;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.sidebar #full-list li a.expand>span.icon-expand:after{content:var(--icon-arrow-down-s);margin-right:10px;font-size:1.2em;position:absolute;right:0}.sidebar #full-list li.open>a.expand>span.icon-expand:after{content:var(--icon-arrow-up-s)}.sidebar #full-list li.docs>a>span.icon-expand:after{margin-right:12px;content:var(--icon-add);font-size:1em;position:absolute;right:0}.sidebar #full-list li.docs.open>a>span.icon-expand:after{content:var(--icon-subtract)}.sidebar #full-list li.nesting-context{font-weight:700;font-size:.9em;line-height:1.8em;color:var(--sidebarSubheadings);padding-left:15px}.sidebar #full-list li.group{text-transform:uppercase;font-weight:700;font-size:.8em;margin:1.5em 0 0;line-height:1.8em;color:var(--sidebarSubheadings);padding-left:15px}.sidebar #full-list li a{padding:3px 0 3px 15px;color:var(--sidebarItem);overflow:hidden}.sidebar #full-list>li>a{display:block;width:100%;height:27px;line-height:20px}.sidebar #full-list li a.expand,.sidebar #full-list li .sections-list>li{text-overflow:ellipsis}.sidebar #full-list li .current-section>a{color:var(--sidebarActiveItem)}.sidebar #full-list>li>a:hover{border-left:3px solid var(--sidebarLanguageAccentBar);padding-left:12px}.sidebar #full-list>li.current-page>a{color:var(--sidebarActiveItem);border-left:3px solid var(--sidebarLanguageAccentBar);padding-left:12px}.sidebar #full-list>li.current-page>a:after,.sidebar #full-list>li.current-page{color:var(--sidebarActiveItem)}.sidebar #full-list>li:last-child{margin-bottom:30px}.sidebar #full-list>li.group:first-child{margin-top:0}.sidebar #full-list ul{display:none;margin:10px 0 10px 15px;padding:0}.sidebar #full-list ul li{font-weight:300;line-height:16px;padding:0 8px;margin-right:0;color:var(--sidebarAccentMain)}.sidebar #full-list ul li.current-hash{color:var(--sidebarActiveItem)}.sidebar #full-list ul li.current-hash>a{color:var(--sidebarActiveItem)}.sidebar #full-list ul li.current-hash>a:before,.sidebar #full-list>li>ul>li>a:hover:before{content:"\2022";position:absolute;margin-left:-15px;color:var(--sidebarActiveItem)}.sidebar #full-list ul li a{padding-left:15px;display:block;width:100%;height:24px}.sidebar #full-list ul li ul{display:none;margin:9px 0 9px 20px}.sidebar #full-list ul li ul li{margin-right:0;height:20px;color:var(--sidebarAccentMain)}.sidebar #full-list ul li ul li a{border-left:1px solid var(--sidebarInactiveItemMarker);padding:0 10px;height:20px}.sidebar #full-list ul li ul li.current-hash>a:before{content:none}.sidebar #full-list ul li ul li>a:hover{border-color:var(--sidebarLanguageAccentBar)}.sidebar #full-list ul li ul li.current-hash>a{color:var(--sidebarActiveItem);border-color:var(--sidebarLanguageAccentBar)}.sidebar #full-list ul li ul li.current-hash>a{color:var(--sidebarActiveItem);margin-left:0}.sidebar ::-webkit-scrollbar{width:14px}::-webkit-scrollbar-track{background-color:var(--sidebarBackground)}.sidebar ::-webkit-scrollbar-thumb{background-color:var(--sidebarScrollbarThumb);border-radius:10px;border:3px solid var(--sidebarBackground)}.sidebar-button{cursor:pointer;background-color:transparent;border:none;padding:15px 11px;font-size:16px}.sidebar-button:hover{color:var(--sidebarHover)}.sidebar-button:is(:active,:hover,:focus){outline:none}.sidebar-button{color:var(--sidebarAccentMain)}.sidebar-closed .sidebar-button{color:var(--contrast)}@media screen and (max-height: 500px){.sidebar{overflow-y:auto}.sidebar #full-list{overflow:visible}}.content-inner{font-family:var(--serifFontFamily);font-size:1em;line-height:1.6875em;position:relative;background-color:var(--background);color:var(--textBody)}.content-inner :is(h1,h2,h3,h4,h5,h6){font-family:var(--sansFontFamily);font-weight:700;line-height:1.5em;word-wrap:break-word;color:var(--textHeaders)}.content-inner h1{font-size:2em;margin:1em 0 .5em}.content-inner h1.signature{margin:0}.content-inner h1.section-heading{margin:1.5em 0 .5em}.content-inner h1 small{font-weight:300}.content-inner h1 .icon-action{font-size:1.2rem;font-weight:400}.content-inner h2{font-size:1.6em;margin:1em 0 .5em;font-weight:700}.content-inner h3{font-size:1.375em;margin:1em 0 .5em;font-weight:700}.content-inner :is(a,.a-main){color:var(--links);text-decoration:underline;text-decoration-skip-ink:auto}.content-inner :is(a:visited,.a-main:visited){color:var(--linksVisited)}.content-inner .icon-action{float:right;color:var(--iconAction);text-decoration:none;border:none;transition:color .3s ease-in-out;background-color:transparent;cursor:pointer}.content-inner button.icon-action{margin-top:12px}.content-inner .icon-action:hover{color:var(--iconActionHover)}.content-inner .icon-action:visited{color:var(--iconAction)}.content-inner .livebook-badge-container{display:flex}.content-inner a.livebook-badge{display:inline-flex}.content-inner .note{color:var(--iconAction);margin-right:5px;font-size:14px;font-weight:400}.content-inner blockquote{border-left:3px solid var(--blockquoteBorder);position:relative;margin:1.5625em 0;padding:0 1.2rem;overflow:auto;background-color:var(--blockquoteBackground);border-radius:3px}.content-inner blockquote p:last-child{padding-bottom:1em;margin-bottom:0}.content-inner table{margin:2em 0}.content-inner th{text-align:left;font-family:var(--sansFontFamily);text-transform:uppercase;font-weight:700;padding-bottom:.5em}.content-inner tr{border-bottom:1px solid var(--gray50);vertical-align:bottom;height:2.5em}.content-inner :is(td,th){padding-left:1em;line-height:2em;vertical-align:top}.content-inner .section-heading{position:relative}.content-inner .section-heading:hover a.hover-link{opacity:1;text-decoration:none}.content-inner .section-heading a.hover-link{transition:opacity .3s ease-in-out;display:inline-block;opacity:0;padding:.3em .4em .6em .6em;line-height:1em;margin-left:-2.4em;text-decoration:none;border:none;font-size:16px;vertical-align:middle}@media screen and (max-width: 768px){.content-inner .section-heading a.hover-link{position:absolute;bottom:0;right:-20px;padding:.3em .6em .4em}}.content-inner .app-vsn{display:none!important;font-size:.6em;line-height:1.5em}@media screen and (max-width: 768px){.content-inner .app-vsn{display:block!important}}.content-inner img{max-width:100%}.content-inner code{font-family:var(--monoFontFamily);font-style:normal;line-height:24px;font-weight:400}@media screen and (max-width: 768px){.content-inner :is(ol,ul){padding-left:calc(1.5 * var(--content-gutter))}}.content-inner blockquote:is(.warning,.error,.info,.neutral,.tip){color:var(--black);border-radius:10px;border-left:0}.content-inner blockquote:is(.warning,.error,.info,.neutral,.tip) :is(a,a:visited){color:var(--black)}.content-inner blockquote.warning{background-color:var(--warningBackground)}.content-inner blockquote.error{background-color:var(--errorBackground)}.content-inner blockquote.info{background-color:var(--infoBackground)}.content-inner blockquote.neutral{background-color:var(--neutralBackground)}.content-inner blockquote.tip{background-color:var(--tipBackground)}.content-inner blockquote :is(h3,h4):is(.warning,.error,.info,.neutral,.tip){color:var(--contrast);margin:0 -1.2rem;padding:.7rem 1.2rem .7rem 3.3rem;font-weight:700;font-style:normal}.content-inner blockquote :is(h3,h4):is(.warning,.error,.info,.neutral,.tip):before{color:var(--contrast);position:absolute;left:1rem;font-size:1.8rem;font-family:remixicon;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.content-inner blockquote :is(h3,h4).warning{background-color:var(--warningHeadingBackground);color:var(--warningHeading)}.content-inner blockquote :is(h3,h4).warning:before{content:var(--icon-error-warning);color:var(--warningHeading)}.content-inner blockquote :is(h3,h4).error{background-color:var(--errorHeadingBackground);color:var(--errorHeading)}.content-inner blockquote :is(h3,h4).error:before{content:var(--icon-error-warning);color:var(--errorHeading)}.content-inner blockquote :is(h3,h4).info{background-color:var(--infoHeadingBackground);color:var(--infoHeading)}.content-inner blockquote :is(h3,h4).info:before{content:var(--icon-information);color:var(--infoHeading)}.content-inner blockquote :is(h3,h4).neutral{background-color:var(--neutralHeadingBackground);color:var(--neutralHeading)}.content-inner blockquote :is(h3,h4).neutral:before{content:var(--icon-double-quotes-l);color:var(--neutralHeading)}.content-inner blockquote :is(h3,h4).tip{background-color:var(--tipHeadingBackground);color:var(--tipHeading)}.content-inner blockquote :is(h3,h4).tip:before{content:var(--icon-information);color:var(--tipHeading)}.content-inner blockquote:is(.warning,.error,.info,.neutral,.tip) code{background-color:var(--inlineCodeBackground);border:1px solid var(--inlineCodeBorder);color:var(--black)}@media screen and (max-width: 768px){.content-inner blockquote:is(.warning,.error,.info,.neutral,.tip){margin-left:calc(-1 * var(--content-gutter));margin-right:calc(-1 * var(--content-gutter));padding-left:var(--content-gutter);padding-right:var(--content-gutter);border-radius:0}.content-inner blockquote :is(h3,h4):is(.warning,.error,.info,.neutral,.tip){margin:0 calc(-1 * var(--content-gutter))}}.content-inner .summary h2{font-weight:700}.content-inner .summary h2 a{text-decoration:none;border:none}.content-inner .summary span.deprecated{color:var(--darkDeprecated);font-weight:400;font-style:italic}.content-inner .summary .summary-row .summary-signature{font-family:var(--monoFontFamily);font-weight:700}.content-inner .summary .summary-row .summary-signature a{text-decoration:none;border:none}.content-inner .summary .summary-row .summary-synopsis{font-family:var(--serifFontFamily);font-style:italic;padding:0 1.2em;margin:0 0 .5em}.content-inner .summary .summary-row .summary-synopsis p{margin:0;padding:0}.content-inner :is(a.no-underline,pre a){color:var(--linksNoUnderline);text-shadow:none;text-decoration:none;background-image:none}.content-inner :is(a.no-underline,pre a):is(:visited,:active,:focus,:hover){color:var(--linksNoUnderlineVisited)}.content-inner code{background-color:var(--codeBackground);vertical-align:baseline;border-radius:2px;padding:.1em .2em;border:1px solid var(--codeBorder);text-transform:none}.content-inner pre{margin:var(--baseLineHeight) 0}.content-inner pre code{display:block;overflow-x:auto;white-space:inherit;padding:.5em 1em;background-color:var(--codeBackground)}.content-inner pre code::-webkit-scrollbar{width:.4rem;height:.4rem}.content-inner pre code::-webkit-scrollbar-thumb{border-radius:.25rem;background-color:var(--codeScrollThumb)}.content-inner pre code::-webkit-scrollbar-track{background-color:var(--codeScrollBackground)}.content-inner pre code::-webkit-scrollbar-corner{background-color:var(--codeScrollBackground)}.content-inner pre code.output{margin:0 12px;max-height:400px;overflow:auto}.content-inner pre code.output+.copy-button{margin-right:12px}.content-inner pre code.output:before{content:"Output";display:block;position:absolute;top:-16px;left:12px;padding:2px 4px;font-size:12px;font-family:var(--monoFontFamily);line-height:1;color:var(--textHeaders);background-color:var(--codeBackground);border:1px solid var(--codeBorder);border-bottom:0;border-radius:2px}@media screen and (max-width: 768px){.content-inner>pre,.content-inner section>pre{margin-left:calc(-1 * var(--content-gutter));margin-right:calc(-1 * var(--content-gutter))}.content-inner>pre code,.content-inner section>pre code{padding-left:var(--content-gutter);padding-right:var(--content-gutter);border-radius:0;border-left-width:0;border-right-width:0}}@keyframes blink-background{0%{background-color:var(--textDetailBackground)}to{background-color:var(--blink)}}.content-inner .detail:target .detail-header{animation-duration:.55s;animation-name:blink-background;animation-iteration-count:1;animation-timing-function:ease-in-out}.content-inner .detail-header{margin:2em 0 1em;padding:.5em 1em;background-color:var(--textDetailBackground);border-left:3px solid var(--main);font-size:1em;font-family:var(--monoFontFamily);position:relative}.content-inner .detail-header .note{float:right}.content-inner .detail-header .signature{display:inline-block;font-family:var(--monoFontFamily);font-size:1rem;font-weight:700}.content-inner .detail-header:hover a.detail-link{opacity:1;text-decoration:none}.content-inner .detail-header a.detail-link{transition:opacity .3s ease-in-out;position:absolute;top:0;left:0;display:block;opacity:0;padding:.6em;line-height:1.5em;margin-left:-2.5em;text-decoration:none;border:none}@media screen and (max-width: 768px){.content-inner .detail-header a.detail-link{margin-left:-30px}}.content-inner .specs pre{font-family:var(--monoFontFamily);font-size:.9em;font-style:normal;line-height:24px;white-space:pre-wrap;margin:0;padding:0}.content-inner .specs .attribute{color:var(--fnSpecAttr)}.content-inner .docstring{margin:1.2em 0 3em 1.2em}@media screen and (max-width: 768px){.content-inner .docstring{margin-left:0}}.content-inner .docstring:is(h2,h3,h4,h5){font-weight:700}.content-inner .docstring h2{font-size:1.1em}.content-inner .docstring h3{font-size:1em}.content-inner .docstring h4{font-size:.95em}.content-inner .docstring h5{font-size:.9em}.content-inner div.deprecated{display:block;padding:9px 15px;background-color:var(--fnDeprecated)}.content-inner .footer{margin:4em auto 1em;text-align:center;font-style:italic;font-size:14px}.content-inner .footer,.content-inner .footer :is(a,.footer-button){color:var(--textFooter)}.content-inner .footer .line{display:inline-block}.content-inner .footer .footer-button{background-color:transparent;border:0;cursor:pointer;font-style:italic;outline:none;padding:0 4px}.content-inner .footer .footer-hex-package{margin-right:4px}.content-inner .bottom-actions{display:flex;justify-content:space-between;margin-top:4em}.content-inner .bottom-actions .bottom-actions-button{display:flex;text-decoration:none;flex-direction:column;border-radius:4px;border:1px solid var(--bottomActionsBtnBorder);padding:8px 16px;min-width:150px}.content-inner .bottom-actions .bottom-actions-button .subheader{font-size:.8em;color:var(--bottomActionsBtnSubheader);white-space:nowrap}.content-inner .bottom-actions .bottom-actions-button[rel=prev] .subheader{text-align:right}@media screen and (max-width: 768px){.content-inner .bottom-actions{flex-direction:column-reverse}.content-inner .bottom-actions .bottom-actions-item:not(:first-child){margin-bottom:16px}}.page-cheatmd .content-inner{--horizontal-space: 1.5em;--vertical-space: 1em}@media (max-width: 600px){.page-cheatmd .content-inner{--horizontal-space: 1em;--vertical-space: .75em}}.page-cheatmd .content-inner{max-width:1200px}.page-cheatmd .content-inner h1{margin-bottom:var(--vertical-space)}.page-cheatmd .content-inner h2{margin:var(--vertical-space) 0;column-span:all;color:var(--gray700);font-weight:500}.page-cheatmd.dark .content-inner h2{color:var(--gray200)}.page-cheatmd .content-inner h3{margin:0 0 1em;color:var(--main);font-weight:400;overflow:hidden}.page-cheatmd .content-inner h3.section-heading .hover-link{display:none}.page-cheatmd .content-inner section.h3{min-width:300px;margin:0 0 calc(var(--vertical-space) * 2) 0;break-inside:avoid}.page-cheatmd .content-inner h3:after{content:"";margin-left:calc(var(--horizontal-space) / 2);vertical-align:baseline;display:inline-block;width:100%;height:1px;margin-right:-100%;margin-bottom:5px;background-color:var(--codeBorder)}.page-cheatmd .content-inner h4{display:block;margin:0;padding:.25em var(--horizontal-space);font-weight:400;background:var(--gray100);color:#567;border:solid 1px 1px 0 1px var(--gray100)}.page-cheatmd.dark .content-inner h4{background:#192f50;color:var(--textBody);border:1px solid #192f50;border-bottom:0}.page-cheatmd .content-inner .h2 p{margin:0;display:block;background:var(--gray50);padding:var(--vertical-space) var(--horizontal-space)}.page-cheatmd.dark .content-inner .h2 p{background:var(--gray700)}.page-cheatmd .content-inner .h2 p>code{color:#eb5757;border-radius:3px;padding:.2em .4em}.page-cheatmd .content-inner pre code{padding:var(--vertical-space) var(--horizontal-space)}.page-cheatmd .content-inner pre code::-webkit-scrollbar{width:.4rem;height:.6rem}.page-cheatmd .content-inner .h2 pre{margin:0}.page-cheatmd .content-inner .h2 pre+pre{margin-top:-1px}.page-cheatmd .content-inner pre.wrap{white-space:break-spaces}@media screen and (max-width: 768px){.page-cheatmd .content-inner pre code{border-left-width:1px!important;border-right-width:1px!important}}.page-cheatmd .content-inner .h2 table{display:table;box-sizing:border-box;width:100%;border-collapse:collapse;margin:0}.page-cheatmd .content-inner .h2 th{padding:var(--vertical-space) var(--horizontal-space);line-height:inherit;margin-bottom:-1px;vertical-align:middle;border-bottom:1px solid var(--codeBorder)}.page-cheatmd .content-inner .h2 td{padding:var(--vertical-space) var(--horizontal-space);border:0;border-bottom:1px solid var(--codeBorder)}.page-cheatmd .content-inner .h2 tr:first-child{border-top:1px solid var(--codeBorder)}.page-cheatmd .content-inner .h2 td code{color:#eb5757;border-radius:3px;padding:.2em .4em}.page-cheatmd .content-inner .h2 thead{background-color:var(--gray50)}.page-cheatmd.dark .content-inner .h2 thead{background-color:var(--gray700)}.page-cheatmd .content-inner .h2 tbody{background-color:var(--codeBackground)}.page-cheatmd .content-inner .h2 :is(ul,ol){margin:0;padding:0}.page-cheatmd .content-inner .h2 li{list-style-position:inside;padding:.5em var(--horizontal-space);line-height:2em;vertical-align:middle;background-color:var(--codeBackground);border-bottom:1px solid var(--codeBorder)}.page-cheatmd .content-inner .h2 :is(ul,ol)+pre code{border-top:0}.page-cheatmd .content-inner .h2 li>code{color:#eb5757;border-radius:3px;padding:.2em .4em}.page-cheatmd .content-inner section.width-50{display:block;width:50%;margin:0}.page-cheatmd .content-inner section.width-50>section>table{width:100%}.page-cheatmd .content-inner section:is(.col-2,.col-2-left,.col-3){column-gap:40px}.page-cheatmd .content-inner section.col-2{column-count:2;height:auto}.page-cheatmd .content-inner section.col-2-left{display:grid;grid-template-columns:calc(100% / 3) auto}.page-cheatmd .content-inner section.col-2-left>h2{grid-column-end:span 2}.page-cheatmd .content-inner section.col-3{column-count:3;height:auto}.page-cheatmd .content-inner section.list-4>ul{display:flex;flex-wrap:wrap}.page-cheatmd .content-inner section.list-4>ul>li{flex:0 0 25%}.page-cheatmd .content-inner section.list-6>ul{display:flex;flex-wrap:wrap}.page-cheatmd .content-inner section.list-6>ul>li{flex:0 0 calc(100% / 6)}@media screen and (max-width: 1400px){.page-cheatmd .content-inner section.col-3{column-count:2}.page-cheatmd .content-inner section.col-2-left{display:block;column-count:1}}@media screen and (max-width: 1200px){.page-cheatmd .content-inner section:is(.col-2,.col-3){column-count:1}.page-cheatmd .content-inner section.list-6>ul>li{flex:0 0 25%}}@media screen and (max-width: 1000px){.page-cheatmd .content-inner section:is(.list-4,.list-6)>ul>li{flex:0 0 calc(100% / 3)}}@media screen and (max-width: 600px){.page-cheatmd .content-inner section:is(.list-4,.list-6)>ul>li{flex:0 0 50%}.page-cheatmd .content-inner section.width-50{width:100%}}#search{min-height:200px;position:relative}#search .loading{height:64px;width:64px;vertical-align:middle;position:absolute;top:50%;left:18%}#search .loading div{box-sizing:border-box;display:block;position:absolute;width:51px;height:51px;margin:6px;border:6px solid var(--coldGray);border-radius:50%;animation:loading 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--coldGray) transparent transparent transparent}#search .loading div:nth-child(1){animation-delay:-.45s}#search .loading div:nth-child(2){animation-delay:-.3s}#search .loading div:nth-child(3){animation-delay:-.15s}@keyframes loading{0%{transform:rotate(0)}to{transform:rotate(360deg)}}#search .result{margin:2em 0 2.5em}#search .result p{margin:0}#search .result-id{font-size:1.4em;margin:0}#search .result-id a{text-decoration:none;transition:color .1s ease-in-out;color:var(--links)}#search .result-id a:is(:visited,:active,:focus){color:var(--linksVisited)}#search .result-id a:hover{color:var(--main)}#search :is(.result-id,.result-elem) em{font-style:normal;color:var(--main)}#search .result-id small{font-weight:400}@keyframes keyboard-shortcuts-show{0%{opacity:0}to{opacity:1}}.modal{animation-duration:.15s;animation-name:keyboard-shortcuts-show;animation-iteration-count:1;animation-timing-function:ease-in-out;display:none;background-color:#000000bf;position:fixed;inset:0;z-index:300}.modal.shown{display:block}.modal .modal-contents{margin:75px auto 0;max-width:500px;background-color:var(--modalBackground);border-radius:3px;box-shadow:2px 2px 8px #0003;padding:25px 35px 35px}@media screen and (max-width: 768px){.modal .modal-contents{padding:20px}}.modal .modal-header{display:flex;align-items:start}.modal .modal-title{display:inline-block;flex-grow:1;font-size:1.2rem;font-weight:700;margin-bottom:20px}.modal .modal-title button{border:none;background-color:transparent;color:var(--textHeaders);font-weight:700;margin-right:30px;padding-left:0;text-align:left;transition:color .15s}.modal .modal-title button:hover{color:var(--main);cursor:pointer}.modal .modal-title button.active{color:var(--main)}.modal .modal-close{cursor:pointer;display:block;font-size:1.5rem;margin:-8px -8px 0 0;padding:8px;opacity:.7;background-color:transparent;color:var(--textHeaders);border:none;transition:opacity .15s}.modal .modal-close:hover{opacity:1}#keyboard-shortcuts-content dl.shortcut-row{display:flex;align-items:center;justify-content:space-between;margin:0;padding:6px 0 8px;border-bottom:1px solid var(--settingsSectionBorder)}#keyboard-shortcuts-content dl.shortcut-row:last-of-type{border-bottom-style:none}#keyboard-shortcuts-content dl.shortcut-row:first-child{padding-top:0}#keyboard-shortcuts-content :is(.shortcut-keys,.shortcut-description){display:inline-block}#keyboard-shortcuts-content kbd>kbd{background-color:var(--settingsInputBorder);color:var(--contrast);border-radius:3px;font-family:inherit;font-weight:700;display:inline-block;line-height:1;padding:4px 7px 6px;min-width:26px;text-align:center}#keyboard-shortcuts-content :is(.shortcut-keys,.shortcut-description){margin:0}#quick-switch-modal-body{width:100%;position:relative}#quick-switch-modal-body .ri-search-2-line{position:absolute;left:0;top:0;padding:4px 10px;color:var(--quickSwitchContour);font-weight:700}#quick-switch-modal-body #quick-switch-input{width:100%;padding:8px 6px 8px 38px;border:none;color:var(--quickSwitchInput);background-color:transparent;border-bottom:1px solid var(--quickSwitchContour);box-sizing:border-box;transition:all .12s ease-out}#quick-switch-modal-body #quick-switch-input:focus{outline:none}#quick-switch-modal-body #quick-switch-results{margin:0}#quick-switch-modal-body .quick-switch-result{padding:2px 5px;border-bottom:1px dotted var(--quickSwitchContour);transition:all .12s ease-out}#quick-switch-modal-body .quick-switch-result:last-child{border-bottom:none}#quick-switch-modal-body .quick-switch-result:hover{cursor:pointer}#quick-switch-modal-body .quick-switch-result:is(:hover,.selected){border-left:4px solid var(--main);background-color:var(--codeBackground)}.autocomplete{display:none;height:0;margin:0 5px 0 12px;overflow:visible;position:relative;width:100%}.autocomplete.shown{display:block}.autocomplete-suggestions{box-shadow:2px 2px 10px #00000040;background-color:var(--gray700);border-top:1px solid var(--gray800);left:0;position:absolute;top:-2px;width:276px;z-index:200}.autocomplete-suggestion{color:inherit;display:block;padding:10px;text-decoration:none}.autocomplete-suggestion:hover,.autocomplete-suggestion.selected{background-color:var(--gray600);border-left:3px solid var(--main)}.autocomplete-suggestion em{font-style:normal;font-weight:700}.autocomplete-suggestion .description{opacity:.6;padding-top:3px}.autocomplete-suggestion .label{padding-left:2px;opacity:.75}.autocomplete-suggestion .title,.autocomplete-suggestion .description{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}#tooltip{box-shadow:0 0 10px var(--black-opacity-10);max-height:300px;max-width:500px;padding:0;position:absolute;pointer-events:none;margin:0;z-index:99;top:0;left:0;visibility:hidden;transform:translateY(20px);opacity:0;transition:.2s visibility ease-out,.2s transform ease-out,.2s opacity ease-out}#tooltip.tooltip-shown{visibility:visible;transform:translateY(0);opacity:1}#tooltip .tooltip-body{border:1px solid var(--codeBorder)}#tooltip .tooltip-body .signature{min-width:320px;width:100%}#tooltip .tooltip-body .detail-header{border-left:0;margin-bottom:0;margin-top:0}#tooltip .tooltip-body .docstring{background-color:var(--background);padding:1.2em;margin:0;width:498px}#tooltip .tooltip-body .docstring-plain{max-width:498px;width:auto}#tooltip .tooltip-body .version-info{float:right;line-height:1.6rem;font-family:var(--monoFontFamily);font-size:.9rem;font-weight:400;margin-bottom:-6px;opacity:.3;padding-left:.3em}pre{position:relative}pre:hover .copy-button{display:block}.copy-button{display:none;position:absolute;top:9px;right:9px;background-color:transparent;border:none;cursor:pointer;padding:0;opacity:.5;transition:all .15s;font-family:var(--serifFontFamily);font-size:14px;line-height:24px;color:currentColor}.copy-button:hover{opacity:1}.copy-button svg{width:20px}.copy-button.clicked{display:block;opacity:1;color:var(--success)}.copy-button.clicked:after{content:"Copied! \2713"}.copy-button.clicked svg{display:none;color:currentColor}#settings-modal-content{margin-top:10px}#settings-modal-content .hidden{display:none}#settings-modal-content .input{box-sizing:border-box;width:80%;padding:8px;font-size:14px;background-color:var(--settingsInputBackground);color:var(--settingsInput);border:1px solid var(--settingsInputBorder);border-radius:8px;transition:border-color .15s}#settings-modal-content .input:focus{outline:none;border-color:var(--main)}#settings-modal-content .input::placeholder{color:var(--gray400)}#settings-modal-content .switch-button-container{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--settingsSectionBorder);padding:10px 0}#settings-modal-content .switch-button-container:first-of-type{border-top-style:none;padding-top:0}#settings-modal-content .switch-button-container>div>span{font-size:18px}#settings-modal-content .switch-button-container>div>p{font-size:14px;font-weight:300;line-height:1.4;margin:0;padding-bottom:6px;padding-right:10px}#settings-modal-content .switch-button{position:relative;display:inline-block;flex-shrink:0;width:40px;height:20px;user-select:none;transition:all .15s}#settings-modal-content .switch-button__checkbox{appearance:none;position:absolute;display:block;width:20px;height:20px;border-radius:1000px;background-color:#91a4b7;border:3px solid #e5edf5;cursor:pointer;transition:all .3s}#settings-modal-content .switch-button__bg{display:block;width:100%;height:100%;border-radius:1000px;background-color:#e5edf5;cursor:pointer;transition:all .3s}#settings-modal-content .switch-button__checkbox:checked{background-color:#fff;border-color:var(--main);transform:translate(100%)}#settings-modal-content .switch-button__checkbox:checked+.switch-button__bg{background-color:var(--main)}#settings-modal-content .settings-select{cursor:pointer;position:relative;border:none;background-color:transparent;color:var(--textBody)}#settings-modal-content .settings-select option{color:initial}#settings-modal-content .settings-select:focus{outline:none}#toast{opacity:0;position:fixed;z-index:1;left:50%;bottom:1rem;min-width:3rem;margin:0 -1.2rem;padding:.7rem 1.2rem;text-align:center;font-weight:700;border-radius:10px;border:1px solid var(--codeBorder);background-color:var(--codeBackground);color:var(--textBody);transition:opacity .4s ease-in-out,transform .3s ease-out}#toast.show{opacity:1;transform:translateY(-.75rem)}@media (prefers-reduced-motion: reduce){#toast{transition:none}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0;user-select:none}@media print{.main{display:block}.sidebar,.sidebar-button{display:none}.content{padding-left:0;overflow:visible;left:0;width:100%}.summary-row{break-inside:avoid}#toast,.content-inner .section-heading a.hover-link,.content-inner button.icon-action,.content-inner a.icon-action,.content-inner .bottom-actions{display:none}.footer p:first-of-type{display:none}.content-inner blockquote:is(.warning,.error,.info,.neutral,.tip){border:2px solid var(--gray400)}.content-inner blockquote :is(h3,h4):is(.warning,.error,.info,.neutral,.tip){color:var(--textHeaders);border-bottom:2px solid var(--gray400)}.content-inner pre code.makeup{border-color:var(--gray400);white-space:break-spaces;break-inside:avoid}.content-inner blockquote code.inline,.content-inner code.inline{border-color:var(--gray400)}}@media print{.page-cheatmd .content-inner *{background-color:transparent!important;border-color:var(--gray400)!important}.page-cheatmd .content-inner{max-width:100%;width:100%;padding:0;font-size:.7em}.page-cheatmd .content-inner section:is(.col-2,.col-2-left,.col-3){column-gap:30px}.page-cheatmd .content-inner section.col-2{column-count:2}.page-cheatmd .content-inner section.col-2-left{display:grid}.page-cheatmd .content-inner section.col-3{column-count:3}.page-cheatmd .content-inner h1{margin-top:0;margin-bottom:.5em}.page-cheatmd .content-inner h2.section-heading{font-weight:700;margin-top:1em;column-span:all}.page-cheatmd .content-inner section.h2{break-inside:avoid}.page-cheatmd .content-inner h3{font-weight:700;color:var(--main-darkened-10)}.page-cheatmd .content-inner h3:after{height:2px;background-color:var(--gray400)}.page-cheatmd .content-inner section.h3{min-width:300px;break-inside:avoid}.page-cheatmd .content-inner h4{padding:.5em 0;border:none;font-weight:700;color:#000}.page-cheatmd .content-inner .h2 p{padding-left:0;padding-right:0;border:none!important}.page-cheatmd .content-inner code{line-height:1.5em}.page-cheatmd .content-inner .h2 table{font-variant-numeric:tabular-nums;break-inside:avoid}.page-cheatmd .content-inner .h2 :is(th,td){vertical-align:top;padding-left:0;padding-right:0}.page-cheatmd .content-inner .h2 thead{border-style:solid none;border-width:1px}.page-cheatmd .content-inner .h2 tr{border-bottom:none}.page-cheatmd .content-inner .h2 th{font-weight:700}.page-cheatmd .content-inner .h2 li{padding-left:0;padding-right:0;vertical-align:middle;border-bottom:none}.page-cheatmd .content-inner pre:hover button.copy-button,.page-cheatmd .content-inner div#tooltip{display:none}.page-cheatmd .content-inner footer p:not(.built-using){display:none}}code.makeup .unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.makeup .hll{background-color:#ffc}.makeup .bp{color:#3465a4}.makeup .c,.makeup .c1,.makeup .ch,.makeup .cm,.makeup .cp,.makeup .cpf,.makeup .cs{color:#4d4d4d}.makeup .dl{color:#408200}.makeup .err{color:#a40000;border:#ef2929}.makeup .fm,.makeup .g{color:#4d4d4c}.makeup .gd{color:#a40000}.makeup .ge{color:#4d4d4c;font-style:italic}.makeup .gh{color:navy;font-weight:700}.makeup .gi{color:#00a000}.makeup .go{color:#4d4d4c;font-style:italic}.makeup .gp{color:#4d4d4d}.makeup .gr{color:#ef2929}.makeup .gs{color:#4d4d4c;font-weight:700}.makeup .gt{color:#a40000;font-weight:700}.makeup .gu{color:purple;font-weight:700}.makeup .il{color:#0000cf;font-weight:700}.makeup .k,.makeup .kc,.makeup .kd,.makeup .kn,.makeup .kp,.makeup .kr,.makeup .kt{color:#204a87}.makeup .l{color:#4d4d4c}.makeup .ld{color:#c00}.makeup .m,.makeup .mb,.makeup .mf,.makeup .mh,.makeup .mi,.makeup .mo{color:#2937ab}.makeup .n{color:#4d4d4c}.makeup .na{color:#8a7000}.makeup .nb{color:#204a87}.makeup .nc{color:#0000cf}.makeup .nd{color:#5c35cc;font-weight:700}.makeup .ne{color:#c00;font-weight:700}.makeup .nf{color:#b65800}.makeup .ni{color:#bc5400}.makeup .nl{color:#b65800}.makeup .nn{color:#4d4d4c}.makeup .no{color:#a06600}.makeup .nt{color:#204a87;font-weight:700}.makeup .nv,.makeup .nx{color:#4d4d4c}.makeup .o{color:#bc5400}.makeup .ow{color:#204a87}.makeup .p,.makeup .py{color:#4d4d4c}.makeup .s,.makeup .s1,.makeup .s2,.makeup .sa,.makeup .sb,.makeup .sc{color:#408200}.makeup .sd{color:#8f5902;font-style:italic}.makeup .se{color:#204a87}.makeup .sh{color:#408200}.makeup .si{color:#204a87}.makeup .sr{color:#c00}.makeup .ss{color:#a06600}.makeup .sx{color:#408200}.makeup .vc,.makeup .vg,.makeup .vi,.makeup .vm,.makeup .x{color:#4d4d4c}.dark .makeup{color:#dce1e6}.dark .makeup .hll{background-color:#49483e}.dark .makeup .bp{color:#dce1e6}.dark .makeup .c,.dark .makeup .c1,.dark .makeup .ch,.dark .makeup .cm,.dark .makeup .cp,.dark .makeup .cpf,.dark .makeup .cs{color:#969386}.dark .makeup .dl{color:#e6db74}.dark .makeup .err{color:#960050;background-color:#1e0010}.dark .makeup .fm{color:#a6e22e}.dark .makeup .gd{color:#ff5385}.dark .makeup .ge{font-style:italic}.dark .makeup .gi{color:#a6e22e}.dark .makeup .gp{color:#969386}.dark .makeup .gs{font-weight:700}.dark .makeup .gu{color:#969386}.dark .makeup .gt{color:#ff5385;font-weight:700}.dark .makeup .il{color:#ae81ff}.dark .makeup .k,.dark .makeup .kc,.dark .makeup .kd{color:#66d9ef}.dark .makeup .kn{color:#ff5385}.dark .makeup .kp,.dark .makeup .kr,.dark .makeup .kt{color:#66d9ef}.dark .makeup .l,.dark .makeup .ld,.dark .makeup .m,.dark .makeup .mb,.dark .makeup .mf,.dark .makeup .mh,.dark .makeup .mi,.dark .makeup .mo{color:#ae81ff}.dark .makeup .n{color:#dce1e6}.dark .makeup .na{color:#a6e22e}.dark .makeup .nb{color:#dce1e6}.dark .makeup .nc,.dark .makeup .nd,.dark .makeup .ne,.dark .makeup .nf{color:#a6e22e}.dark .makeup .ni,.dark .makeup .nl,.dark .makeup .nn{color:#dce1e6}.dark .makeup .no{color:#66d9ef}.dark .makeup .nt{color:#ff5385}.dark .makeup .nv{color:#dce1e6}.dark .makeup .nx{color:#a6e22e}.dark .makeup .o,.dark .makeup .ow{color:#ff5385}.dark .makeup .p,.dark .makeup .py{color:#dce1e6}.dark .makeup .s,.dark .makeup .s1,.dark .makeup .s2,.dark .makeup .sa,.dark .makeup .sb,.dark .makeup .sc,.dark .makeup .sd{color:#e6db74}.dark .makeup .se{color:#ae81ff}.dark .makeup .sh,.dark .makeup .si,.dark .makeup .sr,.dark .makeup .ss,.dark .makeup .sx{color:#e6db74}.dark .makeup .vc,.dark .makeup .vg,.dark .makeup .vi,.dark .makeup .vm{color:#dce1e6}body:not(.dark) .content-inner img[src*="#gh-dark-mode-only"],body.dark .content-inner img[src*="#gh-light-mode-only"]{display:none} +/*! Bundled license information: + +normalize.css/normalize.css: + (*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css *) +*/ diff --git a/dist/inconsolata-latin-400-normal-RGKDDNDD.woff2 b/dist/inconsolata-latin-400-normal-RGKDDNDD.woff2 new file mode 100644 index 000000000..6119e5971 Binary files /dev/null and b/dist/inconsolata-latin-400-normal-RGKDDNDD.woff2 differ diff --git a/dist/inconsolata-latin-700-normal-DTS2D7TO.woff2 b/dist/inconsolata-latin-700-normal-DTS2D7TO.woff2 new file mode 100644 index 000000000..010da61ec Binary files /dev/null and b/dist/inconsolata-latin-700-normal-DTS2D7TO.woff2 differ diff --git a/dist/inconsolata-latin-ext-400-normal-K7HVGTP7.woff2 b/dist/inconsolata-latin-ext-400-normal-K7HVGTP7.woff2 new file mode 100644 index 000000000..50cb547f7 Binary files /dev/null and b/dist/inconsolata-latin-ext-400-normal-K7HVGTP7.woff2 differ diff --git a/dist/inconsolata-latin-ext-700-normal-4MPBLFZC.woff2 b/dist/inconsolata-latin-ext-700-normal-4MPBLFZC.woff2 new file mode 100644 index 000000000..8a20d54f1 Binary files /dev/null and b/dist/inconsolata-latin-ext-700-normal-4MPBLFZC.woff2 differ diff --git a/dist/inconsolata-vietnamese-400-normal-IGQPHHJH.woff2 b/dist/inconsolata-vietnamese-400-normal-IGQPHHJH.woff2 new file mode 100644 index 000000000..ab70f18a8 Binary files /dev/null and b/dist/inconsolata-vietnamese-400-normal-IGQPHHJH.woff2 differ diff --git a/dist/inconsolata-vietnamese-700-normal-LHEGSN35.woff2 b/dist/inconsolata-vietnamese-700-normal-LHEGSN35.woff2 new file mode 100644 index 000000000..a8140081e Binary files /dev/null and b/dist/inconsolata-vietnamese-700-normal-LHEGSN35.woff2 differ diff --git a/dist/lato-latin-300-normal-YUMVEFOL.woff2 b/dist/lato-latin-300-normal-YUMVEFOL.woff2 new file mode 100644 index 000000000..aad98a339 Binary files /dev/null and b/dist/lato-latin-300-normal-YUMVEFOL.woff2 differ diff --git a/dist/lato-latin-400-normal-W7754I4D.woff2 b/dist/lato-latin-400-normal-W7754I4D.woff2 new file mode 100644 index 000000000..ff60934dd Binary files /dev/null and b/dist/lato-latin-400-normal-W7754I4D.woff2 differ diff --git a/dist/lato-latin-700-normal-2XVSBPG4.woff2 b/dist/lato-latin-700-normal-2XVSBPG4.woff2 new file mode 100644 index 000000000..11de83fea Binary files /dev/null and b/dist/lato-latin-700-normal-2XVSBPG4.woff2 differ diff --git a/dist/lato-latin-ext-300-normal-VPGGJKJL.woff2 b/dist/lato-latin-ext-300-normal-VPGGJKJL.woff2 new file mode 100644 index 000000000..486d3ecf0 Binary files /dev/null and b/dist/lato-latin-ext-300-normal-VPGGJKJL.woff2 differ diff --git a/dist/lato-latin-ext-400-normal-N27NCBWW.woff2 b/dist/lato-latin-ext-400-normal-N27NCBWW.woff2 new file mode 100644 index 000000000..edb9fa6f4 Binary files /dev/null and b/dist/lato-latin-ext-400-normal-N27NCBWW.woff2 differ diff --git a/dist/lato-latin-ext-700-normal-Q2L5DVMW.woff2 b/dist/lato-latin-ext-700-normal-Q2L5DVMW.woff2 new file mode 100644 index 000000000..2c8aaa866 Binary files /dev/null and b/dist/lato-latin-ext-700-normal-Q2L5DVMW.woff2 differ diff --git a/dist/merriweather-cyrillic-300-italic-M6KMXZSZ.woff2 b/dist/merriweather-cyrillic-300-italic-M6KMXZSZ.woff2 new file mode 100644 index 000000000..71e8f7ee9 Binary files /dev/null and b/dist/merriweather-cyrillic-300-italic-M6KMXZSZ.woff2 differ diff --git a/dist/merriweather-cyrillic-300-normal-7PAAHU3N.woff2 b/dist/merriweather-cyrillic-300-normal-7PAAHU3N.woff2 new file mode 100644 index 000000000..11d8cdd96 Binary files /dev/null and b/dist/merriweather-cyrillic-300-normal-7PAAHU3N.woff2 differ diff --git a/dist/merriweather-cyrillic-ext-300-italic-JP3ZEV2P.woff2 b/dist/merriweather-cyrillic-ext-300-italic-JP3ZEV2P.woff2 new file mode 100644 index 000000000..0bc4aac16 Binary files /dev/null and b/dist/merriweather-cyrillic-ext-300-italic-JP3ZEV2P.woff2 differ diff --git a/dist/merriweather-cyrillic-ext-300-normal-5LF5LCEK.woff2 b/dist/merriweather-cyrillic-ext-300-normal-5LF5LCEK.woff2 new file mode 100644 index 000000000..8874d2c43 Binary files /dev/null and b/dist/merriweather-cyrillic-ext-300-normal-5LF5LCEK.woff2 differ diff --git a/dist/merriweather-latin-300-italic-353COS6Q.woff2 b/dist/merriweather-latin-300-italic-353COS6Q.woff2 new file mode 100644 index 000000000..0c7b8ed1b Binary files /dev/null and b/dist/merriweather-latin-300-italic-353COS6Q.woff2 differ diff --git a/dist/merriweather-latin-300-normal-RWDJH4FN.woff2 b/dist/merriweather-latin-300-normal-RWDJH4FN.woff2 new file mode 100644 index 000000000..a11988387 Binary files /dev/null and b/dist/merriweather-latin-300-normal-RWDJH4FN.woff2 differ diff --git a/dist/merriweather-latin-ext-300-italic-MWCA36KE.woff2 b/dist/merriweather-latin-ext-300-italic-MWCA36KE.woff2 new file mode 100644 index 000000000..8a6b26f8b Binary files /dev/null and b/dist/merriweather-latin-ext-300-italic-MWCA36KE.woff2 differ diff --git a/dist/merriweather-latin-ext-300-normal-K6L27CZ5.woff2 b/dist/merriweather-latin-ext-300-normal-K6L27CZ5.woff2 new file mode 100644 index 000000000..ff2d483b5 Binary files /dev/null and b/dist/merriweather-latin-ext-300-normal-K6L27CZ5.woff2 differ diff --git a/dist/merriweather-vietnamese-300-italic-EHHNZPUO.woff2 b/dist/merriweather-vietnamese-300-italic-EHHNZPUO.woff2 new file mode 100644 index 000000000..ff20a5bc7 Binary files /dev/null and b/dist/merriweather-vietnamese-300-italic-EHHNZPUO.woff2 differ diff --git a/dist/merriweather-vietnamese-300-normal-U376L4Z4.woff2 b/dist/merriweather-vietnamese-300-normal-U376L4Z4.woff2 new file mode 100644 index 000000000..b250a2d45 Binary files /dev/null and b/dist/merriweather-vietnamese-300-normal-U376L4Z4.woff2 differ diff --git a/dist/remixicon-NKANDIL5.woff2 b/dist/remixicon-NKANDIL5.woff2 new file mode 100644 index 000000000..57e6c7c12 Binary files /dev/null and b/dist/remixicon-NKANDIL5.woff2 differ diff --git a/dist/search_items-3C5A86A8.js b/dist/search_items-3C5A86A8.js new file mode 100644 index 000000000..e62a73b3c --- /dev/null +++ b/dist/search_items-3C5A86A8.js @@ -0,0 +1 @@ +searchNodes=[{"doc":"","ref":"Mix.Tasks.AnalyzePlans.html","title":"Mix.Tasks.AnalyzePlans","type":"task"},{"doc":"Callback implementation for Mix.Task.run/1 .","ref":"Mix.Tasks.AnalyzePlans.html#run/1","title":"Mix.Tasks.AnalyzePlans.run/1","type":"function"},{"doc":"","ref":"Mix.Tasks.CleanClickhouse.html","title":"Mix.Tasks.CleanClickhouse","type":"task"},{"doc":"Callback implementation for Mix.Task.run/1 .","ref":"Mix.Tasks.CleanClickhouse.html#run/1","title":"Mix.Tasks.CleanClickhouse.run/1","type":"function"},{"doc":"","ref":"Mix.Tasks.CreateFreeSubscription.html","title":"Mix.Tasks.CreateFreeSubscription","type":"task"},{"doc":"","ref":"Mix.Tasks.CreateFreeSubscription.html#execute/1","title":"Mix.Tasks.CreateFreeSubscription.execute/1","type":"function"},{"doc":"Callback implementation for Mix.Task.run/1 .","ref":"Mix.Tasks.CreateFreeSubscription.html#run/1","title":"Mix.Tasks.CreateFreeSubscription.run/1","type":"function"},{"doc":"This task downloads the Country Lite database from DB-IP for self-hosted or development purposes. Plausible Cloud runs a paid version of DB-IP with more detailed geolocation data.","ref":"Mix.Tasks.DownloadCountryDatabase.html","title":"Mix.Tasks.DownloadCountryDatabase","type":"task"},{"doc":"Callback implementation for Mix.Task.run/1 .","ref":"Mix.Tasks.DownloadCountryDatabase.html#run/1","title":"Mix.Tasks.DownloadCountryDatabase.run/1","type":"function"},{"doc":"","ref":"Mix.Tasks.GenerateReferrerFavicons.html","title":"Mix.Tasks.GenerateReferrerFavicons","type":"task"},{"doc":"Callback implementation for Mix.Task.run/1 .","ref":"Mix.Tasks.GenerateReferrerFavicons.html#run/1","title":"Mix.Tasks.GenerateReferrerFavicons.run/1","type":"function"},{"doc":"","ref":"Mix.Tasks.PullSandboxSubscription.html","title":"Mix.Tasks.PullSandboxSubscription","type":"task"},{"doc":"Callback implementation for Mix.Task.run/1 .","ref":"Mix.Tasks.PullSandboxSubscription.html#run/1","title":"Mix.Tasks.PullSandboxSubscription.run/1","type":"function"},{"doc":"It's often necessary to generate fake events for development and testing purposes. This Mix Task provides a quick and easy way to generate a pageview or custom event, either in your development environment or a remote Plausible instance. See Mix.Tasks.SendPageview.usage/1 for more detailed documentation.","ref":"Mix.Tasks.SendPageview.html","title":"Mix.Tasks.SendPageview","type":"task"},{"doc":"Callback implementation for Mix.Task.run/1 .","ref":"Mix.Tasks.SendPageview.html#run/1","title":"Mix.Tasks.SendPageview.run/1","type":"function"},{"doc":"","ref":"ObanErrorReporter.html","title":"ObanErrorReporter","type":"module"},{"doc":"","ref":"ObanErrorReporter.html#handle_event/4","title":"ObanErrorReporter.handle_event/4","type":"function"},{"doc":"Plausible keeps the contexts that define your domain and business logic. Contexts are also responsible for managing your data, regardless if it comes from the database, an external API or others.","ref":"Plausible.html","title":"Plausible","type":"module"},{"doc":"Clickhouse access with async inserts enabled","ref":"Plausible.AsyncInsertRepo.html","title":"Plausible.AsyncInsertRepo","type":"module"},{"doc":"Callback implementation for Ecto.Repo.aggregate/3 .","ref":"Plausible.AsyncInsertRepo.html#aggregate/3","title":"Plausible.AsyncInsertRepo.aggregate/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.aggregate/4 .","ref":"Plausible.AsyncInsertRepo.html#aggregate/4","title":"Plausible.AsyncInsertRepo.aggregate/4","type":"function"},{"doc":"Callback implementation for Ecto.Repo.all/2 .","ref":"Plausible.AsyncInsertRepo.html#all/2","title":"Plausible.AsyncInsertRepo.all/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.checked_out?/0 .","ref":"Plausible.AsyncInsertRepo.html#checked_out?/0","title":"Plausible.AsyncInsertRepo.checked_out?/0","type":"function"},{"doc":"Callback implementation for Ecto.Repo.checkout/2 .","ref":"Plausible.AsyncInsertRepo.html#checkout/2","title":"Plausible.AsyncInsertRepo.checkout/2","type":"function"},{"doc":"","ref":"Plausible.AsyncInsertRepo.html#child_spec/1","title":"Plausible.AsyncInsertRepo.child_spec/1","type":"function"},{"doc":"Callback implementation for Ecto.Repo.config/0 .","ref":"Plausible.AsyncInsertRepo.html#config/0","title":"Plausible.AsyncInsertRepo.config/0","type":"function"},{"doc":"Callback implementation for Ecto.Repo.default_options/1 .","ref":"Plausible.AsyncInsertRepo.html#default_options/1","title":"Plausible.AsyncInsertRepo.default_options/1","type":"function"},{"doc":"Callback implementation for Ecto.Repo.delete/2 .","ref":"Plausible.AsyncInsertRepo.html#delete/2","title":"Plausible.AsyncInsertRepo.delete/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.delete!/2 .","ref":"Plausible.AsyncInsertRepo.html#delete!/2","title":"Plausible.AsyncInsertRepo.delete!/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.delete_all/2 .","ref":"Plausible.AsyncInsertRepo.html#delete_all/2","title":"Plausible.AsyncInsertRepo.delete_all/2","type":"function"},{"doc":"A convenience function for SQL-based repositories that forces all connections in the pool to disconnect within the given interval. See Ecto.Adapters.SQL.disconnect_all/3 for more information.","ref":"Plausible.AsyncInsertRepo.html#disconnect_all/2","title":"Plausible.AsyncInsertRepo.disconnect_all/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.exists?/2 .","ref":"Plausible.AsyncInsertRepo.html#exists?/2","title":"Plausible.AsyncInsertRepo.exists?/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get/3 .","ref":"Plausible.AsyncInsertRepo.html#get/3","title":"Plausible.AsyncInsertRepo.get/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get!/3 .","ref":"Plausible.AsyncInsertRepo.html#get!/3","title":"Plausible.AsyncInsertRepo.get!/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get_by/3 .","ref":"Plausible.AsyncInsertRepo.html#get_by/3","title":"Plausible.AsyncInsertRepo.get_by/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get_by!/3 .","ref":"Plausible.AsyncInsertRepo.html#get_by!/3","title":"Plausible.AsyncInsertRepo.get_by!/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get_dynamic_repo/0 .","ref":"Plausible.AsyncInsertRepo.html#get_dynamic_repo/0","title":"Plausible.AsyncInsertRepo.get_dynamic_repo/0","type":"function"},{"doc":"Callback implementation for Ecto.Repo.insert/2 .","ref":"Plausible.AsyncInsertRepo.html#insert/2","title":"Plausible.AsyncInsertRepo.insert/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.insert!/2 .","ref":"Plausible.AsyncInsertRepo.html#insert!/2","title":"Plausible.AsyncInsertRepo.insert!/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.insert_all/3 .","ref":"Plausible.AsyncInsertRepo.html#insert_all/3","title":"Plausible.AsyncInsertRepo.insert_all/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.insert_or_update/2 .","ref":"Plausible.AsyncInsertRepo.html#insert_or_update/2","title":"Plausible.AsyncInsertRepo.insert_or_update/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.insert_or_update!/2 .","ref":"Plausible.AsyncInsertRepo.html#insert_or_update!/2","title":"Plausible.AsyncInsertRepo.insert_or_update!/2","type":"function"},{"doc":"Similar to insert_all/2 but with the following differences: accepts rows as streams or lists sends rows as a chunked request doesn't autogenerate ids or does any other preprocessing Example: Repo . query! ( "create table ecto_ch_demo(a UInt64, b String) engine Null" ) defmodule Demo do use Ecto.Schema @primary_key false schema "ecto_ch_demo" do field :a , Ch , type : "UInt64" field :b , :string end end rows = Stream . map ( 1 .. 100_000 , fn i -> %{ a : i , b : to_string ( i ) } end ) { 100_000 , nil } = Repo . insert_stream ( Demo , rows ) # schemaless { 100_000 , nil } = Repo . insert_stream ( "ecto_ch_demo" , rows , types : [ a : Ch.Types . u64 ( ) , b : :string ] )","ref":"Plausible.AsyncInsertRepo.html#insert_stream/3","title":"Plausible.AsyncInsertRepo.insert_stream/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.load/2 .","ref":"Plausible.AsyncInsertRepo.html#load/2","title":"Plausible.AsyncInsertRepo.load/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.one/2 .","ref":"Plausible.AsyncInsertRepo.html#one/2","title":"Plausible.AsyncInsertRepo.one/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.one!/2 .","ref":"Plausible.AsyncInsertRepo.html#one!/2","title":"Plausible.AsyncInsertRepo.one!/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.preload/3 .","ref":"Plausible.AsyncInsertRepo.html#preload/3","title":"Plausible.AsyncInsertRepo.preload/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.prepare_query/3 .","ref":"Plausible.AsyncInsertRepo.html#prepare_query/3","title":"Plausible.AsyncInsertRepo.prepare_query/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.put_dynamic_repo/1 .","ref":"Plausible.AsyncInsertRepo.html#put_dynamic_repo/1","title":"Plausible.AsyncInsertRepo.put_dynamic_repo/1","type":"function"},{"doc":"A convenience function for SQL-based repositories that executes the given query. See Ecto.Adapters.SQL.query/4 for more information.","ref":"Plausible.AsyncInsertRepo.html#query/3","title":"Plausible.AsyncInsertRepo.query/3","type":"function"},{"doc":"A convenience function for SQL-based repositories that executes the given query. See Ecto.Adapters.SQL.query!/4 for more information.","ref":"Plausible.AsyncInsertRepo.html#query!/3","title":"Plausible.AsyncInsertRepo.query!/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.reload/2 .","ref":"Plausible.AsyncInsertRepo.html#reload/2","title":"Plausible.AsyncInsertRepo.reload/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.reload!/2 .","ref":"Plausible.AsyncInsertRepo.html#reload!/2","title":"Plausible.AsyncInsertRepo.reload!/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.start_link/1 .","ref":"Plausible.AsyncInsertRepo.html#start_link/1","title":"Plausible.AsyncInsertRepo.start_link/1","type":"function"},{"doc":"Callback implementation for Ecto.Repo.stop/1 .","ref":"Plausible.AsyncInsertRepo.html#stop/1","title":"Plausible.AsyncInsertRepo.stop/1","type":"function"},{"doc":"Callback implementation for Ecto.Repo.stream/2 .","ref":"Plausible.AsyncInsertRepo.html#stream/2","title":"Plausible.AsyncInsertRepo.stream/2","type":"function"},{"doc":"A convenience function for SQL-based repositories that translates the given query to SQL. See Ecto.Adapters.SQL.to_sql/3 for more information.","ref":"Plausible.AsyncInsertRepo.html#to_sql/2","title":"Plausible.AsyncInsertRepo.to_sql/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.update/2 .","ref":"Plausible.AsyncInsertRepo.html#update/2","title":"Plausible.AsyncInsertRepo.update/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.update!/2 .","ref":"Plausible.AsyncInsertRepo.html#update!/2","title":"Plausible.AsyncInsertRepo.update!/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.update_all/3 .","ref":"Plausible.AsyncInsertRepo.html#update_all/3","title":"Plausible.AsyncInsertRepo.update_all/3","type":"function"},{"doc":"","ref":"Plausible.Auth.html","title":"Plausible.Auth","type":"module"},{"doc":"","ref":"Plausible.Auth.html#create_user/3","title":"Plausible.Auth.create_user/3","type":"function"},{"doc":"","ref":"Plausible.Auth.html#delete_user/1","title":"Plausible.Auth.delete_user/1","type":"function"},{"doc":"","ref":"Plausible.Auth.html#enterprise?/1","title":"Plausible.Auth.enterprise?/1","type":"function"},{"doc":"","ref":"Plausible.Auth.html#find_user_by/1","title":"Plausible.Auth.find_user_by/1","type":"function"},{"doc":"","ref":"Plausible.Auth.html#has_active_sites?/2","title":"Plausible.Auth.has_active_sites?/2","type":"function"},{"doc":"","ref":"Plausible.Auth.html#is_super_admin?/1","title":"Plausible.Auth.is_super_admin?/1","type":"function"},{"doc":"","ref":"Plausible.Auth.html#issue_email_verification/1","title":"Plausible.Auth.issue_email_verification/1","type":"function"},{"doc":"","ref":"Plausible.Auth.html#user_owns_sites?/1","title":"Plausible.Auth.user_owns_sites?/1","type":"function"},{"doc":"","ref":"Plausible.Auth.html#verify_email/2","title":"Plausible.Auth.verify_email/2","type":"function"},{"doc":"","ref":"Plausible.Auth.ApiKey.html","title":"Plausible.Auth.ApiKey","type":"module"},{"doc":"","ref":"Plausible.Auth.ApiKey.html#changeset/2","title":"Plausible.Auth.ApiKey.changeset/2","type":"function"},{"doc":"","ref":"Plausible.Auth.ApiKey.html#do_hash/1","title":"Plausible.Auth.ApiKey.do_hash/1","type":"function"},{"doc":"","ref":"Plausible.Auth.ApiKey.html#process_key/1","title":"Plausible.Auth.ApiKey.process_key/1","type":"function"},{"doc":"","ref":"Plausible.Auth.ApiKey.html#update/2","title":"Plausible.Auth.ApiKey.update/2","type":"function"},{"doc":"","ref":"Plausible.Auth.ApiKeyAdmin.html","title":"Plausible.Auth.ApiKeyAdmin","type":"module"},{"doc":"","ref":"Plausible.Auth.ApiKeyAdmin.html#create_changeset/2","title":"Plausible.Auth.ApiKeyAdmin.create_changeset/2","type":"function"},{"doc":"","ref":"Plausible.Auth.ApiKeyAdmin.html#custom_index_query/3","title":"Plausible.Auth.ApiKeyAdmin.custom_index_query/3","type":"function"},{"doc":"","ref":"Plausible.Auth.ApiKeyAdmin.html#form_fields/1","title":"Plausible.Auth.ApiKeyAdmin.form_fields/1","type":"function"},{"doc":"","ref":"Plausible.Auth.ApiKeyAdmin.html#index/1","title":"Plausible.Auth.ApiKeyAdmin.index/1","type":"function"},{"doc":"","ref":"Plausible.Auth.ApiKeyAdmin.html#search_fields/1","title":"Plausible.Auth.ApiKeyAdmin.search_fields/1","type":"function"},{"doc":"","ref":"Plausible.Auth.ApiKeyAdmin.html#update_changeset/2","title":"Plausible.Auth.ApiKeyAdmin.update_changeset/2","type":"function"},{"doc":"This embedded schema stores information about the account locking grace period. Users are given this 7-day grace period to upgrade their account after outgrowing their subscriptions. The actual account locking happens in background with Plausible.Workers.LockSites . The grace period can also be manual, without an end date, being controlled manually from the CRM, and not by the background site locker job. This is useful for enterprise subscriptions.","ref":"Plausible.Auth.GracePeriod.html","title":"Plausible.Auth.GracePeriod","type":"module"},{"doc":"Returns whether the grace period is still active for a User. Defaults to false if the user is nil or there is no grace period.","ref":"Plausible.Auth.GracePeriod.html#active?/1","title":"Plausible.Auth.GracePeriod.active?/1","type":"function"},{"doc":"Ends an existing grace period by setting users.grace_period.is_over to true. This means the grace period has expired.","ref":"Plausible.Auth.GracePeriod.html#end_changeset/1","title":"Plausible.Auth.GracePeriod.end_changeset/1","type":"function"},{"doc":"Returns whether the grace period has already expired for a User. Defaults to false if the user is nil or there is no grace period.","ref":"Plausible.Auth.GracePeriod.html#expired?/1","title":"Plausible.Auth.GracePeriod.expired?/1","type":"function"},{"doc":"Removes the grace period from the User completely.","ref":"Plausible.Auth.GracePeriod.html#remove_changeset/1","title":"Plausible.Auth.GracePeriod.remove_changeset/1","type":"function"},{"doc":"Starts a account locking grace period of 7 days by changing the User struct.","ref":"Plausible.Auth.GracePeriod.html#start_changeset/2","title":"Plausible.Auth.GracePeriod.start_changeset/2","type":"function"},{"doc":"Starts a manual account locking grace period by changing the User struct. Manual locking means the grace period can only be removed manually from the CRM.","ref":"Plausible.Auth.GracePeriod.html#start_manual_lock_changeset/2","title":"Plausible.Auth.GracePeriod.start_manual_lock_changeset/2","type":"function"},{"doc":"","ref":"Plausible.Auth.GracePeriod.html#t:t/0","title":"Plausible.Auth.GracePeriod.t/0","type":"type"},{"doc":"","ref":"Plausible.Auth.Invitation.html","title":"Plausible.Auth.Invitation","type":"module"},{"doc":"","ref":"Plausible.Auth.Invitation.html#new/1","title":"Plausible.Auth.Invitation.new/1","type":"function"},{"doc":"","ref":"Plausible.Auth.Password.html","title":"Plausible.Auth.Password","type":"module"},{"doc":"","ref":"Plausible.Auth.Password.html#dummy_calculation/0","title":"Plausible.Auth.Password.dummy_calculation/0","type":"function"},{"doc":"","ref":"Plausible.Auth.Password.html#hash/1","title":"Plausible.Auth.Password.hash/1","type":"function"},{"doc":"","ref":"Plausible.Auth.Password.html#match?/2","title":"Plausible.Auth.Password.match?/2","type":"function"},{"doc":"","ref":"Plausible.Auth.Token.html","title":"Plausible.Auth.Token","type":"module"},{"doc":"","ref":"Plausible.Auth.Token.html#sign_password_reset/1","title":"Plausible.Auth.Token.sign_password_reset/1","type":"function"},{"doc":"","ref":"Plausible.Auth.Token.html#sign_shared_link/1","title":"Plausible.Auth.Token.sign_shared_link/1","type":"function"},{"doc":"","ref":"Plausible.Auth.Token.html#verify_password_reset/1","title":"Plausible.Auth.Token.verify_password_reset/1","type":"function"},{"doc":"","ref":"Plausible.Auth.Token.html#verify_shared_link/1","title":"Plausible.Auth.Token.verify_shared_link/1","type":"function"},{"doc":"","ref":"Plausible.Auth.User.html","title":"Plausible.Auth.User","type":"module"},{"doc":"","ref":"Plausible.Auth.User.html#changeset/2","title":"Plausible.Auth.User.changeset/2","type":"function"},{"doc":"","ref":"Plausible.Auth.User.html#end_trial/1","title":"Plausible.Auth.User.end_trial/1","type":"function"},{"doc":"","ref":"Plausible.Auth.User.html#hash_password/1","title":"Plausible.Auth.User.hash_password/1","type":"function"},{"doc":"","ref":"Plausible.Auth.User.html#new/1","title":"Plausible.Auth.User.new/1","type":"function"},{"doc":"","ref":"Plausible.Auth.User.html#remove_trial_expiry/1","title":"Plausible.Auth.User.remove_trial_expiry/1","type":"function"},{"doc":"","ref":"Plausible.Auth.User.html#set_password/2","title":"Plausible.Auth.User.set_password/2","type":"function"},{"doc":"","ref":"Plausible.Auth.User.html#start_trial/1","title":"Plausible.Auth.User.start_trial/1","type":"function"},{"doc":"","ref":"Plausible.Auth.User.html#t:t/0","title":"Plausible.Auth.User.t/0","type":"type"},{"doc":"","ref":"Plausible.Auth.UserAdmin.html","title":"Plausible.Auth.UserAdmin","type":"module"},{"doc":"","ref":"Plausible.Auth.UserAdmin.html#custom_index_query/3","title":"Plausible.Auth.UserAdmin.custom_index_query/3","type":"function"},{"doc":"","ref":"Plausible.Auth.UserAdmin.html#form_fields/1","title":"Plausible.Auth.UserAdmin.form_fields/1","type":"function"},{"doc":"","ref":"Plausible.Auth.UserAdmin.html#index/1","title":"Plausible.Auth.UserAdmin.index/1","type":"function"},{"doc":"","ref":"Plausible.Auth.UserAdmin.html#resource_actions/1","title":"Plausible.Auth.UserAdmin.resource_actions/1","type":"function"},{"doc":"","ref":"Plausible.Billing.html","title":"Plausible.Billing","type":"module"},{"doc":"","ref":"Plausible.Billing.html#active_subscription_for/1","title":"Plausible.Billing.active_subscription_for/1","type":"function"},{"doc":"","ref":"Plausible.Billing.html#change_plan/2","title":"Plausible.Billing.change_plan/2","type":"function"},{"doc":"","ref":"Plausible.Billing.html#change_plan_preview/2","title":"Plausible.Billing.change_plan_preview/2","type":"function"},{"doc":"","ref":"Plausible.Billing.html#has_active_subscription?/1","title":"Plausible.Billing.has_active_subscription?/1","type":"function"},{"doc":"","ref":"Plausible.Billing.html#last_two_billing_cycles/2","title":"Plausible.Billing.last_two_billing_cycles/2","type":"function"},{"doc":"","ref":"Plausible.Billing.html#last_two_billing_months_usage/2","title":"Plausible.Billing.last_two_billing_months_usage/2","type":"function"},{"doc":"","ref":"Plausible.Billing.html#needs_to_upgrade?/1","title":"Plausible.Billing.needs_to_upgrade?/1","type":"function"},{"doc":"","ref":"Plausible.Billing.html#on_trial?/1","title":"Plausible.Billing.on_trial?/1","type":"function"},{"doc":"","ref":"Plausible.Billing.html#paddle_api/0","title":"Plausible.Billing.paddle_api/0","type":"function"},{"doc":"Returns the number of sites that an account is allowed to have. Accounts for grandfathering old accounts to unlimited websites and ignores site limit on self-hosted installations.","ref":"Plausible.Billing.html#sites_limit/1","title":"Plausible.Billing.sites_limit/1","type":"function"},{"doc":"","ref":"Plausible.Billing.html#subscription_cancelled/1","title":"Plausible.Billing.subscription_cancelled/1","type":"function"},{"doc":"","ref":"Plausible.Billing.html#subscription_created/1","title":"Plausible.Billing.subscription_created/1","type":"function"},{"doc":"","ref":"Plausible.Billing.html#subscription_payment_succeeded/1","title":"Plausible.Billing.subscription_payment_succeeded/1","type":"function"},{"doc":"","ref":"Plausible.Billing.html#subscription_updated/1","title":"Plausible.Billing.subscription_updated/1","type":"function"},{"doc":"","ref":"Plausible.Billing.html#trial_days_left/1","title":"Plausible.Billing.trial_days_left/1","type":"function"},{"doc":"","ref":"Plausible.Billing.html#usage/1","title":"Plausible.Billing.usage/1","type":"function"},{"doc":"","ref":"Plausible.Billing.html#usage_breakdown/1","title":"Plausible.Billing.usage_breakdown/1","type":"function"},{"doc":"","ref":"Plausible.Billing.EnterprisePlan.html","title":"Plausible.Billing.EnterprisePlan","type":"module"},{"doc":"","ref":"Plausible.Billing.EnterprisePlan.html#changeset/2","title":"Plausible.Billing.EnterprisePlan.changeset/2","type":"function"},{"doc":"","ref":"Plausible.Billing.EnterprisePlanAdmin.html","title":"Plausible.Billing.EnterprisePlanAdmin","type":"module"},{"doc":"","ref":"Plausible.Billing.EnterprisePlanAdmin.html#custom_index_query/3","title":"Plausible.Billing.EnterprisePlanAdmin.custom_index_query/3","type":"function"},{"doc":"","ref":"Plausible.Billing.EnterprisePlanAdmin.html#form_fields/1","title":"Plausible.Billing.EnterprisePlanAdmin.form_fields/1","type":"function"},{"doc":"","ref":"Plausible.Billing.EnterprisePlanAdmin.html#index/1","title":"Plausible.Billing.EnterprisePlanAdmin.index/1","type":"function"},{"doc":"","ref":"Plausible.Billing.EnterprisePlanAdmin.html#search_fields/1","title":"Plausible.Billing.EnterprisePlanAdmin.search_fields/1","type":"function"},{"doc":"","ref":"Plausible.Billing.PaddleApi.html","title":"Plausible.Billing.PaddleApi","type":"module"},{"doc":"","ref":"Plausible.Billing.PaddleApi.html#checkout_domain/0","title":"Plausible.Billing.PaddleApi.checkout_domain/0","type":"function"},{"doc":"","ref":"Plausible.Billing.PaddleApi.html#get_invoices/1","title":"Plausible.Billing.PaddleApi.get_invoices/1","type":"function"},{"doc":"","ref":"Plausible.Billing.PaddleApi.html#get_subscription/1","title":"Plausible.Billing.PaddleApi.get_subscription/1","type":"function"},{"doc":"","ref":"Plausible.Billing.PaddleApi.html#update_subscription/2","title":"Plausible.Billing.PaddleApi.update_subscription/2","type":"function"},{"doc":"","ref":"Plausible.Billing.PaddleApi.html#update_subscription_preview/2","title":"Plausible.Billing.PaddleApi.update_subscription_preview/2","type":"function"},{"doc":"","ref":"Plausible.Billing.PaddleApi.html#vendors_domain/0","title":"Plausible.Billing.PaddleApi.vendors_domain/0","type":"function"},{"doc":"","ref":"Plausible.Billing.Plans.html","title":"Plausible.Billing.Plans","type":"module"},{"doc":"","ref":"Plausible.Billing.Plans.html#all_yearly_plan_ids/0","title":"Plausible.Billing.Plans.all_yearly_plan_ids/0","type":"function"},{"doc":"","ref":"Plausible.Billing.Plans.html#allowance/1","title":"Plausible.Billing.Plans.allowance/1","type":"function"},{"doc":"","ref":"Plausible.Billing.Plans.html#for_product_id/1","title":"Plausible.Billing.Plans.for_product_id/1","type":"function"},{"doc":"","ref":"Plausible.Billing.Plans.html#plans_for/1","title":"Plausible.Billing.Plans.plans_for/1","type":"function"},{"doc":"","ref":"Plausible.Billing.Plans.html#subscription_interval/1","title":"Plausible.Billing.Plans.subscription_interval/1","type":"function"},{"doc":"","ref":"Plausible.Billing.Plans.html#suggested_plan/2","title":"Plausible.Billing.Plans.suggested_plan/2","type":"function"},{"doc":"","ref":"Plausible.Billing.Plans.html#t:plan/0","title":"Plausible.Billing.Plans.plan/0","type":"type"},{"doc":"","ref":"Plausible.Billing.SiteLocker.html","title":"Plausible.Billing.SiteLocker","type":"module"},{"doc":"","ref":"Plausible.Billing.SiteLocker.html#check_sites_for/1","title":"Plausible.Billing.SiteLocker.check_sites_for/1","type":"function"},{"doc":"","ref":"Plausible.Billing.SiteLocker.html#set_lock_status_for/2","title":"Plausible.Billing.SiteLocker.set_lock_status_for/2","type":"function"},{"doc":"Helper function for working with Ecto changesets","ref":"Plausible.ChangesetHelpers.html","title":"Plausible.ChangesetHelpers","type":"module"},{"doc":"","ref":"Plausible.ChangesetHelpers.html#traverse_errors/1","title":"Plausible.ChangesetHelpers.traverse_errors/1","type":"function"},{"doc":"Provides the core functions to retrieve and manage the CLDR data that supports formatting and localisation. It provides the core functions to access formatted CLDR data, set and retrieve a current locale and validate certain core data types such as locales, currencies and territories.","ref":"Plausible.Cldr.html","title":"Plausible.Cldr","type":"module"},{"doc":"See Cldr.available_locale_name?/1 .","ref":"Plausible.Cldr.html#available_locale_name?/1","title":"Plausible.Cldr.available_locale_name?/1","type":"function"},{"doc":"Returns the default locale . Example iex> Plausible.Cldr . default_locale ( ) % Cldr.LanguageTag { backend : Plausible.Cldr , canonical_locale_name : "en-001" , cldr_locale_name : :"en-001" , language_subtags : [ ] , extensions : %{ } , gettext_locale_name : "en" , language : "en" , locale : %{ } , private_use : [ ] , rbnf_locale_name : :en , requested_locale_name : "en-001" , script : :Latn , territory : :"001" , transform : %{ } , language_variants : [ ] }","ref":"Plausible.Cldr.html#default_locale/0","title":"Plausible.Cldr.default_locale/0","type":"function"},{"doc":"Returns the default territory when a locale does not specify one and none can be inferred. Example iex> Plausible.Cldr . default_territory ( ) :"001"","ref":"Plausible.Cldr.html#default_territory/0","title":"Plausible.Cldr.default_territory/0","type":"function"},{"doc":"Add locale-specific ellipsis to a string. Arguments string is any String.t or a 2-element list of String.t between which the ellipsis is inserted. backend is any module that includes use Cldr and therefore is a Cldr backend module. The default is Cldr.default_backend!/0 . Note that Cldr.default_backend!/0 will raise an exception if no :default_backend is configured under the :ex_cldr key in config.exs . options is a keyword list of options Options :locale is any valid locale name returned by Cldr.known_locale_names/1 . The default is Cldr.get_locale/0 . :location determines where to place the ellipsis. The options are :after (the default for a single string argument), :between (the default and only valid location for an argument that is a list of two strings) and :before . :format formats based upon whether the ellipsis is inserted between words or sentences. The valid options are :word or :sentence . The default is :sentence . Examples iex> Plausible.Cldr . ellipsis "And furthermore" "And furthermore…" iex> Plausible.Cldr . ellipsis [ "And furthermore" , "there is much to be done" ] , locale : :ja "And furthermore…there is much to be done" iex> Plausible.Cldr . ellipsis "And furthermore" , format : :word "And furthermore …" iex> Plausible.Cldr . ellipsis [ "And furthermore" , "there is much to be done" ] , locale : :ja , format : :word "And furthermore … there is much to be done"","ref":"Plausible.Cldr.html#ellipsis/2","title":"Plausible.Cldr.ellipsis/2","type":"function"},{"doc":"Return the current locale to be used for Cldr functions that take an optional locale parameter for which a locale is not supplied. Example iex> Plausible.Cldr . put_locale ( "pl" ) iex> Plausible.Cldr . get_locale % Cldr.LanguageTag { backend : Elixir.Plausible.Cldr , canonical_locale_name : "pl" , cldr_locale_name : :pl , extensions : %{ } , language : "pl" , locale : %{ } , private_use : [ ] , rbnf_locale_name : :pl , territory : :PL , requested_locale_name : "pl" , script : :Latn , transform : %{ } , language_variants : [ ] }","ref":"Plausible.Cldr.html#get_locale/0","title":"Plausible.Cldr.get_locale/0","type":"function"},{"doc":"See Cldr.known_calendars/0 .","ref":"Plausible.Cldr.html#known_calendars/0","title":"Plausible.Cldr.known_calendars/0","type":"function"},{"doc":"See Cldr.known_currencies/0 .","ref":"Plausible.Cldr.html#known_currencies/0","title":"Plausible.Cldr.known_currencies/0","type":"function"},{"doc":"Returns either the Gettext locale_name in Cldr format or false based upon whether the locale name is configured in Gettext . Arguments locale is any valid locale name returned by Plausible.Cldr.known_gettext_locale_names/0 Examples iex> Plausible.Cldr . known_gettext_locale_name "en" "en" iex> Plausible.Cldr . known_gettext_locale_name "en-SA" false","ref":"Plausible.Cldr.html#known_gettext_locale_name/1","title":"Plausible.Cldr.known_gettext_locale_name/1","type":"function"},{"doc":"Returns a boolean indicating if the specified locale name is configured and available in Gettext. Arguments locale is any valid locale name returned by Plausible.Cldr.known_locale_names/0 Examples iex> Plausible.Cldr . known_gettext_locale_name? ( "en" ) true iex> Plausible.Cldr . known_gettext_locale_name? ( "!!" ) false","ref":"Plausible.Cldr.html#known_gettext_locale_name?/1","title":"Plausible.Cldr.known_gettext_locale_name?/1","type":"function"},{"doc":"Returns a list of Gettext locale names but in CLDR format with underscore replaced by hyphen in order to facilitate comparisons with Cldr locale names.","ref":"Plausible.Cldr.html#known_gettext_locale_names/0","title":"Plausible.Cldr.known_gettext_locale_names/0","type":"function"},{"doc":"Returns either the locale_name or false based upon whether the locale name is configured in Cldr . This is helpful when building a list of or expressions to return the first known locale name from a list. Arguments locale is any valid locale name returned by Plausible.Cldr.known_locale_names/0 Examples iex> Plausible.Cldr . known_locale_name :"en-AU" :"en-AU" iex> Plausible.Cldr . known_locale_name :"en-SA" false","ref":"Plausible.Cldr.html#known_locale_name/1","title":"Plausible.Cldr.known_locale_name/1","type":"function"},{"doc":"Returns a boolean indicating if the specified locale name is configured and available in Cldr. Arguments locale is any valid locale name returned by Plausible.Cldr.known_locale_names/0 Examples iex> Plausible.Cldr . known_locale_name? ( :en ) true iex> Plausible.Cldr . known_locale_name? ( :"!!" ) false","ref":"Plausible.Cldr.html#known_locale_name?/1","title":"Plausible.Cldr.known_locale_name?/1","type":"function"},{"doc":"Returns a list of the known locale names. Known locales are those locales which are the subset of all CLDR locales that have been configured for use either in this module or in Gettext .","ref":"Plausible.Cldr.html#known_locale_names/0","title":"Plausible.Cldr.known_locale_names/0","type":"function"},{"doc":"Returns a list of atoms representing the number systems types known to Cldr . Example iex> Plausible.Cldr . known_number_system_types [ :default , :finance , :native , :traditional ]","ref":"Plausible.Cldr.html#known_number_system_types/0","title":"Plausible.Cldr.known_number_system_types/0","type":"function"},{"doc":"See Cldr.known_number_systems/0 .","ref":"Plausible.Cldr.html#known_number_systems/0","title":"Plausible.Cldr.known_number_systems/0","type":"function"},{"doc":"Returns either the RBNF locale_name or false based upon whether the locale name is configured in Cldr and has RBNF rules defined. Arguments locale is any valid locale name returned by Plausible.Cldr.known_locale_names/0 Examples iex> Plausible.Cldr . known_rbnf_locale_name :en :en iex> Plausible.Cldr . known_rbnf_locale_name :"en-SA" false","ref":"Plausible.Cldr.html#known_rbnf_locale_name/1","title":"Plausible.Cldr.known_rbnf_locale_name/1","type":"function"},{"doc":"Returns a boolean indicating if the specified locale name is configured and available in Cldr and supports rules based number formats (RBNF). Arguments locale is any valid locale name returned by Plausible.Cldr.known_locale_names/0 Examples iex> Plausible.Cldr . known_rbnf_locale_name? ( :en ) true iex> Plausible.Cldr . known_rbnf_locale_name? ( :"!!" ) false","ref":"Plausible.Cldr.html#known_rbnf_locale_name?/1","title":"Plausible.Cldr.known_rbnf_locale_name?/1","type":"function"},{"doc":"Returns a list of locale names which have rules-based number formats (RBNF).","ref":"Plausible.Cldr.html#known_rbnf_locale_names/0","title":"Plausible.Cldr.known_rbnf_locale_names/0","type":"function"},{"doc":"See Cldr.known_territories/0 .","ref":"Plausible.Cldr.html#known_territories/0","title":"Plausible.Cldr.known_territories/0","type":"function"},{"doc":"Normalizes a string by applying transliteration of common symbols in numbers, currencies and dates","ref":"Plausible.Cldr.html#normalize_lenient_parse/3","title":"Plausible.Cldr.normalize_lenient_parse/3","type":"function"},{"doc":"Set the current locale to be used for Cldr functions that take an optional locale parameter for which a locale is not supplied. Arguments locale is any valid locale name returned by Plausible.Cldr.known_locale_names/0 or a t:Cldr.LanguageTag struct returned by Plausible.Cldr.Locale.new!/1 See rfc5646 for the specification of a language tag. Examples iex> Plausible.Cldr . put_locale ( "en" ) { :ok , % Cldr.LanguageTag { backend : Plausible.Cldr , canonical_locale_name : "en" , cldr_locale_name : :en , language_subtags : [ ] , extensions : %{ } , gettext_locale_name : "en" , language : "en" , locale : %{ } , private_use : [ ] , rbnf_locale_name : :en , requested_locale_name : "en" , script : :Latn , territory : :US , transform : %{ } , language_variants : [ ] } } iex> Plausible.Cldr . put_locale ( "invalid-locale!" ) { :error , { Cldr.LanguageTag.ParseError , "Expected a BCP47 language tag. Could not parse the remaining \\" ! \\" starting at position 15" } }","ref":"Plausible.Cldr.html#put_locale/1","title":"Plausible.Cldr.put_locale/1","type":"function"},{"doc":"Add locale-specific quotation marks around a string. Arguments string is any valid Elixir string options is a keyword list of options Options locale is any valid locale name returned by Cldr.known_locale_names/1 . The default is Cldr.get_locale/0 Examples iex> Plausible.Cldr . quote "Quoted String" "“Quoted String”" iex> Plausible.Cldr . quote "Quoted String" , locale : :ja "「Quoted String」"","ref":"Plausible.Cldr.html#quote/2","title":"Plausible.Cldr.quote/2","type":"function"},{"doc":"Returns a list of the locales names that are configured, but not known in CLDR. Since there is a compile-time exception raised if there are any unknown locales this function should always return an empty list.","ref":"Plausible.Cldr.html#unknown_locale_names/0","title":"Plausible.Cldr.unknown_locale_names/0","type":"function"},{"doc":"See Cldr.validate_calendar/1 .","ref":"Plausible.Cldr.html#validate_calendar/1","title":"Plausible.Cldr.validate_calendar/1","type":"function"},{"doc":"See Cldr.validate_currency/1 .","ref":"Plausible.Cldr.html#validate_currency/1","title":"Plausible.Cldr.validate_currency/1","type":"function"},{"doc":"Normalise and validate a locale name. Arguments locale is any valid locale name returned by Plausible.Cldr.known_locale_names/0 or a Cldr.LanguageTag struct returned by Plausible.Cldr.Locale.new!/1 Returns {:ok, language_tag} {:error, reason} Notes See rfc5646 for the specification of a language tag. Examples iex> Plausible.Cldr . validate_locale ( :en ) { :ok , % Cldr.LanguageTag { backend : Plausible.Cldr , canonical_locale_name : "en" , cldr_locale_name : :en , extensions : %{ } , gettext_locale_name : "en" , language : "en" , locale : %{ } , private_use : [ ] , rbnf_locale_name : :en , requested_locale_name : "en" , script : :Latn , territory : :US , transform : %{ } , language_variants : [ ] } } iex> Plausible.Cldr . validate_locale Plausible.Cldr . default_locale ( ) { :ok , % Cldr.LanguageTag { backend : Plausible.Cldr , canonical_locale_name : "en-001" , cldr_locale_name : :"en-001" , extensions : %{ } , gettext_locale_name : "en" , language : "en" , locale : %{ } , private_use : [ ] , rbnf_locale_name : :en , requested_locale_name : "en-001" , script : :Latn , territory : :"001" , transform : %{ } , language_variants : [ ] } } iex> Plausible.Cldr . validate_locale ( "zzz" ) { :error , { Cldr.InvalidLanguageError , "The language \\" zzz \\" is invalid" } }","ref":"Plausible.Cldr.html#validate_locale/1","title":"Plausible.Cldr.validate_locale/1","type":"function"},{"doc":"See Cldr.validate_number_system/1 .","ref":"Plausible.Cldr.html#validate_number_system/1","title":"Plausible.Cldr.validate_number_system/1","type":"function"},{"doc":"Normalise and validate a number system type. Arguments number_system_type is any number system type returned by Cldr.known_number_system_types/1 Returns {:ok, normalized_number_system_type} or {:error, {exception, message}} Examples iex> Plausible.Cldr . validate_number_system_type :default { :ok , :default } iex> Plausible.Cldr . validate_number_system_type :traditional { :ok , :traditional } iex> Plausible.Cldr . validate_number_system_type :latn { :error , { Cldr.UnknownNumberSystemTypeError , "The number system type :latn is unknown" } } iex> Plausible.Cldr . validate_number_system_type "bork" { :error , { Cldr.UnknownNumberSystemTypeError , "The number system type \\" bork \\" is invalid" } }","ref":"Plausible.Cldr.html#validate_number_system_type/1","title":"Plausible.Cldr.validate_number_system_type/1","type":"function"},{"doc":"See Cldr.validate_territory/1 .","ref":"Plausible.Cldr.html#validate_territory/1","title":"Plausible.Cldr.validate_territory/1","type":"function"},{"doc":"Execute a function with a locale ensuring that the current locale is restored after the function. Arguments locale is any valid locale name returned by Cldr.known_locale_names/1 . fun is any 0-arity function or function capture. Returns The value returned by the function fun/0 or {:error, {exception, reason}} if the locale is invalid or raises an exception if the current locale cannot be identified.","ref":"Plausible.Cldr.html#with_locale/2","title":"Plausible.Cldr.with_locale/2","type":"function"},{"doc":"Parses HTTP Accept-Language header values as defined in rfc2616 . The Accept-Language request-header field is similar to Accept, but restricts the set of natural languages that are preferred as a response to the request. Language tags function are provided in Cldr.LanguageTag . The format of an Accept-Language header is as follows in ABNF format: Accept - Language = "Accept-Language" ":" 1 #( language-range [ ";" "q" "=" qvalue ] ) language - range = ( ( 1 * 8 ALPHA * ( "-" 1 * 8 ALPHA ) ) | "*" ) Each language-range MAY be given an associated quality value which represents an estimate of the user's preference for the languages specified by that range. The quality value defaults to "q=1". For example, Accept - Language : da , en - gb ; q = 0.8 , en ; q = 0.7 would mean: "I prefer Danish, but will accept British English and other types of English."","ref":"Plausible.Cldr.AcceptLanguage.html","title":"Plausible.Cldr.AcceptLanguage","type":"module"},{"doc":"Parse an Accept-Language string and return the best match for a configured Cldr locale. Arguments accept_langauge is a string representing an accept language header Returns {:ok, language_tag} or {:error, reason} Examples iex> Plausible.Cldr.AcceptLanguage . best_match ( "da;q=0.1,zh-TW;q=0.3" , TestBackend.Cldr ) { :ok , % Cldr.LanguageTag { backend : TestBackend.Cldr , canonical_locale_name : "zh-TW" , cldr_locale_name : :"zh-Hant" , language_subtags : [ ] , extensions : %{ } , gettext_locale_name : nil , language : "zh" , locale : %{ } , private_use : [ ] , rbnf_locale_name : :"zh-Hant" , requested_locale_name : "zh-TW" , script : :Hant , territory : :TW , transform : %{ } , language_variants : [ ] } } iex> Plausible.Cldr.AcceptLanguage . best_match ( "da;q=0.1,zh-TW;q=0.3" , TestBackend.Cldr ) { :ok , % Cldr.LanguageTag { backend : TestBackend.Cldr , canonical_locale_name : "zh-TW" , cldr_locale_name : :"zh-Hant" , language_subtags : [ ] , extensions : %{ } , gettext_locale_name : nil , language : "zh" , locale : %{ } , private_use : [ ] , rbnf_locale_name : :"zh-Hant" , requested_locale_name : "zh-TW" , script : :Hant , territory : :TW , transform : %{ } , language_variants : [ ] } } iex> Plausible.Cldr.AcceptLanguage . best_match ( "xx,yy;q=0.3" ) { :error , { Cldr.NoMatchingLocale , "No configured locale could be matched to \\" xx,yy;q=0.3 \\" " } } iex> Plausible.Cldr.AcceptLanguage . best_match ( "invalid_tag" ) { :error , { Cldr.LanguageTag.ParseError , "Expected a BCP47 language tag. Could not parse the remaining \\" g \\" starting at position 11" } }","ref":"Plausible.Cldr.AcceptLanguage.html#best_match/1","title":"Plausible.Cldr.AcceptLanguage.best_match/1","type":"function"},{"doc":"Parses an Accept-Language header value in its string or tokenized form to return a tuple of the form {:ok, [{quality, %Cldr.LanguageTag{}}, ...]} sorted by quality. Arguments accept-language is any string in the format defined by rfc2616 backend is any module that includes use Cldr and therefore is a Cldr backend module Returns {:ok, [{quality, language_tag}, ...]} or {:error, {Cldr.AcceptLanguageError, String.t}} If at least one valid language tag is found but errors are also detected on one more more tags, an {ok, list} tuple is returned wuth an error tuple for each invalid tag added at the end of the list. Example iex> Cldr.AcceptLanguage . parse ( "da,zh-TW;q=0.3" , TestBackend.Cldr ) { :ok , [ { 1.0 , % Cldr.LanguageTag { backend : TestBackend.Cldr , canonical_locale_name : "da" , cldr_locale_name : :da , language_subtags : [ ] , extensions : %{ } , gettext_locale_name : nil , language : "da" , locale : %{ } , private_use : [ ] , rbnf_locale_name : :da , requested_locale_name : "da" , script : :Latn , territory : :DK , transform : %{ } , language_variants : [ ] } } , { 0.3 , % Cldr.LanguageTag { backend : TestBackend.Cldr , canonical_locale_name : "zh-TW" , cldr_locale_name : :"zh-Hant" , language_subtags : [ ] , extensions : %{ } , gettext_locale_name : nil , language : "zh" , locale : %{ } , private_use : [ ] , rbnf_locale_name : :"zh-Hant" , requested_locale_name : "zh-TW" , script : :Hant , territory : :TW , transform : %{ } , language_variants : [ ] } } ] } iex> Plausible.Cldr.AcceptLanguage . parse ( "invalid_tag" ) { :error , { Cldr.LanguageTag.ParseError , "Expected a BCP47 language tag. Could not parse the remaining \\" g \\" starting at position 11" } } iex> Plausible.Cldr.AcceptLanguage . parse ( "da,zh-TW;q=0.3,invalid_tag" ) { :ok , [ { 1.0 , % Cldr.LanguageTag { backend : TestBackend.Cldr , canonical_locale_name : "da" , cldr_locale_name : :da , language_subtags : [ ] , extensions : %{ } , gettext_locale_name : nil , language : "da" , locale : %{ } , private_use : [ ] , rbnf_locale_name : :da , requested_locale_name : "da" , script : :Latn , territory : :DK , transform : %{ } , language_variants : [ ] } } , { 0.3 , % Cldr.LanguageTag { backend : TestBackend.Cldr , canonical_locale_name : "zh-TW" , cldr_locale_name : :"zh-Hant" , language_subtags : [ ] , extensions : %{ } , gettext_locale_name : nil , language : "zh" , locale : %{ } , private_use : [ ] , rbnf_locale_name : :"zh-Hant" , requested_locale_name : "zh-TW" , script : :Hant , territory : :TW , transform : %{ } , language_variants : [ ] } } , { :error , { Cldr.LanguageTag.ParseError , "Expected a BCP47 language tag. Could not parse the remaining \\" g \\" starting at position 11" } } ] }","ref":"Plausible.Cldr.AcceptLanguage.html#parse/1","title":"Plausible.Cldr.AcceptLanguage.parse/1","type":"function"},{"doc":"Parses an Accept-Language header value in its string or tokenized form to produce a list of tuples of the form [{quality, %Cldr.LanguageTag{}}, ...] sorted by quality in descending order. Arguments accept-language is any string in the format defined by rfc2616 Returns {:ok, [{quality, language_tag}, ...]} or raises a Cldr.AcceptLanguageError exception If at least one valid language tag is found but errors are also detected on one more more tags, an {ok, list} tuple is returned wuth an error tuple for each invalid tag added at the end of the list. Example iex> Plausible.Cldr.AcceptLanguage . parse! ( "da,zh-TW;q=0.3" ) [ { 1.0 , % Cldr.LanguageTag { backend : TestBackend.Cldr , canonical_locale_name : "da" , cldr_locale_name : :da , language_subtags : [ ] , extensions : %{ } , gettext_locale_name : nil , language : "da" , locale : %{ } , private_use : [ ] , rbnf_locale_name : :da , requested_locale_name : "da" , script : :Latn , territory : :DK , transform : %{ } , language_variants : [ ] } } , { 0.3 , % Cldr.LanguageTag { backend : TestBackend.Cldr , canonical_locale_name : "zh-TW" , cldr_locale_name : :"zh-Hant" , language_subtags : [ ] , extensions : %{ } , gettext_locale_name : nil , language : "zh" , locale : %{ } , private_use : [ ] , rbnf_locale_name : :"zh-Hant" , requested_locale_name : "zh-TW" , script : :Hant , territory : :TW , transform : %{ } , language_variants : [ ] } } ] Plausible.Cldr.AcceptLanguage . parse! "invalid_tag" ** (Cldr.AcceptLanguageError) "Expected a BCP47 language tag. Could not parse the remaining "g" starting at position 11 (ex_cldr) lib/cldr/accept_language.ex:304: Cldr.AcceptLanguage.parse!/1 iex> Plausible.Cldr.AcceptLanguage . parse! ( "da,zh-TW;q=0.3,invalid_tag" ) [ { 1.0 , % Cldr.LanguageTag { backend : TestBackend.Cldr , canonical_locale_name : "da" , cldr_locale_name : :da , language_subtags : [ ] , extensions : %{ } , gettext_locale_name : nil , language : "da" , locale : %{ } , private_use : [ ] , rbnf_locale_name : :da , requested_locale_name : "da" , script : :Latn , territory : :DK , transform : %{ } , language_variants : [ ] } } , { 0.3 , % Cldr.LanguageTag { backend : TestBackend.Cldr , canonical_locale_name : "zh-TW" , cldr_locale_name : :"zh-Hant" , language_subtags : [ ] , extensions : %{ } , gettext_locale_name : nil , language : "zh" , locale : %{ } , private_use : [ ] , rbnf_locale_name : :"zh-Hant" , requested_locale_name : "zh-TW" , script : :Hant , territory : :TW , transform : %{ } , language_variants : [ ] } } , { :error , { Cldr.LanguageTag.ParseError , "Expected a BCP47 language tag. Could not parse the remaining \\" g \\" starting at position 11" } } ]","ref":"Plausible.Cldr.AcceptLanguage.html#parse!/1","title":"Plausible.Cldr.AcceptLanguage.parse!/1","type":"function"},{"doc":"","ref":"Plausible.Cldr.Currency.html","title":"Plausible.Cldr.Currency","type":"module"},{"doc":"Returns a map of the metadata for all currencies for a given locale. Arguments locale is any valid locale name returned by MyApp.Cldr.known_locale_names/0 or a Cldr.LanguageTag struct returned by MyApp.Cldr.Locale.new!/1 currency_status is :all , :current , :historic , unannotated or :tender ; or a list of one or more status. The default is :all . See Cldr.Currency.currency_filter/2 . Returns {:ok, currency_map} or {:error, {exception, reason}} Example MyApp.Cldr.Currency.currencies_for_locale "en" => {:ok, %{ FJD : % Cldr.Currency { cash_digits : 2 , cash_rounding : 0 , code : "FJD" , count : %{ one : "Fijian dollar" , other : "Fijian dollars" } , digits : 2 , from : nil , iso_digits : 2 , name : "Fijian Dollar" , narrow_symbol : "$" , rounding : 0 , symbol : "FJD" , tender : true , to : nil } , SUR : % Cldr.Currency { cash_digits : 2 , cash_rounding : 0 , code : "SUR" , count : %{ one : "Soviet rouble" , other : "Soviet roubles" } , digits : 2 , from : nil , iso_digits : nil , name : "Soviet Rouble" , narrow_symbol : nil , rounding : 0 , symbol : "SUR" , tender : true , to : nil } , ... } }","ref":"Plausible.Cldr.Currency.html#currencies_for_locale/3","title":"Plausible.Cldr.Currency.currencies_for_locale/3","type":"function"},{"doc":"Returns a map of the metadata for all currencies for a given locale and raises on error. Arguments locale is any valid locale name returned by MyApp.Cldr.known_locale_names/0 or a Cldr.LanguageTag struct returned by MyApp.Cldr.Locale.new!/1 currency_status is :all , :current , :historic , unannotated or :tender ; or a list of one or more status. The default is :all . See Cldr.Currency.currency_filter/2 . Returns {:ok, currency_map} or raises an exception Example MyApp.Cldr.Currency.currencies_for_locale! "en" => %{ FJD : % Cldr.Currency { cash_digits : 2 , cash_rounding : 0 , code : "FJD" , count : %{ one : "Fijian dollar" , other : "Fijian dollars" } , digits : 2 , from : nil , iso_digits : 2 , name : "Fijian Dollar" , narrow_symbol : "$" , rounding : 0 , symbol : "FJD" , tender : true , to : nil } , SUR : % Cldr.Currency { cash_digits : 2 , cash_rounding : 0 , code : "SUR" , count : %{ one : "Soviet rouble" , other : "Soviet roubles" } , digits : 2 , from : nil , iso_digits : nil , name : "Soviet Rouble" , narrow_symbol : nil , rounding : 0 , symbol : "SUR" , tender : true , to : nil } , ... }","ref":"Plausible.Cldr.Currency.html#currencies_for_locale!/3","title":"Plausible.Cldr.Currency.currencies_for_locale!/3","type":"function"},{"doc":"Returns the currency metadata for the requested currency code. Arguments currency_or_currency_code is a binary or atom representation of an ISO 4217 currency code, or a %Cldr.Currency{} struct. Options :locale is any valid locale name returned by Cldr.known_locale_names/1 or a Cldr.LanguageTag struct returned by Cldr.Locale.new!/2 Returns A {:ok, currency} or {:error, {exception, reason}} Examples iex> Plausible.Cldr.Currency . currency_for_code ( "AUD" ) { :ok , % Cldr.Currency { cash_digits : 2 , cash_rounding : 0 , code : "AUD" , count : %{ one : "Australian dollar" , other : "Australian dollars" } , digits : 2 , iso_digits : 2 , name : "Australian Dollar" , narrow_symbol : "$" , rounding : 0 , symbol : "A$" , tender : true } } iex> Plausible.Cldr.Currency . currency_for_code ( "THB" ) { :ok , % Cldr.Currency { cash_digits : 2 , cash_rounding : 0 , code : "THB" , count : %{ one : "Thai baht" , other : "Thai baht" } , digits : 2 , iso_digits : 2 , name : "Thai Baht" , narrow_symbol : "฿" , rounding : 0 , symbol : "THB" , tender : true } }","ref":"Plausible.Cldr.Currency.html#currency_for_code/2","title":"Plausible.Cldr.Currency.currency_for_code/2","type":"function"},{"doc":"Returns the currency metadata for the requested currency code. Arguments currency_or_currency_code is a binary or atom representation of an ISO 4217 currency code, or a %Cldr.Currency{} struct. Options :locale is any valid locale name returned by Cldr.known_locale_names/1 or a Cldr.LanguageTag struct returned by Cldr.Locale.new!/2 Returns A t:Cldr.Current.t/0 or raises an exception Examples iex> Plausible.Cldr.Currency . currency_for_code! ( "AUD" ) % Cldr.Currency { cash_digits : 2 , cash_rounding : 0 , code : "AUD" , count : %{ one : "Australian dollar" , other : "Australian dollars" } , digits : 2 , iso_digits : 2 , name : "Australian Dollar" , narrow_symbol : "$" , rounding : 0 , symbol : "A$" , tender : true } iex> Plausible.Cldr.Currency . currency_for_code! ( "THB" ) % Cldr.Currency { cash_digits : 2 , cash_rounding : 0 , code : "THB" , count : %{ one : "Thai baht" , other : "Thai baht" } , digits : 2 , iso_digits : 2 , name : "Thai Baht" , narrow_symbol : "฿" , rounding : 0 , symbol : "THB" , tender : true }","ref":"Plausible.Cldr.Currency.html#currency_for_code!/2","title":"Plausible.Cldr.Currency.currency_for_code!/2","type":"function"},{"doc":"Returns the effective currency for a given locale Arguments locale is a Cldr.LanguageTag struct returned by Cldr.Locale.new!/2 Returns A ISO 4217 currency code as an upcased atom Examples iex> { :ok , locale } = Plausible.Cldr . validate_locale "en" iex> Plausible.Cldr.Currency . currency_from_locale locale :USD iex> { :ok , locale } = Plausible.Cldr . validate_locale "en-AU" iex> Plausible.Cldr.Currency . currency_from_locale locale :AUD iex> Plausible.Cldr.Currency . currency_from_locale "en-GB" :GBP","ref":"Plausible.Cldr.Currency.html#currency_from_locale/1","title":"Plausible.Cldr.Currency.currency_from_locale/1","type":"function"},{"doc":"Returns a list of historic and the current currency for a given locale. Arguments locale is any valid locale name returned by MyApp.Cldr.known_locale_names/0 or a Cldr.LanguageTag struct returned by MyApp.Cldr.Locale.new!/1 Example iex> MyApp.Cldr.Currency . currency_history_for_locale "en" { :ok , %{ USD : %{ from : ~D[1792-01-01] , to : nil } , USN : %{ tender : false } , USS : %{ from : nil , tender : false , to : ~D[2014-03-01] } } }","ref":"Plausible.Cldr.Currency.html#currency_history_for_locale/1","title":"Plausible.Cldr.Currency.currency_history_for_locale/1","type":"function"},{"doc":"Returns a map that matches a currency string to a currency code. A currency string is a localised name or symbol representing a currency in a locale-specific manner. Arguments locale is any valid locale name returned by MyApp.Cldr.known_locale_names/0 or a Cldr.LanguageTag struct returned by MyApp.Cldr.Locale.new!/1 currency_status is :all , :current , :historic , unannotated or :tender ; or a list of one or more status. The default is :all . See Cldr.Currency.currency_filter/2 . Returns {:ok, currency_string_map} or {:error, {exception, reason}} Example MyApp.Cldr.Currency . currency_strings "en" => { :ok , %{ "mexican silver pesos" => :MXP , "sudanese dinar" => :SDD , "bad" => :BAD , "rsd" => :RSD , "swazi lilangeni" => :SZL , "zairean new zaire" => :ZRN , "guyanaese dollars" => :GYD , "equatorial guinean ekwele" => :GQE , ... } }","ref":"Plausible.Cldr.Currency.html#currency_strings/3","title":"Plausible.Cldr.Currency.currency_strings/3","type":"function"},{"doc":"Returns a map that matches a currency string to a currency code or raises an exception. A currency string is a localised name or symbol representing a currency in a locale-specific manner. Arguments locale is any valid locale name returned by MyApp.Cldr.known_locale_names/0 or a Cldr.LanguageTag struct returned by MyApp.Cldr.Locale.new!/1 currency_status is :all , :current , :historic , unannotated or :tender ; or a list of one or more status. The default is :all . See Cldr.Currency.currency_filter/2 . Returns {:ok, currency_string_map} or raises an exception Example MyApp.Cldr.Currency . currency_strings! "en" => %{ "mexican silver pesos" => :MXP , "sudanese dinar" => :SDD , "bad" => :BAD , "rsd" => :RSD , "swazi lilangeni" => :SZL , "zairean new zaire" => :ZRN , "guyanaese dollars" => :GYD , "equatorial guinean ekwele" => :GQE , ... }","ref":"Plausible.Cldr.Currency.html#currency_strings!/3","title":"Plausible.Cldr.Currency.currency_strings!/3","type":"function"},{"doc":"Returns the current currency for a given locale. This function does not consider the U extenion parameters cu or rg . It is recommended to us Cldr.Currency.currency_from_locale/1 in most circumstances. Arguments locale is any valid locale name returned by MyApp.Cldr.known_locale_names/0 or a Cldr.LanguageTag struct returned by MyApp.Cldr.Locale.new!/1 Example iex> MyApp.Cldr.Currency . current_currency_from_locale "en" :USD iex> MyApp.Cldr.Currency . current_currency_from_locale "en-AU" :AUD","ref":"Plausible.Cldr.Currency.html#current_currency_from_locale/1","title":"Plausible.Cldr.Currency.current_currency_from_locale/1","type":"function"},{"doc":"Returns a mapping from a territory code to its current currency code. If a territory has no current currency (like Antartica, territory code :AQ ) then no mapping is returned for that territory. Returns A map of {territory_code => Cldr.Currency.t} Example iex> Plausible.Cldr.Currency . current_territory_currencies ( )","ref":"Plausible.Cldr.Currency.html#current_territory_currencies/0","title":"Plausible.Cldr.Currency.current_territory_currencies/0","type":"function"},{"doc":"See Plausible.Cldr.Currency.known_currency_codes/0 .","ref":"Plausible.Cldr.Currency.html#known_currencies/0","title":"Plausible.Cldr.Currency.known_currencies/0","type":"function"},{"doc":"See Plausible.Cldr.Currency.known_currency_code?/1 .","ref":"Plausible.Cldr.Currency.html#known_currency?/1","title":"Plausible.Cldr.Currency.known_currency?/1","type":"function"},{"doc":"Returns a 2-tuple indicating if the supplied currency code is known. Arguments currency_code is a binary or atom representing an ISO4217 currency code Returns {:ok, currency_code} or {:error, {exception, reason}} Examples iex> Plausible.Cldr.Currency . known_currency_code "AUD" { :ok , :AUD } iex> Plausible.Cldr.Currency . known_currency_code "GGG" { :error , { Cldr.UnknownCurrencyError , "The currency \\" GGG \\" is invalid" } }","ref":"Plausible.Cldr.Currency.html#known_currency_code/1","title":"Plausible.Cldr.Currency.known_currency_code/1","type":"function"},{"doc":"Returns a boolean indicating if the supplied currency code is known. Arguments currency_code is a binary or atom representing an ISO4217 currency code Returns true or false Examples iex> Plausible.Cldr.Currency . known_currency_code? "AUD" true iex> Plausible.Cldr.Currency . known_currency_code? "GGG" false iex> Plausible.Cldr.Currency . known_currency_code? :XCV false","ref":"Plausible.Cldr.Currency.html#known_currency_code?/1","title":"Plausible.Cldr.Currency.known_currency_code?/1","type":"function"},{"doc":"Returns a list of all known currency codes. Example iex> Plausible.Cldr.Currency . known_currency_codes","ref":"Plausible.Cldr.Currency.html#known_currency_codes/0","title":"Plausible.Cldr.Currency.known_currency_codes/0","type":"function"},{"doc":"Returns a Currency struct created from the arguments. Arguments currency is a private use currency code in a format defined by ISO4217 which is X followed by two alphanumeric characters. options is a map of options representing the optional elements of the Cldr.Currency.t struct. Options :name is the name of the currency. Required. :digits is the precision of the currency. Required. :symbol is the currency symbol. Optional. :narrow_symbol is an alternative narrow symbol. Optional. :round_nearest is the rounding precision such as 0.05 . Optional. :alt_code is an alternative currency code for application use. :cash_digits is the precision of the currency when used as cash. Optional. :cash_rounding_nearest is the rounding precision when used as cash such as 0.05 . Optional. Returns {:ok, Cldr.Currency.t} or {:error, {exception, message}} Example iex> Plausible.Cldr.Currency . new ( :XAE , name : "Custom Name" , digits : 0 ) { :ok , % Cldr.Currency { alt_code : :XAE , cash_digits : 0 , cash_rounding : nil , code : :XAE , count : %{ other : "Custom Name" } , digits : 0 , from : nil , iso_digits : 0 , name : "Custom Name" , narrow_symbol : nil , rounding : 0 , symbol : "XAE" , tender : false , to : nil } } iex> MyApp.Cldr.Currency . new ( :XAH , name : "Custom Name" ) { :error , "Required options are missing. Required options are [:name, :digits]" } iex> Plausible.Cldr.Currency . new ( :XAE , name : "XAE" , digits : 0 ) { :error , { Cldr.CurrencyAlreadyDefined , "Currency :XAE is already defined." } }","ref":"Plausible.Cldr.Currency.html#new/2","title":"Plausible.Cldr.Currency.new/2","type":"function"},{"doc":"Returns the appropriate currency display name for the currency , based on the plural rules in effect for the locale . Arguments number is an integer, float or Decimal currency is any currency returned by Cldr.Currency.known_currencies/0 options is a keyword list of options Options locale is any valid locale name returned by MyApp.Cldr.known_locale_names/0 or a Cldr.LanguageTag struct returned by MyApp.Cldr.Locale.new!/1 . The default is Plausible.Cldr.get_locale/0 Returns {:ok, plural_string} or {:error, {exception, message}} Examples iex> Plausible.Cldr.Currency . pluralize 1 , :USD { :ok , "US dollar" } iex> Plausible.Cldr.Currency . pluralize 3 , :USD { :ok , "US dollars" } iex> Plausible.Cldr.Currency . pluralize 12 , :USD , locale : "zh" { :ok , "美元" } iex> Plausible.Cldr.Currency . pluralize 12 , :USD , locale : "fr" { :ok , "dollars des États-Unis" } iex> Plausible.Cldr.Currency . pluralize 1 , :USD , locale : "fr" { :ok , "dollar des États-Unis" }","ref":"Plausible.Cldr.Currency.html#pluralize/3","title":"Plausible.Cldr.Currency.pluralize/3","type":"function"},{"doc":"Returns the strings associated with a currency in a given locale. Arguments currency is an ISO4217 currency code locale is any valid locale name returned by MyApp.Cldr.known_locale_names/0 or a Cldr.LanguageTag struct returned by MyApp.Cldr.Locale.new!/1 Returns A list of strings or {:error, {exception, reason}} Example iex> MyApp.Cldr.Currency . strings_for_currency :AUD , "en" [ "a$" , "australian dollars" , "aud" , "australian dollar" ]","ref":"Plausible.Cldr.Currency.html#strings_for_currency/2","title":"Plausible.Cldr.Currency.strings_for_currency/2","type":"function"},{"doc":"Backend module that provides functions to define new locales and display human-readable locale names for presentation purposes.","ref":"Plausible.Cldr.Locale.html","title":"Plausible.Cldr.Locale","type":"module"},{"doc":"Returns the list of fallback locale names, starting with the provided locale name. Fallbacks are a list of locate names which can be used to resolve translation or other localization data if such localised data does not exist for this specific locale. After locale-specific fallbacks are determined, the the default locale and its fallbacks are added to the chain. Arguments locale_name is any locale name returned by Plausible.Cldr.known_locale_names/0 Returns {:ok, list_of_locale_names} or {:error, {exception, reason}} Examples In these examples the default locale is :"en-001" . iex> Plausible.Cldr.Locale . fallback_locale_names ( :"fr-CA" ) { :ok , [ :"fr-CA" , :fr , :"en-001" , :en ] } # Fallbacks are typically formed by progressively # stripping variant, territory and script from the # given locale name. But not always - there are # certain fallbacks that take a different path. iex> Plausible.Cldr.Locale . fallback_locale_names ( :nb ) { :ok , [ :nb , :no , :"en-001" , :en ] }","ref":"Plausible.Cldr.Locale.html#fallback_locale_names/1","title":"Plausible.Cldr.Locale.fallback_locale_names/1","type":"function"},{"doc":"Returns the list of fallback locales, starting with the provided locale name. Fallbacks are a list of locate names which can be used to resolve translation or other localization data if such localised data does not exist for this specific locale. After locale-specific fallbacks are determined, the the default locale and its fallbacks are added to the chain. Arguments locale_name is any locale name returned by Plausible.Cldr.known_locale_names/0 Returns {:ok, list_of_locales} or {:error, {exception, reason}} Examples In these examples the default locale is :"en-001" . Plausible.Cldr.Locale . fallback_locales ( :"fr-CA" ) => { :ok , [ # Cldr.LanguageTag < fr - CA [ validated ] > , # Cldr.LanguageTag < fr [ validated ] > , # Cldr.LanguageTag < en [ validated ] > ] } # Fallbacks are typically formed by progressively # stripping variant, territory and script from the # given locale name. But not always - there are # certain fallbacks that take a different path. Plausible.Cldr.Locale . fallback_locales ( :nb ) ) => { :ok , [ # Cldr.LanguageTag < nb [ validated ] > , # Cldr.LanguageTag < no [ validated ] > , # Cldr.LanguageTag < en [ validated ] > ] }","ref":"Plausible.Cldr.Locale.html#fallback_locales/1","title":"Plausible.Cldr.Locale.fallback_locales/1","type":"function"},{"doc":"Returns the "best fit" locale for a given territory. Using the population percentage data from CLDR, the language most commonly spoken in the given territory is used to form a locale name which is then validated against the given backend. First a territory-specific locale is validated and if that fails, the base language only is validate. For example, if the territory is AU then then the language most spoken is "en". First, the locale "en-AU" is validated and if that fails, "en" is validated. Arguments territory is any ISO 3166 Alpha-2 territory code that can be validated by Cldr.validate_territory/1 Returns {:ok, language_tag} or {:error, {exception, reason}} Examples iex> Plausible.Cldr.Locale.locale_for_territory(:AU) Elixir.Plausible.Cldr.validate_locale(:"en-AU") iex> Plausible.Cldr.Locale.locale_for_territory(:US) Elixir.Plausible.Cldr.validate_locale(:"en-US") iex> Plausible.Cldr.Locale.locale_for_territory(:ZZ) {:error, {Cldr.UnknownTerritoryError, "The territory :ZZ is unknown"}}","ref":"Plausible.Cldr.Locale.html#locale_for_territory/1","title":"Plausible.Cldr.Locale.locale_for_territory/1","type":"function"},{"doc":"Returns a "best fit" locale for a host name. Arguments host is any valid host name options is a keyword list of options. The default is [] . Options :tlds is a list of territory codes as upper-cased atoms that are to be considered as top-level domains. See Cldr.Locale.locale_from_host/2 for the default list. Returns {:ok, langauge_tag} or {:error, {exception, reason}} Notes Certain top-level domains have become associated with content underlated to the territory for who the domain is registered. Therefore Google (and perhaps others) do not associate these TLDs as belonging to the territory but rather are considered generic top-level domain names. Examples iex> Plausible.Cldr.Locale . locale_from_host "a.b.com.au" Elixir.Plausible.Cldr . validate_locale ( :"en-AU" ) iex> Plausible.Cldr.Locale . locale_from_host ( "a.b.com.tv" ) { :error , { Cldr.UnknownLocaleError , "No locale was identified for territory \\" tv \\" " } } iex> Plausible.Cldr.Locale . locale_from_host ( "a.b.com" ) { :error , { Cldr.UnknownLocaleError , "No locale was identified for territory \\" com \\" " } }","ref":"Plausible.Cldr.Locale.html#locale_from_host/2","title":"Plausible.Cldr.Locale.locale_from_host/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Locale.html#new/1","title":"Plausible.Cldr.Locale.new/1","type":"function"},{"doc":"","ref":"Plausible.Cldr.Locale.html#new!/1","title":"Plausible.Cldr.Locale.new!/1","type":"function"},{"doc":"Returns the last segment of a host that might be a territory. Arguments host is any valid host name Returns {:ok, territory} or {:error, {exception, reason}} Examples iex> Cldr.Locale . territory_from_host ( "a.b.com.au" ) { :ok , :AU } iex> Cldr.Locale . territory_from_host ( "a.b.com" ) { :error , { Cldr.UnknownLocaleError , "No locale was identified for territory \\" com \\" " } }","ref":"Plausible.Cldr.Locale.html#territory_from_host/1","title":"Plausible.Cldr.Locale.territory_from_host/1","type":"function"},{"doc":"Returns the territory from a language tag or locale name. Arguments locale is any language tag returned by Plausible.Cldr.Locale.new/1 or a locale name in the list returned by Plausible.Cldr.known_locale_names/0 Returns A territory code as an atom Examples iex> Plausible.Cldr.Locale . territory_from_locale "en-US" :US iex> Plausible.Cldr.Locale . territory_from_locale "en-US-u-rg-GBzzzz" :GB","ref":"Plausible.Cldr.Locale.html#territory_from_locale/1","title":"Plausible.Cldr.Locale.territory_from_locale/1","type":"function"},{"doc":"Returns the time zone from a language tag or locale name. Arguments locale is any language tag returned by Plausible.Cldr.Locale.new/1 or a locale name in the list returned by Plausible.Cldr.known_locale_names/0 Returns A time zone ID as a string or :error if no time zone can be determined Examples iex> Plausible.Cldr.Locale . timezone_from_locale "en-US-u-tz-ausyd" "Australia/Sydney"","ref":"Plausible.Cldr.Locale.html#timezone_from_locale/1","title":"Plausible.Cldr.Locale.timezone_from_locale/1","type":"function"},{"doc":"Formats numbers and currencies based upon CLDR's decimal formats specification. The format specification is documentated in Unicode TR35 . There are several classes of formatting including non-scientific, scientific, rules based (for spelling and ordinal formats), compact formats that display 1k rather than 1,000 and so on. See Cldr.Number.to_string/2 for specific formatting options. Non-Scientific Notation Formatting The following description applies to formats that do not use scientific notation or significant digits: If the number of actual integer digits exceeds the maximum integer digits, then only the least significant digits are shown. For example, 1997 is formatted as "97" if the maximum integer digits is set to 2. If the number of actual integer digits is less than the minimum integer digits, then leading zeros are added. For example, 1997 is formatted as "01997" if the minimum integer digits is set to 5. If the number of actual fraction digits exceeds the maximum fraction digits, then half-even rounding it performed to the maximum fraction digits. For example, 0.125 is formatted as "0.12" if the maximum fraction digits is 2. This behavior can be changed by specifying a rounding increment and a rounding mode. If the number of actual fraction digits is less than the minimum fraction digits, then trailing zeros are added. For example, 0.125 is formatted as "0.1250" if the minimum fraction digits is set to 4. Trailing fractional zeros are not displayed if they occur j positions after the decimal, where j is less than the maximum fraction digits. For example, 0.10004 is formatted as "0.1" if the maximum fraction digits is four or less. Scientific Notation Formatting Numbers in scientific notation are expressed as the product of a mantissa and a power of ten, for example, 1234 can be expressed as 1.234 x 10^3. The mantissa is typically in the half-open interval [1.0, 10.0) or sometimes [0.0, 1.0), but it need not be. In a pattern, the exponent character immediately followed by one or more digit characters indicates scientific notation. Example: "0.###E0" formats the number 1234 as "1.234E3". The number of digit characters after the exponent character gives the minimum exponent digit count. There is no maximum. Negative exponents are formatted using the localized minus sign, not the prefix and suffix from the pattern. This allows patterns such as "0.###E0 m/s". To prefix positive exponents with a localized plus sign, specify '+' between the exponent and the digits: "0.###E+0" will produce formats "1E+1", "1E+0", "1E-1", and so on. (In localized patterns, use the localized plus sign rather than '+'.) The minimum number of integer digits is achieved by adjusting the exponent. Example: 0.00123 formatted with "00.###E0" yields "12.3E-4". This only happens if there is no maximum number of integer digits. If there is a maximum, then the minimum number of integer digits is fixed at one. The maximum number of integer digits, if present, specifies the exponent grouping. The most common use of this is to generate engineering notation, in which the exponent is a multiple of three, for example, "##0.###E0". The number 12345 is formatted using "##0.####E0" as "12.345E3". When using scientific notation, the formatter controls the digit counts using significant digits logic. The maximum number of significant digits limits the total number of integer and fraction digits that will be shown in the mantissa; it does not affect parsing. For example, 12345 formatted with "##0.##E0" is "12.3E3". Exponential patterns may not contain grouping separators. Significant Digits There are two ways of controlling how many digits are shows: (a) significant digits counts, or (b) integer and fraction digit counts. Integer and fraction digit counts are described above. When a formatter is using significant digits counts, it uses however many integer and fraction digits are required to display the specified number of significant digits. It may ignore min/max integer/fraction digits, or it may use them to the extent possible.","ref":"Plausible.Cldr.Number.html","title":"Plausible.Cldr.Number","type":"module"},{"doc":"Parse a string locale-aware manner and return a number. Arguments string is any String.t options is a keyword list of options Options :number is one of :integer , :float , :decimal or nil . The default is nil meaning that the type auto-detected as either an integer or a float . :locale is any locale returned by Plausible.Cldr.known_locale_names/0 or a Cldr.LanguageTag.t . The default is Plausible.Cldr.get_locale/0 . Returns A number of the requested or default type or {:error, {exception, error}} if no number could be determined Notes This function parses a string to return a number but in a locale-aware manner. It will normalise grouping characters and decimal separators, different forms of the + and - symbols that appear in Unicode and strips any _ characters that might be used for formatting in a string. It then parses the number using the Elixir standard library functions. Examples iex> Plausible.Cldr.Number . parse ( "+1.000,34" , locale : "de" ) { :ok , 1000.34 } iex> Plausible.Cldr.Number . parse ( "-1_000_000.34" ) { :ok , - 1000000.34 } iex> Plausible.Cldr.Number . parse ( "1.000" , locale : "de" , number : :integer ) { :ok , 1000 } iex> Plausible.Cldr.Number . parse ( "+1.000,34" , locale : "de" , number : :integer ) { :error , { Cldr.Number.ParseError , "The string \\" +1.000,34 \\" could not be parsed as a number" } }","ref":"Plausible.Cldr.Number.html#parse/2","title":"Plausible.Cldr.Number.parse/2","type":"function"},{"doc":"Resolve curencies from strings within a list. Arguments list is any list in which currency names and symbols are expected options is a keyword list of options Options :locale is any valid locale returned by Cldr.known_locale_names/1 or a Cldr.LanguageTag struct returned by Cldr.Locale.new!/2 The default is Plausible.Cldr.get_locale() :only is an atom or list of atoms representing the currencies or currency types to be considered for a match. The equates to a list of acceptable currencies for parsing. See the notes below for currency types. :except is an atom or list of atoms representing the currencies or currency types to be not considered for a match. This equates to a list of unacceptable currencies for parsing. See the notes below for currency types. :fuzzy is a float greater than 0.0 and less than or equal to 1.0 which is used as input to String.jaro_distance/2 to determine is the provided currency string is close enough to a known currency string for it to identify definitively a currency code. It is recommended to use numbers greater than 0.8 in order to reduce false positives. Notes The :only and :except options accept a list of currency codes and/or currency types. The following types are recognised. If both :only and :except are specified, the :except entries take priority - that means any entries in :except are removed from the :only entries. :all , the default, considers all currencies :current considers those currencies that have a :to date of nil and which also is a known ISO4217 currency :historic is the opposite of :current :tender considers currencies that are legal tender :unannotated considers currencies that don't have "(some string)" in their names. These are usually financial instruments. Examples iex> Plausible.Cldr.Number . scan ( "100 US dollars" ) ...> |> Plausible.Cldr.Number . resolve_currencies [ 100 , :USD ] iex> Plausible.Cldr.Number . scan ( "100 eurosports" ) ...> |> Plausible.Cldr.Number . resolve_currencies ( fuzzy : 0.75 ) [ 100 , :EUR ] iex> Plausible.Cldr.Number . scan ( "100 dollars des États-Unis" ) ...> |> Plausible.Cldr.Number . resolve_currencies ( locale : "fr" ) [ 100 , :USD ]","ref":"Plausible.Cldr.Number.html#resolve_currencies/2","title":"Plausible.Cldr.Number.resolve_currencies/2","type":"function"},{"doc":"Resolve a currency from a string Arguments list is any list in which currency names and symbols are expected options is a keyword list of options Options :locale is any valid locale returned by Cldr.known_locale_names/1 or a Cldr.LanguageTag struct returned by Cldr.Locale.new!/2 The default is Plausible.Cldr.get_locale() :only is an atom or list of atoms representing the currencies or currency types to be considered for a match. The equates to a list of acceptable currencies for parsing. See the notes below for currency types. :except is an atom or list of atoms representing the currencies or currency types to be not considered for a match. This equates to a list of unacceptable currencies for parsing. See the notes below for currency types. :fuzzy is a float greater than 0.0 and less than or equal to 1.0 which is used as input to String.jaro_distance/2 to determine is the provided currency string is close enough to a known currency string for it to identify definitively a currency code. It is recommended to use numbers greater than 0.8 in order to reduce false positives. Returns An ISO4217 currency code as an atom or {:error, {exception, message}} Notes The :only and :except options accept a list of currency codes and/or currency types. The following types are recognised. If both :only and :except are specified, the :except entries take priority - that means any entries in :except are removed from the :only entries. :all , the default, considers all currencies :current considers those currencies that have a :to date of nil and which also is a known ISO4217 currency :historic is the opposite of :current :tender considers currencies that are legal tender :unannotated considers currencies that don't have "(some string)" in their names. These are usually financial instruments. Examples iex> Plausible.Cldr.Number . resolve_currency ( "US dollars" ) [ :USD ] iex> Plausible.Cldr.Number . resolve_currency ( "100 eurosports" , fuzzy : 0.75 ) [ :EUR ] iex> Plausible.Cldr.Number . resolve_currency ( "dollars des États-Unis" , locale : "fr" ) [ :USD ] iex> Plausible.Cldr.Number . resolve_currency ( "not a known currency" , locale : "fr" ) { :error , { Cldr.UnknownCurrencyError , "The currency \\" not a known currency \\" is unknown or not supported" } }","ref":"Plausible.Cldr.Number.html#resolve_currency/2","title":"Plausible.Cldr.Number.resolve_currency/2","type":"function"},{"doc":"Resolve and tokenize percent or permille from the beginning and/or the end of a string Arguments list is any list in which percent and permille symbols are expected options is a keyword list of options Options :locale is any valid locale returned by Cldr.known_locale_names/1 or a Cldr.LanguageTag struct returned by Cldr.Locale.new!/2 The default is options[:backend].get_locale() Returns An :percent or permille or {:error, {exception, message}} Examples iex> Plausible.Cldr.Number . resolve_per "11%" [ "11" , :percent ] iex> Plausible.Cldr.Number . resolve_per "% of linguists" [ :percent , " of linguists" ] iex> Plausible.Cldr.Number . resolve_per "% of linguists %" [ :percent , " of linguists " , :percent ]","ref":"Plausible.Cldr.Number.html#resolve_per/2","title":"Plausible.Cldr.Number.resolve_per/2","type":"function"},{"doc":"Resolve and tokenize percent and permille sybols from strings within a list. Percent and permille symbols can be identified at the beginning and/or the end of a string. Arguments list is any list in which percent and permille symbols are expected options is a keyword list of options Options :locale is any valid locale returned by Cldr.known_locale_names/1 or a t:Cldr.LanguageTag struct returned by Cldr.Locale.new!/2 The default is options[:backend].get_locale() Examples iex> Plausible.Cldr.Number . scan ( "100%" ) ...> |> Plausible.Cldr.Number . resolve_pers ( ) [ 100 , :percent ]","ref":"Plausible.Cldr.Number.html#resolve_pers/2","title":"Plausible.Cldr.Number.resolve_pers/2","type":"function"},{"doc":"Scans a string locale-aware manner and returns a list of strings and numbers. Arguments string is any String.t options is a keyword list of options Options :number is one of :integer , :float , :decimal or nil . The default is nil meaning that the type auto-detected as either an integer or a float . :locale is any locale returned by Cldr.known_locale_names/1 or a Cldr.LanguageTag.t . The default is Plausible.Cldr.get_locale/0 . Returns A list of strings and numbers Notes Number parsing is performed by Cldr.Number.Parser.parse/2 and any options provided are passed to that function. Examples iex> Plausible.Cldr.Number . scan ( "£1_000_000.34" ) [ "£" , 1000000.34 ] iex> Plausible.Cldr.Number . scan ( "I want £1_000_000 dollars" ) [ "I want £" , 1000000 , " dollars" ] iex> Plausible.Cldr.Number . scan ( "The prize is 23" ) [ "The prize is " , 23 ] iex> Plausible.Cldr.Number . scan ( "The lottery number is 23 for the next draw" ) [ "The lottery number is " , 23 , " for the next draw" ] iex> Plausible.Cldr.Number . scan ( "The loss is -1.000 euros" , locale : "de" , number : :integer ) [ "The loss is " , - 1000 , " euros" ]","ref":"Plausible.Cldr.Number.html#scan/2","title":"Plausible.Cldr.Number.scan/2","type":"function"},{"doc":"Formats a number and applies the :approximately format for a locale and number system. Arguments number is an integer, float or Decimal to be formatted options is a keyword list defining how the number is to be formatted. See Cldr.Number.to_string/3 for a description of the available options. Example iex> Plausible.Cldr.Number . to_approx_string 1234 { :ok , "~1,234" }","ref":"Plausible.Cldr.Number.html#to_approx_string/2","title":"Plausible.Cldr.Number.to_approx_string/2","type":"function"},{"doc":"Formats a number and applies the :at_least format for a locale and number system. Arguments number is an integer, float or Decimal to be formatted options is a keyword list defining how the number is to be formatted. See Plausible.Cldr.Number.to_string/2 for a description of the available options. Example iex> Plausible.Cldr.Number . to_at_least_string 1234 { :ok , "1,234+" }","ref":"Plausible.Cldr.Number.html#to_at_least_string/2","title":"Plausible.Cldr.Number.to_at_least_string/2","type":"function"},{"doc":"Formats a number and applies the :at_most format for a locale and number system. Arguments number is an integer, float or Decimal to be formatted options is a keyword list defining how the number is to be formatted. See Cldr.Number.to_string/3 for a description of the available options. Example iex> Plausible.Cldr.Number . to_at_most_string 1234 { :ok , "≤1,234" }","ref":"Plausible.Cldr.Number.html#to_at_most_string/2","title":"Plausible.Cldr.Number.to_at_most_string/2","type":"function"},{"doc":"Formats the first and last numbers of a range and applies the :range format for a locale and number system. Arguments number is an integer, float or Decimal to be formatted options is a keyword list defining how the number is to be formatted. See Cldr.Number.to_string/3 for a description of the available options. Example iex> Plausible.Cldr.Number . to_range_string 1234 .. 5678 { :ok , "1,234–5,678" }","ref":"Plausible.Cldr.Number.html#to_range_string/2","title":"Plausible.Cldr.Number.to_range_string/2","type":"function"},{"doc":"Returns a number formatted into a string according to a format pattern and options. Arguments number is an integer, float or Decimal to be formatted options is a keyword list defining how the number is to be formatted. Options format : the format style or a format string defining how the number is formatted. See Cldr.Number.Format for how format strings can be constructed. See Cldr.Number.Format.format_styles_for/3 to return available format styles for a locale. The default format is :standard . If :format is set to :long or :short then the formatting depends on whether :currency is specified. If not specified then the number is formatted as :decimal_long or :decimal_short . If :currency is specified the number is formatted as :currency_long or :currency_short and :fractional_digits is set to 0 as a default. :format may also be a format defined by CLDR's Rules Based Number Formats (RBNF). Further information is found in the module Cldr.Rbnf . The most commonly used formats in this category are to spell out the number in a the locales language. The applicable formats are :spellout , :spellout_year , :ordinal . A number can also be formatted as roman numbers by using the format :roman or :roman_lower . currency : is the currency for which the number is formatted. For available currencies see Cldr.Currency.known_currencies/0 . This option is required if :format is set to :currency . If currency is set and no :format is set, :format will be set to :currency as well. currency_symbol : Allows overriding a currency symbol. The alternatives are: :iso the ISO currency code will be used instead of the default currency symbol. :narrow uses the narrow symbol defined for the locale. The same narrow symbol can be defined for more than one currency and therefore this should be used with care. If no narrow symbol is defined, the standard symbol is used. :symbol uses the standard symbol defined in CLDR. A symbol is unique for each currency and can be safely used. "string" uses string as the currency symbol :standard (the default and recommended) uses the CLDR-defined symbol based upon the currency format for the locale. :cash : a boolean which indicates whether a number being formatted as a :currency is to be considered a cash value or not. Currencies can be rounded differently depending on whether :cash is true or false . *This option is deprecated in favour of currency_digits: :cash . :currency_digits indicates which of the rounding and digits should be used. The options are :accounting which is the default, :cash or :iso :rounding_mode : determines how a number is rounded to meet the precision of the format requested. The available rounding modes are :down , :half_up, :half_even, :ceiling, :floor, :half_down, :up. The default is :half_even . :number_system : determines which of the number systems for a locale should be used to define the separators and digits for the formatted number. If number_system is an atom then number_system is interpreted as a number system. If the :number_system is binary then it is interpreted as a number system name. See Cldr.Number.System.number_system_names_for/2 . The default is :default . :locale : determines the locale in which the number is formatted. See Cldr.known_locale_names/0 . The default is Cldr.get_locale/0 which is the locale currently in affect for this Process and which is set by Cldr.put_locale/1 . If :fractional_digits is set to a positive integer value then the number will be rounded to that number of digits and displayed accordingly - overriding settings that would be applied by default. For example, currencies have fractional digits defined reflecting each currencies minor unit. Setting :fractional_digits will override that setting. If :maximum_integer_digits is set to a positive integer value then the number is left truncated before formatting. For example if the number 1234 is formatted with the option maximum_integer_digits: 2 , the number is truncated to 34 and formatted. If :round_nearest is set to a positive integer value then the number will be rounded to nearest increment of that value - overriding settings that would be applied by default. :minimum_grouping_digits overrides the CLDR definition of minimum grouping digits. For example in the locale es the number 1234 is formatted by default as 1345 because the locale defines the minimium_grouping_digits as 2 . If minimum_grouping_digits: 1 is set as an option the number is formatting as 1.345 . The :minimum_grouping_digits is added to the grouping defined by the number format. If the sum of these two digits is greater than the number of digits in the integer (or fractional) part of the number then no grouping is performed. :wrapper is a 2-arity function that will be called for each number component with parameters string and tag where tag is one of :number , :currency_symbol , :currency_space , :literal , :quote , :percent , :permille , :minus or :plus . The function must return a string. The function can be used to wrap format elements in HTML or other tags. Locale extensions affecting formatting A locale identifier can specify options that affect number formatting. These options are: nu : defines the number system to be used if none is specified by the :number_system option to to_string/2 This key is part of the u extension and that document should be consulted for details on how to construct a locale identifier with these extensions. Wrapping format elements Wrapping elements is particularly useful when formatting a number with a currency symbol and the requirement is to have different HTML formatting applied to the symbol than the number. For example: iex> Cldr.Number . to_string ( 100 , format : :currency , currency : :USD , wrapper : fn ...> string , :currency_symbol -> "<span class= \\" symbol \\" >" <> string <> "</span>" ...> string , :number -> "<span class= \\" number \\" >" <> string <> "</span>" ...> string , :currency_space -> "<span>" <> string <> "</span>" ...> string , _other -> string ...> end ) { :ok , "<span class= \\" symbol \\" >$</span><span class= \\" number \\" >100.00</span>" } It is also possible and recommended to use the Phoenix.HTML.Tag.content_tag/3 function if wrapping HTML tags since these will ensure HTML entities are correctly encoded. For example: iex> Cldr.Number . to_string ( 100 , format : :currency , currency : :USD , wrapper : fn ...> string , :currency_symbol -> Phoenix.HTML.Tag . content_tag ( :span , string , class : "symbol" ) ...> string , :number -> Phoenix.HTML.Tag . content_tag ( :span , string , class : "number" ) ...> string , :currency_space -> Phoenix.HTML.Tag . content_tag ( :span , string ) ...> string , _other -> string ...> end ) { :ok , "<span class= \\" symbol \\" >$</span><span class= \\" number \\" >100.00</span>" } When formatting a number the format is parsed into format elements that might include a currency symbol, a literal string, inserted text between a currency symbol and the currency amount, a percent sign, the number itself and several other elements. In some cases it is helpful to be apply specific formatting to each element. This can be achieved by specifying a :wrapper option. This option takes a 2-arity function as an argument. For each element of the format the wrapper function is called with two parameters: the format element as a string and an atom representing the element type. The wrapper function is required to return a string that is then inserted in the final formatted number. Returns {:ok, string} or {:error, {exception, message}} Examples iex> Plausible.Cldr.Number . to_string 12345 { :ok , "12,345" } iex> Plausible.Cldr.Number . to_string 12345 , locale : "fr" { :ok , "12 345" } iex> Plausible.Cldr.Number . to_string 1345.32 , currency : :EUR , locale : "es" , minimum_grouping_digits : 1 { :ok , "1.345,32 €" } iex> Plausible.Cldr.Number . to_string 1345.32 , currency : :EUR , locale : "es" { :ok , "1345,32 €" } iex> Plausible.Cldr.Number . to_string 12345 , locale : "fr" , currency : "USD" { :ok , "12 345,00 $US" } iex> Plausible.Cldr.Number . to_string 12345 , format : "#E0" { :ok , "1.2345E4" } iex> Plausible.Cldr.Number . to_string 12345 , format : :accounting , currency : "THB" { :ok , "THB 12,345.00" } iex> Plausible.Cldr.Number . to_string - 12345 , format : :accounting , currency : "THB" { :ok , "(THB 12,345.00)" } iex> Plausible.Cldr.Number . to_string 12345 , format : :accounting , currency : "THB" , ...> locale : "th" { :ok , "฿12,345.00" } iex> Plausible.Cldr.Number . to_string 12345 , format : :accounting , currency : "THB" , ...> locale : "th" , number_system : :native { :ok , "฿๑๒,๓๔๕.๐๐" } iex> Plausible.Cldr.Number . to_string 1244.30 , format : :long { :ok , "1 thousand" } iex> Plausible.Cldr.Number . to_string 1244.30 , format : :long , currency : "USD" { :ok , "1,244 US dollars" } iex> Plausible.Cldr.Number . to_string 1244.30 , format : :short { :ok , "1K" } iex> Plausible.Cldr.Number . to_string 1244.30 , format : :short , currency : "EUR" { :ok , "€1K" } iex> Plausible.Cldr.Number . to_string 1234 , format : :spellout { :ok , "one thousand two hundred thirty-four" } iex> Plausible.Cldr.Number . to_string 1234 , format : :spellout_verbose { :ok , "one thousand two hundred and thirty-four" } iex> Plausible.Cldr.Number . to_string 1989 , format : :spellout_year { :ok , "nineteen eighty-nine" } iex> Plausible.Cldr.Number . to_string 123 , format : :ordinal { :ok , "123rd" } iex> Plausible.Cldr.Number . to_string 123 , format : :roman { :ok , "CXXIII" } iex> Plausible.Cldr.Number . to_string 123 , locale : "th-u-nu-thai" { :ok , "๑๒๓" } Errors An error tuple {:error, reason} will be returned if an error is detected. The two most likely causes of an error return are: A format cannot be compiled. In this case the error tuple will look like: iex> Plausible.Cldr.Number . to_string ( 12345 , format : "0#" ) { :error , { Cldr.FormatCompileError , "Decimal format compiler: syntax error before: \\" # \\" " } } The format style requested is not defined for the locale and number_system . This happens typically when the number system is :algorithmic rather than the more common :numeric . In this case the error return looks like: iex> Plausible.Cldr.Number . to_string ( 1234 , locale : "he" , number_system : "hebr" ) { :error , { Cldr.UnknownFormatError , "The locale :he with number system :hebr does not define a format :standard" } }","ref":"Plausible.Cldr.Number.html#to_string/2","title":"Plausible.Cldr.Number.to_string/2","type":"function"},{"doc":"Same as the execution of to_string/2 but raises an exception if an error would be returned. Arguments number is an integer, float or Decimal to be formatted options is a keyword list defining how the number is to be formatted. See Plausible.Cldr.Number.to_string/2 Returns a formatted number as a string or raises an exception Examples iex> Plausible.Cldr.Number . to_string! 12345 "12,345" iex> Plausible.Cldr.Number . to_string! 12345 , locale : "fr" "12 345"","ref":"Plausible.Cldr.Number.html#to_string!/2","title":"Plausible.Cldr.Number.to_string!/2","type":"function"},{"doc":"Return a valid number system from a provided locale and number system name or type. The number system or number system type must be valid for the given locale. If a number system type is provided, the underlying number system is returned. Arguments locale is any valid locale name returned by Cldr.known_locale_names/1 or a Cldr.LanguageTag struct returned by Cldr.Locale.new!/2 system_name is any number system name returned by Cldr.known_number_systems/0 or a number system type returned by Cldr.known_number_system_types/0 Examples iex> Plausible.Cldr.Number . validate_number_system "en" , :latn { :ok , :latn } iex> Plausible.Cldr.Number . validate_number_system "en" , :default { :ok , :latn } iex> Plausible.Cldr.Number . validate_number_system "en" , :unknown { :error , { Cldr.UnknownNumberSystemError , "The number system :unknown is unknown" } } iex> Plausible.Cldr.Number . validate_number_system "zz" , :default { :error , { Cldr.InvalidLanguageError , "The language \\" zz \\" is invalid" } }","ref":"Plausible.Cldr.Number.html#validate_number_system/2","title":"Plausible.Cldr.Number.validate_number_system/2","type":"function"},{"doc":"Implements cardinal plural rules for numbers.","ref":"Plausible.Cldr.Number.Cardinal.html","title":"Plausible.Cldr.Number.Cardinal","type":"module"},{"doc":"The locale names for which plural rules are defined.","ref":"Plausible.Cldr.Number.Cardinal.html#available_locale_names/0","title":"Plausible.Cldr.Number.Cardinal.available_locale_names/0","type":"function"},{"doc":"The configured locales for which plural rules are defined. Returns the intersection of Plausible.Cldr.known_locale_names/0 and the locales for which Cardinal plural rules are defined. There are many Cldr locales which don't have their own plural rules so this list is the intersection of Cldr 's configured locales and those that have rules.","ref":"Plausible.Cldr.Number.Cardinal.html#known_locale_names/0","title":"Plausible.Cldr.Number.Cardinal.known_locale_names/0","type":"function"},{"doc":"Return the plural key for a given number in a given locale Returns which plural key ( :zero , :one , :two , :few , :many or :other ) a given number fits into within the context of a given locale. Note that these key names should not be interpreted literally. For example, the key returned from Cldr.Number.Ordinal.plural_rule(0, "en") is actually :other , not :zero . This key can then be used to format a number, date, time, unit, list or other content in a plural-sensitive way. Arguments number is any integer , float or Decimal locale is any locale returned by Cldr.Locale.new!/2 or any locale_name returned by Plausible.Cldr.known_locale_names/0 rounding is one of [:down, :up, :ceiling, :floor, :half_even, :half_up, :half_down] . The default is :half_even . Examples iex> Plausible.Cldr.Number.Cardinal . plural_rule 0 , "fr" :one iex> Plausible.Cldr.Number.Cardinal . plural_rule 0 , "en" :other","ref":"Plausible.Cldr.Number.Cardinal.html#plural_rule/3","title":"Plausible.Cldr.Number.Cardinal.plural_rule/3","type":"function"},{"doc":"Returns all the plural rules defined in CLDR.","ref":"Plausible.Cldr.Number.Cardinal.html#plural_rules/0","title":"Plausible.Cldr.Number.Cardinal.plural_rules/0","type":"function"},{"doc":"Return the plural rules for a locale. Arguments locale is any locale returned by Plausible.Cldr.Locale.new!/1 or any locale_name returned by Plausible.Cldr.known_locale_names/0 The rules are returned in AST form after parsing.","ref":"Plausible.Cldr.Number.Cardinal.html#plural_rules_for/1","title":"Plausible.Cldr.Number.Cardinal.plural_rules_for/1","type":"function"},{"doc":"Pluralize a number using cardinal plural rules and a substitution map. Arguments number is an integer, float or Decimal locale is any locale returned by Plausible.Cldr.Locale.new!/1 or any locale_name returned by Plausible.Cldr.known_locale_names/0 substitutions is a map that maps plural keys to a string. The valid substitution keys are :zero , :one , :two , :few , :many and :other . See also Plausible.Cldr.Number.Cardinal.Cardinal.plural_rule/3 . Examples iex> Plausible.Cldr.Number.Cardinal . pluralize 1 , "en" , %{ one : "one" } "one" iex> Plausible.Cldr.Number.Cardinal . pluralize 2 , "en" , %{ one : "one" } nil iex> Plausible.Cldr.Number.Cardinal . pluralize 2 , "en" , %{ one : "one" , two : "two" , other : "other" } "other" iex> Plausible.Cldr.Number.Cardinal . pluralize 22 , "en" , %{ one : "one" , two : "two" , other : "other" } "other" iex> Plausible.Cldr.Number.Cardinal . pluralize Decimal . new ( 1 ) , "en" , %{ one : "one" } "one" iex> Plausible.Cldr.Number.Cardinal . pluralize Decimal . new ( 2 ) , "en" , %{ one : "one" } nil iex> Plausible.Cldr.Number.Cardinal . pluralize Decimal . new ( 2 ) , "en" , %{ one : "one" , two : "two" } nil iex> Plausible.Cldr.Number.Cardinal . pluralize 1 .. 10 , "ar" , %{ one : "one" , few : "few" , other : "other" } "few" iex> Plausible.Cldr.Number.Cardinal . pluralize 1 .. 10 , "en" , %{ one : "one" , few : "few" , other : "other" } "other"","ref":"Plausible.Cldr.Number.Cardinal.html#pluralize/3","title":"Plausible.Cldr.Number.Cardinal.pluralize/3","type":"function"},{"doc":"Functions to manage the collection of number patterns defined in Cldr. Number patterns affect how numbers are interpreted in a localized context. Here are some examples, based on the French locale. The "." shows where the decimal point should go. The "," shows where the thousands separator should go. A "0" indicates zero-padding: if the number is too short, a zero (in the locale's numeric set) will go there. A "#" indicates no padding: if the number is too short, nothing goes there. A "¤" shows where the currency sign will go. The following illustrates the effects of different patterns for the French locale, with the number "1234.567". Notice how the pattern characters ',' and '.' are replaced by the characters appropriate for the locale. Number Pattern Examples Pattern Currency Text #,##0.## n/a 1 234,57 #,##0.### n/a 1 234,567 ###0.##### n/a 1234,567 ###0.0000# n/a 1234,5670 00000.0000 n/a 01234,5670 #,##0.00 ¤ EUR 1 234,57 € The number of # placeholder characters before the decimal do not matter, since no limit is placed on the maximum number of digits. There should, however, be at least one zero some place in the pattern. In currency formats, the number of digits after the decimal also do not matter, since the information in the supplemental data (see Supplemental Currency Data) is used to override the number of decimal places — and the rounding — according to the currency that is being formatted. That can be seen in the above chart, with the difference between Yen and Euro formatting. Details of the number formats are described in the Unicode documentation","ref":"Plausible.Cldr.Number.Format.html","title":"Plausible.Cldr.Number.Format","type":"module"},{"doc":"Returns the decimal formats defined for a given locale. Arguments locale is any valid locale name returned by Plausible.Cldr.known_locale_names/0 or a Cldr.LanguageTag struct returned by Plausible.Cldr.Locale.new!/1 . The default is Plausible.Cldr.get_locale/0 . Returns {:ok, map} where map is a map of decimal formats keyed by number system or {:error, {exception, message}}","ref":"Plausible.Cldr.Number.Format.html#all_formats_for/1","title":"Plausible.Cldr.Number.Format.all_formats_for/1","type":"function"},{"doc":"Returns the decimal formats defined for a given locale. Arguments locale is any valid locale name returned by Plausible.Cldr.known_locale_names/0 or a Cldr.LanguageTag struct returned by Plausible.Cldr.Locale.new!/1 . The default is Plausible.Cldr.get_locale/0 . Returns {:ok, map} where map is a map of decimal formats keyed by number system or raises an exception See Plausible.Cldr.Number.Format.Number.Format.all_formats_for/1 for further information.","ref":"Plausible.Cldr.Number.Format.html#all_formats_for!/1","title":"Plausible.Cldr.Number.Format.all_formats_for!/1","type":"function"},{"doc":"Returns the currency space for a given locale and number system.","ref":"Plausible.Cldr.Number.Format.html#currency_spacing/2","title":"Plausible.Cldr.Number.Format.currency_spacing/2","type":"function"},{"doc":"Returns the list of decimal formats in the configured locales including the list of locales configured for precompilation in config.exs . This function exists to allow the decimal formatter to precompile all the known formats at compile time. Example #=> Plausible.Cldr.Number.Format.Format.decimal_format_list [ "#" , "#,##,##0%" , "#,##,##0.###" , "#,##,##0.00¤" , "#,##,##0.00¤;(#,##,##0.00¤)" , "#,##,##0 %" , "#,##0%" , "#,##0.###" , "#,##0.00 ¤" , "#,##0.00 ¤;(#,##0.00 ¤)" , "#,##0.00¤" , "#,##0.00¤;(#,##0.00¤)" , "#,##0 %" , "#0%" , "#0.######" , "#0.00 ¤" , "#E0" , "%#,##0" , "% #,##0" , "0" , "0.000000E+000" , "0000 M ¤" , "0000¤" , "000G ¤" , "000K ¤" , "000M ¤" , "000T ¤" , "000mM ¤" , "000m ¤" , "000 Bio'.' ¤" , "000 Bln ¤" , "000 Bn ¤" , "000 B ¤" , "000 E ¤" , "000 K ¤" , "000 MRD ¤" , "000 Md ¤" , "000 Mio'.' ¤" , "000 Mio ¤" , "000 Mld ¤" , "000 Mln ¤" , "000 Mn ¤" , "000 Mrd'.' ¤" , "000 Mrd ¤" , "000 Mr ¤" , "000 M ¤" , "000 NT ¤" , "000 N ¤" , "000 Tn ¤" , "000 Tr ¤" , ... ]","ref":"Plausible.Cldr.Number.Format.html#decimal_format_list/0","title":"Plausible.Cldr.Number.Format.decimal_format_list/0","type":"function"},{"doc":"Returns the list of decimal formats for a configured locale. Arguments locale is any valid locale name returned by Plausible.Cldr.known_locale_names/0 or a Cldr.LanguageTag struct returned by Plausible.Cldr.Locale.new!/1 . The default is Plausible.Cldr.get_locale/0 . This function exists to allow the decimal formatter to precompile all the known formats at compile time. Its use is not otherwise recommended. Example iex> Plausible.Cldr.Number.Format . decimal_format_list_for ( :en ) { :ok , [ "#,##0%" , "#,##0.###" , "#,##0.00" , "#,##0.00;(#,##0.00)" , "#E0" , "0 billion" , "0 million" , "0 thousand" , "0 trillion" , "00 billion" , "00 million" , "00 thousand" , "00 trillion" , "000 billion" , "000 million" , "000 thousand" , "000 trillion" , "000B" , "000K" , "000M" , "000T" , "00B" , "00K" , "00M" , "00T" , "0B" , "0K" , "0M" , "0T" , "¤#,##0.00" , "¤#,##0.00;(¤#,##0.00)" , "¤000B" , "¤000K" , "¤000M" , "¤000T" , "¤00B" , "¤00K" , "¤00M" , "¤00T" , "¤0B" , "¤0K" , "¤0M" , "¤0T" , "¤ #,##0.00" , "¤ #,##0.00;(¤ #,##0.00)" , "¤ 000B" , "¤ 000K" , "¤ 000M" , "¤ 000T" , "¤ 00B" , "¤ 00K" , "¤ 00M" , "¤ 00T" , "¤ 0B" , "¤ 0K" , "¤ 0M" , "¤ 0T" ] }","ref":"Plausible.Cldr.Number.Format.html#decimal_format_list_for/1","title":"Plausible.Cldr.Number.Format.decimal_format_list_for/1","type":"function"},{"doc":"Returns the default grouping for a locale as a map. Arguments locale is any valid locale name returned by Plausible.Cldr.known_locale_names/0 or a Cldr.LanguageTag struct returned by Plausible.Cldr.Locale.new!/1 . The default is Plausible.Cldr.get_locale/0 . Returns {:ok, grouping} or {:error, {exception, message}} Examples iex> Plausible.Cldr.Number.Format . default_grouping_for ( :en ) { :ok , %{ fraction : %{ first : 0 , rest : 0 } , integer : %{ first : 3 , rest : 3 } } }","ref":"Plausible.Cldr.Number.Format.html#default_grouping_for/1","title":"Plausible.Cldr.Number.Format.default_grouping_for/1","type":"function"},{"doc":"Returns the default grouping for a locale or raises on error. Arguments locale is any valid locale name returned by Plausible.Cldr.known_locale_names/0 or a Cldr.LanguageTag struct returned by Plausible.Cldr.Locale.new!/1 . The default is Plausible.Cldr.get_locale/0 . Returns grouping as a map or raises an exception Examples iex> Plausible.Cldr.Number.Format . default_grouping_for! ( :en ) %{ fraction : %{ first : 0 , rest : 0 } , integer : %{ first : 3 , rest : 3 } }","ref":"Plausible.Cldr.Number.Format.html#default_grouping_for!/1","title":"Plausible.Cldr.Number.Format.default_grouping_for!/1","type":"function"},{"doc":"Return the predfined formats for a given locale and number_system . Arguments locale is any valid locale name returned by Plausible.Cldr.known_locale_names/0 or a Cldr.LanguageTag struct returned by Plausible.Cldr.Locale.new!/1 . The default is Plausible.Cldr.get_locale/0 . number_system is any valid number system or number system type returned by Plausible.Cldr.Number.System.number_systems_for/1 . Example Plausible.Cldr.Number.Format . formats_for :fr , :native #=> %Cldr.Number.Format{ accounting : "#,##0.00 ¤;(#,##0.00 ¤)" , currency : "#,##0.00 ¤" , percent : "#,##0 %" , scientific : "#E0" , standard : "#,##0.###" currency_short : [ { "1000" , [ one : "0 k ¤" , other : "0 k ¤" ] } , { "10000" , [ one : "00 k ¤" , other : "00 k ¤" ] } , { "100000" , [ one : "000 k ¤" , other : "000 k ¤" ] } , { "1000000" , [ one : "0 M ¤" , other : "0 M ¤" ] } , { "10000000" , [ one : "00 M ¤" , other : "00 M ¤" ] } , { "100000000" , [ one : "000 M ¤" , other : "000 M ¤" ] } , { "1000000000" , [ one : "0 Md ¤" , other : "0 Md ¤" ] } , { "10000000000" , [ one : "00 Md ¤" , other : "00 Md ¤" ] } , { "100000000000" , [ one : "000 Md ¤" , other : "000 Md ¤" ] } , { "1000000000000" , [ one : "0 Bn ¤" , other : "0 Bn ¤" ] } , { "10000000000000" , [ one : "00 Bn ¤" , other : "00 Bn ¤" ] } , { "100000000000000" , [ one : "000 Bn ¤" , other : "000 Bn ¤" ] } ] , ... }","ref":"Plausible.Cldr.Number.Format.html#formats_for/2","title":"Plausible.Cldr.Number.Format.formats_for/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Number.Format.html#formats_for!/2","title":"Plausible.Cldr.Number.Format.formats_for!/2","type":"function"},{"doc":"Returns the minimum grouping digits for a locale. Arguments locale is any valid locale name returned by Plausible.Cldr.known_locale_names/0 or a Cldr.LanguageTag struct returned by Plausible.Cldr.Locale.new!/1 . The default is Plausible.Cldr.get_locale/0 . Returns {:ok, minumum_digits} or {:error, {exception, message}} Examples iex> Plausible.Cldr.Number.Format . minimum_grouping_digits_for ( "en" ) { :ok , 1 }","ref":"Plausible.Cldr.Number.Format.html#minimum_grouping_digits_for/1","title":"Plausible.Cldr.Number.Format.minimum_grouping_digits_for/1","type":"function"},{"doc":"Returns the minimum grouping digits for a locale or raises on error. Arguments locale is any valid locale name returned by Plausible.Cldr.known_locale_names/0 or a Cldr.LanguageTag struct returned by Plausible.Cldr.Locale.new!/1 . The default is Plausible.Cldr.get_locale/0 . Returns minumum_digits or raises an exception Examples iex> Plausible.Cldr.Number.Format . minimum_grouping_digits_for! ( "en" ) 1","ref":"Plausible.Cldr.Number.Format.html#minimum_grouping_digits_for!/1","title":"Plausible.Cldr.Number.Format.minimum_grouping_digits_for!/1","type":"function"},{"doc":"","ref":"Plausible.Cldr.Number.Formatter.Decimal.html","title":"Plausible.Cldr.Number.Formatter.Decimal","type":"module"},{"doc":"","ref":"Plausible.Cldr.Number.Formatter.Decimal.html#metadata!/1","title":"Plausible.Cldr.Number.Formatter.Decimal.metadata!/1","type":"function"},{"doc":"Formats a number according to a decimal format string. Arguments number is an integer, float or Decimal format is a format string. See Plausible.Cldr.Number for further information. options is a map of options. See Plausible.Cldr.Number.to_string/2 for further information.","ref":"Plausible.Cldr.Number.Formatter.Decimal.html#to_string/3","title":"Plausible.Cldr.Number.Formatter.Decimal.to_string/3","type":"function"},{"doc":"Implements ordinal plural rules for numbers.","ref":"Plausible.Cldr.Number.Ordinal.html","title":"Plausible.Cldr.Number.Ordinal","type":"module"},{"doc":"The locale names for which plural rules are defined.","ref":"Plausible.Cldr.Number.Ordinal.html#available_locale_names/0","title":"Plausible.Cldr.Number.Ordinal.available_locale_names/0","type":"function"},{"doc":"The configured locales for which plural rules are defined. Returns the intersection of Plausible.Cldr.known_locale_names/0 and the locales for which Ordinal plural rules are defined. There are many Cldr locales which don't have their own plural rules so this list is the intersection of Cldr 's configured locales and those that have rules.","ref":"Plausible.Cldr.Number.Ordinal.html#known_locale_names/0","title":"Plausible.Cldr.Number.Ordinal.known_locale_names/0","type":"function"},{"doc":"Return the plural key for a given number in a given locale Returns which plural key ( :zero , :one , :two , :few , :many or :other ) a given number fits into within the context of a given locale. Note that these key names should not be interpreted literally. For example, the key returned from Cldr.Number.Ordinal.plural_rule(0, "en") is actually :other , not :zero . This key can then be used to format a number, date, time, unit, list or other content in a plural-sensitive way. Arguments number is any integer , float or Decimal locale is any locale returned by Cldr.Locale.new!/2 or any locale_name returned by Plausible.Cldr.known_locale_names/0 rounding is one of [:down, :up, :ceiling, :floor, :half_even, :half_up, :half_down] . The default is :half_even . Examples iex> Plausible.Cldr.Number.Ordinal . plural_rule 0 , "fr" :other iex> Plausible.Cldr.Number.Ordinal . plural_rule 1 , "en" :one","ref":"Plausible.Cldr.Number.Ordinal.html#plural_rule/3","title":"Plausible.Cldr.Number.Ordinal.plural_rule/3","type":"function"},{"doc":"Returns all the plural rules defined in CLDR.","ref":"Plausible.Cldr.Number.Ordinal.html#plural_rules/0","title":"Plausible.Cldr.Number.Ordinal.plural_rules/0","type":"function"},{"doc":"Return the plural rules for a locale. Arguments locale is any locale returned by Plausible.Cldr.Locale.new!/1 or any locale_name returned by Plausible.Cldr.known_locale_names/0 The rules are returned in AST form after parsing.","ref":"Plausible.Cldr.Number.Ordinal.html#plural_rules_for/1","title":"Plausible.Cldr.Number.Ordinal.plural_rules_for/1","type":"function"},{"doc":"Pluralize a number using ordinal plural rules and a substitution map. Arguments number is an integer, float or Decimal or a Range.t{} . When a range, The is that in any usage, the start value is strictly less than the end value, and that no values are negative. Results for any cases that do not meet these criteria are undefined. locale is any locale returned by Plausible.Cldr.Locale.new!/1 or any locale_name returned by Plausible.Cldr.known_locale_names/0 substitutions is a map that maps plural keys to a string. The valid substitution keys are :zero , :one , :two , :few , :many and :other . See also Plausible.Cldr.Number.Ordinal.Ordinal.plural_rule/3 . Examples iex> Plausible.Cldr.Number.Ordinal . pluralize 1 , :en , %{ one : "one" } "one" iex> Plausible.Cldr.Number.Ordinal . pluralize 2 , :en , %{ one : "one" } nil iex> Plausible.Cldr.Number.Ordinal . pluralize 2 , :en , %{ one : "one" , two : "two" } "two" iex> Plausible.Cldr.Number.Ordinal . pluralize 22 , :en , %{ one : "one" , two : "two" , other : "other" } "two" iex> Plausible.Cldr.Number.Ordinal . pluralize Decimal . new ( 1 ) , :en , %{ one : "one" } "one" iex> Plausible.Cldr.Number.Ordinal . pluralize Decimal . new ( 2 ) , :en , %{ one : "one" } nil iex> Plausible.Cldr.Number.Ordinal . pluralize Decimal . new ( 2 ) , :en , %{ one : "one" , two : "two" } "two" iex> Plausible.Cldr.Number.Ordinal . pluralize 1 .. 10 , "ar" , %{ one : "one" , few : "few" , other : "other" } "other" iex> Plausible.Cldr.Number.Ordinal . pluralize 1 .. 10 , "en" , %{ one : "one" , few : "few" , other : "other" } "other"","ref":"Plausible.Cldr.Number.Ordinal.html#pluralize/3","title":"Plausible.Cldr.Number.Ordinal.pluralize/3","type":"function"},{"doc":"Implements plural rules for ranges","ref":"Plausible.Cldr.Number.PluralRule.Range.html","title":"Plausible.Cldr.Number.PluralRule.Range","type":"module"},{"doc":"Returns a final plural type for a start-of-range plural type, an end-of-range plural type and a locale. Arguments first is a plural type for the start of a range last is a plural type for the end of a range locale is any Cldr.LanguageTag.t or a language name (not locale name) Example iex> Plausible.Cldr.Number.PluralRule.Range . plural_rule :other , :few , "ar" :few","ref":"Plausible.Cldr.Number.PluralRule.Range.html#plural_rule/3","title":"Plausible.Cldr.Number.PluralRule.Range.plural_rule/3","type":"function"},{"doc":"","ref":"Plausible.Cldr.Number.Symbol.html","title":"Plausible.Cldr.Number.Symbol","type":"module"},{"doc":"Returns a list of all decimal symbols defined by the locales configured in this backend as a list.","ref":"Plausible.Cldr.Number.Symbol.html#all_decimal_symbols/0","title":"Plausible.Cldr.Number.Symbol.all_decimal_symbols/0","type":"function"},{"doc":"Returns a list of all decimal symbols defined by the locales configured in this backend as a string. This string can be used as a character class when builing a regular expression.","ref":"Plausible.Cldr.Number.Symbol.html#all_decimal_symbols_class/0","title":"Plausible.Cldr.Number.Symbol.all_decimal_symbols_class/0","type":"function"},{"doc":"Returns a list of all grouping symbols defined by the locales configured in this backend as a list.","ref":"Plausible.Cldr.Number.Symbol.html#all_grouping_symbols/0","title":"Plausible.Cldr.Number.Symbol.all_grouping_symbols/0","type":"function"},{"doc":"Returns a list of all grouping symbols defined by the locales configured in this backend as a string. This string can be used as a character class when builing a regular expression.","ref":"Plausible.Cldr.Number.Symbol.html#all_grouping_symbols_class/0","title":"Plausible.Cldr.Number.Symbol.all_grouping_symbols_class/0","type":"function"},{"doc":"Returns a map of Cldr.Number.Symbol.t structs of the number symbols for each of the number systems of a locale. Options locale is any valid locale name returned by Plausible.Cldr.known_locale_names/0 or a Cldr.LanguageTag struct returned by Plausible.Cldr.Locale.new!/1 . The default is Plausible.Cldr.get_locale/0 . Example: iex> Plausible.Cldr.Number.Symbol . number_symbols_for ( :th ) { :ok , %{ latn : % Cldr.Number.Symbol { decimal : "." , exponential : "E" , group : "," , infinity : "∞" , list : ";" , minus_sign : "-" , nan : "NaN" , per_mille : "‰" , percent_sign : "%" , plus_sign : "+" , superscripting_exponent : "×" , time_separator : ":" } , thai : % Cldr.Number.Symbol { decimal : "." , exponential : "E" , group : "," , infinity : "∞" , list : ";" , minus_sign : "-" , nan : "NaN" , per_mille : "‰" , percent_sign : "%" , plus_sign : "+" , superscripting_exponent : "×" , time_separator : ":" } } }","ref":"Plausible.Cldr.Number.Symbol.html#number_symbols_for/1","title":"Plausible.Cldr.Number.Symbol.number_symbols_for/1","type":"function"},{"doc":"","ref":"Plausible.Cldr.Number.Symbol.html#number_symbols_for/2","title":"Plausible.Cldr.Number.Symbol.number_symbols_for/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Number.System.html","title":"Plausible.Cldr.Number.System","type":"module"},{"doc":"Returns the actual number system from a number system type. locale is any valid locale name returned by Cldr.known_locale_names/0 or a Cldr.LanguageTag struct returned by Cldr.Locale.new!/2 system_name is any number system name returned by Cldr.known_number_systems/0 or a number system type returned by Cldr.known_number_system_types/0 This function will decode a number system type into the actual number system. If the number system provided can't be decoded it is returned as is. Examples iex> Plausible.Cldr.Number.System . number_system_for "th" , :latn { :ok , %{ digits : "0123456789" , type : :numeric } } iex> Plausible.Cldr.Number.System . number_system_for "en" , :default { :ok , %{ digits : "0123456789" , type : :numeric } } iex> Plausible.Cldr.Number.System . number_system_for "he" , :traditional { :ok , %{ rules : "hebrew" , type : :algorithmic } } iex> Plausible.Cldr.Number.System . number_system_for "en" , :native { :ok , %{ digits : "0123456789" , type : :numeric } } iex> Plausible.Cldr.Number.System . number_system_for "en" , :finance { :error , { Cldr.UnknownNumberSystemError , "The number system :finance is unknown for the locale named :en. Valid number systems are %{default: :latn, native: :latn}" } }","ref":"Plausible.Cldr.Number.System.html#number_system_for/2","title":"Plausible.Cldr.Number.System.number_system_for/2","type":"function"},{"doc":"Returns the number system from a language tag or locale name. Arguments locale is any language tag returned be Cldr.Locale.new/2 or a locale name in the list returned by Cldr.known_locale_names/1 Returns A number system name as an atom Examples iex> Plausible.Cldr.Number.System . number_system_from_locale "en-US-u-nu-thai" :thai iex> Plausible.Cldr.Number.System . number_system_from_locale "en-US" :latn","ref":"Plausible.Cldr.Number.System.html#number_system_from_locale/1","title":"Plausible.Cldr.Number.System.number_system_from_locale/1","type":"function"},{"doc":"Returns the number systems available for a locale or {:error, message} if the locale is not known. locale is any valid locale name returned by Plausible.Cldr.known_locale_names/0 or a Cldr.LanguageTag struct returned by Plausible.Cldr.Locale.new!/1 Examples iex> Plausible.Cldr.Number.System . number_system_names_for "en" { :ok , [ :latn ] } iex> Plausible.Cldr.Number.System . number_system_names_for "zz" { :error , { Cldr.InvalidLanguageError , "The language \\" zz \\" is invalid" } }","ref":"Plausible.Cldr.Number.System.html#number_system_names_for/1","title":"Plausible.Cldr.Number.System.number_system_names_for/1","type":"function"},{"doc":"","ref":"Plausible.Cldr.Number.System.html#number_system_names_for!/1","title":"Plausible.Cldr.Number.System.number_system_names_for!/1","type":"function"},{"doc":"","ref":"Plausible.Cldr.Number.System.html#number_system_types_for/1","title":"Plausible.Cldr.Number.System.number_system_types_for/1","type":"function"},{"doc":"Returns the number systems available for a locale or {:error, message} if the locale is not known. locale is any valid locale name returned by Plausible.Cldr.known_locale_names/0 or a Cldr.LanguageTag struct returned by Plausible.Cldr.Locale.new!/1 Examples iex> Plausible.Cldr.Number.System . number_systems_for "en" { :ok , %{ default : :latn , native : :latn } } iex> Plausible.Cldr.Number.System . number_systems_for "th" { :ok , %{ default : :latn , native : :thai } } iex> Plausible.Cldr.Number.System . number_systems_for "zz" { :error , { Cldr.InvalidLanguageError , "The language \\" zz \\" is invalid" } }","ref":"Plausible.Cldr.Number.System.html#number_systems_for/1","title":"Plausible.Cldr.Number.System.number_systems_for/1","type":"function"},{"doc":"","ref":"Plausible.Cldr.Number.System.html#number_systems_for!/1","title":"Plausible.Cldr.Number.System.number_systems_for!/1","type":"function"},{"doc":"","ref":"Plausible.Cldr.Number.System.html#number_systems_like/2","title":"Plausible.Cldr.Number.System.number_systems_like/2","type":"function"},{"doc":"Returns a number system name for a given locale and number system reference. system_name is any number system name returned by Plausible.Cldr.known_number_systems/0 or a number system type returned by Plausible.Cldr.known_number_system_types/0 locale is any valid locale name returned by Plausible.Cldr.known_locale_names/0 or a Cldr.LanguageTag struct returned by Plausible.Cldr.Locale.new!/1 Number systems can be references in one of two ways: As a number system type such as :default, :native, :traditional and :finance. This allows references to a number system for a locale in a consistent fashion for a given use WIth the number system name directly, such as :latn, :arab or any of the other 70 or so This function dereferences the supplied system_name and returns the actual system name. Examples ex > Plausible.Cldr.Number.System . system_name_from ( :default , "en" ) { :ok , :latn } iex> Plausible.Cldr.Number.System . system_name_from ( "latn" , "en" ) { :ok , :latn } iex> Plausible.Cldr.Number.System . system_name_from ( :native , "en" ) { :ok , :latn } iex> Plausible.Cldr.Number.System . system_name_from ( :nope , "en" ) { :error , { Cldr.UnknownNumberSystemError , "The number system :nope is unknown" } } Note that return value is not guaranteed to be a valid number system for the given locale as demonstrated in the third example.","ref":"Plausible.Cldr.Number.System.html#system_name_from/2","title":"Plausible.Cldr.Number.System.system_name_from/2","type":"function"},{"doc":"Converts a number into the representation of a non-latin number system. This function converts numbers to a known number system only, it does not provide number formatting. number is a float , integer or Decimal system_name is any number system name returned by Cldr.known_number_systems/0 or a number system type returned by Cldr.known_number_system_types/0 There are two types of number systems in CLDR: :numeric in which the number system defines a direct mapping between the latin digits 0..9 into a the number system equivalent. In this case, to_system/2 invokes Cldr.Number.Transliterate.transliterate_digits/3 for the given number. :algorithmic in which the number system does not have the same structure as the :latn number system and therefore the conversion is done algorithmically. For CLDR the algorithm is implemented through Cldr.Rbnf rulesets. These rulesets are considered by CLDR to be less rigorous than the :numeric number systems and caution and testing for a specific use case is recommended. Examples iex> Plausible.Cldr.Number.System . to_system 123456 , :hebr { :ok , "קכ״ג׳תנ״ו" } iex> Plausible.Cldr.Number.System . to_system 123 , :hans { :ok , "一百二十三" } iex> Plausible.Cldr.Number.System . to_system 123 , :hant { :ok , "一百二十三" } iex> Plausible.Cldr.Number.System . to_system 123 , :hansfin { :ok , "壹佰贰拾叁" }","ref":"Plausible.Cldr.Number.System.html#to_system/2","title":"Plausible.Cldr.Number.System.to_system/2","type":"function"},{"doc":"Converts a number into the representation of a non-latin number system. Returns a converted string or raises on error. number is a float , integer or Decimal system_name is any number system name returned by Plausible.Cldr.known_number_systems/0 or a number system type returned by Plausible.Cldr.known_number_system_types/0 See Plausible.Cldr.Number.System.to_system/2 for further information. Examples iex> Plausible.Cldr.Number.System . to_system! 123 , :hans "一百二十三" iex> Plausible.Cldr.Number.System . to_system! 123 , :hant "一百二十三" iex> Plausible.Cldr.Number.System . to_system! 123 , :hansfin "壹佰贰拾叁"","ref":"Plausible.Cldr.Number.System.html#to_system!/2","title":"Plausible.Cldr.Number.System.to_system!/2","type":"function"},{"doc":"Transliteration for digits and separators. Transliterating a string is an expensive business. First the string has to be exploded into its component graphemes. Then for each grapheme we have to map to the equivalent in the other {locale, number_system} . Then we have to reassemble the string. Effort is made to short circuit where possible. Transliteration is not required for any {locale, number_system} that is the same as {"en", "latn"} since the implementation uses this combination for the placeholders during formatting already. When short circuiting is possible (typically the en-* locales with "latn" number_system - the total number of short circuited locales is 211 of the 537 in CLDR) the overall number formatting is twice as fast than when formal transliteration is required. Configuring precompilation of digit transliterations This module includes Cldr.Number.Transliterate.transliterate_digits/3 which transliterates digits between number systems. For example from :arabic to :latn. Since generating a transliteration map is slow, pairs of transliterations can be configured so that the transliteration map is created at compile time and therefore speeding up transliteration at run time. To configure these transliteration pairs, add the to the use Cldr configuration in a backend module: defmodule MyApp.Cldr do use Cldr , locale : [ "en" , "fr" , "th" ] , default_locale : "en" , precompile_transliterations : [ { :latn , :thai } , { :arab , :thai } ] end Where each tuple in the list configures one transliteration map. In this example, two maps are configured: from :latn to :thai and from :arab to :thai . A list of configurable number systems is returned by Cldr.Number.System.systems_with_digits/0 . If a transliteration is requested between two number pairs that have not been configured for precompilation, a warning is logged.","ref":"Plausible.Cldr.Number.Transliterate.html","title":"Plausible.Cldr.Number.Transliterate","type":"module"},{"doc":"Transliterates from latin digits to another number system's digits. Transliterates the latin digits 0..9 to their equivalents in another number system. Also transliterates the decimal and grouping separators as well as the plus, minus and exponent symbols. Any other character in the string will be returned "as is". Arguments sequence is the string to be transliterated. locale is any known locale, defaulting to Plausible.Cldr.get_locale/0 . number_system is any known number system. If expressed as a string it is the actual name of a known number system. If epressed as an atom it is used as a key to look up a number system for the locale (the usual keys are :default and :native but :traditional and :finance are also part of the standard). See Plausible.Cldr.Number.System.number_systems_for/1 for a locale to see what number system types are defined. The default is :default . For available number systems see Cldr.Number.System.number_systems/0 and Plausible.Cldr.Number.System.number_systems_for/1 . Also see Plausible.Cldr.Number.Symbol.number_symbols_for/1 . Examples iex> Plausible.Cldr.Number.Transliterate . transliterate ( "123556" ) "123556" iex> Plausible.Cldr.Number.Transliterate . transliterate ( "123,556.000" , "fr" , :default ) "123 556,000" iex> Plausible.Cldr.Number.Transliterate . transliterate ( "123556" , "th" , :default ) "123556" iex> Plausible.Cldr.Number.Transliterate . transliterate ( "123556" , "th" , "thai" ) "๑๒๓๕๕๖" iex> Plausible.Cldr.Number.Transliterate . transliterate ( "123556" , "th" , :native ) "๑๒๓๕๕๖" iex> Plausible.Cldr.Number.Transliterate . transliterate ( "Some number is: 123556" , "th" , "thai" ) "Some number is: ๑๒๓๕๕๖"","ref":"Plausible.Cldr.Number.Transliterate.html#transliterate/3","title":"Plausible.Cldr.Number.Transliterate.transliterate/3","type":"function"},{"doc":"","ref":"Plausible.Cldr.Number.Transliterate.html#transliterate!/3","title":"Plausible.Cldr.Number.Transliterate.transliterate!/3","type":"function"},{"doc":"Transliterates digits from one number system to another number system digits is binary representation of a number from_system and to_system are number system names in atom form. See Cldr.Number.System.systems_with_digits/0 for available number systems. Example iex> Plausible.Cldr.Number.Transliterate . transliterate_digits "٠١٢٣٤٥٦٧٨٩" , :arab , :latn "0123456789"","ref":"Plausible.Cldr.Number.Transliterate.html#transliterate_digits/3","title":"Plausible.Cldr.Number.Transliterate.transliterate_digits/3","type":"function"},{"doc":"Functions to implement the number system rule-based-number-format rules of CLDR. These rules are defined only on the "und" locale and represent specialised number formatting. The standard public API for RBNF is via the Cldr.Number.to_string/2 function. The functions on this module are defined at compile time based upon the RBNF rules defined in the Unicode CLDR data repository. Available rules are identified by: iex> Plausible.Cldr.Rbnf.NumberSystem . rule_sets ( :und ) [ :zz_default , :tamil , :roman_upper , :roman_lower , :hebrew_item , :hebrew , :greek_upper , :greek_lower , :georgian , :ethiopic , :cyrillic_lower , :armenian_upper , :armenian_lower ] A rule can then be invoked on an available rule_set. For example iex> Plausible.Cldr.Rbnf.NumberSystem . roman_upper ( 123 , :und ) "CXXIII" This particular call is equivalent to the call through the public API of: iex> Plausible.Cldr.Number . to_string ( 123 , format : :roman ) { :ok , "CXXIII" }","ref":"Plausible.Cldr.Rbnf.NumberSystem.html","title":"Plausible.Cldr.Rbnf.NumberSystem","type":"module"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#all_rule_sets/0","title":"Plausible.Cldr.Rbnf.NumberSystem.all_rule_sets/0","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#armenian_lower/1","title":"Plausible.Cldr.Rbnf.NumberSystem.armenian_lower/1","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#armenian_lower/2","title":"Plausible.Cldr.Rbnf.NumberSystem.armenian_lower/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#armenian_upper/1","title":"Plausible.Cldr.Rbnf.NumberSystem.armenian_upper/1","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#armenian_upper/2","title":"Plausible.Cldr.Rbnf.NumberSystem.armenian_upper/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#cyrillic_lower/1","title":"Plausible.Cldr.Rbnf.NumberSystem.cyrillic_lower/1","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#cyrillic_lower/2","title":"Plausible.Cldr.Rbnf.NumberSystem.cyrillic_lower/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#cyrillic_lower_1_10/2","title":"Plausible.Cldr.Rbnf.NumberSystem.cyrillic_lower_1_10/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#cyrillic_lower_final/2","title":"Plausible.Cldr.Rbnf.NumberSystem.cyrillic_lower_final/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#cyrillic_lower_post/2","title":"Plausible.Cldr.Rbnf.NumberSystem.cyrillic_lower_post/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#cyrillic_lower_thousands/2","title":"Plausible.Cldr.Rbnf.NumberSystem.cyrillic_lower_thousands/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#ethiopic/1","title":"Plausible.Cldr.Rbnf.NumberSystem.ethiopic/1","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#ethiopic/2","title":"Plausible.Cldr.Rbnf.NumberSystem.ethiopic/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#ethiopic_p1/2","title":"Plausible.Cldr.Rbnf.NumberSystem.ethiopic_p1/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#ethiopic_p2/2","title":"Plausible.Cldr.Rbnf.NumberSystem.ethiopic_p2/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#ethiopic_p3/2","title":"Plausible.Cldr.Rbnf.NumberSystem.ethiopic_p3/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#ethiopic_p/2","title":"Plausible.Cldr.Rbnf.NumberSystem.ethiopic_p/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#georgian/1","title":"Plausible.Cldr.Rbnf.NumberSystem.georgian/1","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#georgian/2","title":"Plausible.Cldr.Rbnf.NumberSystem.georgian/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#greek_lower/1","title":"Plausible.Cldr.Rbnf.NumberSystem.greek_lower/1","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#greek_lower/2","title":"Plausible.Cldr.Rbnf.NumberSystem.greek_lower/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#greek_numeral_majuscules/2","title":"Plausible.Cldr.Rbnf.NumberSystem.greek_numeral_majuscules/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#greek_numeral_minuscules/2","title":"Plausible.Cldr.Rbnf.NumberSystem.greek_numeral_minuscules/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#greek_upper/1","title":"Plausible.Cldr.Rbnf.NumberSystem.greek_upper/1","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#greek_upper/2","title":"Plausible.Cldr.Rbnf.NumberSystem.greek_upper/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#hebrew/1","title":"Plausible.Cldr.Rbnf.NumberSystem.hebrew/1","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#hebrew/2","title":"Plausible.Cldr.Rbnf.NumberSystem.hebrew/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#hebrew_0_99/2","title":"Plausible.Cldr.Rbnf.NumberSystem.hebrew_0_99/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#hebrew_item/1","title":"Plausible.Cldr.Rbnf.NumberSystem.hebrew_item/1","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#hebrew_item/2","title":"Plausible.Cldr.Rbnf.NumberSystem.hebrew_item/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#hebrew_item_hundreds/2","title":"Plausible.Cldr.Rbnf.NumberSystem.hebrew_item_hundreds/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#hebrew_thousands/2","title":"Plausible.Cldr.Rbnf.NumberSystem.hebrew_thousands/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#roman_lower/1","title":"Plausible.Cldr.Rbnf.NumberSystem.roman_lower/1","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#roman_lower/2","title":"Plausible.Cldr.Rbnf.NumberSystem.roman_lower/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#roman_upper/1","title":"Plausible.Cldr.Rbnf.NumberSystem.roman_upper/1","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#roman_upper/2","title":"Plausible.Cldr.Rbnf.NumberSystem.roman_upper/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#rule_sets/0","title":"Plausible.Cldr.Rbnf.NumberSystem.rule_sets/0","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#rule_sets/1","title":"Plausible.Cldr.Rbnf.NumberSystem.rule_sets/1","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#tamil/1","title":"Plausible.Cldr.Rbnf.NumberSystem.tamil/1","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#tamil/2","title":"Plausible.Cldr.Rbnf.NumberSystem.tamil/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#tamil_thousands/2","title":"Plausible.Cldr.Rbnf.NumberSystem.tamil_thousands/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#zz_default/1","title":"Plausible.Cldr.Rbnf.NumberSystem.zz_default/1","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.NumberSystem.html#zz_default/2","title":"Plausible.Cldr.Rbnf.NumberSystem.zz_default/2","type":"function"},{"doc":"Functions to implement the ordinal rule-based-number-format rules of CLDR. As CLDR notes, the data is incomplete or non-existent for many languages. It is considered complete for English however. The standard public API for RBNF is via the Cldr.Number.to_string/2 function. The functions on this module are defined at compile time based upon the RBNF rules defined in the Unicode CLDR data repository. Available rules are identified by: iex> Plausible.Cldr.Rbnf.Ordinal . rule_sets ( :en ) [ :digits_ordinal ] iex> Plausible.Cldr.Rbnf.Ordinal . rule_sets ( "fr" ) [ :digits_ordinal_masculine_plural , :digits_ordinal_masculine , :digits_ordinal_feminine_plural , :digits_ordinal_feminine , :digits_ordinal ] A rule can then be invoked on an available rule_set. For example iex> Plausible.Cldr.Rbnf.Ordinal . digits_ordinal ( 123 , :en ) "123rd" This call is equivalent to the call through the public API of: iex> Plausible.Cldr.Number . to_string ( 123 , format : :ordinal ) { :ok , "123rd" }","ref":"Plausible.Cldr.Rbnf.Ordinal.html","title":"Plausible.Cldr.Rbnf.Ordinal","type":"module"},{"doc":"","ref":"Plausible.Cldr.Rbnf.Ordinal.html#all_rule_sets/0","title":"Plausible.Cldr.Rbnf.Ordinal.all_rule_sets/0","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.Ordinal.html#digits_ordinal/2","title":"Plausible.Cldr.Rbnf.Ordinal.digits_ordinal/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.Ordinal.html#rule_sets/0","title":"Plausible.Cldr.Rbnf.Ordinal.rule_sets/0","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.Ordinal.html#rule_sets/1","title":"Plausible.Cldr.Rbnf.Ordinal.rule_sets/1","type":"function"},{"doc":"Functions to implement the spellout rule-based-number-format rules of CLDR. As CLDR notes, the data is incomplete or non-existent for many languages. It is considered complete for English however. The standard public API for RBNF is via the Cldr.Number.to_string/2 function. The functions on this module are defined at compile time based upon the RBNF rules defined in the Unicode CLDR data repository. Available rules are identified by: iex> Plausible.Cldr.Rbnf.Spellout . rule_sets ( "en" ) [ :spellout_ordinal_verbose , :spellout_ordinal , :spellout_numbering_year , :spellout_numbering_verbose , :spellout_numbering , :spellout_cardinal_verbose , :spellout_cardinal ] A rule can then be invoked on an available rule_set. For example: iex> Plausible.Cldr.Rbnf.Spellout . spellout_ordinal ( 123 , "en" ) "one hundred twenty-third" This call is equivalent to the call through the public API of: iex> Plausible.Cldr.Number . to_string ( 123 , format : :spellout ) { :ok , "one hundred twenty-three" }","ref":"Plausible.Cldr.Rbnf.Spellout.html","title":"Plausible.Cldr.Rbnf.Spellout","type":"module"},{"doc":"","ref":"Plausible.Cldr.Rbnf.Spellout.html#2d_year/2","title":"Plausible.Cldr.Rbnf.Spellout.2d_year/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.Spellout.html#all_rule_sets/0","title":"Plausible.Cldr.Rbnf.Spellout.all_rule_sets/0","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.Spellout.html#and/2","title":"Plausible.Cldr.Rbnf.Spellout.and/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.Spellout.html#and_o/2","title":"Plausible.Cldr.Rbnf.Spellout.and_o/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.Spellout.html#commas/2","title":"Plausible.Cldr.Rbnf.Spellout.commas/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.Spellout.html#commas_o/2","title":"Plausible.Cldr.Rbnf.Spellout.commas_o/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.Spellout.html#rule_sets/0","title":"Plausible.Cldr.Rbnf.Spellout.rule_sets/0","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.Spellout.html#rule_sets/1","title":"Plausible.Cldr.Rbnf.Spellout.rule_sets/1","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.Spellout.html#spellout_cardinal/2","title":"Plausible.Cldr.Rbnf.Spellout.spellout_cardinal/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.Spellout.html#spellout_cardinal_verbose/2","title":"Plausible.Cldr.Rbnf.Spellout.spellout_cardinal_verbose/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.Spellout.html#spellout_numbering/2","title":"Plausible.Cldr.Rbnf.Spellout.spellout_numbering/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.Spellout.html#spellout_numbering_verbose/2","title":"Plausible.Cldr.Rbnf.Spellout.spellout_numbering_verbose/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.Spellout.html#spellout_numbering_year/2","title":"Plausible.Cldr.Rbnf.Spellout.spellout_numbering_year/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.Spellout.html#spellout_ordinal/2","title":"Plausible.Cldr.Rbnf.Spellout.spellout_ordinal/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.Spellout.html#spellout_ordinal_verbose/2","title":"Plausible.Cldr.Rbnf.Spellout.spellout_ordinal_verbose/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.Spellout.html#th/2","title":"Plausible.Cldr.Rbnf.Spellout.th/2","type":"function"},{"doc":"","ref":"Plausible.Cldr.Rbnf.Spellout.html#tieth/2","title":"Plausible.Cldr.Rbnf.Spellout.tieth/2","type":"function"},{"doc":"Event schema for when NumericIDs migration is complete","ref":"Plausible.ClickhouseEventV2.html","title":"Plausible.ClickhouseEventV2","type":"module"},{"doc":"","ref":"Plausible.ClickhouseEventV2.html#new/1","title":"Plausible.ClickhouseEventV2.new/1","type":"function"},{"doc":"","ref":"Plausible.ClickhouseRepo.html","title":"Plausible.ClickhouseRepo","type":"module"},{"doc":"Callback implementation for Ecto.Repo.aggregate/3 .","ref":"Plausible.ClickhouseRepo.html#aggregate/3","title":"Plausible.ClickhouseRepo.aggregate/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.aggregate/4 .","ref":"Plausible.ClickhouseRepo.html#aggregate/4","title":"Plausible.ClickhouseRepo.aggregate/4","type":"function"},{"doc":"Callback implementation for Ecto.Repo.all/2 .","ref":"Plausible.ClickhouseRepo.html#all/2","title":"Plausible.ClickhouseRepo.all/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.checked_out?/0 .","ref":"Plausible.ClickhouseRepo.html#checked_out?/0","title":"Plausible.ClickhouseRepo.checked_out?/0","type":"function"},{"doc":"Callback implementation for Ecto.Repo.checkout/2 .","ref":"Plausible.ClickhouseRepo.html#checkout/2","title":"Plausible.ClickhouseRepo.checkout/2","type":"function"},{"doc":"","ref":"Plausible.ClickhouseRepo.html#child_spec/1","title":"Plausible.ClickhouseRepo.child_spec/1","type":"function"},{"doc":"Callback implementation for Ecto.Repo.config/0 .","ref":"Plausible.ClickhouseRepo.html#config/0","title":"Plausible.ClickhouseRepo.config/0","type":"function"},{"doc":"Callback implementation for Ecto.Repo.default_options/1 .","ref":"Plausible.ClickhouseRepo.html#default_options/1","title":"Plausible.ClickhouseRepo.default_options/1","type":"function"},{"doc":"A convenience function for SQL-based repositories that forces all connections in the pool to disconnect within the given interval. See Ecto.Adapters.SQL.disconnect_all/3 for more information.","ref":"Plausible.ClickhouseRepo.html#disconnect_all/2","title":"Plausible.ClickhouseRepo.disconnect_all/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.exists?/2 .","ref":"Plausible.ClickhouseRepo.html#exists?/2","title":"Plausible.ClickhouseRepo.exists?/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get/3 .","ref":"Plausible.ClickhouseRepo.html#get/3","title":"Plausible.ClickhouseRepo.get/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get!/3 .","ref":"Plausible.ClickhouseRepo.html#get!/3","title":"Plausible.ClickhouseRepo.get!/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get_by/3 .","ref":"Plausible.ClickhouseRepo.html#get_by/3","title":"Plausible.ClickhouseRepo.get_by/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get_by!/3 .","ref":"Plausible.ClickhouseRepo.html#get_by!/3","title":"Plausible.ClickhouseRepo.get_by!/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get_dynamic_repo/0 .","ref":"Plausible.ClickhouseRepo.html#get_dynamic_repo/0","title":"Plausible.ClickhouseRepo.get_dynamic_repo/0","type":"function"},{"doc":"Similar to insert_all/2 but with the following differences: accepts rows as streams or lists sends rows as a chunked request doesn't autogenerate ids or does any other preprocessing Example: Repo . query! ( "create table ecto_ch_demo(a UInt64, b String) engine Null" ) defmodule Demo do use Ecto.Schema @primary_key false schema "ecto_ch_demo" do field :a , Ch , type : "UInt64" field :b , :string end end rows = Stream . map ( 1 .. 100_000 , fn i -> %{ a : i , b : to_string ( i ) } end ) { 100_000 , nil } = Repo . insert_stream ( Demo , rows ) # schemaless { 100_000 , nil } = Repo . insert_stream ( "ecto_ch_demo" , rows , types : [ a : Ch.Types . u64 ( ) , b : :string ] )","ref":"Plausible.ClickhouseRepo.html#insert_stream/3","title":"Plausible.ClickhouseRepo.insert_stream/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.load/2 .","ref":"Plausible.ClickhouseRepo.html#load/2","title":"Plausible.ClickhouseRepo.load/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.one/2 .","ref":"Plausible.ClickhouseRepo.html#one/2","title":"Plausible.ClickhouseRepo.one/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.one!/2 .","ref":"Plausible.ClickhouseRepo.html#one!/2","title":"Plausible.ClickhouseRepo.one!/2","type":"function"},{"doc":"","ref":"Plausible.ClickhouseRepo.html#parallel_tasks/1","title":"Plausible.ClickhouseRepo.parallel_tasks/1","type":"function"},{"doc":"Callback implementation for Ecto.Repo.preload/3 .","ref":"Plausible.ClickhouseRepo.html#preload/3","title":"Plausible.ClickhouseRepo.preload/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.prepare_query/3 .","ref":"Plausible.ClickhouseRepo.html#prepare_query/3","title":"Plausible.ClickhouseRepo.prepare_query/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.put_dynamic_repo/1 .","ref":"Plausible.ClickhouseRepo.html#put_dynamic_repo/1","title":"Plausible.ClickhouseRepo.put_dynamic_repo/1","type":"function"},{"doc":"A convenience function for SQL-based repositories that executes the given query. See Ecto.Adapters.SQL.query/4 for more information.","ref":"Plausible.ClickhouseRepo.html#query/3","title":"Plausible.ClickhouseRepo.query/3","type":"function"},{"doc":"A convenience function for SQL-based repositories that executes the given query. See Ecto.Adapters.SQL.query!/4 for more information.","ref":"Plausible.ClickhouseRepo.html#query!/3","title":"Plausible.ClickhouseRepo.query!/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.reload/2 .","ref":"Plausible.ClickhouseRepo.html#reload/2","title":"Plausible.ClickhouseRepo.reload/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.reload!/2 .","ref":"Plausible.ClickhouseRepo.html#reload!/2","title":"Plausible.ClickhouseRepo.reload!/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.start_link/1 .","ref":"Plausible.ClickhouseRepo.html#start_link/1","title":"Plausible.ClickhouseRepo.start_link/1","type":"function"},{"doc":"Callback implementation for Ecto.Repo.stop/1 .","ref":"Plausible.ClickhouseRepo.html#stop/1","title":"Plausible.ClickhouseRepo.stop/1","type":"function"},{"doc":"Callback implementation for Ecto.Repo.stream/2 .","ref":"Plausible.ClickhouseRepo.html#stream/2","title":"Plausible.ClickhouseRepo.stream/2","type":"function"},{"doc":"A convenience function for SQL-based repositories that translates the given query to SQL. See Ecto.Adapters.SQL.to_sql/3 for more information.","ref":"Plausible.ClickhouseRepo.html#to_sql/2","title":"Plausible.ClickhouseRepo.to_sql/2","type":"function"},{"doc":"Session schema for when NumericIDs migration is complete","ref":"Plausible.ClickhouseSessionV2.html","title":"Plausible.ClickhouseSessionV2","type":"module"},{"doc":"","ref":"Plausible.ClickhouseSessionV2.html#random_uint64/0","title":"Plausible.ClickhouseSessionV2.random_uint64/0","type":"function"},{"doc":"Custom type to cast Bool as UInt8","ref":"Plausible.ClickhouseSessionV2.BoolUInt8.html","title":"Plausible.ClickhouseSessionV2.BoolUInt8","type":"module"},{"doc":"Callback implementation for Ecto.Type.embed_as/1 .","ref":"Plausible.ClickhouseSessionV2.BoolUInt8.html#embed_as/1","title":"Plausible.ClickhouseSessionV2.BoolUInt8.embed_as/1","type":"function"},{"doc":"Callback implementation for Ecto.Type.equal?/2 .","ref":"Plausible.ClickhouseSessionV2.BoolUInt8.html#equal?/2","title":"Plausible.ClickhouseSessionV2.BoolUInt8.equal?/2","type":"function"},{"doc":"","ref":"Plausible.ConfigHelpers.html","title":"Plausible.ConfigHelpers","type":"module"},{"doc":"","ref":"Plausible.ConfigHelpers.html#get_int_from_path_or_env/3","title":"Plausible.ConfigHelpers.get_int_from_path_or_env/3","type":"function"},{"doc":"","ref":"Plausible.ConfigHelpers.html#get_var_from_path_or_env/3","title":"Plausible.ConfigHelpers.get_var_from_path_or_env/3","type":"function"},{"doc":"This module defines the setup for tests requiring access to the application's data layer. You may define functions here to be used as helpers in your tests. Finally, if the test case interacts with the database, it cannot be async. For this reason, every test runs inside a transaction which is reset at the beginning of the test unless the test case is marked as async.","ref":"Plausible.DataCase.html","title":"Plausible.DataCase","type":"module"},{"doc":"Base module for coordinated Clickhouse data migrations run via remote shell or otherwise (TBD).","ref":"Plausible.DataMigration.html","title":"Plausible.DataMigration","type":"module"},{"doc":"Numeric IDs migration, SQL files available at: priv/data_migrations/NumericIDs/sql","ref":"Plausible.DataMigration.NumericIDs.html","title":"Plausible.DataMigration.NumericIDs","type":"module"},{"doc":"","ref":"Plausible.DataMigration.NumericIDs.html#confirm/3","title":"Plausible.DataMigration.NumericIDs.confirm/3","type":"function"},{"doc":"","ref":"Plausible.DataMigration.NumericIDs.html#run/1","title":"Plausible.DataMigration.NumericIDs.run/1","type":"function"},{"doc":"","ref":"Plausible.DataMigration.NumericIDs.html#run_sql/2","title":"Plausible.DataMigration.NumericIDs.run_sql/2","type":"function"},{"doc":"","ref":"Plausible.DataMigration.NumericIDs.html#run_sql_confirm/2","title":"Plausible.DataMigration.NumericIDs.run_sql_confirm/2","type":"function"},{"doc":"Ecto.Repo for Clickhouse data migrations, to be started manually, outside of the main application supervision tree.","ref":"Plausible.DataMigration.Repo.html","title":"Plausible.DataMigration.Repo","type":"module"},{"doc":"Callback implementation for Ecto.Repo.aggregate/3 .","ref":"Plausible.DataMigration.Repo.html#aggregate/3","title":"Plausible.DataMigration.Repo.aggregate/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.aggregate/4 .","ref":"Plausible.DataMigration.Repo.html#aggregate/4","title":"Plausible.DataMigration.Repo.aggregate/4","type":"function"},{"doc":"Callback implementation for Ecto.Repo.all/2 .","ref":"Plausible.DataMigration.Repo.html#all/2","title":"Plausible.DataMigration.Repo.all/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.checked_out?/0 .","ref":"Plausible.DataMigration.Repo.html#checked_out?/0","title":"Plausible.DataMigration.Repo.checked_out?/0","type":"function"},{"doc":"Callback implementation for Ecto.Repo.checkout/2 .","ref":"Plausible.DataMigration.Repo.html#checkout/2","title":"Plausible.DataMigration.Repo.checkout/2","type":"function"},{"doc":"","ref":"Plausible.DataMigration.Repo.html#child_spec/1","title":"Plausible.DataMigration.Repo.child_spec/1","type":"function"},{"doc":"Callback implementation for Ecto.Repo.config/0 .","ref":"Plausible.DataMigration.Repo.html#config/0","title":"Plausible.DataMigration.Repo.config/0","type":"function"},{"doc":"Callback implementation for Ecto.Repo.default_options/1 .","ref":"Plausible.DataMigration.Repo.html#default_options/1","title":"Plausible.DataMigration.Repo.default_options/1","type":"function"},{"doc":"Callback implementation for Ecto.Repo.delete/2 .","ref":"Plausible.DataMigration.Repo.html#delete/2","title":"Plausible.DataMigration.Repo.delete/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.delete!/2 .","ref":"Plausible.DataMigration.Repo.html#delete!/2","title":"Plausible.DataMigration.Repo.delete!/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.delete_all/2 .","ref":"Plausible.DataMigration.Repo.html#delete_all/2","title":"Plausible.DataMigration.Repo.delete_all/2","type":"function"},{"doc":"A convenience function for SQL-based repositories that forces all connections in the pool to disconnect within the given interval. See Ecto.Adapters.SQL.disconnect_all/3 for more information.","ref":"Plausible.DataMigration.Repo.html#disconnect_all/2","title":"Plausible.DataMigration.Repo.disconnect_all/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.exists?/2 .","ref":"Plausible.DataMigration.Repo.html#exists?/2","title":"Plausible.DataMigration.Repo.exists?/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get/3 .","ref":"Plausible.DataMigration.Repo.html#get/3","title":"Plausible.DataMigration.Repo.get/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get!/3 .","ref":"Plausible.DataMigration.Repo.html#get!/3","title":"Plausible.DataMigration.Repo.get!/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get_by/3 .","ref":"Plausible.DataMigration.Repo.html#get_by/3","title":"Plausible.DataMigration.Repo.get_by/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get_by!/3 .","ref":"Plausible.DataMigration.Repo.html#get_by!/3","title":"Plausible.DataMigration.Repo.get_by!/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get_dynamic_repo/0 .","ref":"Plausible.DataMigration.Repo.html#get_dynamic_repo/0","title":"Plausible.DataMigration.Repo.get_dynamic_repo/0","type":"function"},{"doc":"Callback implementation for Ecto.Repo.insert/2 .","ref":"Plausible.DataMigration.Repo.html#insert/2","title":"Plausible.DataMigration.Repo.insert/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.insert!/2 .","ref":"Plausible.DataMigration.Repo.html#insert!/2","title":"Plausible.DataMigration.Repo.insert!/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.insert_all/3 .","ref":"Plausible.DataMigration.Repo.html#insert_all/3","title":"Plausible.DataMigration.Repo.insert_all/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.insert_or_update/2 .","ref":"Plausible.DataMigration.Repo.html#insert_or_update/2","title":"Plausible.DataMigration.Repo.insert_or_update/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.insert_or_update!/2 .","ref":"Plausible.DataMigration.Repo.html#insert_or_update!/2","title":"Plausible.DataMigration.Repo.insert_or_update!/2","type":"function"},{"doc":"Similar to insert_all/2 but with the following differences: accepts rows as streams or lists sends rows as a chunked request doesn't autogenerate ids or does any other preprocessing Example: Repo . query! ( "create table ecto_ch_demo(a UInt64, b String) engine Null" ) defmodule Demo do use Ecto.Schema @primary_key false schema "ecto_ch_demo" do field :a , Ch , type : "UInt64" field :b , :string end end rows = Stream . map ( 1 .. 100_000 , fn i -> %{ a : i , b : to_string ( i ) } end ) { 100_000 , nil } = Repo . insert_stream ( Demo , rows ) # schemaless { 100_000 , nil } = Repo . insert_stream ( "ecto_ch_demo" , rows , types : [ a : Ch.Types . u64 ( ) , b : :string ] )","ref":"Plausible.DataMigration.Repo.html#insert_stream/3","title":"Plausible.DataMigration.Repo.insert_stream/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.load/2 .","ref":"Plausible.DataMigration.Repo.html#load/2","title":"Plausible.DataMigration.Repo.load/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.one/2 .","ref":"Plausible.DataMigration.Repo.html#one/2","title":"Plausible.DataMigration.Repo.one/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.one!/2 .","ref":"Plausible.DataMigration.Repo.html#one!/2","title":"Plausible.DataMigration.Repo.one!/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.preload/3 .","ref":"Plausible.DataMigration.Repo.html#preload/3","title":"Plausible.DataMigration.Repo.preload/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.prepare_query/3 .","ref":"Plausible.DataMigration.Repo.html#prepare_query/3","title":"Plausible.DataMigration.Repo.prepare_query/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.put_dynamic_repo/1 .","ref":"Plausible.DataMigration.Repo.html#put_dynamic_repo/1","title":"Plausible.DataMigration.Repo.put_dynamic_repo/1","type":"function"},{"doc":"A convenience function for SQL-based repositories that executes the given query. See Ecto.Adapters.SQL.query/4 for more information.","ref":"Plausible.DataMigration.Repo.html#query/3","title":"Plausible.DataMigration.Repo.query/3","type":"function"},{"doc":"A convenience function for SQL-based repositories that executes the given query. See Ecto.Adapters.SQL.query!/4 for more information.","ref":"Plausible.DataMigration.Repo.html#query!/3","title":"Plausible.DataMigration.Repo.query!/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.reload/2 .","ref":"Plausible.DataMigration.Repo.html#reload/2","title":"Plausible.DataMigration.Repo.reload/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.reload!/2 .","ref":"Plausible.DataMigration.Repo.html#reload!/2","title":"Plausible.DataMigration.Repo.reload!/2","type":"function"},{"doc":"","ref":"Plausible.DataMigration.Repo.html#start/2","title":"Plausible.DataMigration.Repo.start/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.start_link/1 .","ref":"Plausible.DataMigration.Repo.html#start_link/1","title":"Plausible.DataMigration.Repo.start_link/1","type":"function"},{"doc":"Callback implementation for Ecto.Repo.stop/1 .","ref":"Plausible.DataMigration.Repo.html#stop/1","title":"Plausible.DataMigration.Repo.stop/1","type":"function"},{"doc":"Callback implementation for Ecto.Repo.stream/2 .","ref":"Plausible.DataMigration.Repo.html#stream/2","title":"Plausible.DataMigration.Repo.stream/2","type":"function"},{"doc":"A convenience function for SQL-based repositories that translates the given query to SQL. See Ecto.Adapters.SQL.to_sql/3 for more information.","ref":"Plausible.DataMigration.Repo.html#to_sql/2","title":"Plausible.DataMigration.Repo.to_sql/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.update/2 .","ref":"Plausible.DataMigration.Repo.html#update/2","title":"Plausible.DataMigration.Repo.update/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.update!/2 .","ref":"Plausible.DataMigration.Repo.html#update!/2","title":"Plausible.DataMigration.Repo.update!/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.update_all/3 .","ref":"Plausible.DataMigration.Repo.html#update_all/3","title":"Plausible.DataMigration.Repo.update_all/3","type":"function"},{"doc":"Custom type for event name. Accepts Strings and Integers and stores them as String. Returns cast error if any other type is provided. Accepting integers is important for 404 tracking.","ref":"Plausible.Ecto.EventName.html","title":"Plausible.Ecto.EventName","type":"module"},{"doc":"Callback implementation for Ecto.Type.cast/1 .","ref":"Plausible.Ecto.EventName.html#cast/1","title":"Plausible.Ecto.EventName.cast/1","type":"function"},{"doc":"Callback implementation for Ecto.Type.dump/1 .","ref":"Plausible.Ecto.EventName.html#dump/1","title":"Plausible.Ecto.EventName.dump/1","type":"function"},{"doc":"Callback implementation for Ecto.Type.embed_as/1 .","ref":"Plausible.Ecto.EventName.html#embed_as/1","title":"Plausible.Ecto.EventName.embed_as/1","type":"function"},{"doc":"Callback implementation for Ecto.Type.equal?/2 .","ref":"Plausible.Ecto.EventName.html#equal?/2","title":"Plausible.Ecto.EventName.equal?/2","type":"function"},{"doc":"Callback implementation for Ecto.Type.load/1 .","ref":"Plausible.Ecto.EventName.html#load/1","title":"Plausible.Ecto.EventName.load/1","type":"function"},{"doc":"Callback implementation for Ecto.Type.type/0 .","ref":"Plausible.Ecto.EventName.html#type/0","title":"Plausible.Ecto.EventName.type/0","type":"function"},{"doc":"","ref":"Plausible.Event.WriteBuffer.html","title":"Plausible.Event.WriteBuffer","type":"module"},{"doc":"Returns a specification to start this module under a supervisor. See Supervisor .","ref":"Plausible.Event.WriteBuffer.html#child_spec/1","title":"Plausible.Event.WriteBuffer.child_spec/1","type":"function"},{"doc":"","ref":"Plausible.Event.WriteBuffer.html#flush/0","title":"Plausible.Event.WriteBuffer.flush/0","type":"function"},{"doc":"Callback implementation for GenServer.init/1 .","ref":"Plausible.Event.WriteBuffer.html#init/1","title":"Plausible.Event.WriteBuffer.init/1","type":"function"},{"doc":"","ref":"Plausible.Event.WriteBuffer.html#insert/1","title":"Plausible.Event.WriteBuffer.insert/1","type":"function"},{"doc":"","ref":"Plausible.Event.WriteBuffer.html#start_link/1","title":"Plausible.Event.WriteBuffer.start_link/1","type":"function"},{"doc":"","ref":"Plausible.Factory.html","title":"Plausible.Factory","type":"module"},{"doc":"","ref":"Plausible.Factory.html#api_key_factory/0","title":"Plausible.Factory.api_key_factory/0","type":"function"},{"doc":"","ref":"Plausible.Factory.html#build/2","title":"Plausible.Factory.build/2","type":"function"},{"doc":"","ref":"Plausible.Factory.html#build_list/3","title":"Plausible.Factory.build_list/3","type":"function"},{"doc":"","ref":"Plausible.Factory.html#build_pair/2","title":"Plausible.Factory.build_pair/2","type":"function"},{"doc":"","ref":"Plausible.Factory.html#ch_session_factory/0","title":"Plausible.Factory.ch_session_factory/0","type":"function"},{"doc":"","ref":"Plausible.Factory.html#create/1","title":"Plausible.Factory.create/1","type":"function"},{"doc":"","ref":"Plausible.Factory.html#create/2","title":"Plausible.Factory.create/2","type":"function"},{"doc":"","ref":"Plausible.Factory.html#create_list/3","title":"Plausible.Factory.create_list/3","type":"function"},{"doc":"","ref":"Plausible.Factory.html#create_pair/2","title":"Plausible.Factory.create_pair/2","type":"function"},{"doc":"","ref":"Plausible.Factory.html#custom_domain_factory/0","title":"Plausible.Factory.custom_domain_factory/0","type":"function"},{"doc":"","ref":"Plausible.Factory.html#enterprise_plan_factory/0","title":"Plausible.Factory.enterprise_plan_factory/0","type":"function"},{"doc":"","ref":"Plausible.Factory.html#event_factory/0","title":"Plausible.Factory.event_factory/0","type":"function"},{"doc":"Raises a helpful error if no factory is defined.","ref":"Plausible.Factory.html#factory/1","title":"Plausible.Factory.factory/1","type":"function"},{"doc":"","ref":"Plausible.Factory.html#goal_factory/0","title":"Plausible.Factory.goal_factory/0","type":"function"},{"doc":"","ref":"Plausible.Factory.html#google_auth_factory/0","title":"Plausible.Factory.google_auth_factory/0","type":"function"},{"doc":"","ref":"Plausible.Factory.html#imported_browsers_factory/0","title":"Plausible.Factory.imported_browsers_factory/0","type":"function"},{"doc":"","ref":"Plausible.Factory.html#imported_devices_factory/0","title":"Plausible.Factory.imported_devices_factory/0","type":"function"},{"doc":"","ref":"Plausible.Factory.html#imported_entry_pages_factory/0","title":"Plausible.Factory.imported_entry_pages_factory/0","type":"function"},{"doc":"","ref":"Plausible.Factory.html#imported_exit_pages_factory/0","title":"Plausible.Factory.imported_exit_pages_factory/0","type":"function"},{"doc":"","ref":"Plausible.Factory.html#imported_locations_factory/0","title":"Plausible.Factory.imported_locations_factory/0","type":"function"},{"doc":"","ref":"Plausible.Factory.html#imported_operating_systems_factory/0","title":"Plausible.Factory.imported_operating_systems_factory/0","type":"function"},{"doc":"","ref":"Plausible.Factory.html#imported_pages_factory/0","title":"Plausible.Factory.imported_pages_factory/0","type":"function"},{"doc":"","ref":"Plausible.Factory.html#imported_sources_factory/0","title":"Plausible.Factory.imported_sources_factory/0","type":"function"},{"doc":"","ref":"Plausible.Factory.html#imported_visitors_factory/0","title":"Plausible.Factory.imported_visitors_factory/0","type":"function"},{"doc":"","ref":"Plausible.Factory.html#insert/1","title":"Plausible.Factory.insert/1","type":"function"},{"doc":"","ref":"Plausible.Factory.html#insert/2","title":"Plausible.Factory.insert/2","type":"function"},{"doc":"","ref":"Plausible.Factory.html#insert/3","title":"Plausible.Factory.insert/3","type":"function"},{"doc":"","ref":"Plausible.Factory.html#insert_list/3","title":"Plausible.Factory.insert_list/3","type":"function"},{"doc":"","ref":"Plausible.Factory.html#insert_list/4","title":"Plausible.Factory.insert_list/4","type":"function"},{"doc":"","ref":"Plausible.Factory.html#insert_pair/2","title":"Plausible.Factory.insert_pair/2","type":"function"},{"doc":"","ref":"Plausible.Factory.html#insert_pair/3","title":"Plausible.Factory.insert_pair/3","type":"function"},{"doc":"","ref":"Plausible.Factory.html#invitation_factory/0","title":"Plausible.Factory.invitation_factory/0","type":"function"},{"doc":"","ref":"Plausible.Factory.html#monthly_report_factory/0","title":"Plausible.Factory.monthly_report_factory/0","type":"function"},{"doc":"","ref":"Plausible.Factory.html#pageview_factory/0","title":"Plausible.Factory.pageview_factory/0","type":"function"},{"doc":"","ref":"Plausible.Factory.html#params_for/2","title":"Plausible.Factory.params_for/2","type":"function"},{"doc":"","ref":"Plausible.Factory.html#params_with_assocs/2","title":"Plausible.Factory.params_with_assocs/2","type":"function"},{"doc":"","ref":"Plausible.Factory.html#shared_link_factory/0","title":"Plausible.Factory.shared_link_factory/0","type":"function"},{"doc":"","ref":"Plausible.Factory.html#site_factory/0","title":"Plausible.Factory.site_factory/0","type":"function"},{"doc":"","ref":"Plausible.Factory.html#site_membership_factory/0","title":"Plausible.Factory.site_membership_factory/0","type":"function"},{"doc":"","ref":"Plausible.Factory.html#spike_notification_factory/0","title":"Plausible.Factory.spike_notification_factory/0","type":"function"},{"doc":"","ref":"Plausible.Factory.html#string_params_for/2","title":"Plausible.Factory.string_params_for/2","type":"function"},{"doc":"","ref":"Plausible.Factory.html#string_params_with_assocs/2","title":"Plausible.Factory.string_params_with_assocs/2","type":"function"},{"doc":"","ref":"Plausible.Factory.html#subscription_factory/0","title":"Plausible.Factory.subscription_factory/0","type":"function"},{"doc":"","ref":"Plausible.Factory.html#user_factory/1","title":"Plausible.Factory.user_factory/1","type":"function"},{"doc":"","ref":"Plausible.Factory.html#weekly_report_factory/0","title":"Plausible.Factory.weekly_report_factory/0","type":"function"},{"doc":"A funnel is a marketing term used to capture and describe the journey that users go through, from initial step to conversion. A funnel consists of several steps (here: 2..8). This module defines the database schema for storing funnels and changeset helpers for enumerating the steps within. Each step references a goal (either a Custom Event or Visit) see: Plausible.Goal .","ref":"Plausible.Funnel.html","title":"Plausible.Funnel","type":"module"},{"doc":"","ref":"Plausible.Funnel.html#changeset/2","title":"Plausible.Funnel.changeset/2","type":"function"},{"doc":"","ref":"Plausible.Funnel.html#max_steps/0","title":"Plausible.Funnel.max_steps/0","type":"macro"},{"doc":"","ref":"Plausible.Funnel.html#min_steps/0","title":"Plausible.Funnel.min_steps/0","type":"macro"},{"doc":"","ref":"Plausible.Funnel.html#put_step_orders/1","title":"Plausible.Funnel.put_step_orders/1","type":"function"},{"doc":"","ref":"Plausible.Funnel.html#t:t/0","title":"Plausible.Funnel.t/0","type":"type"},{"doc":"This module defines the database schema for a single Funnel step. See: Plausible.Funnel for more information.","ref":"Plausible.Funnel.Step.html","title":"Plausible.Funnel.Step","type":"module"},{"doc":"","ref":"Plausible.Funnel.Step.html#changeset/2","title":"Plausible.Funnel.Step.changeset/2","type":"function"},{"doc":"","ref":"Plausible.Funnel.Step.html#t:t/0","title":"Plausible.Funnel.Step.t/0","type":"type"},{"doc":"This module implements contextual Funnel interface, allowing listing, creating and deleting funnel definitions. For brief explanation of what a Funnel is, please see Plausible.Funnel schema. See Plausible.Stats.Funnel for the evaluation logic.","ref":"Plausible.Funnels.html","title":"Plausible.Funnels","type":"module"},{"doc":"","ref":"Plausible.Funnels.html#create/3","title":"Plausible.Funnels.create/3","type":"function"},{"doc":"","ref":"Plausible.Funnels.html#create_changeset/3","title":"Plausible.Funnels.create_changeset/3","type":"function"},{"doc":"","ref":"Plausible.Funnels.html#delete/2","title":"Plausible.Funnels.delete/2","type":"function"},{"doc":"","ref":"Plausible.Funnels.html#enabled_for?/1","title":"Plausible.Funnels.enabled_for?/1","type":"function"},{"doc":"","ref":"Plausible.Funnels.html#ephemeral_definition/3","title":"Plausible.Funnels.ephemeral_definition/3","type":"function"},{"doc":"","ref":"Plausible.Funnels.html#get/2","title":"Plausible.Funnels.get/2","type":"function"},{"doc":"","ref":"Plausible.Funnels.html#list/1","title":"Plausible.Funnels.list/1","type":"function"},{"doc":"This module provides an API for fetching IP geolocation.","ref":"Plausible.Geo.html","title":"Plausible.Geo","type":"module"},{"doc":"Waits for the database to start after calling load_db/1 with the async option.","ref":"Plausible.Geo.html#await_loader/0","title":"Plausible.Geo.await_loader/0","type":"function"},{"doc":"Returns geodatabase type. Used for deciding whether to show the DB-IP disclaimer or not. Examples In the case of a DB-IP database: iex> database_type ( ) "DBIP-City-Lite" In the case of a MaxMind database: iex> database_type ( ) "GeoLite2-City"","ref":"Plausible.Geo.html#database_type/0","title":"Plausible.Geo.database_type/0","type":"function"},{"doc":"Starts the geodatabase loading process. Two modes are supported: local file and MaxMind license key. Options :path - the path to the .mmdb database local file. When present, :license_key and :edition are not required. :license_key - the license key from MaxMind to authenticate requests to MaxMind. :edition - the name of the MaxMind database to be downloaded from MaxMind servers. Defaults to GeoLite2-City . :async - when used, configures the database loading to run asynchronously. Examples Loading from a local file: iex> load_db ( path : "/etc/plausible/dbip-city.mmdb" ) :ok Downloading a MaxMind DB (this license key is no longer active): iex> load_db ( license_key : "LNpsJCCKPis6XvBP" , edition : "GeoLite2-City" , async : true ) :ok","ref":"Plausible.Geo.html#load_db/1","title":"Plausible.Geo.load_db/1","type":"function"},{"doc":"Looks up geo info about an IP address. Examples iex> lookup ( "8.7.6.5" ) %{ "city" => %{ "geoname_id" => 5349755 , "names" => %{ "de" => "Fontana" , "en" => "Fontana" , "ja" => "フォンタナ" , "ru" => "Фонтана" } } , "continent" => %{ "code" => "NA" , "geoname_id" => 6255149 , "names" => %{ "de" => "Nordamerika" , "en" => "North America" , "es" => "Norteamérica" , "fr" => "Amérique du Nord" , "ja" => "北アメリカ" , "pt-BR" => "América do Norte" , "ru" => "Северная Америка" , "zh-CN" => "北美洲" } } , "country" => %{ "geoname_id" => 6252001 , "iso_code" => "US" , "names" => %{ "de" => "Vereinigte Staaten" , "en" => "United States" , "es" => "Estados Unidos" , "fr" => "États Unis" , "ja" => "アメリカ" , "pt-BR" => "EUA" , "ru" => "США" , "zh-CN" => "美国" } } , "location" => %{ "accuracy_radius" => 50 , "latitude" => 34.1211 , "longitude" => - 117.4362 , "metro_code" => 803 , "time_zone" => "America/Los_Angeles" } , "postal" => %{ "code" => "92336" } , "registered_country" => %{ "geoname_id" => 6252001 , "iso_code" => "US" , "names" => %{ "de" => "Vereinigte Staaten" , "en" => "United States" , "es" => "Estados Unidos" , "fr" => "États Unis" , "ja" => "アメリカ" , "pt-BR" => "EUA" , "ru" => "США" , "zh-CN" => "美国" } } , "subdivisions" => [ %{ "geoname_id" => 5332921 , "iso_code" => "CA" , "names" => %{ "de" => "Kalifornien" , "en" => "California" , "es" => "California" , "fr" => "Californie" , "ja" => "カリフォルニア州" , "pt-BR" => "Califórnia" , "ru" => "Калифорния" , "zh-CN" => "加州" } } ] }","ref":"Plausible.Geo.html#lookup/1","title":"Plausible.Geo.lookup/1","type":"function"},{"doc":"","ref":"Plausible.Goal.html","title":"Plausible.Goal","type":"module"},{"doc":"","ref":"Plausible.Goal.html#changeset/2","title":"Plausible.Goal.changeset/2","type":"function"},{"doc":"","ref":"Plausible.Goal.html#currency_options/0","title":"Plausible.Goal.currency_options/0","type":"function"},{"doc":"","ref":"Plausible.Goal.html#revenue?/1","title":"Plausible.Goal.revenue?/1","type":"function"},{"doc":"","ref":"Plausible.Goal.html#valid_currencies/0","title":"Plausible.Goal.valid_currencies/0","type":"function"},{"doc":"","ref":"Plausible.Goal.html#t:t/0","title":"Plausible.Goal.t/0","type":"type"},{"doc":"","ref":"Plausible.Goals.html","title":"Plausible.Goals","type":"module"},{"doc":"","ref":"Plausible.Goals.html#count/1","title":"Plausible.Goals.count/1","type":"function"},{"doc":"Creates a Goal for a site. If the created goal is a revenue goal, it sets site.updated_at to be refreshed by the sites cache, as revenue goals are used during ingestion.","ref":"Plausible.Goals.html#create/3","title":"Plausible.Goals.create/3","type":"function"},{"doc":"If a goal belongs to funnel(s), we need to inspect their number of steps. If it exceeds the minimum allowed (defined via Plausible.Funnel.min_steps/0 ), the funnel will be reduced (i.e. a step associated with the goal to be deleted is removed), so that the minimum number of steps is preserved. This is done implicitly, by postgres, as per on_delete: :delete_all. Otherwise, for associated funnel(s) consisting of minimum number steps only, funnel record(s) are removed completely along with the targeted goal.","ref":"Plausible.Goals.html#delete/2","title":"Plausible.Goals.delete/2","type":"function"},{"doc":"","ref":"Plausible.Goals.html#find_or_create/2","title":"Plausible.Goals.find_or_create/2","type":"function"},{"doc":"","ref":"Plausible.Goals.html#for_site/2","title":"Plausible.Goals.for_site/2","type":"function"},{"doc":"","ref":"Plausible.Google.Api.html","title":"Plausible.Google.Api","type":"module"},{"doc":"","ref":"Plausible.Google.Api.html#fetch_and_persist/3","title":"Plausible.Google.Api.fetch_and_persist/3","type":"function"},{"doc":"","ref":"Plausible.Google.Api.html#fetch_stats/3","title":"Plausible.Google.Api.fetch_stats/3","type":"function"},{"doc":"","ref":"Plausible.Google.Api.html#fetch_verified_properties/1","title":"Plausible.Google.Api.fetch_verified_properties/1","type":"function"},{"doc":"Returns a single Google Analytics view if the user has access to it.","ref":"Plausible.Google.Api.html#get_view/2","title":"Plausible.Google.Api.get_view/2","type":"function"},{"doc":"Imports stats from a Google Analytics UA view to a Plausible site. This function fetches Google Analytics reports in batches of 7500 per request. The batches are then buffered to Clickhouse by the Plausible.Google.Buffer process. Requests to Google Analytics can fail, and are retried at most 5 times with an exponential backoff. Returns :ok when importing has finished or {:error, term()} when a request to GA failed too many times. Useful links: Feature documentation GA API reference GA Dimensions reference","ref":"Plausible.Google.Api.html#import_analytics/4","title":"Plausible.Google.Api.import_analytics/4","type":"function"},{"doc":"","ref":"Plausible.Google.Api.html#import_authorize_url/2","title":"Plausible.Google.Api.import_authorize_url/2","type":"function"},{"doc":"Lists Google Analytics views grouped by hostname.","ref":"Plausible.Google.Api.html#list_views/1","title":"Plausible.Google.Api.list_views/1","type":"function"},{"doc":"","ref":"Plausible.Google.Api.html#search_console_authorize_url/2","title":"Plausible.Google.Api.search_console_authorize_url/2","type":"function"},{"doc":"","ref":"Plausible.Google.Api.html#t:google_analytics_view/0","title":"Plausible.Google.Api.google_analytics_view/0","type":"type"},{"doc":"","ref":"Plausible.Google.Api.html#t:import_auth/0","title":"Plausible.Google.Api.import_auth/0","type":"type"},{"doc":"","ref":"Plausible.Google.Api.Mock.html","title":"Plausible.Google.Api.Mock","type":"module"},{"doc":"","ref":"Plausible.Google.Api.Mock.html#fetch_stats/3","title":"Plausible.Google.Api.Mock.fetch_stats/3","type":"function"},{"doc":"This GenServer inserts records into Clickhouse imported_* tables. Multiple buffers are automatically created for each table. Records are flushed when the table buffer reaches the maximum size, defined by max_buffer_size/0 .","ref":"Plausible.Google.Buffer.html","title":"Plausible.Google.Buffer","type":"module"},{"doc":"Returns a specification to start this module under a supervisor. See Supervisor .","ref":"Plausible.Google.Buffer.html#child_spec/1","title":"Plausible.Google.Buffer.child_spec/1","type":"function"},{"doc":"Flushes all table buffers to Clickhouse.","ref":"Plausible.Google.Buffer.html#flush/2","title":"Plausible.Google.Buffer.flush/2","type":"function"},{"doc":"Callback implementation for GenServer.handle_continue/2 .","ref":"Plausible.Google.Buffer.html#handle_continue/2","title":"Plausible.Google.Buffer.handle_continue/2","type":"function"},{"doc":"Callback implementation for GenServer.init/1 .","ref":"Plausible.Google.Buffer.html#init/1","title":"Plausible.Google.Buffer.init/1","type":"function"},{"doc":"Puts the given records into the table buffer.","ref":"Plausible.Google.Buffer.html#insert_many/3","title":"Plausible.Google.Buffer.insert_many/3","type":"function"},{"doc":"Returns the total count of items in the given table buffer.","ref":"Plausible.Google.Buffer.html#size/2","title":"Plausible.Google.Buffer.size/2","type":"function"},{"doc":"","ref":"Plausible.Google.Buffer.html#start_link/0","title":"Plausible.Google.Buffer.start_link/0","type":"function"},{"doc":"","ref":"Plausible.Google.Buffer.html#stop/1","title":"Plausible.Google.Buffer.stop/1","type":"function"},{"doc":"","ref":"Plausible.Google.HTTP.html","title":"Plausible.Google.HTTP","type":"module"},{"doc":"","ref":"Plausible.Google.HTTP.html#fetch_access_token/1","title":"Plausible.Google.HTTP.fetch_access_token/1","type":"function"},{"doc":"","ref":"Plausible.Google.HTTP.html#get_analytics_start_date/2","title":"Plausible.Google.HTTP.get_analytics_start_date/2","type":"function"},{"doc":"","ref":"Plausible.Google.HTTP.html#get_report/1","title":"Plausible.Google.HTTP.get_report/1","type":"function"},{"doc":"","ref":"Plausible.Google.HTTP.html#list_sites/1","title":"Plausible.Google.HTTP.list_sites/1","type":"function"},{"doc":"","ref":"Plausible.Google.HTTP.html#list_stats/5","title":"Plausible.Google.HTTP.list_stats/5","type":"function"},{"doc":"","ref":"Plausible.Google.HTTP.html#list_views_for_user/1","title":"Plausible.Google.HTTP.list_views_for_user/1","type":"function"},{"doc":"","ref":"Plausible.Google.HTTP.html#refresh_auth_token/1","title":"Plausible.Google.HTTP.refresh_auth_token/1","type":"function"},{"doc":"","ref":"Plausible.Google.ReportRequest.html","title":"Plausible.Google.ReportRequest","type":"module"},{"doc":"","ref":"Plausible.Google.ReportRequest.html#full_report/0","title":"Plausible.Google.ReportRequest.full_report/0","type":"function"},{"doc":"","ref":"Plausible.Google.ReportRequest.html#t:t/0","title":"Plausible.Google.ReportRequest.t/0","type":"type"},{"doc":"HTTP Client built on top of Finch. By default, request parameters are json-encoded. If a raw binary value is supplied, no encoding is performed. If x-www-form-urlencoded content-type is set in headers, URL encoding is invoked.","ref":"Plausible.HTTPClient.html","title":"Plausible.HTTPClient","type":"module"},{"doc":"Make a GET request","ref":"Plausible.HTTPClient.html#get/2","title":"Plausible.HTTPClient.get/2","type":"function"},{"doc":"","ref":"Plausible.HTTPClient.html#impl/0","title":"Plausible.HTTPClient.impl/0","type":"function"},{"doc":"Make a POST request","ref":"Plausible.HTTPClient.html#post/4","title":"Plausible.HTTPClient.post/4","type":"function"},{"doc":"","ref":"Plausible.HTTPClient.Interface.html","title":"Plausible.HTTPClient.Interface","type":"behaviour"},{"doc":"","ref":"Plausible.HTTPClient.Interface.html#c:get/1","title":"Plausible.HTTPClient.Interface.get/1","type":"callback"},{"doc":"","ref":"Plausible.HTTPClient.Interface.html#c:get/2","title":"Plausible.HTTPClient.Interface.get/2","type":"callback"},{"doc":"","ref":"Plausible.HTTPClient.Interface.html#c:post/3","title":"Plausible.HTTPClient.Interface.post/3","type":"callback"},{"doc":"","ref":"Plausible.HTTPClient.Interface.html#c:post/4","title":"Plausible.HTTPClient.Interface.post/4","type":"callback"},{"doc":"","ref":"Plausible.HTTPClient.Interface.html#t:finch_request_opts/0","title":"Plausible.HTTPClient.Interface.finch_request_opts/0","type":"type"},{"doc":"","ref":"Plausible.HTTPClient.Interface.html#t:headers/0","title":"Plausible.HTTPClient.Interface.headers/0","type":"type"},{"doc":"","ref":"Plausible.HTTPClient.Interface.html#t:params/0","title":"Plausible.HTTPClient.Interface.params/0","type":"type"},{"doc":"","ref":"Plausible.HTTPClient.Interface.html#t:response/0","title":"Plausible.HTTPClient.Interface.response/0","type":"type"},{"doc":"","ref":"Plausible.HTTPClient.Interface.html#t:url/0","title":"Plausible.HTTPClient.Interface.url/0","type":"type"},{"doc":"","ref":"Plausible.HTTPClient.Non200Error.html","title":"Plausible.HTTPClient.Non200Error","type":"module"},{"doc":"","ref":"Plausible.HTTPClient.Non200Error.html#new/1","title":"Plausible.HTTPClient.Non200Error.new/1","type":"function"},{"doc":"","ref":"Plausible.HTTPClient.Non200Error.html#t:t/0","title":"Plausible.HTTPClient.Non200Error.t/0","type":"type"},{"doc":"A dedicated repo for import related mutations","ref":"Plausible.ImportDeletionRepo.html","title":"Plausible.ImportDeletionRepo","type":"module"},{"doc":"Callback implementation for Ecto.Repo.aggregate/3 .","ref":"Plausible.ImportDeletionRepo.html#aggregate/3","title":"Plausible.ImportDeletionRepo.aggregate/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.aggregate/4 .","ref":"Plausible.ImportDeletionRepo.html#aggregate/4","title":"Plausible.ImportDeletionRepo.aggregate/4","type":"function"},{"doc":"Callback implementation for Ecto.Repo.all/2 .","ref":"Plausible.ImportDeletionRepo.html#all/2","title":"Plausible.ImportDeletionRepo.all/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.checked_out?/0 .","ref":"Plausible.ImportDeletionRepo.html#checked_out?/0","title":"Plausible.ImportDeletionRepo.checked_out?/0","type":"function"},{"doc":"Callback implementation for Ecto.Repo.checkout/2 .","ref":"Plausible.ImportDeletionRepo.html#checkout/2","title":"Plausible.ImportDeletionRepo.checkout/2","type":"function"},{"doc":"","ref":"Plausible.ImportDeletionRepo.html#child_spec/1","title":"Plausible.ImportDeletionRepo.child_spec/1","type":"function"},{"doc":"Callback implementation for Ecto.Repo.config/0 .","ref":"Plausible.ImportDeletionRepo.html#config/0","title":"Plausible.ImportDeletionRepo.config/0","type":"function"},{"doc":"Callback implementation for Ecto.Repo.default_options/1 .","ref":"Plausible.ImportDeletionRepo.html#default_options/1","title":"Plausible.ImportDeletionRepo.default_options/1","type":"function"},{"doc":"Callback implementation for Ecto.Repo.delete/2 .","ref":"Plausible.ImportDeletionRepo.html#delete/2","title":"Plausible.ImportDeletionRepo.delete/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.delete!/2 .","ref":"Plausible.ImportDeletionRepo.html#delete!/2","title":"Plausible.ImportDeletionRepo.delete!/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.delete_all/2 .","ref":"Plausible.ImportDeletionRepo.html#delete_all/2","title":"Plausible.ImportDeletionRepo.delete_all/2","type":"function"},{"doc":"A convenience function for SQL-based repositories that forces all connections in the pool to disconnect within the given interval. See Ecto.Adapters.SQL.disconnect_all/3 for more information.","ref":"Plausible.ImportDeletionRepo.html#disconnect_all/2","title":"Plausible.ImportDeletionRepo.disconnect_all/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.exists?/2 .","ref":"Plausible.ImportDeletionRepo.html#exists?/2","title":"Plausible.ImportDeletionRepo.exists?/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get/3 .","ref":"Plausible.ImportDeletionRepo.html#get/3","title":"Plausible.ImportDeletionRepo.get/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get!/3 .","ref":"Plausible.ImportDeletionRepo.html#get!/3","title":"Plausible.ImportDeletionRepo.get!/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get_by/3 .","ref":"Plausible.ImportDeletionRepo.html#get_by/3","title":"Plausible.ImportDeletionRepo.get_by/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get_by!/3 .","ref":"Plausible.ImportDeletionRepo.html#get_by!/3","title":"Plausible.ImportDeletionRepo.get_by!/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get_dynamic_repo/0 .","ref":"Plausible.ImportDeletionRepo.html#get_dynamic_repo/0","title":"Plausible.ImportDeletionRepo.get_dynamic_repo/0","type":"function"},{"doc":"Callback implementation for Ecto.Repo.insert/2 .","ref":"Plausible.ImportDeletionRepo.html#insert/2","title":"Plausible.ImportDeletionRepo.insert/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.insert!/2 .","ref":"Plausible.ImportDeletionRepo.html#insert!/2","title":"Plausible.ImportDeletionRepo.insert!/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.insert_all/3 .","ref":"Plausible.ImportDeletionRepo.html#insert_all/3","title":"Plausible.ImportDeletionRepo.insert_all/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.insert_or_update/2 .","ref":"Plausible.ImportDeletionRepo.html#insert_or_update/2","title":"Plausible.ImportDeletionRepo.insert_or_update/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.insert_or_update!/2 .","ref":"Plausible.ImportDeletionRepo.html#insert_or_update!/2","title":"Plausible.ImportDeletionRepo.insert_or_update!/2","type":"function"},{"doc":"Similar to insert_all/2 but with the following differences: accepts rows as streams or lists sends rows as a chunked request doesn't autogenerate ids or does any other preprocessing Example: Repo . query! ( "create table ecto_ch_demo(a UInt64, b String) engine Null" ) defmodule Demo do use Ecto.Schema @primary_key false schema "ecto_ch_demo" do field :a , Ch , type : "UInt64" field :b , :string end end rows = Stream . map ( 1 .. 100_000 , fn i -> %{ a : i , b : to_string ( i ) } end ) { 100_000 , nil } = Repo . insert_stream ( Demo , rows ) # schemaless { 100_000 , nil } = Repo . insert_stream ( "ecto_ch_demo" , rows , types : [ a : Ch.Types . u64 ( ) , b : :string ] )","ref":"Plausible.ImportDeletionRepo.html#insert_stream/3","title":"Plausible.ImportDeletionRepo.insert_stream/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.load/2 .","ref":"Plausible.ImportDeletionRepo.html#load/2","title":"Plausible.ImportDeletionRepo.load/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.one/2 .","ref":"Plausible.ImportDeletionRepo.html#one/2","title":"Plausible.ImportDeletionRepo.one/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.one!/2 .","ref":"Plausible.ImportDeletionRepo.html#one!/2","title":"Plausible.ImportDeletionRepo.one!/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.preload/3 .","ref":"Plausible.ImportDeletionRepo.html#preload/3","title":"Plausible.ImportDeletionRepo.preload/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.prepare_query/3 .","ref":"Plausible.ImportDeletionRepo.html#prepare_query/3","title":"Plausible.ImportDeletionRepo.prepare_query/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.put_dynamic_repo/1 .","ref":"Plausible.ImportDeletionRepo.html#put_dynamic_repo/1","title":"Plausible.ImportDeletionRepo.put_dynamic_repo/1","type":"function"},{"doc":"A convenience function for SQL-based repositories that executes the given query. See Ecto.Adapters.SQL.query/4 for more information.","ref":"Plausible.ImportDeletionRepo.html#query/3","title":"Plausible.ImportDeletionRepo.query/3","type":"function"},{"doc":"A convenience function for SQL-based repositories that executes the given query. See Ecto.Adapters.SQL.query!/4 for more information.","ref":"Plausible.ImportDeletionRepo.html#query!/3","title":"Plausible.ImportDeletionRepo.query!/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.reload/2 .","ref":"Plausible.ImportDeletionRepo.html#reload/2","title":"Plausible.ImportDeletionRepo.reload/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.reload!/2 .","ref":"Plausible.ImportDeletionRepo.html#reload!/2","title":"Plausible.ImportDeletionRepo.reload!/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.start_link/1 .","ref":"Plausible.ImportDeletionRepo.html#start_link/1","title":"Plausible.ImportDeletionRepo.start_link/1","type":"function"},{"doc":"Callback implementation for Ecto.Repo.stop/1 .","ref":"Plausible.ImportDeletionRepo.html#stop/1","title":"Plausible.ImportDeletionRepo.stop/1","type":"function"},{"doc":"Callback implementation for Ecto.Repo.stream/2 .","ref":"Plausible.ImportDeletionRepo.html#stream/2","title":"Plausible.ImportDeletionRepo.stream/2","type":"function"},{"doc":"A convenience function for SQL-based repositories that translates the given query to SQL. See Ecto.Adapters.SQL.to_sql/3 for more information.","ref":"Plausible.ImportDeletionRepo.html#to_sql/2","title":"Plausible.ImportDeletionRepo.to_sql/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.update/2 .","ref":"Plausible.ImportDeletionRepo.html#update/2","title":"Plausible.ImportDeletionRepo.update/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.update!/2 .","ref":"Plausible.ImportDeletionRepo.html#update!/2","title":"Plausible.ImportDeletionRepo.update!/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.update_all/3 .","ref":"Plausible.ImportDeletionRepo.html#update_all/3","title":"Plausible.ImportDeletionRepo.update_all/3","type":"function"},{"doc":"","ref":"Plausible.Imported.html","title":"Plausible.Imported","type":"module"},{"doc":"","ref":"Plausible.Imported.html#forget/1","title":"Plausible.Imported.forget/1","type":"function"},{"doc":"","ref":"Plausible.Imported.html#from_google_analytics/3","title":"Plausible.Imported.from_google_analytics/3","type":"function"},{"doc":"","ref":"Plausible.Imported.html#tables/0","title":"Plausible.Imported.tables/0","type":"function"},{"doc":"Write-centric Clickhouse access interface","ref":"Plausible.IngestRepo.html","title":"Plausible.IngestRepo","type":"module"},{"doc":"Callback implementation for Ecto.Repo.aggregate/3 .","ref":"Plausible.IngestRepo.html#aggregate/3","title":"Plausible.IngestRepo.aggregate/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.aggregate/4 .","ref":"Plausible.IngestRepo.html#aggregate/4","title":"Plausible.IngestRepo.aggregate/4","type":"function"},{"doc":"Callback implementation for Ecto.Repo.all/2 .","ref":"Plausible.IngestRepo.html#all/2","title":"Plausible.IngestRepo.all/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.checked_out?/0 .","ref":"Plausible.IngestRepo.html#checked_out?/0","title":"Plausible.IngestRepo.checked_out?/0","type":"function"},{"doc":"Callback implementation for Ecto.Repo.checkout/2 .","ref":"Plausible.IngestRepo.html#checkout/2","title":"Plausible.IngestRepo.checkout/2","type":"function"},{"doc":"","ref":"Plausible.IngestRepo.html#child_spec/1","title":"Plausible.IngestRepo.child_spec/1","type":"function"},{"doc":"Callback implementation for Ecto.Repo.config/0 .","ref":"Plausible.IngestRepo.html#config/0","title":"Plausible.IngestRepo.config/0","type":"function"},{"doc":"Callback implementation for Ecto.Repo.default_options/1 .","ref":"Plausible.IngestRepo.html#default_options/1","title":"Plausible.IngestRepo.default_options/1","type":"function"},{"doc":"Callback implementation for Ecto.Repo.delete/2 .","ref":"Plausible.IngestRepo.html#delete/2","title":"Plausible.IngestRepo.delete/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.delete!/2 .","ref":"Plausible.IngestRepo.html#delete!/2","title":"Plausible.IngestRepo.delete!/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.delete_all/2 .","ref":"Plausible.IngestRepo.html#delete_all/2","title":"Plausible.IngestRepo.delete_all/2","type":"function"},{"doc":"A convenience function for SQL-based repositories that forces all connections in the pool to disconnect within the given interval. See Ecto.Adapters.SQL.disconnect_all/3 for more information.","ref":"Plausible.IngestRepo.html#disconnect_all/2","title":"Plausible.IngestRepo.disconnect_all/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.exists?/2 .","ref":"Plausible.IngestRepo.html#exists?/2","title":"Plausible.IngestRepo.exists?/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get/3 .","ref":"Plausible.IngestRepo.html#get/3","title":"Plausible.IngestRepo.get/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get!/3 .","ref":"Plausible.IngestRepo.html#get!/3","title":"Plausible.IngestRepo.get!/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get_by/3 .","ref":"Plausible.IngestRepo.html#get_by/3","title":"Plausible.IngestRepo.get_by/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get_by!/3 .","ref":"Plausible.IngestRepo.html#get_by!/3","title":"Plausible.IngestRepo.get_by!/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get_dynamic_repo/0 .","ref":"Plausible.IngestRepo.html#get_dynamic_repo/0","title":"Plausible.IngestRepo.get_dynamic_repo/0","type":"function"},{"doc":"Callback implementation for Ecto.Repo.insert/2 .","ref":"Plausible.IngestRepo.html#insert/2","title":"Plausible.IngestRepo.insert/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.insert!/2 .","ref":"Plausible.IngestRepo.html#insert!/2","title":"Plausible.IngestRepo.insert!/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.insert_all/3 .","ref":"Plausible.IngestRepo.html#insert_all/3","title":"Plausible.IngestRepo.insert_all/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.insert_or_update/2 .","ref":"Plausible.IngestRepo.html#insert_or_update/2","title":"Plausible.IngestRepo.insert_or_update/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.insert_or_update!/2 .","ref":"Plausible.IngestRepo.html#insert_or_update!/2","title":"Plausible.IngestRepo.insert_or_update!/2","type":"function"},{"doc":"Similar to insert_all/2 but with the following differences: accepts rows as streams or lists sends rows as a chunked request doesn't autogenerate ids or does any other preprocessing Example: Repo . query! ( "create table ecto_ch_demo(a UInt64, b String) engine Null" ) defmodule Demo do use Ecto.Schema @primary_key false schema "ecto_ch_demo" do field :a , Ch , type : "UInt64" field :b , :string end end rows = Stream . map ( 1 .. 100_000 , fn i -> %{ a : i , b : to_string ( i ) } end ) { 100_000 , nil } = Repo . insert_stream ( Demo , rows ) # schemaless { 100_000 , nil } = Repo . insert_stream ( "ecto_ch_demo" , rows , types : [ a : Ch.Types . u64 ( ) , b : :string ] )","ref":"Plausible.IngestRepo.html#insert_stream/3","title":"Plausible.IngestRepo.insert_stream/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.load/2 .","ref":"Plausible.IngestRepo.html#load/2","title":"Plausible.IngestRepo.load/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.one/2 .","ref":"Plausible.IngestRepo.html#one/2","title":"Plausible.IngestRepo.one/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.one!/2 .","ref":"Plausible.IngestRepo.html#one!/2","title":"Plausible.IngestRepo.one!/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.preload/3 .","ref":"Plausible.IngestRepo.html#preload/3","title":"Plausible.IngestRepo.preload/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.prepare_query/3 .","ref":"Plausible.IngestRepo.html#prepare_query/3","title":"Plausible.IngestRepo.prepare_query/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.put_dynamic_repo/1 .","ref":"Plausible.IngestRepo.html#put_dynamic_repo/1","title":"Plausible.IngestRepo.put_dynamic_repo/1","type":"function"},{"doc":"A convenience function for SQL-based repositories that executes the given query. See Ecto.Adapters.SQL.query/4 for more information.","ref":"Plausible.IngestRepo.html#query/3","title":"Plausible.IngestRepo.query/3","type":"function"},{"doc":"A convenience function for SQL-based repositories that executes the given query. See Ecto.Adapters.SQL.query!/4 for more information.","ref":"Plausible.IngestRepo.html#query!/3","title":"Plausible.IngestRepo.query!/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.reload/2 .","ref":"Plausible.IngestRepo.html#reload/2","title":"Plausible.IngestRepo.reload/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.reload!/2 .","ref":"Plausible.IngestRepo.html#reload!/2","title":"Plausible.IngestRepo.reload!/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.start_link/1 .","ref":"Plausible.IngestRepo.html#start_link/1","title":"Plausible.IngestRepo.start_link/1","type":"function"},{"doc":"Callback implementation for Ecto.Repo.stop/1 .","ref":"Plausible.IngestRepo.html#stop/1","title":"Plausible.IngestRepo.stop/1","type":"function"},{"doc":"Callback implementation for Ecto.Repo.stream/2 .","ref":"Plausible.IngestRepo.html#stream/2","title":"Plausible.IngestRepo.stream/2","type":"function"},{"doc":"A convenience function for SQL-based repositories that translates the given query to SQL. See Ecto.Adapters.SQL.to_sql/3 for more information.","ref":"Plausible.IngestRepo.html#to_sql/2","title":"Plausible.IngestRepo.to_sql/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.update/2 .","ref":"Plausible.IngestRepo.html#update/2","title":"Plausible.IngestRepo.update/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.update!/2 .","ref":"Plausible.IngestRepo.html#update!/2","title":"Plausible.IngestRepo.update!/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.update_all/3 .","ref":"Plausible.IngestRepo.html#update_all/3","title":"Plausible.IngestRepo.update_all/3","type":"function"},{"doc":"This is instrumentation necessary for keeping track of per-domain internal metrics. Due to metric labels cardinality (domain x metric_name), these statistics are not suitable for prometheus/grafana exposure, hence an internal storage is used. The module installs Counters.TelemetryHandler and periodically flushes the internal counter aggregates via Counters.Buffer interface. The underlying database schema is running SummingMergeTree engine. To take advantage of automatic roll-ups it provides, upon dispatching the buffered records to Clickhouse this module transforms each event_timebucket aggregate into a 1-minute resolution. Clickhouse connection is set to insert counters asynchronously every time a pool checkout is made. Those properties are reverted once the insert is done (or naturally, if the connection crashes).","ref":"Plausible.Ingestion.Counters.html","title":"Plausible.Ingestion.Counters","type":"module"},{"doc":"","ref":"Plausible.Ingestion.Counters.html#child_spec/1","title":"Plausible.Ingestion.Counters.child_spec/1","type":"function"},{"doc":"","ref":"Plausible.Ingestion.Counters.html#enabled?/0","title":"Plausible.Ingestion.Counters.enabled?/0","type":"function"},{"doc":"","ref":"Plausible.Ingestion.Counters.html#stop/1","title":"Plausible.Ingestion.Counters.stop/1","type":"function"},{"doc":"A buffer aggregating counters for internal metrics, within 10 seconds time buckets. See Plausible.Ingestion.Counters for integration. Flushing is by default possible only once the 10s bucket is complete (its window has moved). This is to avoid race conditions when clearing up the buffer on dequeue - because there is no atomic "get and delete", and items are buffered concurrently, there is a gap between get and delete in which items written may disappear otherwise. aggregate_bucket_fn and flush_boundary_fn control that semantics and are configurable only for test purposes.","ref":"Plausible.Ingestion.Counters.Buffer.html","title":"Plausible.Ingestion.Counters.Buffer","type":"module"},{"doc":"","ref":"Plausible.Ingestion.Counters.Buffer.html#aggregate/4","title":"Plausible.Ingestion.Counters.Buffer.aggregate/4","type":"function"},{"doc":"","ref":"Plausible.Ingestion.Counters.Buffer.html#bucket_10s/1","title":"Plausible.Ingestion.Counters.Buffer.bucket_10s/1","type":"function"},{"doc":"","ref":"Plausible.Ingestion.Counters.Buffer.html#flush/2","title":"Plausible.Ingestion.Counters.Buffer.flush/2","type":"function"},{"doc":"","ref":"Plausible.Ingestion.Counters.Buffer.html#new/2","title":"Plausible.Ingestion.Counters.Buffer.new/2","type":"function"},{"doc":"","ref":"Plausible.Ingestion.Counters.Buffer.html#previous_10s/1","title":"Plausible.Ingestion.Counters.Buffer.previous_10s/1","type":"function"},{"doc":"","ref":"Plausible.Ingestion.Counters.Buffer.html#t:bucket_fn_opt/0","title":"Plausible.Ingestion.Counters.Buffer.bucket_fn_opt/0","type":"type"},{"doc":"","ref":"Plausible.Ingestion.Counters.Buffer.html#t:t/0","title":"Plausible.Ingestion.Counters.Buffer.t/0","type":"type"},{"doc":"","ref":"Plausible.Ingestion.Counters.Buffer.html#t:unix_timestamp/0","title":"Plausible.Ingestion.Counters.Buffer.unix_timestamp/0","type":"type"},{"doc":"Clickhouse schema for storing ingest counter metrics","ref":"Plausible.Ingestion.Counters.Record.html","title":"Plausible.Ingestion.Counters.Record","type":"module"},{"doc":"","ref":"Plausible.Ingestion.Counters.Record.html#t:t/0","title":"Plausible.Ingestion.Counters.Record.t/0","type":"type"},{"doc":"Susbcribes to telemetry events emitted by Plausible.Ingestion.Event . Every time a request derived event is either dispatched to clickhouse or dropped, a telemetry event is emitted respectively. That event is captured here, its metadata is extracted and sent for internal stats aggregation via Counters.Buffer interface.","ref":"Plausible.Ingestion.Counters.TelemetryHandler.html","title":"Plausible.Ingestion.Counters.TelemetryHandler","type":"module"},{"doc":"","ref":"Plausible.Ingestion.Counters.TelemetryHandler.html#handle_event/4","title":"Plausible.Ingestion.Counters.TelemetryHandler.handle_event/4","type":"function"},{"doc":"","ref":"Plausible.Ingestion.Counters.TelemetryHandler.html#install/1","title":"Plausible.Ingestion.Counters.TelemetryHandler.install/1","type":"function"},{"doc":"This module exposes the build_and_buffer/1 function capable of turning %Plausible.Ingestion.Request{} into a series of events that in turn are uniformly either buffered in batches (to Clickhouse) or dropped (e.g. due to spam blocklist) from the processing pipeline.","ref":"Plausible.Ingestion.Event.html","title":"Plausible.Ingestion.Event","type":"module"},{"doc":"","ref":"Plausible.Ingestion.Event.html#build_and_buffer/1","title":"Plausible.Ingestion.Event.build_and_buffer/1","type":"function"},{"doc":"","ref":"Plausible.Ingestion.Event.html#emit_telemetry_buffered/1","title":"Plausible.Ingestion.Event.emit_telemetry_buffered/1","type":"function"},{"doc":"","ref":"Plausible.Ingestion.Event.html#emit_telemetry_dropped/2","title":"Plausible.Ingestion.Event.emit_telemetry_dropped/2","type":"function"},{"doc":"","ref":"Plausible.Ingestion.Event.html#telemetry_event_buffered/0","title":"Plausible.Ingestion.Event.telemetry_event_buffered/0","type":"function"},{"doc":"","ref":"Plausible.Ingestion.Event.html#telemetry_event_dropped/0","title":"Plausible.Ingestion.Event.telemetry_event_dropped/0","type":"function"},{"doc":"","ref":"Plausible.Ingestion.Event.html#t:drop_reason/0","title":"Plausible.Ingestion.Event.drop_reason/0","type":"type"},{"doc":"","ref":"Plausible.Ingestion.Event.html#t:t/0","title":"Plausible.Ingestion.Event.t/0","type":"type"},{"doc":"The %Plausible.Ingestion.Request{} struct stores all needed fields to create an event downstream. Pre-eliminary validation is made to detect user errors early.","ref":"Plausible.Ingestion.Request.html","title":"Plausible.Ingestion.Request","type":"module"},{"doc":"Builds and initially validates %Plausible.Ingestion.Request{} struct from %Plug.Conn{}.","ref":"Plausible.Ingestion.Request.html#build/2","title":"Plausible.Ingestion.Request.build/2","type":"function"},{"doc":"Removes the "www" part of a hostname.","ref":"Plausible.Ingestion.Request.html#sanitize_hostname/1","title":"Plausible.Ingestion.Request.sanitize_hostname/1","type":"function"},{"doc":"","ref":"Plausible.Ingestion.Request.html#t:t/0","title":"Plausible.Ingestion.Request.t/0","type":"type"},{"doc":"","ref":"Plausible.Mailer.html","title":"Plausible.Mailer","type":"module"},{"doc":"","ref":"Plausible.Mailer.html#deliver/1","title":"Plausible.Mailer.deliver/1","type":"function"},{"doc":"","ref":"Plausible.Mailer.html#deliver_later/2","title":"Plausible.Mailer.deliver_later/2","type":"function"},{"doc":"","ref":"Plausible.Mailer.html#deliver_later!/2","title":"Plausible.Mailer.deliver_later!/2","type":"function"},{"doc":"","ref":"Plausible.Mailer.html#deliver_now/2","title":"Plausible.Mailer.deliver_now/2","type":"function"},{"doc":"","ref":"Plausible.Mailer.html#deliver_now!/2","title":"Plausible.Mailer.deliver_now!/2","type":"function"},{"doc":"","ref":"Plausible.Mailer.html#send/1","title":"Plausible.Mailer.send/1","type":"function"},{"doc":"Custom OpenTelemetry sampler implementation that ignores particular traces to reduce noise. Ingestion HTTP requests and queries to Oban tables are ignored, for example.","ref":"Plausible.OpenTelemetry.Sampler.html","title":"Plausible.OpenTelemetry.Sampler","type":"module"},{"doc":"","ref":"Plausible.PaddleApi.Mock.html","title":"Plausible.PaddleApi.Mock","type":"module"},{"doc":"","ref":"Plausible.PaddleApi.Mock.html#get_invoices/1","title":"Plausible.PaddleApi.Mock.get_invoices/1","type":"function"},{"doc":"","ref":"Plausible.PaddleApi.Mock.html#get_subscription/1","title":"Plausible.PaddleApi.Mock.get_subscription/1","type":"function"},{"doc":"","ref":"Plausible.PaddleApi.Mock.html#update_subscription/2","title":"Plausible.PaddleApi.Mock.update_subscription/2","type":"function"},{"doc":"","ref":"Plausible.PromEx.html","title":"Plausible.PromEx","type":"module"},{"doc":"Returns a specification to start this module under a supervisor. See Supervisor .","ref":"Plausible.PromEx.html#child_spec/1","title":"Plausible.PromEx.child_spec/1","type":"function"},{"doc":"Custom PromEx plugin for instrumenting code within Plausible app.","ref":"Plausible.PromEx.Plugins.PlausibleMetrics.html","title":"Plausible.PromEx.Plugins.PlausibleMetrics","type":"module"},{"doc":"Add telemetry events for Cachex user agents and sessions","ref":"Plausible.PromEx.Plugins.PlausibleMetrics.html#execute_cache_metrics/0","title":"Plausible.PromEx.Plugins.PlausibleMetrics.execute_cache_metrics/0","type":"function"},{"doc":"Add telemetry events for Session and Event write buffers","ref":"Plausible.PromEx.Plugins.PlausibleMetrics.html#execute_write_buffer_metrics/0","title":"Plausible.PromEx.Plugins.PlausibleMetrics.execute_write_buffer_metrics/0","type":"function"},{"doc":"Deletes data from a site. Stats are stored on Clickhouse, and unlike other databases data deletion is done asynchronously. Clickhouse ALTER TABLE ... DELETE Statement Synchronicity of ALTER Queries","ref":"Plausible.Purge.html","title":"Plausible.Purge","type":"module"},{"doc":"Deletes imported stats from Google Analytics, and clears the stats_start_date field.","ref":"Plausible.Purge.html#delete_imported_stats!/1","title":"Plausible.Purge.delete_imported_stats!/1","type":"function"},{"doc":"Move stats pointers so that no historical stats are available.","ref":"Plausible.Purge.html#delete_native_stats!/1","title":"Plausible.Purge.delete_native_stats!/1","type":"function"},{"doc":"","ref":"Plausible.Purge.html#reset!/1","title":"Plausible.Purge.reset!/1","type":"function"},{"doc":"","ref":"Plausible.Release.html","title":"Plausible.Release","type":"module"},{"doc":"","ref":"Plausible.Release.html#configure_ref_inspector/0","title":"Plausible.Release.configure_ref_inspector/0","type":"function"},{"doc":"","ref":"Plausible.Release.html#configure_ua_inspector/0","title":"Plausible.Release.configure_ua_inspector/0","type":"function"},{"doc":"","ref":"Plausible.Release.html#createdb/0","title":"Plausible.Release.createdb/0","type":"function"},{"doc":"","ref":"Plausible.Release.html#migrate/0","title":"Plausible.Release.migrate/0","type":"function"},{"doc":"","ref":"Plausible.Release.html#rollback/0","title":"Plausible.Release.rollback/0","type":"function"},{"doc":"","ref":"Plausible.Release.html#seed/0","title":"Plausible.Release.seed/0","type":"function"},{"doc":"","ref":"Plausible.Release.html#selfhost?/0","title":"Plausible.Release.selfhost?/0","type":"function"},{"doc":"","ref":"Plausible.Release.html#should_be_first_launch?/0","title":"Plausible.Release.should_be_first_launch?/0","type":"function"},{"doc":"","ref":"Plausible.Repo.html","title":"Plausible.Repo","type":"module"},{"doc":"Callback implementation for Ecto.Repo.aggregate/3 .","ref":"Plausible.Repo.html#aggregate/3","title":"Plausible.Repo.aggregate/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.aggregate/4 .","ref":"Plausible.Repo.html#aggregate/4","title":"Plausible.Repo.aggregate/4","type":"function"},{"doc":"Callback implementation for Ecto.Repo.all/2 .","ref":"Plausible.Repo.html#all/2","title":"Plausible.Repo.all/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.checked_out?/0 .","ref":"Plausible.Repo.html#checked_out?/0","title":"Plausible.Repo.checked_out?/0","type":"function"},{"doc":"Callback implementation for Ecto.Repo.checkout/2 .","ref":"Plausible.Repo.html#checkout/2","title":"Plausible.Repo.checkout/2","type":"function"},{"doc":"","ref":"Plausible.Repo.html#child_spec/1","title":"Plausible.Repo.child_spec/1","type":"function"},{"doc":"Callback implementation for Ecto.Repo.config/0 .","ref":"Plausible.Repo.html#config/0","title":"Plausible.Repo.config/0","type":"function"},{"doc":"Callback implementation for Ecto.Repo.default_options/1 .","ref":"Plausible.Repo.html#default_options/1","title":"Plausible.Repo.default_options/1","type":"function"},{"doc":"Callback implementation for Ecto.Repo.delete/2 .","ref":"Plausible.Repo.html#delete/2","title":"Plausible.Repo.delete/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.delete!/2 .","ref":"Plausible.Repo.html#delete!/2","title":"Plausible.Repo.delete!/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.delete_all/2 .","ref":"Plausible.Repo.html#delete_all/2","title":"Plausible.Repo.delete_all/2","type":"function"},{"doc":"A convenience function for SQL-based repositories that forces all connections in the pool to disconnect within the given interval. See Ecto.Adapters.SQL.disconnect_all/3 for more information.","ref":"Plausible.Repo.html#disconnect_all/2","title":"Plausible.Repo.disconnect_all/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.exists?/2 .","ref":"Plausible.Repo.html#exists?/2","title":"Plausible.Repo.exists?/2","type":"function"},{"doc":"A convenience function for SQL-based repositories that executes an EXPLAIN statement or similar depending on the adapter to obtain statistics for the given query. See Ecto.Adapters.SQL.explain/4 for more information.","ref":"Plausible.Repo.html#explain/3","title":"Plausible.Repo.explain/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get/3 .","ref":"Plausible.Repo.html#get/3","title":"Plausible.Repo.get/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get!/3 .","ref":"Plausible.Repo.html#get!/3","title":"Plausible.Repo.get!/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get_by/3 .","ref":"Plausible.Repo.html#get_by/3","title":"Plausible.Repo.get_by/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get_by!/3 .","ref":"Plausible.Repo.html#get_by!/3","title":"Plausible.Repo.get_by!/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.get_dynamic_repo/0 .","ref":"Plausible.Repo.html#get_dynamic_repo/0","title":"Plausible.Repo.get_dynamic_repo/0","type":"function"},{"doc":"Callback implementation for Ecto.Repo.in_transaction?/0 .","ref":"Plausible.Repo.html#in_transaction?/0","title":"Plausible.Repo.in_transaction?/0","type":"function"},{"doc":"Callback implementation for Ecto.Repo.insert/2 .","ref":"Plausible.Repo.html#insert/2","title":"Plausible.Repo.insert/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.insert!/2 .","ref":"Plausible.Repo.html#insert!/2","title":"Plausible.Repo.insert!/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.insert_all/3 .","ref":"Plausible.Repo.html#insert_all/3","title":"Plausible.Repo.insert_all/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.insert_or_update/2 .","ref":"Plausible.Repo.html#insert_or_update/2","title":"Plausible.Repo.insert_or_update/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.insert_or_update!/2 .","ref":"Plausible.Repo.html#insert_or_update!/2","title":"Plausible.Repo.insert_or_update!/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.load/2 .","ref":"Plausible.Repo.html#load/2","title":"Plausible.Repo.load/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.one/2 .","ref":"Plausible.Repo.html#one/2","title":"Plausible.Repo.one/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.one!/2 .","ref":"Plausible.Repo.html#one!/2","title":"Plausible.Repo.one!/2","type":"function"},{"doc":"","ref":"Plausible.Repo.html#paginate/3","title":"Plausible.Repo.paginate/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.preload/3 .","ref":"Plausible.Repo.html#preload/3","title":"Plausible.Repo.preload/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.prepare_query/3 .","ref":"Plausible.Repo.html#prepare_query/3","title":"Plausible.Repo.prepare_query/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.put_dynamic_repo/1 .","ref":"Plausible.Repo.html#put_dynamic_repo/1","title":"Plausible.Repo.put_dynamic_repo/1","type":"function"},{"doc":"A convenience function for SQL-based repositories that executes the given query. See Ecto.Adapters.SQL.query/4 for more information.","ref":"Plausible.Repo.html#query/3","title":"Plausible.Repo.query/3","type":"function"},{"doc":"A convenience function for SQL-based repositories that executes the given query. See Ecto.Adapters.SQL.query!/4 for more information.","ref":"Plausible.Repo.html#query!/3","title":"Plausible.Repo.query!/3","type":"function"},{"doc":"A convenience function for SQL-based repositories that executes the given multi-result query. See Ecto.Adapters.SQL.query_many/4 for more information.","ref":"Plausible.Repo.html#query_many/3","title":"Plausible.Repo.query_many/3","type":"function"},{"doc":"A convenience function for SQL-based repositories that executes the given multi-result query. See Ecto.Adapters.SQL.query_many!/4 for more information.","ref":"Plausible.Repo.html#query_many!/3","title":"Plausible.Repo.query_many!/3","type":"function"},{"doc":"Callback implementation for Ecto.Repo.reload/2 .","ref":"Plausible.Repo.html#reload/2","title":"Plausible.Repo.reload/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.reload!/2 .","ref":"Plausible.Repo.html#reload!/2","title":"Plausible.Repo.reload!/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.rollback/1 .","ref":"Plausible.Repo.html#rollback/1","title":"Plausible.Repo.rollback/1","type":"function"},{"doc":"Callback implementation for Ecto.Repo.start_link/1 .","ref":"Plausible.Repo.html#start_link/1","title":"Plausible.Repo.start_link/1","type":"function"},{"doc":"Callback implementation for Ecto.Repo.stop/1 .","ref":"Plausible.Repo.html#stop/1","title":"Plausible.Repo.stop/1","type":"function"},{"doc":"Callback implementation for Ecto.Repo.stream/2 .","ref":"Plausible.Repo.html#stream/2","title":"Plausible.Repo.stream/2","type":"function"},{"doc":"A convenience function for SQL-based repositories that translates the given query to SQL. See Ecto.Adapters.SQL.to_sql/3 for more information.","ref":"Plausible.Repo.html#to_sql/2","title":"Plausible.Repo.to_sql/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.transaction/2 .","ref":"Plausible.Repo.html#transaction/2","title":"Plausible.Repo.transaction/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.update/2 .","ref":"Plausible.Repo.html#update/2","title":"Plausible.Repo.update/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.update!/2 .","ref":"Plausible.Repo.html#update!/2","title":"Plausible.Repo.update!/2","type":"function"},{"doc":"Callback implementation for Ecto.Repo.update_all/3 .","ref":"Plausible.Repo.html#update_all/3","title":"Plausible.Repo.update_all/3","type":"function"},{"doc":"","ref":"Plausible.Sentry.Client.html","title":"Plausible.Sentry.Client","type":"module"},{"doc":"The Sentry.HTTPClient behaviour requires a child spec to be supplied. In this case we don't want Sentry to manage our Finch instances, hence it's fed with a dummy module for the sake of the contract. XXX: Submit a Sentry PR making the child spec callback optional.","ref":"Plausible.Sentry.Client.html#child_spec/0","title":"Plausible.Sentry.Client.child_spec/0","type":"function"},{"doc":"Callback implementation for Sentry.HTTPClient.post/3 .","ref":"Plausible.Sentry.Client.html#post/3","title":"Plausible.Sentry.Client.post/3","type":"function"},{"doc":"Sentry callbacks for filtering and grouping events","ref":"Plausible.SentryFilter.html","title":"Plausible.SentryFilter","type":"module"},{"doc":"","ref":"Plausible.SentryFilter.html#before_send/1","title":"Plausible.SentryFilter.before_send/1","type":"function"},{"doc":"Callback implementation for Sentry.EventFilter.exclude_exception?/2 .","ref":"Plausible.SentryFilter.html#exclude_exception?/2","title":"Plausible.SentryFilter.exclude_exception?/2","type":"function"},{"doc":"","ref":"Plausible.Session.CacheStore.html","title":"Plausible.Session.CacheStore","type":"module"},{"doc":"","ref":"Plausible.Session.CacheStore.html#on_event/3","title":"Plausible.Session.CacheStore.on_event/3","type":"function"},{"doc":"","ref":"Plausible.Session.Salts.html","title":"Plausible.Session.Salts","type":"module"},{"doc":"Returns a specification to start this module under a supervisor. See Supervisor .","ref":"Plausible.Session.Salts.html#child_spec/1","title":"Plausible.Session.Salts.child_spec/1","type":"function"},{"doc":"","ref":"Plausible.Session.Salts.html#fetch/0","title":"Plausible.Session.Salts.fetch/0","type":"function"},{"doc":"","ref":"Plausible.Session.Salts.html#rotate/0","title":"Plausible.Session.Salts.rotate/0","type":"function"},{"doc":"","ref":"Plausible.Session.Salts.html#start_link/1","title":"Plausible.Session.Salts.start_link/1","type":"function"},{"doc":"","ref":"Plausible.Session.WriteBuffer.html","title":"Plausible.Session.WriteBuffer","type":"module"},{"doc":"Returns a specification to start this module under a supervisor. See Supervisor .","ref":"Plausible.Session.WriteBuffer.html#child_spec/1","title":"Plausible.Session.WriteBuffer.child_spec/1","type":"function"},{"doc":"","ref":"Plausible.Session.WriteBuffer.html#flush/0","title":"Plausible.Session.WriteBuffer.flush/0","type":"function"},{"doc":"Callback implementation for GenServer.init/1 .","ref":"Plausible.Session.WriteBuffer.html#init/1","title":"Plausible.Session.WriteBuffer.init/1","type":"function"},{"doc":"","ref":"Plausible.Session.WriteBuffer.html#insert/1","title":"Plausible.Session.WriteBuffer.insert/1","type":"function"},{"doc":"","ref":"Plausible.Session.WriteBuffer.html#start_link/1","title":"Plausible.Session.WriteBuffer.start_link/1","type":"function"},{"doc":"Site schema","ref":"Plausible.Site.html","title":"Plausible.Site","type":"module"},{"doc":"","ref":"Plausible.Site.html#changeset/2","title":"Plausible.Site.changeset/2","type":"function"},{"doc":"","ref":"Plausible.Site.html#crm_changeset/2","title":"Plausible.Site.crm_changeset/2","type":"function"},{"doc":"","ref":"Plausible.Site.html#feature_toggle_change/3","title":"Plausible.Site.feature_toggle_change/3","type":"function"},{"doc":"","ref":"Plausible.Site.html#import_failure/1","title":"Plausible.Site.import_failure/1","type":"function"},{"doc":"","ref":"Plausible.Site.html#import_success/1","title":"Plausible.Site.import_success/1","type":"function"},{"doc":"Returns the date of the first recorded stat in the timezone configured by the user. This function does 2 transformations: UTC %NaiveDateTime{} -> Local %DateTime{} -> Local %Date Examples iex> Plausible.Site.local_start_date(%Plausible.Site{stats_start_date: nil}) nil iex> utc_start = ~N[2022-09-28 00:00:00] iex> tz = "Europe/Helsinki" iex> site = %Plausible.Site{stats_start_date: utc_start, timezone: tz} iex> Plausible.Site.local_start_date(site) ~D[2022-09-28] iex> utc_start = ~N[2022-09-28 00:00:00] iex> tz = "America/Los_Angeles" iex> site = %Plausible.Site{stats_start_date: utc_start, timezone: tz} iex> Plausible.Site.local_start_date(site) ~D[2022-09-27]","ref":"Plausible.Site.html#local_start_date/1","title":"Plausible.Site.local_start_date/1","type":"function"},{"doc":"","ref":"Plausible.Site.html#make_private/1","title":"Plausible.Site.make_private/1","type":"function"},{"doc":"","ref":"Plausible.Site.html#make_public/1","title":"Plausible.Site.make_public/1","type":"function"},{"doc":"","ref":"Plausible.Site.html#remove_imported_data/1","title":"Plausible.Site.remove_imported_data/1","type":"function"},{"doc":"","ref":"Plausible.Site.html#set_allowed_event_props/2","title":"Plausible.Site.set_allowed_event_props/2","type":"function"},{"doc":"","ref":"Plausible.Site.html#set_imported_source/2","title":"Plausible.Site.set_imported_source/2","type":"function"},{"doc":"","ref":"Plausible.Site.html#set_native_stats_start_at/2","title":"Plausible.Site.set_native_stats_start_at/2","type":"function"},{"doc":"","ref":"Plausible.Site.html#set_stats_start_date/2","title":"Plausible.Site.set_stats_start_date/2","type":"function"},{"doc":"","ref":"Plausible.Site.html#start_import/5","title":"Plausible.Site.start_import/5","type":"function"},{"doc":"","ref":"Plausible.Site.html#tz_offset/2","title":"Plausible.Site.tz_offset/2","type":"function"},{"doc":"","ref":"Plausible.Site.html#update_changeset/3","title":"Plausible.Site.update_changeset/3","type":"function"},{"doc":"","ref":"Plausible.Site.html#t:t/0","title":"Plausible.Site.t/0","type":"type"},{"doc":"A "sites by domain" caching interface. Serves as a thin wrapper around Cachex, but the underlying implementation can be transparently swapped. Even though the Cachex process is started, cache access is disabled during tests via the :sites_by_domain_cache_enabled application env key. This can be overridden on case by case basis, using the child specs options. NOTE: the cache allows lookups by both domain and domain_changed_from fields - this is to allow traffic from sites whose domains changed within a certain grace period (see: Plausible.Site.Transfer ). When Cache is disabled via application env, the get/1 function falls back to pure database lookups. This should help with introducing cached lookups in existing code, so that no existing tests should break. To differentiate cached Site structs from those retrieved directly from the database, a virtual schema field from_cache?: true is set. This indicates the Plausible.Site struct is incomplete in comparison to its database counterpart -- to spare bandwidth and query execution time, only selected database columns are retrieved and cached. There are two modes of refreshing the cache: :all and :updated_recently . :all means querying the database for all Site entries and should be done periodically (via Cache.Warmer ). All stale Cache entries are cleared upon persisting the new batch. :updated_recently attempts to re-query sites updated within the last 15 minutes only, to account for most recent changes. This refresh is lighter on the database and is meant to be executed more frequently (via Cache.Warmer.RecentlyUpdated ). Refreshing the cache emits telemetry event defined as per telemetry_event_refresh/2 . The @cached_schema_fields attribute defines the list of DB columns queried on each cache refresh. Also see tests for more comprehensive examples.","ref":"Plausible.Site.Cache.html","title":"Plausible.Site.Cache","type":"module"},{"doc":"","ref":"Plausible.Site.Cache.html#child_spec/1","title":"Plausible.Site.Cache.child_spec/1","type":"function"},{"doc":"","ref":"Plausible.Site.Cache.html#enabled?/0","title":"Plausible.Site.Cache.enabled?/0","type":"function"},{"doc":"","ref":"Plausible.Site.Cache.html#get/2","title":"Plausible.Site.Cache.get/2","type":"function"},{"doc":"","ref":"Plausible.Site.Cache.html#get_site_id/2","title":"Plausible.Site.Cache.get_site_id/2","type":"function"},{"doc":"","ref":"Plausible.Site.Cache.html#hit_rate/1","title":"Plausible.Site.Cache.hit_rate/1","type":"function"},{"doc":"","ref":"Plausible.Site.Cache.html#merge/2","title":"Plausible.Site.Cache.merge/2","type":"function"},{"doc":"","ref":"Plausible.Site.Cache.html#name/0","title":"Plausible.Site.Cache.name/0","type":"function"},{"doc":"Ensures the cache has non-zero size unless no sites exist. Useful for orchestrating app startup to prevent the service going up asynchronously with an empty cache.","ref":"Plausible.Site.Cache.html#ready?/1","title":"Plausible.Site.Cache.ready?/1","type":"function"},{"doc":"","ref":"Plausible.Site.Cache.html#refresh_all/1","title":"Plausible.Site.Cache.refresh_all/1","type":"function"},{"doc":"","ref":"Plausible.Site.Cache.html#refresh_updated_recently/1","title":"Plausible.Site.Cache.refresh_updated_recently/1","type":"function"},{"doc":"","ref":"Plausible.Site.Cache.html#size/1","title":"Plausible.Site.Cache.size/1","type":"function"},{"doc":"","ref":"Plausible.Site.Cache.html#telemetry_event_refresh/2","title":"Plausible.Site.Cache.telemetry_event_refresh/2","type":"function"},{"doc":"","ref":"Plausible.Site.Cache.html#t:t/0","title":"Plausible.Site.Cache.t/0","type":"type"},{"doc":"A periodic cache warmer. Queries all Sites from Postgres, every interval and pre-populates the cache. After each run the process is hibernated, triggering garbage collection. Currently Cachex is used, but the underlying implementation can be transparently swapped. Child specification options available: interval - the number of milliseconds for each warm-up cycle, defaults to :sites_by_domain_cache_refresh_interval application env value with random jitter added, for which the maximum is stored under :sites_by_domain_cache_refresh_interval_max_jitter key. cache_name - defaults to Cache.name() but can be overriden for testing force_start? - enforcess process startup for testing, even if it's barred by Cache.enabled? . This is useful for avoiding issues with DB ownership and async tests. warmer_fn - used for testing, a custom function to retrieve the items meant to be cached during the warm-up cycle. See tests for more comprehensive examples.","ref":"Plausible.Site.Cache.Warmer.html","title":"Plausible.Site.Cache.Warmer","type":"module"},{"doc":"","ref":"Plausible.Site.Cache.Warmer.html#child_spec/1","title":"Plausible.Site.Cache.Warmer.child_spec/1","type":"function"},{"doc":"","ref":"Plausible.Site.Cache.Warmer.html#interval/0","title":"Plausible.Site.Cache.Warmer.interval/0","type":"function"},{"doc":"A Cache.Warmer adapter that refreshes the Sites Cache fully. This module exists only to make it explicit what the warmer refreshes, to be used in the supervisor tree.","ref":"Plausible.Site.Cache.Warmer.All.html","title":"Plausible.Site.Cache.Warmer.All","type":"module"},{"doc":"See Plausible.Site.Cache.Warmer.child_spec/1 .","ref":"Plausible.Site.Cache.Warmer.All.html#child_spec/1","title":"Plausible.Site.Cache.Warmer.All.child_spec/1","type":"function"},{"doc":"A Cache.Warmer adapter that only refreshes the Cache with recently updated sites every 30 seconds.","ref":"Plausible.Site.Cache.Warmer.RecentlyUpdated.html","title":"Plausible.Site.Cache.Warmer.RecentlyUpdated","type":"module"},{"doc":"","ref":"Plausible.Site.Cache.Warmer.RecentlyUpdated.html#child_spec/1","title":"Plausible.Site.Cache.Warmer.RecentlyUpdated.child_spec/1","type":"function"},{"doc":"","ref":"Plausible.Site.CustomDomain.html","title":"Plausible.Site.CustomDomain","type":"module"},{"doc":"Basic interface for domain changes. Once Plausible.DataMigration.NumericIDs schema migration is ready, domain change operation will be enabled, accessible to the users. We will set a transition period of 72 hours during which, both old and new domains, will be accepted as traffic identifiers to the same site. A periodic worker will call the expire/0 function to end it where applicable. See: Plausible.Workers.ExpireDomainChangeTransitions . The underlying changeset for domain change (see: Plausible.Site ) relies on database trigger installed via Plausible.Repo.Migrations.AllowDomainChange Postgres migration. The trigger checks if either domain or domain_changed_from exist to ensure unicity.","ref":"Plausible.Site.Domain.html","title":"Plausible.Site.Domain","type":"module"},{"doc":"","ref":"Plausible.Site.Domain.html#change/3","title":"Plausible.Site.Domain.change/3","type":"function"},{"doc":"","ref":"Plausible.Site.Domain.html#expire_change_transitions/1","title":"Plausible.Site.Domain.expire_change_transitions/1","type":"function"},{"doc":"Thin wrapper around Hammer for gate keeping domain-specific events during the ingestion phase. When the site is allowed, gate keeping check returns :allow , otherwise a :deny tagged tuple is returned with one of the following policy markers: :not_found (indicates site not found in cache) :block (indicates disabled sites) :throttle (indicates rate limiting) Rate Limiting buckets are configured per site (externally via the CRM). See: Plausible.Site To look up each site's configuration, the RateLimiter fetches a Site by domain using Plausible.Cache interface. The module defines two policies outside the regular bucket inspection: when the the site is not found in cache: not_found when the underlying rate limiting mechanism returns an internal error: :allow","ref":"Plausible.Site.GateKeeper.html","title":"Plausible.Site.GateKeeper","type":"module"},{"doc":"","ref":"Plausible.Site.GateKeeper.html#check/2","title":"Plausible.Site.GateKeeper.check/2","type":"function"},{"doc":"","ref":"Plausible.Site.GateKeeper.html#key/1","title":"Plausible.Site.GateKeeper.key/1","type":"function"},{"doc":"","ref":"Plausible.Site.GateKeeper.html#t:policy/0","title":"Plausible.Site.GateKeeper.policy/0","type":"type"},{"doc":"","ref":"Plausible.Site.GateKeeper.html#t:t/0","title":"Plausible.Site.GateKeeper.t/0","type":"type"},{"doc":"","ref":"Plausible.Site.GoogleAuth.html","title":"Plausible.Site.GoogleAuth","type":"module"},{"doc":"","ref":"Plausible.Site.GoogleAuth.html#changeset/2","title":"Plausible.Site.GoogleAuth.changeset/2","type":"function"},{"doc":"","ref":"Plausible.Site.GoogleAuth.html#set_property/2","title":"Plausible.Site.GoogleAuth.set_property/2","type":"function"},{"doc":"Embedded schema for Google Analytics imports","ref":"Plausible.Site.ImportedData.html","title":"Plausible.Site.ImportedData","type":"module"},{"doc":"","ref":"Plausible.Site.Membership.html","title":"Plausible.Site.Membership","type":"module"},{"doc":"","ref":"Plausible.Site.Membership.html#changeset/2","title":"Plausible.Site.Membership.changeset/2","type":"function"},{"doc":"","ref":"Plausible.Site.MonthlyReport.html","title":"Plausible.Site.MonthlyReport","type":"module"},{"doc":"","ref":"Plausible.Site.MonthlyReport.html#add_recipient/2","title":"Plausible.Site.MonthlyReport.add_recipient/2","type":"function"},{"doc":"","ref":"Plausible.Site.MonthlyReport.html#changeset/2","title":"Plausible.Site.MonthlyReport.changeset/2","type":"function"},{"doc":"","ref":"Plausible.Site.MonthlyReport.html#remove_recipient/2","title":"Plausible.Site.MonthlyReport.remove_recipient/2","type":"function"},{"doc":"A site deletion service stub.","ref":"Plausible.Site.Removal.html","title":"Plausible.Site.Removal","type":"module"},{"doc":"","ref":"Plausible.Site.Removal.html#run/1","title":"Plausible.Site.Removal.run/1","type":"function"},{"doc":"","ref":"Plausible.Site.SharedLink.html","title":"Plausible.Site.SharedLink","type":"module"},{"doc":"","ref":"Plausible.Site.SharedLink.html#changeset/2","title":"Plausible.Site.SharedLink.changeset/2","type":"function"},{"doc":"","ref":"Plausible.Site.SpikeNotification.html","title":"Plausible.Site.SpikeNotification","type":"module"},{"doc":"","ref":"Plausible.Site.SpikeNotification.html#add_recipient/2","title":"Plausible.Site.SpikeNotification.add_recipient/2","type":"function"},{"doc":"","ref":"Plausible.Site.SpikeNotification.html#changeset/2","title":"Plausible.Site.SpikeNotification.changeset/2","type":"function"},{"doc":"","ref":"Plausible.Site.SpikeNotification.html#remove_recipient/2","title":"Plausible.Site.SpikeNotification.remove_recipient/2","type":"function"},{"doc":"","ref":"Plausible.Site.SpikeNotification.html#was_sent/1","title":"Plausible.Site.SpikeNotification.was_sent/1","type":"function"},{"doc":"","ref":"Plausible.Site.WeeklyReport.html","title":"Plausible.Site.WeeklyReport","type":"module"},{"doc":"","ref":"Plausible.Site.WeeklyReport.html#add_recipient/2","title":"Plausible.Site.WeeklyReport.add_recipient/2","type":"function"},{"doc":"","ref":"Plausible.Site.WeeklyReport.html#changeset/2","title":"Plausible.Site.WeeklyReport.changeset/2","type":"function"},{"doc":"","ref":"Plausible.Site.WeeklyReport.html#remove_recipient/2","title":"Plausible.Site.WeeklyReport.remove_recipient/2","type":"function"},{"doc":"","ref":"Plausible.SiteAdmin.html","title":"Plausible.SiteAdmin","type":"module"},{"doc":"","ref":"Plausible.SiteAdmin.html#create_changeset/2","title":"Plausible.SiteAdmin.create_changeset/2","type":"function"},{"doc":"","ref":"Plausible.SiteAdmin.html#custom_index_query/3","title":"Plausible.SiteAdmin.custom_index_query/3","type":"function"},{"doc":"","ref":"Plausible.SiteAdmin.html#form_fields/1","title":"Plausible.SiteAdmin.form_fields/1","type":"function"},{"doc":"","ref":"Plausible.SiteAdmin.html#get_struct_fields/1","title":"Plausible.SiteAdmin.get_struct_fields/1","type":"function"},{"doc":"","ref":"Plausible.SiteAdmin.html#index/1","title":"Plausible.SiteAdmin.index/1","type":"function"},{"doc":"","ref":"Plausible.SiteAdmin.html#list_actions/1","title":"Plausible.SiteAdmin.list_actions/1","type":"function"},{"doc":"","ref":"Plausible.SiteAdmin.html#ordering/1","title":"Plausible.SiteAdmin.ordering/1","type":"function"},{"doc":"","ref":"Plausible.SiteAdmin.html#search_fields/1","title":"Plausible.SiteAdmin.search_fields/1","type":"function"},{"doc":"","ref":"Plausible.SiteAdmin.html#set_allowed_props_for_site/3","title":"Plausible.SiteAdmin.set_allowed_props_for_site/3","type":"function"},{"doc":"","ref":"Plausible.SiteAdmin.html#update_changeset/2","title":"Plausible.SiteAdmin.update_changeset/2","type":"function"},{"doc":"","ref":"Plausible.Sites.html","title":"Plausible.Sites","type":"module"},{"doc":"","ref":"Plausible.Sites.html#create/2","title":"Plausible.Sites.create/2","type":"function"},{"doc":"","ref":"Plausible.Sites.html#create_shared_link/3","title":"Plausible.Sites.create_shared_link/3","type":"function"},{"doc":"","ref":"Plausible.Sites.html#get_by_domain/1","title":"Plausible.Sites.get_by_domain/1","type":"function"},{"doc":"","ref":"Plausible.Sites.html#get_for_user/3","title":"Plausible.Sites.get_for_user/3","type":"function"},{"doc":"","ref":"Plausible.Sites.html#get_for_user!/3","title":"Plausible.Sites.get_for_user!/3","type":"function"},{"doc":"","ref":"Plausible.Sites.html#has_admin_access?/2","title":"Plausible.Sites.has_admin_access?/2","type":"function"},{"doc":"","ref":"Plausible.Sites.html#has_goals?/1","title":"Plausible.Sites.has_goals?/1","type":"function"},{"doc":"","ref":"Plausible.Sites.html#has_stats?/1","title":"Plausible.Sites.has_stats?/1","type":"function"},{"doc":"","ref":"Plausible.Sites.html#is_member?/2","title":"Plausible.Sites.is_member?/2","type":"function"},{"doc":"","ref":"Plausible.Sites.html#locked?/1","title":"Plausible.Sites.locked?/1","type":"function"},{"doc":"","ref":"Plausible.Sites.html#owned_site_ids/1","title":"Plausible.Sites.owned_site_ids/1","type":"function"},{"doc":"","ref":"Plausible.Sites.html#owned_sites_count/1","title":"Plausible.Sites.owned_sites_count/1","type":"function"},{"doc":"","ref":"Plausible.Sites.html#owned_sites_domains/1","title":"Plausible.Sites.owned_sites_domains/1","type":"function"},{"doc":"","ref":"Plausible.Sites.html#owner_for/1","title":"Plausible.Sites.owner_for/1","type":"function"},{"doc":"","ref":"Plausible.Sites.html#role/2","title":"Plausible.Sites.role/2","type":"function"},{"doc":"","ref":"Plausible.Sites.html#shared_link_url/2","title":"Plausible.Sites.shared_link_url/2","type":"function"},{"doc":"Returns the date of the first event of the given site, or nil if the site does not have stats yet. If this is the first time the function is called for the site, it queries Clickhouse and saves the date in the sites table.","ref":"Plausible.Sites.html#stats_start_date/1","title":"Plausible.Sites.stats_start_date/1","type":"function"},{"doc":"","ref":"Plausible.Stats.html","title":"Plausible.Stats","type":"module"},{"doc":"See Plausible.Stats.Aggregate.aggregate/3 .","ref":"Plausible.Stats.html#aggregate/3","title":"Plausible.Stats.aggregate/3","type":"function"},{"doc":"See Plausible.Stats.Breakdown.breakdown/5 .","ref":"Plausible.Stats.html#breakdown/5","title":"Plausible.Stats.breakdown/5","type":"function"},{"doc":"See Plausible.Stats.CurrentVisitors.current_visitors/1 .","ref":"Plausible.Stats.html#current_visitors/1","title":"Plausible.Stats.current_visitors/1","type":"function"},{"doc":"See Plausible.Stats.FilterSuggestions.filter_suggestions/4 .","ref":"Plausible.Stats.html#filter_suggestions/4","title":"Plausible.Stats.filter_suggestions/4","type":"function"},{"doc":"See Plausible.Stats.Funnel.funnel/3 .","ref":"Plausible.Stats.html#funnel/3","title":"Plausible.Stats.funnel/3","type":"function"},{"doc":"See Plausible.Stats.Timeseries.timeseries/3 .","ref":"Plausible.Stats.html#timeseries/3","title":"Plausible.Stats.timeseries/3","type":"function"},{"doc":"","ref":"Plausible.Stats.Aggregate.html","title":"Plausible.Stats.Aggregate","type":"module"},{"doc":"","ref":"Plausible.Stats.Aggregate.html#aggregate/3","title":"Plausible.Stats.Aggregate.aggregate/3","type":"function"},{"doc":"","ref":"Plausible.Stats.Base.html","title":"Plausible.Stats.Base","type":"module"},{"doc":"","ref":"Plausible.Stats.Base.html#apply_entry_prop_filter/3","title":"Plausible.Stats.Base.apply_entry_prop_filter/3","type":"function"},{"doc":"","ref":"Plausible.Stats.Base.html#base_event_query/2","title":"Plausible.Stats.Base.base_event_query/2","type":"function"},{"doc":"","ref":"Plausible.Stats.Base.html#filter_by_entry_props/2","title":"Plausible.Stats.Base.filter_by_entry_props/2","type":"function"},{"doc":"","ref":"Plausible.Stats.Base.html#filter_converted_sessions/3","title":"Plausible.Stats.Base.filter_converted_sessions/3","type":"function"},{"doc":"","ref":"Plausible.Stats.Base.html#page_regex/1","title":"Plausible.Stats.Base.page_regex/1","type":"function"},{"doc":"","ref":"Plausible.Stats.Base.html#query_events/2","title":"Plausible.Stats.Base.query_events/2","type":"function"},{"doc":"","ref":"Plausible.Stats.Base.html#query_sessions/2","title":"Plausible.Stats.Base.query_sessions/2","type":"function"},{"doc":"","ref":"Plausible.Stats.Base.html#select_event_metrics/2","title":"Plausible.Stats.Base.select_event_metrics/2","type":"function"},{"doc":"","ref":"Plausible.Stats.Base.html#select_session_metrics/3","title":"Plausible.Stats.Base.select_session_metrics/3","type":"function"},{"doc":"","ref":"Plausible.Stats.Base.html#utc_boundaries/2","title":"Plausible.Stats.Base.utc_boundaries/2","type":"function"},{"doc":"","ref":"Plausible.Stats.Breakdown.html","title":"Plausible.Stats.Breakdown","type":"module"},{"doc":"","ref":"Plausible.Stats.Breakdown.html#breakdown/5","title":"Plausible.Stats.Breakdown.breakdown/5","type":"function"},{"doc":"","ref":"Plausible.Stats.Clickhouse.html","title":"Plausible.Stats.Clickhouse","type":"module"},{"doc":"","ref":"Plausible.Stats.Clickhouse.html#current_visitors/2","title":"Plausible.Stats.Clickhouse.current_visitors/2","type":"function"},{"doc":"","ref":"Plausible.Stats.Clickhouse.html#has_pageviews?/1","title":"Plausible.Stats.Clickhouse.has_pageviews?/1","type":"function"},{"doc":"","ref":"Plausible.Stats.Clickhouse.html#imported_pageview_count/1","title":"Plausible.Stats.Clickhouse.imported_pageview_count/1","type":"function"},{"doc":"","ref":"Plausible.Stats.Clickhouse.html#last_24h_visitors/1","title":"Plausible.Stats.Clickhouse.last_24h_visitors/1","type":"function"},{"doc":"","ref":"Plausible.Stats.Clickhouse.html#pageview_start_date_local/1","title":"Plausible.Stats.Clickhouse.pageview_start_date_local/1","type":"function"},{"doc":"","ref":"Plausible.Stats.Clickhouse.html#top_sources/6","title":"Plausible.Stats.Clickhouse.top_sources/6","type":"function"},{"doc":"","ref":"Plausible.Stats.Clickhouse.html#usage_breakdown/1","title":"Plausible.Stats.Clickhouse.usage_breakdown/1","type":"function"},{"doc":"","ref":"Plausible.Stats.Clickhouse.html#usage_breakdown/2","title":"Plausible.Stats.Clickhouse.usage_breakdown/2","type":"function"},{"doc":"","ref":"Plausible.Stats.Compare.html","title":"Plausible.Stats.Compare","type":"module"},{"doc":"","ref":"Plausible.Stats.Compare.html#calculate_change/3","title":"Plausible.Stats.Compare.calculate_change/3","type":"function"},{"doc":"This module provides functions for comparing query periods. It allows you to compare a given period with a previous period or with the same period from the previous year. For example, you can compare this month's main graph with last month or with the same month from last year.","ref":"Plausible.Stats.Comparisons.html","title":"Plausible.Stats.Comparisons","type":"module"},{"doc":"Generates a comparison query based on the source query and comparison mode. The mode parameter specifies the type of comparison and can be one of the following: "previous_period" - shifts back the query by the same number of days the source query has. "year_over_year" - shifts back the query by 1 year. "custom" - compares the query using a custom date range. See options for more details. The comparison query returned by the function has its end date restricted to the current day. This can be overriden by the now option, described below. Options :now - a NaiveDateTime struct with the current date and time. This is optional and used for testing purposes. :from - a ISO-8601 date string used when mode is "custom" . :to - a ISO-8601 date string used when mode is "custom" . Must be after from . :match_day_of_week? - determines whether the comparison query should be adjusted to match the day of the week of the source query. When this option is set to true, the comparison query is shifted to start on the same day of the week as the source query, rather than on the exact same date. For example, if the source query starts on Sunday, January 1st, 2023 and the year_over_year comparison query is configured to match_day_of_week? , it will be shifted to start on Sunday, January 2nd, 2022 instead of January 1st. Defaults to false.","ref":"Plausible.Stats.Comparisons.html#compare/4","title":"Plausible.Stats.Comparisons.compare/4","type":"function"},{"doc":"","ref":"Plausible.Stats.Comparisons.html#t:mode/0","title":"Plausible.Stats.Comparisons.mode/0","type":"type"},{"doc":"","ref":"Plausible.Stats.CurrentVisitors.html","title":"Plausible.Stats.CurrentVisitors","type":"module"},{"doc":"","ref":"Plausible.Stats.CurrentVisitors.html#current_visitors/1","title":"Plausible.Stats.CurrentVisitors.current_visitors/1","type":"function"},{"doc":"Module for querying user defined 'custom properties'.","ref":"Plausible.Stats.CustomProps.html","title":"Plausible.Stats.CustomProps","type":"module"},{"doc":"","ref":"Plausible.Stats.CustomProps.html#maybe_allowed_props_only/2","title":"Plausible.Stats.CustomProps.maybe_allowed_props_only/2","type":"function"},{"doc":"Returns a breakdown of event names with all existing custom properties for each event name.","ref":"Plausible.Stats.CustomProps.html#props_for_all_event_names/2","title":"Plausible.Stats.CustomProps.props_for_all_event_names/2","type":"function"},{"doc":"Expects a single goal filter in the query. Returns a list of custom props for that goal. Works for both custom event and pageview goals.","ref":"Plausible.Stats.CustomProps.html#props_for_goal/2","title":"Plausible.Stats.CustomProps.props_for_goal/2","type":"function"},{"doc":"A module for parsing filters used in stat queries.","ref":"Plausible.Stats.FilterParser.html","title":"Plausible.Stats.FilterParser","type":"module"},{"doc":"Parses different filter formats. Depending on the format and type of the filters argument, returns: a decoded map, when filters is encoded JSON a parsed filter map, when filters is a filter expression string the same map, when filters is a map Returns an empty map when argument type is unexpected (e.g. nil ). Examples: iex> FilterParser . parse_filters ( "{ \\" page \\" : \\" /blog/** \\" }" ) %{ "page" => "/blog/**" } iex> FilterParser . parse_filters ( "visit:browser!=Chrome" ) %{ "visit:browser" => { :is_not , "Chrome" } } iex> FilterParser . parse_filters ( nil ) %{ }","ref":"Plausible.Stats.FilterParser.html#parse_filters/1","title":"Plausible.Stats.FilterParser.parse_filters/1","type":"function"},{"doc":"","ref":"Plausible.Stats.FilterSuggestions.html","title":"Plausible.Stats.FilterSuggestions","type":"module"},{"doc":"","ref":"Plausible.Stats.FilterSuggestions.html#filter_suggestions/4","title":"Plausible.Stats.FilterSuggestions.filter_suggestions/4","type":"function"},{"doc":"","ref":"Plausible.Stats.Filters.html","title":"Plausible.Stats.Filters","type":"module"},{"doc":"","ref":"Plausible.Stats.Filters.html#add_prefix/1","title":"Plausible.Stats.Filters.add_prefix/1","type":"function"},{"doc":"","ref":"Plausible.Stats.Filters.html#visit_props/0","title":"Plausible.Stats.Filters.visit_props/0","type":"function"},{"doc":"","ref":"Plausible.Stats.Fragments.html","title":"Plausible.Stats.Fragments","type":"module"},{"doc":"","ref":"Plausible.Stats.Fragments.html#bounce_rate/0","title":"Plausible.Stats.Fragments.bounce_rate/0","type":"macro"},{"doc":"","ref":"Plausible.Stats.Fragments.html#coalesce_string/2","title":"Plausible.Stats.Fragments.coalesce_string/2","type":"macro"},{"doc":"","ref":"Plausible.Stats.Fragments.html#sample_percent/0","title":"Plausible.Stats.Fragments.sample_percent/0","type":"macro"},{"doc":"Converts time or date and time to the specified timezone. Reference: https://clickhouse.com/docs/en/sql-reference/functions/date-time-functions/#totimezone","ref":"Plausible.Stats.Fragments.html#to_timezone/2","title":"Plausible.Stats.Fragments.to_timezone/2","type":"macro"},{"doc":"","ref":"Plausible.Stats.Fragments.html#total/0","title":"Plausible.Stats.Fragments.total/0","type":"macro"},{"doc":"","ref":"Plausible.Stats.Fragments.html#uniq/1","title":"Plausible.Stats.Fragments.uniq/1","type":"macro"},{"doc":"","ref":"Plausible.Stats.Fragments.html#visit_duration/0","title":"Plausible.Stats.Fragments.visit_duration/0","type":"macro"},{"doc":"Returns the weekstart for date . If the weekstart is before the not_before boundary, not_before is returned. Examples In this pseudo-code example, the fragment returns the weekstart. The not_before boundary is set to the past Saturday, which is before the weekstart, therefore the cap does not apply. iex> this_wednesday = ~D[2022-11-09] ...> past_saturday = ~D[2022-11-05] ...> weekstart_not_before(this_wednesday, past_saturday) ~D[2022-11-07] In this other example, the fragment returns Tuesday and not the weekstart. The not_before boundary is set to Tuesday, which is past the weekstart, therefore the cap applies. iex> this_wednesday = ~D[2022-11-09] ...> this_tuesday = ~D[2022-11-08] ...> weekstart_not_before(this_wednesday, this_tuesday) ~D[2022-11-08]","ref":"Plausible.Stats.Fragments.html#weekstart_not_before/2","title":"Plausible.Stats.Fragments.weekstart_not_before/2","type":"macro"},{"doc":"Same as Plausible.Stats.Fragments.weekstart_not_before/2 but converts dates to the specified timezone.","ref":"Plausible.Stats.Fragments.html#weekstart_not_before/3","title":"Plausible.Stats.Fragments.weekstart_not_before/3","type":"macro"},{"doc":"Module responsible for funnel evaluation, i.e. building and executing ClickHouse funnel query based on Plausible.Funnel definition.","ref":"Plausible.Stats.Funnel.html","title":"Plausible.Stats.Funnel","type":"module"},{"doc":"","ref":"Plausible.Stats.Funnel.html#funnel/3","title":"Plausible.Stats.Funnel.funnel/3","type":"function"},{"doc":"","ref":"Plausible.Stats.Imported.html","title":"Plausible.Stats.Imported","type":"module"},{"doc":"","ref":"Plausible.Stats.Imported.html#merge_imported/5","title":"Plausible.Stats.Imported.merge_imported/5","type":"function"},{"doc":"","ref":"Plausible.Stats.Imported.html#merge_imported_timeseries/4","title":"Plausible.Stats.Imported.merge_imported_timeseries/4","type":"function"},{"doc":"Collection of functions to work with intervals. The interval of a query defines the granularity of the data. You can think of it as a GROUP BY clause. Possible values are minute , hour , date , week , and month .","ref":"Plausible.Stats.Interval.html","title":"Plausible.Stats.Interval","type":"module"},{"doc":"Returns the suggested interval for the given Date.Range struct. Examples iex> Plausible.Stats.Interval.default_for_date_range(Date.range(~D[2022-01-01], ~D[2023-01-01])) "month" iex> Plausible.Stats.Interval.default_for_date_range(Date.range(~D[2022-01-01], ~D[2022-01-15])) "date" iex> Plausible.Stats.Interval.default_for_date_range(Date.range(~D[2022-01-01], ~D[2022-01-01])) "hour"","ref":"Plausible.Stats.Interval.html#default_for_date_range/1","title":"Plausible.Stats.Interval.default_for_date_range/1","type":"function"},{"doc":"Returns the suggested interval for the given time period. Examples iex> Plausible.Stats.Interval.default_for_period("7d") "date"","ref":"Plausible.Stats.Interval.html#default_for_period/1","title":"Plausible.Stats.Interval.default_for_period/1","type":"function"},{"doc":"","ref":"Plausible.Stats.Interval.html#list/0","title":"Plausible.Stats.Interval.list/0","type":"function"},{"doc":"","ref":"Plausible.Stats.Interval.html#valid?/1","title":"Plausible.Stats.Interval.valid?/1","type":"function"},{"doc":"","ref":"Plausible.Stats.Interval.html#valid_by_period/0","title":"Plausible.Stats.Interval.valid_by_period/0","type":"function"},{"doc":"Returns whether the given interval is valid for a time period. Intervals longer than periods are not supported, e.g. current month stats with a month interval, or today stats with a week interval. Examples iex> Plausible.Stats.Interval.valid_for_period?("month", "date") true iex> Plausible.Stats.Interval.valid_for_period?("30d", "month") false iex> Plausible.Stats.Interval.valid_for_period?("realtime", "week") false","ref":"Plausible.Stats.Interval.html#valid_for_period?/2","title":"Plausible.Stats.Interval.valid_for_period?/2","type":"function"},{"doc":"","ref":"Plausible.Stats.Interval.html#t:t/0","title":"Plausible.Stats.Interval.t/0","type":"type"},{"doc":"","ref":"Plausible.Stats.Props.html","title":"Plausible.Stats.Props","type":"module"},{"doc":"","ref":"Plausible.Stats.Props.html#event_props/0","title":"Plausible.Stats.Props.event_props/0","type":"function"},{"doc":"","ref":"Plausible.Stats.Props.html#valid_prop?/1","title":"Plausible.Stats.Props.valid_prop?/1","type":"function"},{"doc":"","ref":"Plausible.Stats.Query.html","title":"Plausible.Stats.Query","type":"module"},{"doc":"","ref":"Plausible.Stats.Query.html#from/2","title":"Plausible.Stats.Query.from/2","type":"function"},{"doc":"","ref":"Plausible.Stats.Query.html#get_filter_by_prefix/2","title":"Plausible.Stats.Query.get_filter_by_prefix/2","type":"function"},{"doc":"","ref":"Plausible.Stats.Query.html#has_event_filters?/1","title":"Plausible.Stats.Query.has_event_filters?/1","type":"function"},{"doc":"","ref":"Plausible.Stats.Query.html#include_imported?/3","title":"Plausible.Stats.Query.include_imported?/3","type":"function"},{"doc":"","ref":"Plausible.Stats.Query.html#put_filter/3","title":"Plausible.Stats.Query.put_filter/3","type":"function"},{"doc":"","ref":"Plausible.Stats.Query.html#remove_event_filters/2","title":"Plausible.Stats.Query.remove_event_filters/2","type":"function"},{"doc":"","ref":"Plausible.Stats.Query.html#trace/1","title":"Plausible.Stats.Query.trace/1","type":"function"},{"doc":"","ref":"Plausible.Stats.Query.html#t:t/0","title":"Plausible.Stats.Query.t/0","type":"type"},{"doc":"","ref":"Plausible.Stats.Timeseries.html","title":"Plausible.Stats.Timeseries","type":"module"},{"doc":"","ref":"Plausible.Stats.Timeseries.html#timeseries/3","title":"Plausible.Stats.Timeseries.timeseries/3","type":"function"},{"doc":"","ref":"Plausible.Stats.Timeseries.html#t:results/0","title":"Plausible.Stats.Timeseries.results/0","type":"type"},{"doc":"Utilities for modifying stat results","ref":"Plausible.Stats.Util.html","title":"Plausible.Stats.Util","type":"module"},{"doc":"","ref":"Plausible.Stats.Util.html#remove_internal_visits_metric/1","title":"Plausible.Stats.Util.remove_internal_visits_metric/1","type":"function"},{"doc":"__internal_visits is fetched when querying bounce rate and visit duration, as it is needed to calculate these from imported data. This function removes that metric from all entries in the results list.","ref":"Plausible.Stats.Util.html#remove_internal_visits_metric/2","title":"Plausible.Stats.Util.remove_internal_visits_metric/2","type":"function"},{"doc":"Floki wrappers to help make assertions about HTML/DOM structures","ref":"Plausible.Test.Support.HTML.html","title":"Plausible.Test.Support.HTML","type":"module"},{"doc":"","ref":"Plausible.Test.Support.HTML.html#element_exists?/2","title":"Plausible.Test.Support.HTML.element_exists?/2","type":"function"},{"doc":"","ref":"Plausible.Test.Support.HTML.html#find/2","title":"Plausible.Test.Support.HTML.find/2","type":"function"},{"doc":"","ref":"Plausible.Test.Support.HTML.html#form_exists?/2","title":"Plausible.Test.Support.HTML.form_exists?/2","type":"function"},{"doc":"","ref":"Plausible.Test.Support.HTML.html#submit_button/2","title":"Plausible.Test.Support.HTML.submit_button/2","type":"function"},{"doc":"","ref":"Plausible.Test.Support.HTML.html#text_of_attr/2","title":"Plausible.Test.Support.HTML.text_of_attr/2","type":"function"},{"doc":"","ref":"Plausible.Test.Support.HTML.html#text_of_element/2","title":"Plausible.Test.Support.HTML.text_of_element/2","type":"function"},{"doc":"","ref":"Plausible.TestUtils.html","title":"Plausible.TestUtils","type":"module"},{"doc":"","ref":"Plausible.TestUtils.html#add_imported_data/1","title":"Plausible.TestUtils.add_imported_data/1","type":"function"},{"doc":"","ref":"Plausible.TestUtils.html#await_clickhouse_count/2","title":"Plausible.TestUtils.await_clickhouse_count/2","type":"function"},{"doc":"","ref":"Plausible.TestUtils.html#create_api_key/1","title":"Plausible.TestUtils.create_api_key/1","type":"function"},{"doc":"","ref":"Plausible.TestUtils.html#create_events/1","title":"Plausible.TestUtils.create_events/1","type":"function"},{"doc":"","ref":"Plausible.TestUtils.html#create_new_site/1","title":"Plausible.TestUtils.create_new_site/1","type":"function"},{"doc":"","ref":"Plausible.TestUtils.html#create_pageviews/1","title":"Plausible.TestUtils.create_pageviews/1","type":"function"},{"doc":"","ref":"Plausible.TestUtils.html#create_sessions/1","title":"Plausible.TestUtils.create_sessions/1","type":"function"},{"doc":"","ref":"Plausible.TestUtils.html#create_site/1","title":"Plausible.TestUtils.create_site/1","type":"function"},{"doc":"","ref":"Plausible.TestUtils.html#create_user/1","title":"Plausible.TestUtils.create_user/1","type":"function"},{"doc":"","ref":"Plausible.TestUtils.html#eventually/3","title":"Plausible.TestUtils.eventually/3","type":"function"},{"doc":"","ref":"Plausible.TestUtils.html#init_session/1","title":"Plausible.TestUtils.init_session/1","type":"function"},{"doc":"","ref":"Plausible.TestUtils.html#log_in/1","title":"Plausible.TestUtils.log_in/1","type":"function"},{"doc":"","ref":"Plausible.TestUtils.html#patch_env/2","title":"Plausible.TestUtils.patch_env/2","type":"macro"},{"doc":"","ref":"Plausible.TestUtils.html#populate_stats/1","title":"Plausible.TestUtils.populate_stats/1","type":"function"},{"doc":"","ref":"Plausible.TestUtils.html#populate_stats/2","title":"Plausible.TestUtils.populate_stats/2","type":"function"},{"doc":"","ref":"Plausible.TestUtils.html#relative_time/1","title":"Plausible.TestUtils.relative_time/1","type":"function"},{"doc":"","ref":"Plausible.TestUtils.html#setup_patch_env/2","title":"Plausible.TestUtils.setup_patch_env/2","type":"macro"},{"doc":"","ref":"Plausible.TestUtils.html#to_naive_truncate/1","title":"Plausible.TestUtils.to_naive_truncate/1","type":"function"},{"doc":"","ref":"Plausible.TestUtils.html#use_api_key/1","title":"Plausible.TestUtils.use_api_key/1","type":"function"},{"doc":"","ref":"Plausible.Themes.html","title":"Plausible.Themes","type":"module"},{"doc":"","ref":"Plausible.Themes.html#options/0","title":"Plausible.Themes.options/0","type":"function"},{"doc":"","ref":"Plausible.Timezones.html","title":"Plausible.Timezones","type":"module"},{"doc":"","ref":"Plausible.Timezones.html#options/1","title":"Plausible.Timezones.options/1","type":"function"},{"doc":"","ref":"Plausible.Workers.CheckUsage.html","title":"Plausible.Workers.CheckUsage","type":"module"},{"doc":"","ref":"Plausible.Workers.CheckUsage.html#check_enterprise_subscriber/2","title":"Plausible.Workers.CheckUsage.check_enterprise_subscriber/2","type":"function"},{"doc":"","ref":"Plausible.Workers.CheckUsage.html#day_of_month/1","title":"Plausible.Workers.CheckUsage.day_of_month/1","type":"macro"},{"doc":"","ref":"Plausible.Workers.CheckUsage.html#last_day_of_month/1","title":"Plausible.Workers.CheckUsage.last_day_of_month/1","type":"macro"},{"doc":"","ref":"Plausible.Workers.CheckUsage.html#least/2","title":"Plausible.Workers.CheckUsage.least/2","type":"macro"},{"doc":"","ref":"Plausible.Workers.CheckUsage.html#yesterday/0","title":"Plausible.Workers.CheckUsage.yesterday/0","type":"macro"},{"doc":"","ref":"Plausible.Workers.CleanEmailVerificationCodes.html","title":"Plausible.Workers.CleanEmailVerificationCodes","type":"module"},{"doc":"","ref":"Plausible.Workers.CleanInvitations.html","title":"Plausible.Workers.CleanInvitations","type":"module"},{"doc":"Periodic worker that expires domain change transition period. Old domains are frozen for a given time, so users can still access them before redeploying their scripts and integrations.","ref":"Plausible.Workers.ExpireDomainChangeTransitions.html","title":"Plausible.Workers.ExpireDomainChangeTransitions","type":"module"},{"doc":"","ref":"Plausible.Workers.ImportGoogleAnalytics.html","title":"Plausible.Workers.ImportGoogleAnalytics","type":"module"},{"doc":"","ref":"Plausible.Workers.ImportGoogleAnalytics.html#import_failed/1","title":"Plausible.Workers.ImportGoogleAnalytics.import_failed/1","type":"function"},{"doc":"","ref":"Plausible.Workers.LockSites.html","title":"Plausible.Workers.LockSites","type":"module"},{"doc":"","ref":"Plausible.Workers.NotifyAnnualRenewal.html","title":"Plausible.Workers.NotifyAnnualRenewal","type":"module"},{"doc":"Sends a notification at most 7 days and at least 1 day before the renewal of an annual subscription","ref":"Plausible.Workers.NotifyAnnualRenewal.html#perform/1","title":"Plausible.Workers.NotifyAnnualRenewal.perform/1","type":"function"},{"doc":"","ref":"Plausible.Workers.RotateSalts.html","title":"Plausible.Workers.RotateSalts","type":"module"},{"doc":"","ref":"Plausible.Workers.ScheduleEmailReports.html","title":"Plausible.Workers.ScheduleEmailReports","type":"module"},{"doc":"","ref":"Plausible.Workers.ScheduleEmailReports.html#first_of_month_9am/1","title":"Plausible.Workers.ScheduleEmailReports.first_of_month_9am/1","type":"function"},{"doc":"","ref":"Plausible.Workers.ScheduleEmailReports.html#monday_9am/1","title":"Plausible.Workers.ScheduleEmailReports.monday_9am/1","type":"function"},{"doc":"Email reports should be sent on Monday at 9am according to the timezone of a site. This job runs every day at midnight to ensure that all sites have a scheduled job for email reports.","ref":"Plausible.Workers.ScheduleEmailReports.html#perform/1","title":"Plausible.Workers.ScheduleEmailReports.perform/1","type":"function"},{"doc":"","ref":"Plausible.Workers.SendCheckStatsEmails.html","title":"Plausible.Workers.SendCheckStatsEmails","type":"module"},{"doc":"","ref":"Plausible.Workers.SendEmailReport.html","title":"Plausible.Workers.SendEmailReport","type":"module"},{"doc":"","ref":"Plausible.Workers.SendSiteSetupEmails.html","title":"Plausible.Workers.SendSiteSetupEmails","type":"module"},{"doc":"","ref":"Plausible.Workers.SendTrialNotifications.html","title":"Plausible.Workers.SendTrialNotifications","type":"module"},{"doc":"","ref":"Plausible.Workers.SpikeNotifier.html","title":"Plausible.Workers.SpikeNotifier","type":"module"},{"doc":"","ref":"PlausibleWeb.html","title":"PlausibleWeb","type":"module"},{"doc":"When used, dispatch to the appropriate controller/view/etc.","ref":"PlausibleWeb.html#__using__/1","title":"PlausibleWeb.__using__/1","type":"macro"},{"doc":"","ref":"PlausibleWeb.html#channel/0","title":"PlausibleWeb.channel/0","type":"function"},{"doc":"","ref":"PlausibleWeb.html#controller/0","title":"PlausibleWeb.controller/0","type":"function"},{"doc":"","ref":"PlausibleWeb.html#router/0","title":"PlausibleWeb.router/0","type":"function"},{"doc":"","ref":"PlausibleWeb.html#view/0","title":"PlausibleWeb.view/0","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.ExternalController.html","title":"PlausibleWeb.Api.ExternalController","type":"module"},{"doc":"","ref":"PlausibleWeb.Api.ExternalController.html#error/2","title":"PlausibleWeb.Api.ExternalController.error/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.ExternalController.html#event/2","title":"PlausibleWeb.Api.ExternalController.event/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.ExternalController.html#health/2","title":"PlausibleWeb.Api.ExternalController.health/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.ExternalController.html#info/2","title":"PlausibleWeb.Api.ExternalController.info/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.ExternalSitesController.html","title":"PlausibleWeb.Api.ExternalSitesController","type":"module"},{"doc":"","ref":"PlausibleWeb.Api.ExternalSitesController.html#create_site/2","title":"PlausibleWeb.Api.ExternalSitesController.create_site/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.ExternalSitesController.html#delete_goal/2","title":"PlausibleWeb.Api.ExternalSitesController.delete_goal/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.ExternalSitesController.html#delete_site/2","title":"PlausibleWeb.Api.ExternalSitesController.delete_site/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.ExternalSitesController.html#find_or_create_goal/2","title":"PlausibleWeb.Api.ExternalSitesController.find_or_create_goal/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.ExternalSitesController.html#find_or_create_shared_link/2","title":"PlausibleWeb.Api.ExternalSitesController.find_or_create_shared_link/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.ExternalSitesController.html#get_site/2","title":"PlausibleWeb.Api.ExternalSitesController.get_site/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.ExternalSitesController.html#update_site/2","title":"PlausibleWeb.Api.ExternalSitesController.update_site/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.ExternalStatsController.html","title":"PlausibleWeb.Api.ExternalStatsController","type":"module"},{"doc":"","ref":"PlausibleWeb.Api.ExternalStatsController.html#aggregate/2","title":"PlausibleWeb.Api.ExternalStatsController.aggregate/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.ExternalStatsController.html#breakdown/2","title":"PlausibleWeb.Api.ExternalStatsController.breakdown/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.ExternalStatsController.html#realtime_visitors/2","title":"PlausibleWeb.Api.ExternalStatsController.realtime_visitors/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.ExternalStatsController.html#timeseries/2","title":"PlausibleWeb.Api.ExternalStatsController.timeseries/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.Helpers.html","title":"PlausibleWeb.Api.Helpers","type":"module"},{"doc":"","ref":"PlausibleWeb.Api.Helpers.html#bad_request/2","title":"PlausibleWeb.Api.Helpers.bad_request/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.Helpers.html#not_found/2","title":"PlausibleWeb.Api.Helpers.not_found/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.Helpers.html#payment_required/2","title":"PlausibleWeb.Api.Helpers.payment_required/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.Helpers.html#too_many_requests/2","title":"PlausibleWeb.Api.Helpers.too_many_requests/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.Helpers.html#unauthorized/2","title":"PlausibleWeb.Api.Helpers.unauthorized/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.InternalController.html","title":"PlausibleWeb.Api.InternalController","type":"module"},{"doc":"","ref":"PlausibleWeb.Api.InternalController.html#disable_feature/2","title":"PlausibleWeb.Api.InternalController.disable_feature/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.InternalController.html#domain_status/2","title":"PlausibleWeb.Api.InternalController.domain_status/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.InternalController.html#sites/2","title":"PlausibleWeb.Api.InternalController.sites/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.PaddleController.html","title":"PlausibleWeb.Api.PaddleController","type":"module"},{"doc":"","ref":"PlausibleWeb.Api.PaddleController.html#verified_signature?/1","title":"PlausibleWeb.Api.PaddleController.verified_signature?/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.PaddleController.html#verify_signature/2","title":"PlausibleWeb.Api.PaddleController.verify_signature/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.PaddleController.html#webhook/2","title":"PlausibleWeb.Api.PaddleController.webhook/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.StatsController.html","title":"PlausibleWeb.Api.StatsController","type":"module"},{"doc":"","ref":"PlausibleWeb.Api.StatsController.html#all_props_breakdown/2","title":"PlausibleWeb.Api.StatsController.all_props_breakdown/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.StatsController.html#browser_versions/2","title":"PlausibleWeb.Api.StatsController.browser_versions/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.StatsController.html#browsers/2","title":"PlausibleWeb.Api.StatsController.browsers/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.StatsController.html#cities/2","title":"PlausibleWeb.Api.StatsController.cities/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.StatsController.html#conversions/2","title":"PlausibleWeb.Api.StatsController.conversions/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.StatsController.html#countries/2","title":"PlausibleWeb.Api.StatsController.countries/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.StatsController.html#current_visitors/2","title":"PlausibleWeb.Api.StatsController.current_visitors/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.StatsController.html#entry_pages/2","title":"PlausibleWeb.Api.StatsController.entry_pages/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.StatsController.html#exit_pages/2","title":"PlausibleWeb.Api.StatsController.exit_pages/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.StatsController.html#filter_suggestions/2","title":"PlausibleWeb.Api.StatsController.filter_suggestions/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.StatsController.html#funnel/2","title":"PlausibleWeb.Api.StatsController.funnel/2","type":"function"},{"doc":"Returns a time-series based on given parameters. Parameters This API accepts the following parameters: period - x-axis of the graph, e.g. 12mo , day , custom . metric - y-axis of the graph, e.g. visits , visitors , pageviews . See the Stats API "Metrics" section for more details. Defaults to visitors . interval - granularity of the time-series data. You can think of it as a GROUP BY clause. Possible values are minute , hour , date , week , and month . The default depends on the period parameter. Check Plausible.Query.from/2 for each default. filters - optional filters to drill down data. See the Stats API "Filtering" section for more details. with_imported - boolean indicating whether to include Google Analytics imported data or not. Defaults to false . Full example: %{ "from" => "2021-09-06" , "interval" => "month" , "metric" => "visitors" , "period" => "custom" , "to" => "2021-12-13" } Response Returns a map with the following keys: plot - list of values for the requested metric representing the y-axis of the graph. labels - list of date times representing the x-axis of the graph. present_index - index of the element representing the current date in labels and plot lists. interval - the interval used for querying. with_imported - boolean indicating whether the Google Analytics data was queried or not. imported_source - the source of the imported data, when applicable. Currently only Google Analytics is supported. full_intervals - map of dates indicating whether the interval has been cut off by the requested date range or not. For example, if looking at a month week-by-week, some weeks may be cut off by the month boundaries. It's useful to adjust the graph display slightly in case the interval is not 'full' so that the user understands why the numbers might be lower for those partial periods. Full example: %{ "full_intervals" => %{ "2021-09-01" => false , "2021-10-01" => true , "2021-11-01" => true , "2021-12-01" => false } , "imported_source" => nil , "interval" => "month" , "labels" => [ "2021-09-01" , "2021-10-01" , "2021-11-01" , "2021-12-01" ] , "plot" => [ 0 , 0 , 0 , 0 ] , "present_index" => nil , "with_imported" => false }","ref":"PlausibleWeb.Api.StatsController.html#main_graph/2","title":"PlausibleWeb.Api.StatsController.main_graph/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.StatsController.html#operating_system_versions/2","title":"PlausibleWeb.Api.StatsController.operating_system_versions/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.StatsController.html#operating_systems/2","title":"PlausibleWeb.Api.StatsController.operating_systems/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.StatsController.html#pages/2","title":"PlausibleWeb.Api.StatsController.pages/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.StatsController.html#prop_breakdown/2","title":"PlausibleWeb.Api.StatsController.prop_breakdown/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.StatsController.html#referrer_drilldown/2","title":"PlausibleWeb.Api.StatsController.referrer_drilldown/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.StatsController.html#regions/2","title":"PlausibleWeb.Api.StatsController.regions/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.StatsController.html#screen_sizes/2","title":"PlausibleWeb.Api.StatsController.screen_sizes/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.StatsController.html#sources/2","title":"PlausibleWeb.Api.StatsController.sources/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.StatsController.html#top_stats/2","title":"PlausibleWeb.Api.StatsController.top_stats/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.StatsController.html#utm_campaigns/2","title":"PlausibleWeb.Api.StatsController.utm_campaigns/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.StatsController.html#utm_contents/2","title":"PlausibleWeb.Api.StatsController.utm_contents/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.StatsController.html#utm_mediums/2","title":"PlausibleWeb.Api.StatsController.utm_mediums/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.StatsController.html#utm_sources/2","title":"PlausibleWeb.Api.StatsController.utm_sources/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Api.StatsController.html#utm_terms/2","title":"PlausibleWeb.Api.StatsController.utm_terms/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthController.html","title":"PlausibleWeb.AuthController","type":"module"},{"doc":"","ref":"PlausibleWeb.AuthController.html#activate/2","title":"PlausibleWeb.AuthController.activate/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthController.html#activate_form/2","title":"PlausibleWeb.AuthController.activate_form/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthController.html#create_api_key/2","title":"PlausibleWeb.AuthController.create_api_key/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthController.html#delete_api_key/2","title":"PlausibleWeb.AuthController.delete_api_key/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthController.html#delete_me/2","title":"PlausibleWeb.AuthController.delete_me/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthController.html#google_auth_callback/2","title":"PlausibleWeb.AuthController.google_auth_callback/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthController.html#login/2","title":"PlausibleWeb.AuthController.login/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthController.html#login_form/2","title":"PlausibleWeb.AuthController.login_form/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthController.html#logout/2","title":"PlausibleWeb.AuthController.logout/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthController.html#new_api_key/2","title":"PlausibleWeb.AuthController.new_api_key/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthController.html#password_form/2","title":"PlausibleWeb.AuthController.password_form/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthController.html#password_reset/2","title":"PlausibleWeb.AuthController.password_reset/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthController.html#password_reset_form/2","title":"PlausibleWeb.AuthController.password_reset_form/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthController.html#password_reset_request/2","title":"PlausibleWeb.AuthController.password_reset_request/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthController.html#password_reset_request_form/2","title":"PlausibleWeb.AuthController.password_reset_request_form/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthController.html#register/2","title":"PlausibleWeb.AuthController.register/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthController.html#register_form/2","title":"PlausibleWeb.AuthController.register_form/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthController.html#register_from_invitation/2","title":"PlausibleWeb.AuthController.register_from_invitation/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthController.html#register_from_invitation_form/2","title":"PlausibleWeb.AuthController.register_from_invitation_form/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthController.html#request_activation_code/2","title":"PlausibleWeb.AuthController.request_activation_code/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthController.html#save_settings/2","title":"PlausibleWeb.AuthController.save_settings/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthController.html#set_password/2","title":"PlausibleWeb.AuthController.set_password/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthController.html#user_settings/2","title":"PlausibleWeb.AuthController.user_settings/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthPlug.html","title":"PlausibleWeb.AuthPlug","type":"module"},{"doc":"","ref":"PlausibleWeb.AuthPlug.html#call/2","title":"PlausibleWeb.AuthPlug.call/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthPlug.html#init/1","title":"PlausibleWeb.AuthPlug.init/1","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthView.html","title":"PlausibleWeb.AuthView","type":"module"},{"doc":"The resource name, as an atom, for this view","ref":"PlausibleWeb.AuthView.html#__resource__/0","title":"PlausibleWeb.AuthView.__resource__/0","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthView.html#activate.html/1","title":"PlausibleWeb.AuthView.activate.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthView.html#base_domain/0","title":"PlausibleWeb.AuthView.base_domain/0","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthView.html#delimit_integer/1","title":"PlausibleWeb.AuthView.delimit_integer/1","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthView.html#format_invoices/1","title":"PlausibleWeb.AuthView.format_invoices/1","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthView.html#invitation_expired.html/1","title":"PlausibleWeb.AuthView.invitation_expired.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthView.html#login_form.html/1","title":"PlausibleWeb.AuthView.login_form.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthView.html#new_api_key.html/1","title":"PlausibleWeb.AuthView.new_api_key.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthView.html#password_form.html/1","title":"PlausibleWeb.AuthView.password_form.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthView.html#password_reset_form.html/1","title":"PlausibleWeb.AuthView.password_reset_form.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthView.html#password_reset_request_form.html/1","title":"PlausibleWeb.AuthView.password_reset_request_form.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthView.html#password_reset_request_success.html/1","title":"PlausibleWeb.AuthView.password_reset_request_success.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthView.html#plausible_url/0","title":"PlausibleWeb.AuthView.plausible_url/0","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthView.html#present_subscription_status/1","title":"PlausibleWeb.AuthView.present_subscription_status/1","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthView.html#register_form.html/1","title":"PlausibleWeb.AuthView.register_form.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthView.html#register_from_invitation_form.html/1","title":"PlausibleWeb.AuthView.register_from_invitation_form.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthView.html#register_success.html/1","title":"PlausibleWeb.AuthView.register_success.html/1","type":"function"},{"doc":"Renders the given template locally.","ref":"PlausibleWeb.AuthView.html#render/2","title":"PlausibleWeb.AuthView.render/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthView.html#subscription_colors/1","title":"PlausibleWeb.AuthView.subscription_colors/1","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthView.html#subscription_interval/1","title":"PlausibleWeb.AuthView.subscription_interval/1","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthView.html#subscription_quota/1","title":"PlausibleWeb.AuthView.subscription_quota/1","type":"function"},{"doc":"Callback invoked when no template is found. By default it raises but can be customized to render a particular template.","ref":"PlausibleWeb.AuthView.html#template_not_found/2","title":"PlausibleWeb.AuthView.template_not_found/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthView.html#user_settings.html/1","title":"PlausibleWeb.AuthView.user_settings.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthorizeSiteAccess.html","title":"PlausibleWeb.AuthorizeSiteAccess","type":"module"},{"doc":"","ref":"PlausibleWeb.AuthorizeSiteAccess.html#call/2","title":"PlausibleWeb.AuthorizeSiteAccess.call/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthorizeSiteAccess.html#init/1","title":"PlausibleWeb.AuthorizeSiteAccess.init/1","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthorizeSitesApiPlug.html","title":"PlausibleWeb.AuthorizeSitesApiPlug","type":"module"},{"doc":"","ref":"PlausibleWeb.AuthorizeSitesApiPlug.html#call/2","title":"PlausibleWeb.AuthorizeSitesApiPlug.call/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthorizeSitesApiPlug.html#init/1","title":"PlausibleWeb.AuthorizeSitesApiPlug.init/1","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthorizeStatsApiPlug.html","title":"PlausibleWeb.AuthorizeStatsApiPlug","type":"module"},{"doc":"","ref":"PlausibleWeb.AuthorizeStatsApiPlug.html#call/2","title":"PlausibleWeb.AuthorizeStatsApiPlug.call/2","type":"function"},{"doc":"","ref":"PlausibleWeb.AuthorizeStatsApiPlug.html#init/1","title":"PlausibleWeb.AuthorizeStatsApiPlug.init/1","type":"function"},{"doc":"","ref":"PlausibleWeb.BillingController.html","title":"PlausibleWeb.BillingController","type":"module"},{"doc":"","ref":"PlausibleWeb.BillingController.html#change_enterprise_plan/2","title":"PlausibleWeb.BillingController.change_enterprise_plan/2","type":"function"},{"doc":"","ref":"PlausibleWeb.BillingController.html#change_plan/2","title":"PlausibleWeb.BillingController.change_plan/2","type":"function"},{"doc":"","ref":"PlausibleWeb.BillingController.html#change_plan_form/2","title":"PlausibleWeb.BillingController.change_plan_form/2","type":"function"},{"doc":"","ref":"PlausibleWeb.BillingController.html#change_plan_preview/2","title":"PlausibleWeb.BillingController.change_plan_preview/2","type":"function"},{"doc":"","ref":"PlausibleWeb.BillingController.html#ping_subscription/2","title":"PlausibleWeb.BillingController.ping_subscription/2","type":"function"},{"doc":"","ref":"PlausibleWeb.BillingController.html#preview_susbcription/2","title":"PlausibleWeb.BillingController.preview_susbcription/2","type":"function"},{"doc":"","ref":"PlausibleWeb.BillingController.html#upgrade/2","title":"PlausibleWeb.BillingController.upgrade/2","type":"function"},{"doc":"","ref":"PlausibleWeb.BillingController.html#upgrade_enterprise_plan/2","title":"PlausibleWeb.BillingController.upgrade_enterprise_plan/2","type":"function"},{"doc":"","ref":"PlausibleWeb.BillingController.html#upgrade_success/2","title":"PlausibleWeb.BillingController.upgrade_success/2","type":"function"},{"doc":"","ref":"PlausibleWeb.BillingView.html","title":"PlausibleWeb.BillingView","type":"module"},{"doc":"The resource name, as an atom, for this view","ref":"PlausibleWeb.BillingView.html#__resource__/0","title":"PlausibleWeb.BillingView.__resource__/0","type":"function"},{"doc":"","ref":"PlausibleWeb.BillingView.html#base_domain/0","title":"PlausibleWeb.BillingView.base_domain/0","type":"function"},{"doc":"","ref":"PlausibleWeb.BillingView.html#change_enterprise_plan.html/1","title":"PlausibleWeb.BillingView.change_enterprise_plan.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.BillingView.html#change_enterprise_plan_contact_us.html/1","title":"PlausibleWeb.BillingView.change_enterprise_plan_contact_us.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.BillingView.html#change_plan.html/1","title":"PlausibleWeb.BillingView.change_plan.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.BillingView.html#change_plan_preview.html/1","title":"PlausibleWeb.BillingView.change_plan_preview.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.BillingView.html#plausible_url/0","title":"PlausibleWeb.BillingView.plausible_url/0","type":"function"},{"doc":"","ref":"PlausibleWeb.BillingView.html#present_currency/1","title":"PlausibleWeb.BillingView.present_currency/1","type":"function"},{"doc":"","ref":"PlausibleWeb.BillingView.html#present_date/1","title":"PlausibleWeb.BillingView.present_date/1","type":"function"},{"doc":"","ref":"PlausibleWeb.BillingView.html#reccommended_plan/1","title":"PlausibleWeb.BillingView.reccommended_plan/1","type":"function"},{"doc":"Renders the given template locally.","ref":"PlausibleWeb.BillingView.html#render/2","title":"PlausibleWeb.BillingView.render/2","type":"function"},{"doc":"Callback invoked when no template is found. By default it raises but can be customized to render a particular template.","ref":"PlausibleWeb.BillingView.html#template_not_found/2","title":"PlausibleWeb.BillingView.template_not_found/2","type":"function"},{"doc":"","ref":"PlausibleWeb.BillingView.html#upgrade.html/1","title":"PlausibleWeb.BillingView.upgrade.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.BillingView.html#upgrade_success.html/1","title":"PlausibleWeb.BillingView.upgrade_success.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.BillingView.html#upgrade_to_plan.html/1","title":"PlausibleWeb.BillingView.upgrade_to_plan.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.CRMAuthPlug.html","title":"PlausibleWeb.CRMAuthPlug","type":"module"},{"doc":"","ref":"PlausibleWeb.CRMAuthPlug.html#call/2","title":"PlausibleWeb.CRMAuthPlug.call/2","type":"function"},{"doc":"","ref":"PlausibleWeb.CRMAuthPlug.html#init/1","title":"PlausibleWeb.CRMAuthPlug.init/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Captcha.html","title":"PlausibleWeb.Captcha","type":"module"},{"doc":"","ref":"PlausibleWeb.Captcha.html#enabled?/0","title":"PlausibleWeb.Captcha.enabled?/0","type":"function"},{"doc":"","ref":"PlausibleWeb.Captcha.html#sitekey/0","title":"PlausibleWeb.Captcha.sitekey/0","type":"function"},{"doc":"","ref":"PlausibleWeb.Captcha.html#verify/1","title":"PlausibleWeb.Captcha.verify/1","type":"function"},{"doc":"Generic reusable components","ref":"PlausibleWeb.Components.Generic.html","title":"PlausibleWeb.Components.Generic","type":"module"},{"doc":"Attributes title ( :string ) - Defaults to "Notice" . class ( :string ) - Defaults to "" . Slots inner_block","ref":"PlausibleWeb.Components.Generic.html#notice/1","title":"PlausibleWeb.Components.Generic.notice/1","type":"function"},{"doc":"Phoenix Component for rendering a user-facing feature toggle capable of flipping booleans in Plausible.Site via the toggle_feature controller action.","ref":"PlausibleWeb.Components.Site.Feature.html","title":"PlausibleWeb.Components.Site.Feature","type":"module"},{"doc":"The resource name, as an atom, for this view","ref":"PlausibleWeb.Components.Site.Feature.html#__resource__/0","title":"PlausibleWeb.Components.Site.Feature.__resource__/0","type":"function"},{"doc":"","ref":"PlausibleWeb.Components.Site.Feature.html#button_active/1","title":"PlausibleWeb.Components.Site.Feature.button_active/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Components.Site.Feature.html#button_inactive/1","title":"PlausibleWeb.Components.Site.Feature.button_inactive/1","type":"function"},{"doc":"Renders the given template locally.","ref":"PlausibleWeb.Components.Site.Feature.html#render/2","title":"PlausibleWeb.Components.Site.Feature.render/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Components.Site.Feature.html#target/4","title":"PlausibleWeb.Components.Site.Feature.target/4","type":"function"},{"doc":"Callback invoked when no template is found. By default it raises but can be customized to render a particular template.","ref":"PlausibleWeb.Components.Site.Feature.html#template_not_found/2","title":"PlausibleWeb.Components.Site.Feature.template_not_found/2","type":"function"},{"doc":"Attributes site ( Plausible.Site ) (required) setting ( :atom ) (required) label ( :string ) (required) conn ( Plug.Conn ) (required) Slots inner_block","ref":"PlausibleWeb.Components.Site.Feature.html#toggle/1","title":"PlausibleWeb.Components.Site.Feature.toggle/1","type":"function"},{"doc":"This module defines the test case to be used by tests that require setting up a connection. Such tests rely on Phoenix.ConnTest and also import other functionality to make it easier to build common data structures and query the data layer. Finally, if the test case interacts with the database, it cannot be async. For this reason, every test runs inside a transaction which is reset at the beginning of the test unless the test case is marked as async.","ref":"PlausibleWeb.ConnCase.html","title":"PlausibleWeb.ConnCase","type":"module"},{"doc":"","ref":"PlausibleWeb.ControllerHelpers.html","title":"PlausibleWeb.ControllerHelpers","type":"module"},{"doc":"","ref":"PlausibleWeb.ControllerHelpers.html#render_error/2","title":"PlausibleWeb.ControllerHelpers.render_error/2","type":"function"},{"doc":"","ref":"PlausibleWeb.ControllerHelpers.html#render_error/3","title":"PlausibleWeb.ControllerHelpers.render_error/3","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html","title":"PlausibleWeb.Email","type":"module"},{"doc":"","ref":"PlausibleWeb.Email.html#activation_email/2","title":"PlausibleWeb.Email.activation_email/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#base_email/0","title":"PlausibleWeb.Email.base_email/0","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#base_email/1","title":"PlausibleWeb.Email.base_email/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#cancellation_email/1","title":"PlausibleWeb.Email.cancellation_email/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#check_stats_email/1","title":"PlausibleWeb.Email.check_stats_email/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#create_site_email/1","title":"PlausibleWeb.Email.create_site_email/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#dashboard_locked/4","title":"PlausibleWeb.Email.dashboard_locked/4","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#enterprise_over_limit_internal_email/5","title":"PlausibleWeb.Email.enterprise_over_limit_internal_email/5","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#error_report/3","title":"PlausibleWeb.Email.error_report/3","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#existing_user_invitation/1","title":"PlausibleWeb.Email.existing_user_invitation/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#import_failure/2","title":"PlausibleWeb.Email.import_failure/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#import_success/2","title":"PlausibleWeb.Email.import_success/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#invitation_accepted/1","title":"PlausibleWeb.Email.invitation_accepted/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#invitation_rejected/1","title":"PlausibleWeb.Email.invitation_rejected/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#mailer_email_from/0","title":"PlausibleWeb.Email.mailer_email_from/0","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#new_user_invitation/1","title":"PlausibleWeb.Email.new_user_invitation/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#over_limit_email/4","title":"PlausibleWeb.Email.over_limit_email/4","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#ownership_transfer_accepted/1","title":"PlausibleWeb.Email.ownership_transfer_accepted/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#ownership_transfer_rejected/1","title":"PlausibleWeb.Email.ownership_transfer_rejected/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#ownership_transfer_request/2","title":"PlausibleWeb.Email.ownership_transfer_request/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#password_reset_email/2","title":"PlausibleWeb.Email.password_reset_email/2","type":"function"},{"doc":"Render an Phoenix template and set the body on the email. Pass an atom as the template name (:welcome_email) to render HTML and plain text emails. Use a string if you only want to render one type, e.g. "welcome_email.text" or "welcome_email.html". Scroll to the top for more examples.","ref":"PlausibleWeb.Email.html#render/3","title":"PlausibleWeb.Email.render/3","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#site_member_removed/1","title":"PlausibleWeb.Email.site_member_removed/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#site_setup_help/2","title":"PlausibleWeb.Email.site_setup_help/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#site_setup_success/2","title":"PlausibleWeb.Email.site_setup_success/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#spike_notification/5","title":"PlausibleWeb.Email.spike_notification/5","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#trial_one_week_reminder/1","title":"PlausibleWeb.Email.trial_one_week_reminder/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#trial_over_email/1","title":"PlausibleWeb.Email.trial_over_email/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#trial_upgrade_email/3","title":"PlausibleWeb.Email.trial_upgrade_email/3","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#weekly_report/3","title":"PlausibleWeb.Email.weekly_report/3","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#welcome_email/1","title":"PlausibleWeb.Email.welcome_email/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#yearly_expiration_notification/1","title":"PlausibleWeb.Email.yearly_expiration_notification/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Email.html#yearly_renewal_notification/1","title":"PlausibleWeb.Email.yearly_renewal_notification/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html","title":"PlausibleWeb.EmailView","type":"module"},{"doc":"The resource name, as an atom, for this view","ref":"PlausibleWeb.EmailView.html#__resource__/0","title":"PlausibleWeb.EmailView.__resource__/0","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#activation_email.html/1","title":"PlausibleWeb.EmailView.activation_email.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#base_domain/0","title":"PlausibleWeb.EmailView.base_domain/0","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#cancellation_email.html/1","title":"PlausibleWeb.EmailView.cancellation_email.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#check_stats_email.html/1","title":"PlausibleWeb.EmailView.check_stats_email.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#create_site_email.html/1","title":"PlausibleWeb.EmailView.create_site_email.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#dashboard_locked.html/1","title":"PlausibleWeb.EmailView.dashboard_locked.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#date_format/1","title":"PlausibleWeb.EmailView.date_format/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#enterprise_over_limit_internal.html/1","title":"PlausibleWeb.EmailView.enterprise_over_limit_internal.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#error_report_email.html/1","title":"PlausibleWeb.EmailView.error_report_email.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#existing_user_invitation.html/1","title":"PlausibleWeb.EmailView.existing_user_invitation.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#google_analytics_import.html/1","title":"PlausibleWeb.EmailView.google_analytics_import.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#greet_recipient/1","title":"PlausibleWeb.EmailView.greet_recipient/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#invitation_accepted.html/1","title":"PlausibleWeb.EmailView.invitation_accepted.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#invitation_rejected.html/1","title":"PlausibleWeb.EmailView.invitation_rejected.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#new_user_invitation.html/1","title":"PlausibleWeb.EmailView.new_user_invitation.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#over_limit.html/1","title":"PlausibleWeb.EmailView.over_limit.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#ownership_transfer_accepted.html/1","title":"PlausibleWeb.EmailView.ownership_transfer_accepted.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#ownership_transfer_rejected.html/1","title":"PlausibleWeb.EmailView.ownership_transfer_rejected.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#ownership_transfer_request.html/1","title":"PlausibleWeb.EmailView.ownership_transfer_request.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#password_reset_email.html/1","title":"PlausibleWeb.EmailView.password_reset_email.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#plausible_url/0","title":"PlausibleWeb.EmailView.plausible_url/0","type":"function"},{"doc":"Renders the given template locally.","ref":"PlausibleWeb.EmailView.html#render/2","title":"PlausibleWeb.EmailView.render/2","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#sentry_link/2","title":"PlausibleWeb.EmailView.sentry_link/2","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#site_member_removed.html/1","title":"PlausibleWeb.EmailView.site_member_removed.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#site_setup_help_email.html/1","title":"PlausibleWeb.EmailView.site_setup_help_email.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#site_setup_success_email.html/1","title":"PlausibleWeb.EmailView.site_setup_success_email.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#spike_notification.html/1","title":"PlausibleWeb.EmailView.spike_notification.html/1","type":"function"},{"doc":"Callback invoked when no template is found. By default it raises but can be customized to render a particular template.","ref":"PlausibleWeb.EmailView.html#template_not_found/2","title":"PlausibleWeb.EmailView.template_not_found/2","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#trial_one_week_reminder.html/1","title":"PlausibleWeb.EmailView.trial_one_week_reminder.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#trial_over_email.html/1","title":"PlausibleWeb.EmailView.trial_over_email.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#trial_upgrade_email.html/1","title":"PlausibleWeb.EmailView.trial_upgrade_email.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#weekly_report.html/1","title":"PlausibleWeb.EmailView.weekly_report.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#welcome_email.html/1","title":"PlausibleWeb.EmailView.welcome_email.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#yearly_expiration_notification.html/1","title":"PlausibleWeb.EmailView.yearly_expiration_notification.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.EmailView.html#yearly_renewal_notification.html/1","title":"PlausibleWeb.EmailView.yearly_renewal_notification.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Endpoint.html","title":"PlausibleWeb.Endpoint","type":"module"},{"doc":"Callback implementation for Phoenix.Endpoint.broadcast/3 .","ref":"PlausibleWeb.Endpoint.html#broadcast/3","title":"PlausibleWeb.Endpoint.broadcast/3","type":"function"},{"doc":"Callback implementation for Phoenix.Endpoint.broadcast!/3 .","ref":"PlausibleWeb.Endpoint.html#broadcast!/3","title":"PlausibleWeb.Endpoint.broadcast!/3","type":"function"},{"doc":"Callback implementation for Phoenix.Endpoint.broadcast_from/4 .","ref":"PlausibleWeb.Endpoint.html#broadcast_from/4","title":"PlausibleWeb.Endpoint.broadcast_from/4","type":"function"},{"doc":"Callback implementation for Phoenix.Endpoint.broadcast_from!/4 .","ref":"PlausibleWeb.Endpoint.html#broadcast_from!/4","title":"PlausibleWeb.Endpoint.broadcast_from!/4","type":"function"},{"doc":"Callback implementation for Plug.call/2 .","ref":"PlausibleWeb.Endpoint.html#call/2","title":"PlausibleWeb.Endpoint.call/2","type":"function"},{"doc":"Returns the child specification to start the endpoint under a supervision tree.","ref":"PlausibleWeb.Endpoint.html#child_spec/1","title":"PlausibleWeb.Endpoint.child_spec/1","type":"function"},{"doc":"Returns the endpoint configuration for key Returns default if the key does not exist.","ref":"PlausibleWeb.Endpoint.html#config/2","title":"PlausibleWeb.Endpoint.config/2","type":"function"},{"doc":"Reloads the configuration given the application environment changes.","ref":"PlausibleWeb.Endpoint.html#config_change/2","title":"PlausibleWeb.Endpoint.config_change/2","type":"function"},{"doc":"Returns the host for the given endpoint.","ref":"PlausibleWeb.Endpoint.html#host/0","title":"PlausibleWeb.Endpoint.host/0","type":"function"},{"doc":"Callback implementation for Plug.init/1 .","ref":"PlausibleWeb.Endpoint.html#init/1","title":"PlausibleWeb.Endpoint.init/1","type":"function"},{"doc":"Callback implementation for Phoenix.Endpoint.local_broadcast/3 .","ref":"PlausibleWeb.Endpoint.html#local_broadcast/3","title":"PlausibleWeb.Endpoint.local_broadcast/3","type":"function"},{"doc":"Callback implementation for Phoenix.Endpoint.local_broadcast_from/4 .","ref":"PlausibleWeb.Endpoint.html#local_broadcast_from/4","title":"PlausibleWeb.Endpoint.local_broadcast_from/4","type":"function"},{"doc":"","ref":"PlausibleWeb.Endpoint.html#patch_session_opts/0","title":"PlausibleWeb.Endpoint.patch_session_opts/0","type":"function"},{"doc":"Generates the path information when routing to this endpoint.","ref":"PlausibleWeb.Endpoint.html#path/1","title":"PlausibleWeb.Endpoint.path/1","type":"function"},{"doc":"Generates the script name.","ref":"PlausibleWeb.Endpoint.html#script_name/0","title":"PlausibleWeb.Endpoint.script_name/0","type":"function"},{"doc":"Starts the endpoint supervision tree. All other options are merged into the endpoint configuration.","ref":"PlausibleWeb.Endpoint.html#start_link/1","title":"PlausibleWeb.Endpoint.start_link/1","type":"function"},{"doc":"Generates a base64-encoded cryptographic hash (sha512) to a static file in priv/static . Meant to be used for Subresource Integrity with CDNs.","ref":"PlausibleWeb.Endpoint.html#static_integrity/1","title":"PlausibleWeb.Endpoint.static_integrity/1","type":"function"},{"doc":"Returns a two item tuple with the first item being the static_path and the second item being the static_integrity .","ref":"PlausibleWeb.Endpoint.html#static_lookup/1","title":"PlausibleWeb.Endpoint.static_lookup/1","type":"function"},{"doc":"Generates a route to a static file in priv/static .","ref":"PlausibleWeb.Endpoint.html#static_path/1","title":"PlausibleWeb.Endpoint.static_path/1","type":"function"},{"doc":"Generates the static URL without any path information. It uses the configuration under :static_url to generate such. It falls back to :url if :static_url is not set.","ref":"PlausibleWeb.Endpoint.html#static_url/0","title":"PlausibleWeb.Endpoint.static_url/0","type":"function"},{"doc":"Generates the endpoint base URL but as a URI struct. It uses the configuration under :url to generate such. Useful for manipulating the URL data and passing it to URL helpers.","ref":"PlausibleWeb.Endpoint.html#struct_url/0","title":"PlausibleWeb.Endpoint.struct_url/0","type":"function"},{"doc":"Callback implementation for Phoenix.Endpoint.subscribe/2 .","ref":"PlausibleWeb.Endpoint.html#subscribe/2","title":"PlausibleWeb.Endpoint.subscribe/2","type":"function"},{"doc":"Callback implementation for Phoenix.Endpoint.unsubscribe/1 .","ref":"PlausibleWeb.Endpoint.html#unsubscribe/1","title":"PlausibleWeb.Endpoint.unsubscribe/1","type":"function"},{"doc":"Generates the endpoint base URL without any path information. It uses the configuration under :url to generate such.","ref":"PlausibleWeb.Endpoint.html#url/0","title":"PlausibleWeb.Endpoint.url/0","type":"function"},{"doc":"","ref":"PlausibleWeb.Endpoint.html#websocket_url/0","title":"PlausibleWeb.Endpoint.websocket_url/0","type":"function"},{"doc":"","ref":"PlausibleWeb.ErrorHelpers.html","title":"PlausibleWeb.ErrorHelpers","type":"module"},{"doc":"","ref":"PlausibleWeb.ErrorHelpers.html#error_tag/2","title":"PlausibleWeb.ErrorHelpers.error_tag/2","type":"function"},{"doc":"","ref":"PlausibleWeb.ErrorReportController.html","title":"PlausibleWeb.ErrorReportController","type":"module"},{"doc":"","ref":"PlausibleWeb.ErrorReportController.html#submit_error_report/2","title":"PlausibleWeb.ErrorReportController.submit_error_report/2","type":"function"},{"doc":"","ref":"PlausibleWeb.ErrorView.html","title":"PlausibleWeb.ErrorView","type":"module"},{"doc":"The resource name, as an atom, for this view","ref":"PlausibleWeb.ErrorView.html#__resource__/0","title":"PlausibleWeb.ErrorView.__resource__/0","type":"function"},{"doc":"","ref":"PlausibleWeb.ErrorView.html#generic_error.html/1","title":"PlausibleWeb.ErrorView.generic_error.html/1","type":"function"},{"doc":"Renders the given template locally.","ref":"PlausibleWeb.ErrorView.html#render/2","title":"PlausibleWeb.ErrorView.render/2","type":"function"},{"doc":"","ref":"PlausibleWeb.ErrorView.html#server_error.html/1","title":"PlausibleWeb.ErrorView.server_error.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.ErrorView.html#server_error_report_thanks.html/1","title":"PlausibleWeb.ErrorView.server_error_report_thanks.html/1","type":"function"},{"doc":"Callback invoked when no template is found. By default it raises but can be customized to render a particular template.","ref":"PlausibleWeb.ErrorView.html#template_not_found/2","title":"PlausibleWeb.ErrorView.template_not_found/2","type":"function"},{"doc":"A Plug that fetches favicon images from DuckDuckGo and returns them to the Plausible frontend. The proxying is there so we can reduce the number of third-party domains that the browser clients need to connect to. Our goal is to have 0 third-party domain connections on the website for privacy reasons. This module also maps between categorized sources and their respective URLs for favicons. What does that mean exactly? During ingestion we use PlausibleWeb.RefInspector.parse/1 to categorize our referrer sources like so: google.com -> Google google.co.uk -> Google google.com.au -> Google So when we show Google as a source in the dashboard, the request to this plug will come as: https://plausible/io/favicon/sources/Google Now, when we want to show a favicon for Google, we need to convert Google -> google.com or some other hostname owned by Google: https://icons.duckduckgo.com/ip3/google.com.ico The mapping from source category -> source hostname is stored in "priv/referer_favicon_domains.json" and managed by Mix.Tasks.GenerateReferrerFavicons.run/1","ref":"PlausibleWeb.Favicon.html","title":"PlausibleWeb.Favicon","type":"module"},{"doc":"Proxies HTTP request to DuckDuckGo favicon service. Swallows hop-by-hop HTTP headers that should not be forwarded as defined in RFC 2616 Placeholder Cases where we show a placeholder icon instead: In case of network error to DuckDuckGo In case of non-2xx status code from DuckDuckGo In case of broken image response body from DuckDuckGo I'm not sure why DDG sometimes returns a broken PNG image in their response but we filter that out. When the icon request fails, we show a placeholder favicon instead. The placeholder is an emoji from https://favicon.io/emoji-favicons/ DuckDuckGo favicon service has some issues with SVG favicons . For some reason, they return them with content-type=image/x-icon whereas SVG icons should be returned with content-type=image/svg+xml . This Plug detects when the response body starts with <svg and will override the Content-Type to correct it. Preventing XSS vulnerabilities SVGs may contain <script> tags, and as these SVGs come from external sources, we need to prevent untrusted code from running on the browser. This Plug sets a strict Content-Security-Policy header telling the browser not to run scripts. This Plug sets Content-Disposition=attachment to prevent the SVG from rendering when navigating to /favicon/sources/:domain directly. Browsers do not execute scripts from <img> tags, therefore it is safe to use <img src="https://plausible.io/favicon/sources/dummy.site"></img>","ref":"PlausibleWeb.Favicon.html#call/2","title":"PlausibleWeb.Favicon.call/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Favicon.html#init/1","title":"PlausibleWeb.Favicon.init/1","type":"function"},{"doc":"Redirects first-launch users to registration page.","ref":"PlausibleWeb.FirstLaunchPlug.html","title":"PlausibleWeb.FirstLaunchPlug","type":"module"},{"doc":"","ref":"PlausibleWeb.FormHelpers.html","title":"PlausibleWeb.FormHelpers","type":"module"},{"doc":"","ref":"PlausibleWeb.FormHelpers.html#styled_error/1","title":"PlausibleWeb.FormHelpers.styled_error/1","type":"function"},{"doc":"","ref":"PlausibleWeb.FormHelpers.html#styled_label/4","title":"PlausibleWeb.FormHelpers.styled_label/4","type":"function"},{"doc":"","ref":"PlausibleWeb.FormHelpers.html#styled_select/4","title":"PlausibleWeb.FormHelpers.styled_select/4","type":"function"},{"doc":"","ref":"PlausibleWeb.FormHelpers.html#styled_text_input/3","title":"PlausibleWeb.FormHelpers.styled_text_input/3","type":"function"},{"doc":"","ref":"PlausibleWeb.InvitationController.html","title":"PlausibleWeb.InvitationController","type":"module"},{"doc":"","ref":"PlausibleWeb.InvitationController.html#accept_invitation/2","title":"PlausibleWeb.InvitationController.accept_invitation/2","type":"function"},{"doc":"","ref":"PlausibleWeb.InvitationController.html#reject_invitation/2","title":"PlausibleWeb.InvitationController.reject_invitation/2","type":"function"},{"doc":"","ref":"PlausibleWeb.InvitationController.html#remove_invitation/2","title":"PlausibleWeb.InvitationController.remove_invitation/2","type":"function"},{"doc":"","ref":"PlausibleWeb.LastSeenPlug.html","title":"PlausibleWeb.LastSeenPlug","type":"module"},{"doc":"","ref":"PlausibleWeb.LastSeenPlug.html#call/2","title":"PlausibleWeb.LastSeenPlug.call/2","type":"function"},{"doc":"","ref":"PlausibleWeb.LastSeenPlug.html#init/1","title":"PlausibleWeb.LastSeenPlug.init/1","type":"function"},{"doc":"","ref":"PlausibleWeb.LayoutView.html","title":"PlausibleWeb.LayoutView","type":"module"},{"doc":"The resource name, as an atom, for this view","ref":"PlausibleWeb.LayoutView.html#__resource__/0","title":"PlausibleWeb.LayoutView.__resource__/0","type":"function"},{"doc":"","ref":"PlausibleWeb.LayoutView.html#app.html/1","title":"PlausibleWeb.LayoutView.app.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.LayoutView.html#base_domain/0","title":"PlausibleWeb.LayoutView.base_domain/0","type":"function"},{"doc":"","ref":"PlausibleWeb.LayoutView.html#base_email.html/1","title":"PlausibleWeb.LayoutView.base_email.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.LayoutView.html#base_error.html/1","title":"PlausibleWeb.LayoutView.base_error.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.LayoutView.html#embedded.html/1","title":"PlausibleWeb.LayoutView.embedded.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.LayoutView.html#focus.html/1","title":"PlausibleWeb.LayoutView.focus.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.LayoutView.html#grace_period_end/1","title":"PlausibleWeb.LayoutView.grace_period_end/1","type":"function"},{"doc":"","ref":"PlausibleWeb.LayoutView.html#home_dest/1","title":"PlausibleWeb.LayoutView.home_dest/1","type":"function"},{"doc":"","ref":"PlausibleWeb.LayoutView.html#is_current_tab/2","title":"PlausibleWeb.LayoutView.is_current_tab/2","type":"function"},{"doc":"","ref":"PlausibleWeb.LayoutView.html#plausible_url/0","title":"PlausibleWeb.LayoutView.plausible_url/0","type":"function"},{"doc":"Renders the given template locally.","ref":"PlausibleWeb.LayoutView.html#render/2","title":"PlausibleWeb.LayoutView.render/2","type":"function"},{"doc":"http://blog.plataformatec.com.br/2018/05/nested-layouts-with-phoenix/","ref":"PlausibleWeb.LayoutView.html#render_layout/3","title":"PlausibleWeb.LayoutView.render_layout/3","type":"function"},{"doc":"","ref":"PlausibleWeb.LayoutView.html#settings_tabs/1","title":"PlausibleWeb.LayoutView.settings_tabs/1","type":"function"},{"doc":"","ref":"PlausibleWeb.LayoutView.html#site_settings.html/1","title":"PlausibleWeb.LayoutView.site_settings.html/1","type":"function"},{"doc":"Callback invoked when no template is found. By default it raises but can be customized to render a particular template.","ref":"PlausibleWeb.LayoutView.html#template_not_found/2","title":"PlausibleWeb.LayoutView.template_not_found/2","type":"function"},{"doc":"","ref":"PlausibleWeb.LayoutView.html#trial_notificaton/1","title":"PlausibleWeb.LayoutView.trial_notificaton/1","type":"function"},{"doc":"","ref":"PlausibleWeb.LayoutView.html#websocket_url/0","title":"PlausibleWeb.LayoutView.websocket_url/0","type":"function"},{"doc":"Flash component for LiveViews - works also when embedded within dead views","ref":"PlausibleWeb.Live.Flash.html","title":"PlausibleWeb.Live.Flash","type":"module"},{"doc":"","ref":"PlausibleWeb.Live.Flash.html#clear_flash_button/1","title":"PlausibleWeb.Live.Flash.clear_flash_button/1","type":"function"},{"doc":"Attributes on_close ( :any ) - Defaults to "lv:clear-flash" . Slots icon (required) title message (required)","ref":"PlausibleWeb.Live.Flash.html#flash/1","title":"PlausibleWeb.Live.Flash.flash/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Live.Flash.html#icon_error/1","title":"PlausibleWeb.Live.Flash.icon_error/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Live.Flash.html#icon_success/1","title":"PlausibleWeb.Live.Flash.icon_success/1","type":"function"},{"doc":"Callback implementation for Phoenix.LiveComponent.render/1 .","ref":"PlausibleWeb.Live.Flash.html#render/1","title":"PlausibleWeb.Live.Flash.render/1","type":"function"},{"doc":"LiveView allowing listing, creating and deleting funnels.","ref":"PlausibleWeb.Live.FunnelSettings.html","title":"PlausibleWeb.Live.FunnelSettings","type":"module"},{"doc":"Callback implementation for Phoenix.LiveView.handle_event/3 .","ref":"PlausibleWeb.Live.FunnelSettings.html#handle_event/3","title":"PlausibleWeb.Live.FunnelSettings.handle_event/3","type":"function"},{"doc":"Callback implementation for Phoenix.LiveView.handle_info/2 .","ref":"PlausibleWeb.Live.FunnelSettings.html#handle_info/2","title":"PlausibleWeb.Live.FunnelSettings.handle_info/2","type":"function"},{"doc":"Callback implementation for Phoenix.LiveView.mount/3 .","ref":"PlausibleWeb.Live.FunnelSettings.html#mount/3","title":"PlausibleWeb.Live.FunnelSettings.mount/3","type":"function"},{"doc":"Callback implementation for Phoenix.LiveView.render/1 .","ref":"PlausibleWeb.Live.FunnelSettings.html#render/1","title":"PlausibleWeb.Live.FunnelSettings.render/1","type":"function"},{"doc":"Phoenix LiveComponent for a combobox UI element with search and selection functionality. The component allows users to select an option from a list of options, which can be searched by typing in the input field. The component renders an input field with a dropdown anchor and a hidden input field for submitting the selected value. The number of options displayed in the dropdown is limited to 15 by default but can be customized. When a user types into the input field, the component searches the available options and provides suggestions based on the input.","ref":"PlausibleWeb.Live.FunnelSettings.ComboBox.html","title":"PlausibleWeb.Live.FunnelSettings.ComboBox","type":"module"},{"doc":"Attributes ref ( :string ) (required) options ( :list ) - Defaults to [] . suggestions ( :list ) - Defaults to [] . target ( :any )","ref":"PlausibleWeb.Live.FunnelSettings.ComboBox.html#dropdown/1","title":"PlausibleWeb.Live.FunnelSettings.ComboBox.dropdown/1","type":"function"},{"doc":"Attributes id ( :any ) (required)","ref":"PlausibleWeb.Live.FunnelSettings.ComboBox.html#dropdown_anchor/1","title":"PlausibleWeb.Live.FunnelSettings.ComboBox.dropdown_anchor/1","type":"function"},{"doc":"Callback implementation for Phoenix.LiveComponent.handle_event/3 .","ref":"PlausibleWeb.Live.FunnelSettings.ComboBox.html#handle_event/3","title":"PlausibleWeb.Live.FunnelSettings.ComboBox.handle_event/3","type":"function"},{"doc":"Attributes display_value ( :string ) (required) submit_value ( :integer ) (required) ref ( :string ) (required) target ( :any ) idx ( :integer ) (required)","ref":"PlausibleWeb.Live.FunnelSettings.ComboBox.html#option/1","title":"PlausibleWeb.Live.FunnelSettings.ComboBox.option/1","type":"function"},{"doc":"Attributes placeholder ( :string ) - Defaults to "Select option or search by typing" . id ( :any ) (required) options ( :list ) (required) submit_name ( :string ) (required) display_value ( :string ) - Defaults to "" . submit_value ( :string ) - Defaults to "" .","ref":"PlausibleWeb.Live.FunnelSettings.ComboBox.html#render/1","title":"PlausibleWeb.Live.FunnelSettings.ComboBox.render/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Live.FunnelSettings.ComboBox.html#select_option/4","title":"PlausibleWeb.Live.FunnelSettings.ComboBox.select_option/4","type":"function"},{"doc":"","ref":"PlausibleWeb.Live.FunnelSettings.ComboBox.html#suggest/2","title":"PlausibleWeb.Live.FunnelSettings.ComboBox.suggest/2","type":"function"},{"doc":"Callback implementation for Phoenix.LiveComponent.update/2 .","ref":"PlausibleWeb.Live.FunnelSettings.ComboBox.html#update/2","title":"PlausibleWeb.Live.FunnelSettings.ComboBox.update/2","type":"function"},{"doc":"Phoenix LiveComponent that renders a form used for setting up funnels. Makes use of dynamically placed PlausibleWeb.Live.FunnelSettings.ComboBox components to allow building searchable funnel definitions out of list of goals available.","ref":"PlausibleWeb.Live.FunnelSettings.Form.html","title":"PlausibleWeb.Live.FunnelSettings.Form","type":"module"},{"doc":"","ref":"PlausibleWeb.Live.FunnelSettings.Form.html#add_step_button/1","title":"PlausibleWeb.Live.FunnelSettings.Form.add_step_button/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Live.FunnelSettings.Form.html#cancel_button/1","title":"PlausibleWeb.Live.FunnelSettings.Form.cancel_button/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Live.FunnelSettings.Form.html#error/1","title":"PlausibleWeb.Live.FunnelSettings.Form.error/1","type":"function"},{"doc":"Attributes at ( :integer ) (required) result ( :map ) (required)","ref":"PlausibleWeb.Live.FunnelSettings.Form.html#evaluation/1","title":"PlausibleWeb.Live.FunnelSettings.Form.evaluation/1","type":"function"},{"doc":"Callback implementation for Phoenix.LiveView.handle_event/3 .","ref":"PlausibleWeb.Live.FunnelSettings.Form.html#handle_event/3","title":"PlausibleWeb.Live.FunnelSettings.Form.handle_event/3","type":"function"},{"doc":"Callback implementation for Phoenix.LiveView.handle_info/2 .","ref":"PlausibleWeb.Live.FunnelSettings.Form.html#handle_info/2","title":"PlausibleWeb.Live.FunnelSettings.Form.handle_info/2","type":"function"},{"doc":"Attributes field ( Phoenix.HTML.FormField )","ref":"PlausibleWeb.Live.FunnelSettings.Form.html#input/1","title":"PlausibleWeb.Live.FunnelSettings.Form.input/1","type":"function"},{"doc":"Callback implementation for Phoenix.LiveView.mount/3 .","ref":"PlausibleWeb.Live.FunnelSettings.Form.html#mount/3","title":"PlausibleWeb.Live.FunnelSettings.Form.mount/3","type":"function"},{"doc":"Attributes step_idx ( :integer ) (required)","ref":"PlausibleWeb.Live.FunnelSettings.Form.html#remove_step_button/1","title":"PlausibleWeb.Live.FunnelSettings.Form.remove_step_button/1","type":"function"},{"doc":"Callback implementation for Phoenix.LiveView.render/1 .","ref":"PlausibleWeb.Live.FunnelSettings.Form.html#render/1","title":"PlausibleWeb.Live.FunnelSettings.Form.render/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Live.FunnelSettings.Form.html#submit_button/1","title":"PlausibleWeb.Live.FunnelSettings.Form.submit_button/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Live.FunnelSettings.Form.html#submit_button_inactive/1","title":"PlausibleWeb.Live.FunnelSettings.Form.submit_button_inactive/1","type":"function"},{"doc":"Phoenix LiveComponent module that renders a list of funnels with their names and the number of steps they have. Each funnel is displayed with a delete button, which triggers a confirmation message before deleting the funnel from the UI. If there are no funnels configured for the site, a message is displayed indicating so.","ref":"PlausibleWeb.Live.FunnelSettings.List.html","title":"PlausibleWeb.Live.FunnelSettings.List","type":"module"},{"doc":"Callback implementation for Phoenix.LiveComponent.render/1 .","ref":"PlausibleWeb.Live.FunnelSettings.List.html#render/1","title":"PlausibleWeb.Live.FunnelSettings.List.render/1","type":"function"},{"doc":"","ref":"PlausibleWeb.PageController.html","title":"PlausibleWeb.PageController","type":"module"},{"doc":"The root path is never accessible in Plausible.Cloud because it is handled by the upstream reverse proxy. This controller action is only ever triggered in self-hosted Plausible.","ref":"PlausibleWeb.PageController.html#index/2","title":"PlausibleWeb.PageController.index/2","type":"function"},{"doc":"","ref":"PlausibleWeb.PageView.html","title":"PlausibleWeb.PageView","type":"module"},{"doc":"The resource name, as an atom, for this view","ref":"PlausibleWeb.PageView.html#__resource__/0","title":"PlausibleWeb.PageView.__resource__/0","type":"function"},{"doc":"","ref":"PlausibleWeb.PageView.html#index.html/1","title":"PlausibleWeb.PageView.index.html/1","type":"function"},{"doc":"Renders the given template locally.","ref":"PlausibleWeb.PageView.html#render/2","title":"PlausibleWeb.PageView.render/2","type":"function"},{"doc":"Callback invoked when no template is found. By default it raises but can be customized to render a particular template.","ref":"PlausibleWeb.PageView.html#template_not_found/2","title":"PlausibleWeb.PageView.template_not_found/2","type":"function"},{"doc":"Rejects bot requests by any means available. We're adding x-robots-tag to the response header and annotate the conn with "noindex, nofollow" under private.robots key. The only exception is, if the request is trying to access our live demo at plausible.io/plausible.io - in which case we'll allow indexing, but deny following links and skip the bot detection, in kind robots we trust.","ref":"PlausibleWeb.Plugs.NoRobots.html","title":"PlausibleWeb.Plugs.NoRobots","type":"module"},{"doc":"A Plug.Session adapter that allows configuration at runtime. Sadly, the plug being wrapped has no MFA option for dynamic configuration. This is currently used so we can dynamically pass the :domain and have cookies planted across one root domain.","ref":"PlausibleWeb.Plugs.RuntimeSessionAdapter.html","title":"PlausibleWeb.Plugs.RuntimeSessionAdapter","type":"module"},{"doc":"","ref":"PlausibleWeb.RefInspector.html","title":"PlausibleWeb.RefInspector","type":"module"},{"doc":"","ref":"PlausibleWeb.RefInspector.html#parse/1","title":"PlausibleWeb.RefInspector.parse/1","type":"function"},{"doc":"","ref":"PlausibleWeb.RefInspector.html#right_uri?/1","title":"PlausibleWeb.RefInspector.right_uri?/1","type":"function"},{"doc":"","ref":"PlausibleWeb.RemoteIp.html","title":"PlausibleWeb.RemoteIp","type":"module"},{"doc":"","ref":"PlausibleWeb.RemoteIp.html#get/1","title":"PlausibleWeb.RemoteIp.get/1","type":"function"},{"doc":"","ref":"PlausibleWeb.RequireAccountPlug.html","title":"PlausibleWeb.RequireAccountPlug","type":"module"},{"doc":"","ref":"PlausibleWeb.RequireAccountPlug.html#call/2","title":"PlausibleWeb.RequireAccountPlug.call/2","type":"function"},{"doc":"","ref":"PlausibleWeb.RequireAccountPlug.html#init/1","title":"PlausibleWeb.RequireAccountPlug.init/1","type":"function"},{"doc":"","ref":"PlausibleWeb.RequireLoggedOutPlug.html","title":"PlausibleWeb.RequireLoggedOutPlug","type":"module"},{"doc":"","ref":"PlausibleWeb.RequireLoggedOutPlug.html#call/2","title":"PlausibleWeb.RequireLoggedOutPlug.call/2","type":"function"},{"doc":"","ref":"PlausibleWeb.RequireLoggedOutPlug.html#init/1","title":"PlausibleWeb.RequireLoggedOutPlug.init/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Router.html","title":"PlausibleWeb.Router","type":"module"},{"doc":"","ref":"PlausibleWeb.Router.html#api/2","title":"PlausibleWeb.Router.api/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Router.html#browser/2","title":"PlausibleWeb.Router.browser/2","type":"function"},{"doc":"Callback invoked by Plug on every request.","ref":"PlausibleWeb.Router.html#call/2","title":"PlausibleWeb.Router.call/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Router.html#csrf/2","title":"PlausibleWeb.Router.csrf/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Router.html#flags/2","title":"PlausibleWeb.Router.flags/2","type":"function"},{"doc":"Callback required by Plug that initializes the router for serving web requests.","ref":"PlausibleWeb.Router.html#init/1","title":"PlausibleWeb.Router.init/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Router.html#internal_stats_api/2","title":"PlausibleWeb.Router.internal_stats_api/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Router.html#kaffy_browser/2","title":"PlausibleWeb.Router.kaffy_browser/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Router.html#public_api/2","title":"PlausibleWeb.Router.public_api/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Router.html#shared_link/2","title":"PlausibleWeb.Router.shared_link/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SessionTimeoutPlug.html","title":"PlausibleWeb.SessionTimeoutPlug","type":"module"},{"doc":"","ref":"PlausibleWeb.SessionTimeoutPlug.html#call/2","title":"PlausibleWeb.SessionTimeoutPlug.call/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SessionTimeoutPlug.html#init/1","title":"PlausibleWeb.SessionTimeoutPlug.init/1","type":"function"},{"doc":"This controller deals with user management via the UI in Site Settings -> People. It's important to enforce permissions in this controller. Owner - Can manage users, can trigger a 'transfer ownership' request Admin - Can manage users Viewer - Can not access user management settings Anyone - Can accept invitations Everything else should be explicitly disallowed.","ref":"PlausibleWeb.Site.MembershipController.html","title":"PlausibleWeb.Site.MembershipController","type":"module"},{"doc":"","ref":"PlausibleWeb.Site.MembershipController.html#invite_member/2","title":"PlausibleWeb.Site.MembershipController.invite_member/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Site.MembershipController.html#invite_member_form/2","title":"PlausibleWeb.Site.MembershipController.invite_member_form/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Site.MembershipController.html#remove_member/2","title":"PlausibleWeb.Site.MembershipController.remove_member/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Site.MembershipController.html#transfer_ownership/2","title":"PlausibleWeb.Site.MembershipController.transfer_ownership/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Site.MembershipController.html#transfer_ownership_form/2","title":"PlausibleWeb.Site.MembershipController.transfer_ownership_form/2","type":"function"},{"doc":"Updates the role of a user. The user being updated could be the same or different from the user taking the action. When updating the role, it's important to enforce permissions: Owner - Can update anyone's role except for themselves. If they want to change their own role, they have to use the 'transfer ownership' feature. Admin - Can update anyone's role except for owners. Can downgrade their own access to 'viewer'. Can promote a viewer to admin.","ref":"PlausibleWeb.Site.MembershipController.html#update_role/2","title":"PlausibleWeb.Site.MembershipController.update_role/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Site.MembershipView.html","title":"PlausibleWeb.Site.MembershipView","type":"module"},{"doc":"The resource name, as an atom, for this view","ref":"PlausibleWeb.Site.MembershipView.html#__resource__/0","title":"PlausibleWeb.Site.MembershipView.__resource__/0","type":"function"},{"doc":"","ref":"PlausibleWeb.Site.MembershipView.html#invite_member_form.html/1","title":"PlausibleWeb.Site.MembershipView.invite_member_form.html/1","type":"function"},{"doc":"Renders the given template locally.","ref":"PlausibleWeb.Site.MembershipView.html#render/2","title":"PlausibleWeb.Site.MembershipView.render/2","type":"function"},{"doc":"Callback invoked when no template is found. By default it raises but can be customized to render a particular template.","ref":"PlausibleWeb.Site.MembershipView.html#template_not_found/2","title":"PlausibleWeb.Site.MembershipView.template_not_found/2","type":"function"},{"doc":"","ref":"PlausibleWeb.Site.MembershipView.html#transfer_ownership_form.html/1","title":"PlausibleWeb.Site.MembershipView.transfer_ownership_form.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html","title":"PlausibleWeb.SiteController","type":"module"},{"doc":"","ref":"PlausibleWeb.SiteController.html#add_monthly_report_recipient/2","title":"PlausibleWeb.SiteController.add_monthly_report_recipient/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#add_snippet/2","title":"PlausibleWeb.SiteController.add_snippet/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#add_snippet_after_domain_change/2","title":"PlausibleWeb.SiteController.add_snippet_after_domain_change/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#add_spike_notification_recipient/2","title":"PlausibleWeb.SiteController.add_spike_notification_recipient/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#add_weekly_report_recipient/2","title":"PlausibleWeb.SiteController.add_weekly_report_recipient/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#change_domain/2","title":"PlausibleWeb.SiteController.change_domain/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#change_domain_submit/2","title":"PlausibleWeb.SiteController.change_domain_submit/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#create_goal/2","title":"PlausibleWeb.SiteController.create_goal/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#create_shared_link/2","title":"PlausibleWeb.SiteController.create_shared_link/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#create_site/2","title":"PlausibleWeb.SiteController.create_site/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#delete_custom_domain/2","title":"PlausibleWeb.SiteController.delete_custom_domain/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#delete_goal/2","title":"PlausibleWeb.SiteController.delete_goal/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#delete_google_auth/2","title":"PlausibleWeb.SiteController.delete_google_auth/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#delete_shared_link/2","title":"PlausibleWeb.SiteController.delete_shared_link/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#delete_site/2","title":"PlausibleWeb.SiteController.delete_site/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#disable_monthly_report/2","title":"PlausibleWeb.SiteController.disable_monthly_report/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#disable_spike_notification/2","title":"PlausibleWeb.SiteController.disable_spike_notification/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#disable_weekly_report/2","title":"PlausibleWeb.SiteController.disable_weekly_report/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#edit_shared_link/2","title":"PlausibleWeb.SiteController.edit_shared_link/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#enable_monthly_report/2","title":"PlausibleWeb.SiteController.enable_monthly_report/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#enable_spike_notification/2","title":"PlausibleWeb.SiteController.enable_spike_notification/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#enable_weekly_report/2","title":"PlausibleWeb.SiteController.enable_weekly_report/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#forget_imported/2","title":"PlausibleWeb.SiteController.forget_imported/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#import_from_google/2","title":"PlausibleWeb.SiteController.import_from_google/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#import_from_google_confirm/2","title":"PlausibleWeb.SiteController.import_from_google_confirm/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#import_from_google_user_metric_notice/2","title":"PlausibleWeb.SiteController.import_from_google_user_metric_notice/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#import_from_google_view_id/2","title":"PlausibleWeb.SiteController.import_from_google_view_id/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#import_from_google_view_id_form/2","title":"PlausibleWeb.SiteController.import_from_google_view_id_form/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#index/2","title":"PlausibleWeb.SiteController.index/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#make_private/2","title":"PlausibleWeb.SiteController.make_private/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#make_public/2","title":"PlausibleWeb.SiteController.make_public/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#new/2","title":"PlausibleWeb.SiteController.new/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#new_goal/2","title":"PlausibleWeb.SiteController.new_goal/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#new_shared_link/2","title":"PlausibleWeb.SiteController.new_shared_link/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#remove_monthly_report_recipient/2","title":"PlausibleWeb.SiteController.remove_monthly_report_recipient/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#remove_spike_notification_recipient/2","title":"PlausibleWeb.SiteController.remove_spike_notification_recipient/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#remove_weekly_report_recipient/2","title":"PlausibleWeb.SiteController.remove_weekly_report_recipient/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#reset_stats/2","title":"PlausibleWeb.SiteController.reset_stats/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#settings/2","title":"PlausibleWeb.SiteController.settings/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#settings_custom_domain/2","title":"PlausibleWeb.SiteController.settings_custom_domain/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#settings_danger_zone/2","title":"PlausibleWeb.SiteController.settings_danger_zone/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#settings_email_reports/2","title":"PlausibleWeb.SiteController.settings_email_reports/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#settings_funnels/2","title":"PlausibleWeb.SiteController.settings_funnels/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#settings_general/2","title":"PlausibleWeb.SiteController.settings_general/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#settings_goals/2","title":"PlausibleWeb.SiteController.settings_goals/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#settings_people/2","title":"PlausibleWeb.SiteController.settings_people/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#settings_search_console/2","title":"PlausibleWeb.SiteController.settings_search_console/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#settings_visibility/2","title":"PlausibleWeb.SiteController.settings_visibility/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#update_feature_visibility/2","title":"PlausibleWeb.SiteController.update_feature_visibility/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#update_google_auth/2","title":"PlausibleWeb.SiteController.update_google_auth/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#update_settings/2","title":"PlausibleWeb.SiteController.update_settings/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#update_shared_link/2","title":"PlausibleWeb.SiteController.update_shared_link/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteController.html#update_spike_notification/2","title":"PlausibleWeb.SiteController.update_spike_notification/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html","title":"PlausibleWeb.SiteView","type":"module"},{"doc":"The resource name, as an atom, for this view","ref":"PlausibleWeb.SiteView.html#__resource__/0","title":"PlausibleWeb.SiteView.__resource__/0","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#base_domain/0","title":"PlausibleWeb.SiteView.base_domain/0","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#change_domain.html/1","title":"PlausibleWeb.SiteView.change_domain.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#edit_shared_link.html/1","title":"PlausibleWeb.SiteView.edit_shared_link.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#goal_name/1","title":"PlausibleWeb.SiteView.goal_name/1","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#google_logo/1","title":"PlausibleWeb.SiteView.google_logo/1","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#gravatar/2","title":"PlausibleWeb.SiteView.gravatar/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#import_from_google_confirm.html/1","title":"PlausibleWeb.SiteView.import_from_google_confirm.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#import_from_google_user_metric_form.html/1","title":"PlausibleWeb.SiteView.import_from_google_user_metric_form.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#import_from_google_view_id_form.html/1","title":"PlausibleWeb.SiteView.import_from_google_view_id_form.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#index.html/1","title":"PlausibleWeb.SiteView.index.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#new.html/1","title":"PlausibleWeb.SiteView.new.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#new_goal.html/1","title":"PlausibleWeb.SiteView.new_goal.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#new_shared_link.html/1","title":"PlausibleWeb.SiteView.new_shared_link.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#plausible_url/0","title":"PlausibleWeb.SiteView.plausible_url/0","type":"function"},{"doc":"Renders the given template locally.","ref":"PlausibleWeb.SiteView.html#render/2","title":"PlausibleWeb.SiteView.render/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#render_snippet/1","title":"PlausibleWeb.SiteView.render_snippet/1","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#settings_custom_domain.html/1","title":"PlausibleWeb.SiteView.settings_custom_domain.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#settings_danger_zone.html/1","title":"PlausibleWeb.SiteView.settings_danger_zone.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#settings_email_reports.html/1","title":"PlausibleWeb.SiteView.settings_email_reports.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#settings_funnels.html/1","title":"PlausibleWeb.SiteView.settings_funnels.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#settings_general.html/1","title":"PlausibleWeb.SiteView.settings_general.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#settings_goals.html/1","title":"PlausibleWeb.SiteView.settings_goals.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#settings_people.html/1","title":"PlausibleWeb.SiteView.settings_people.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#settings_search_console.html/1","title":"PlausibleWeb.SiteView.settings_search_console.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#settings_visibility.html/1","title":"PlausibleWeb.SiteView.settings_visibility.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#shared_link_dest/2","title":"PlausibleWeb.SiteView.shared_link_dest/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#snippet.html/1","title":"PlausibleWeb.SiteView.snippet.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#snippet_after_domain_change.html/1","title":"PlausibleWeb.SiteView.snippet_after_domain_change.html/1","type":"function"},{"doc":"Callback invoked when no template is found. By default it raises but can be customized to render a particular template.","ref":"PlausibleWeb.SiteView.html#template_not_found/2","title":"PlausibleWeb.SiteView.template_not_found/2","type":"function"},{"doc":"","ref":"PlausibleWeb.SiteView.html#with_indefinite_article/1","title":"PlausibleWeb.SiteView.with_indefinite_article/1","type":"function"},{"doc":"This controller is responsible for rendering stats dashboards. The stats dashboards are currently the only part of the app that uses client-side rendering. Since the dashboards are heavily interactive, they are built with React which is an appropriate choice for highly interactive browser UIs. sequenceDiagram Browser->>StatsController: GET /mydomain.com StatsController-->>Browser: StatsView.render(\"stats.html\") Note left of Browser: ReactDom.render(Dashboard) Browser -) Api.StatsController: GET /api/stats/mydomain.com/top-stats Api.StatsController --) Browser: {\"top_stats\": [...]} Note left of Browser: TopStats.render() Browser -) Api.StatsController: GET /api/stats/mydomain.com/main-graph Api.StatsController --) Browser: [{\"plot\": [...], \"labels\": [...]}, ...] Note left of Browser: VisitorGraph.render() Browser -) Api.StatsController: GET /api/stats/mydomain.com/sources Api.StatsController --) Browser: [{\"name\": \"Google\", \"visitors\": 292150}, ...] Note left of Browser: Sources.render() Note over Browser,StatsController: And so on, for all reports in the viewport This reasoning for this sequence is as follows: First paint is fast because it doesn't do any data aggregation yet - good UX The basic structure of the dashboard is rendered with spinners before reports are ready - good UX Rendering on the frontend allows for maximum interactivity. Re-rendering and re-fetching can be as granular as needed. Routing on the frontend allows the user to navigate the dashboard without reloading the page and losing context Rendering on the frontend allows caching results in the browser to reduce pressure on backends and storage 3.1 No client-side caching has been implemented yet. This is still theoretical. See https://github.com/plausible/analytics/discussions/1278 3.2 This is a big potential opportunity, because analytics data is mostly immutable. Clients can cache all historical data. Since frontend rendering & navigation is harder to build and maintain than regular server-rendered HTML, we don't use SPA-style rendering anywhere else .The only place currently where the benefits outweigh the costs is the dashboard.","ref":"PlausibleWeb.StatsController.html","title":"PlausibleWeb.StatsController","type":"module"},{"doc":"","ref":"PlausibleWeb.StatsController.html#authenticate_shared_link/2","title":"PlausibleWeb.StatsController.authenticate_shared_link/2","type":"function"},{"doc":"The export is limited to 300 entries for other reports and 100 entries for pages because bigger result sets start causing failures. Since we request data like time on page or bounce_rate for pages in a separate query using the IN filter, it causes the requests to balloon in payload size.","ref":"PlausibleWeb.StatsController.html#csv_export/2","title":"PlausibleWeb.StatsController.csv_export/2","type":"function"},{"doc":"Authorizes and renders a shared link: Shared link with no password protection: needs to just make sure the shared link entry is still in our database. This check makes sure shared link access can be revoked by the site admins. If the shared link exists, render it directly. Shared link with password protection: Same checks as without the password, but an extra step is taken to protect the page with a password. When the user passes the password challenge, a cookie is set with Plausible.Auth.Token.sign_shared_link(). The cookie allows the user to access the dashboard for 24 hours without entering the password again. ### Backwards compatibility The URL format for shared links was changed in this pull request in order to make the URLs easier to bookmark. The old format is supported along with the new in order to not break old links. See: https://plausible.io/docs/shared-links","ref":"PlausibleWeb.StatsController.html#shared_link/2","title":"PlausibleWeb.StatsController.shared_link/2","type":"function"},{"doc":"","ref":"PlausibleWeb.StatsController.html#stats/2","title":"PlausibleWeb.StatsController.stats/2","type":"function"},{"doc":"","ref":"PlausibleWeb.StatsView.html","title":"PlausibleWeb.StatsView","type":"module"},{"doc":"The resource name, as an atom, for this view","ref":"PlausibleWeb.StatsView.html#__resource__/0","title":"PlausibleWeb.StatsView.__resource__/0","type":"function"},{"doc":"","ref":"PlausibleWeb.StatsView.html#base_domain/0","title":"PlausibleWeb.StatsView.base_domain/0","type":"function"},{"doc":"","ref":"PlausibleWeb.StatsView.html#large_number_format/1","title":"PlausibleWeb.StatsView.large_number_format/1","type":"function"},{"doc":"","ref":"PlausibleWeb.StatsView.html#plausible_url/0","title":"PlausibleWeb.StatsView.plausible_url/0","type":"function"},{"doc":"Returns a readable stats URL. Native Phoenix router functions percent-encode all diacritics, resulting in ugly URLs, e.g. https://plausible.io/café.com transforms into https://plausible.io/caf%C3%A9.com . This function encodes only the slash ( / ) character from the site's domain. Examples iex> PlausibleWeb.StatsView.pretty_stats_url(%Plausible.Site{domain: "user.gittea.io/repo"}) " http://localhost:8000/user.gittea.io%2Frepo" iex> PlausibleWeb.StatsView.pretty_stats_url(%Plausible.Site{domain: "anakin.test"}) " http://localhost:8000/anakin.test" iex> PlausibleWeb.StatsView.pretty_stats_url(%Plausible.Site{domain: "café.test"}) " http://localhost:8000/café.test"","ref":"PlausibleWeb.StatsView.html#pretty_stats_url/1","title":"PlausibleWeb.StatsView.pretty_stats_url/1","type":"function"},{"doc":"Renders the given template locally.","ref":"PlausibleWeb.StatsView.html#render/2","title":"PlausibleWeb.StatsView.render/2","type":"function"},{"doc":"","ref":"PlausibleWeb.StatsView.html#shared_link_password.html/1","title":"PlausibleWeb.StatsView.shared_link_password.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.StatsView.html#site_locked.html/1","title":"PlausibleWeb.StatsView.site_locked.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.StatsView.html#stats.html/1","title":"PlausibleWeb.StatsView.stats.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.StatsView.html#stats_container_class/1","title":"PlausibleWeb.StatsView.stats_container_class/1","type":"function"},{"doc":"Callback invoked when no template is found. By default it raises but can be customized to render a particular template.","ref":"PlausibleWeb.StatsView.html#template_not_found/2","title":"PlausibleWeb.StatsView.template_not_found/2","type":"function"},{"doc":"","ref":"PlausibleWeb.StatsView.html#waiting_first_pageview.html/1","title":"PlausibleWeb.StatsView.waiting_first_pageview.html/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Tracker.html","title":"PlausibleWeb.Tracker","type":"module"},{"doc":"","ref":"PlausibleWeb.Tracker.html#call/2","title":"PlausibleWeb.Tracker.call/2","type":"function"},{"doc":"Returns a specification to start this module under a supervisor. See Supervisor .","ref":"PlausibleWeb.Tracker.html#child_spec/1","title":"PlausibleWeb.Tracker.child_spec/1","type":"function"},{"doc":"","ref":"PlausibleWeb.Tracker.html#init/1","title":"PlausibleWeb.Tracker.init/1","type":"function"},{"doc":"","ref":"PlausibleWeb.UnsubscribeController.html","title":"PlausibleWeb.UnsubscribeController","type":"module"},{"doc":"","ref":"PlausibleWeb.UnsubscribeController.html#monthly_report/2","title":"PlausibleWeb.UnsubscribeController.monthly_report/2","type":"function"},{"doc":"","ref":"PlausibleWeb.UnsubscribeController.html#weekly_report/2","title":"PlausibleWeb.UnsubscribeController.weekly_report/2","type":"function"},{"doc":"","ref":"PlausibleWeb.UnsubscribeView.html","title":"PlausibleWeb.UnsubscribeView","type":"module"},{"doc":"The resource name, as an atom, for this view","ref":"PlausibleWeb.UnsubscribeView.html#__resource__/0","title":"PlausibleWeb.UnsubscribeView.__resource__/0","type":"function"},{"doc":"Renders the given template locally.","ref":"PlausibleWeb.UnsubscribeView.html#render/2","title":"PlausibleWeb.UnsubscribeView.render/2","type":"function"},{"doc":"","ref":"PlausibleWeb.UnsubscribeView.html#success.html/1","title":"PlausibleWeb.UnsubscribeView.success.html/1","type":"function"},{"doc":"Callback invoked when no template is found. By default it raises but can be customized to render a particular template.","ref":"PlausibleWeb.UnsubscribeView.html#template_not_found/2","title":"PlausibleWeb.UnsubscribeView.template_not_found/2","type":"function"},{"doc":"Simple Metrics | Lightweight Script | Privacy Focused | Open Source | Docs | Contributing Plausible Analytics is a simple, lightweight (< 1 KB), open source and privacy-friendly alternative to Google Analytics. It doesn’t use cookies and is fully compliant with GDPR, CCPA and PECR. You can self-host or have us run Plausible for you in the cloud. Here's the live demo of our own website stats . Made and hosted in the EU 🇪🇺 We are dedicated to making web analytics more privacy-friendly. Our mission is to reduce corporate surveillance by providing an alternative web analytics tool which doesn’t come from the AdTech world. We are completely independent and solely funded by our subscribers.","ref":"readme.html","title":"Introduction","type":"extras"},{"doc":"Here's what makes Plausible a great Google Analytics alternative and why we're trusted by thousands of paying subscribers to deliver their website and business insights: Clutter Free : Plausible Analytics provides simple web analytics and it cuts through the noise. No layers of menus, no need for custom reports. Get all the important insights on one single page. No training necessary. GDPR/CCPA/PECR compliant : Measure traffic, not individuals. No personal data or IP addresses are ever stored in our database. We don't use cookies or any other persistent identifiers. Read more about our data policy Lightweight : Plausible Analytics works by loading a script on your website, like Google Analytics. Our script is 45x smaller , making your website quicker to load. Email or Slack reports : Keep an eye on your traffic with weekly and/or monthly email or Slack reports. You can also get traffic spike notifications. Open website stats : You have the option to be transparent and open your web analytics to everyone. Your website stats are private by default but you can choose to make them public so anyone with your custom link can view them. Define key goals and track conversions : Set custom events or page URLs as your goals and see how they convert over time to understand and identify the trends that matter. Includes easy ways to track outbound link clicks and 404 error pages. Search keywords : Integrate your dashboard with Google Search Console to get the most accurate reporting on your search keywords. SPA support : Plausible is built with modern web frameworks in mind and it works automatically with any pushState based router on the frontend. We also support frameworks that use the URL hash for routing. See our documentation . Interested to learn more? Read more on our website , learn more about the team and the goals of the project on our about page or explore the documentation .","ref":"readme.html#why-plausible","title":"Introduction - Why Plausible?","type":"extras"},{"doc":"Plausible Analytics is an independently owned and actively developed project. To keep the project development going, to stay in business, to continue putting effort into building a better product and to cover our costs, we need to charge a fee. Google Analytics is free because Google has built their company and their wealth by collecting and analyzing huge amounts of personal information from web users and using these personal and behavioral insights to sell advertisements. Plausible has no part in that business model. No personal data is being collected and analyzed either. With Plausible, you 100% own and control all of your website data. This data is not being shared with or sold to any third-parties. We choose the subscription business model rather than the business model of surveillance capitalism. See reasons why we believe you should stop using Google Analytics on your website .","ref":"readme.html#why-is-plausible-analytics-cloud-not-free-like-google-analytics","title":"Introduction - Why is Plausible Analytics Cloud not free like Google Analytics?","type":"extras"},{"doc":"The easiest way to get started with Plausible is with our official managed service in the cloud . It takes 2 minutes to start counting your stats with a worldwide CDN, high availability, backups, security and maintenance all done for you by us. In order to be compliant with the GDPR and the Schrems II ruling, all visitor data for our managed service in the cloud is exclusively processed on servers and cloud infrastructure owned and operated by European providers. Your website data never leaves the EU. Our managed hosting can save a substantial amount of developer time and resources. For most sites this ends up being the best value option and the revenue goes to funding the maintenance and further development of Plausible. So you’ll be supporting open source software and getting a great service! Can Plausible Analytics be self-hosted? Plausible is fully open source web analytics and we have a free as in beer Plausible Analytics Self-Hosted solution. It’s exactly the same product as our cloud solution with a less frequent release schedule (think of it as a long term support release). Bug fixes and new features are released to the cloud version several times per week. Features are battle-tested in the cloud which allows us to fix any bugs before the general self-hosted release. Every six months or so we combine all the changes into a new self-hosted release. The main difference between the two is that the self-hosted version you have to install, host and manage yourself on your own infrastructure while the cloud version we manage everything for your ease and convenience. Here's the overview of all the differences: Plausible Cloud Self-Hosting Hosting Easy and convenient. It takes 2 minutes to start counting your stats with a worldwide CDN, high availability, backups, security and maintenance all done for you by us. We manage everything so you don’t have to worry about anything and can focus on your stats. You do it all yourself. You need to get a server and you need to manage your infrastructure. You are responsible for installation, maintenance, upgrades, server capacity, uptime, backup, security, stability, consistency, loading time and so on. Storage All visitor data is exclusively processed on EU-owned cloud infrastructure. We keep your site data on a secure, encrypted and green energy powered server in Germany. This ensures that your site data is protected by the strict European Union data privacy laws and ensures compliance with GDPR. Your website data never leaves the EU. You have full control and can host your instance on any server in any country that you wish. Host it on a server in your basement or host it with any cloud provider wherever you want, even those that are not GDPR compliant. Releases Continuously developed and improved with new features and updates multiple times per week. It's a long term release published approximately twice per year so latest features won't be immediately available. You can see all the currently unreleased features in the changelog . Raw data You see all your site stats and metrics on our modern-looking, simple to use and fast loading dashboard. You can only see the stats aggregated in the dashboard. You can download the stats using the CSV export , stats API or tools such as the Data Studio Connector . Do you want access to the raw data? Self-hosting gives you that option. You can take the data directly from the ClickHouse database. Premium Support Real support delivered by real human beings who build and maintain Plausible. Premium support is not included. Self-hosting is community supported only. Costs There's a cost associated with providing an analytics service so we charge a subscription fee. We choose the subscription business model rather than the business model of surveillance capitalism. Your money funds further development of Plausible. You need to pay for your server, CDN, backups and whatever other cost there is associated with running the infrastructure. You never have to pay any fees to us. Your money goes to 3rd party companies with no connection to us. Interested in self-hosting Plausible on your server? Take a look at our self-hosting installation instructions . Plausible Self-Hosted is a community supported project and there are no guarantees that you will get support from the creators of Plausible to troubleshoot your self-hosting issues. There is a community supported forum where you can ask for help. Our only source of funding is our premium, managed service for running Plausible in the cloud. If you're looking for an alternative way to support the project, we've put together some sponsorship packages. If you choose to self-host Plausible you can become a sponsor which is a great way to give back to the community and to contribute to the long-term sustainability of the project.","ref":"readme.html#getting-started-with-plausible","title":"Introduction - Getting started with Plausible","type":"extras"},{"doc":"Plausible Analytics is a standard Elixir/Phoenix application backed by a PostgreSQL database for general data and a Clickhouse database for stats. On the frontend we use TailwindCSS for styling and React to make the dashboard interactive.","ref":"readme.html#technology","title":"Introduction - Technology","type":"extras"},{"doc":"For anyone wishing to contribute to Plausible, we recommend taking a look at our contributor guide .","ref":"readme.html#contributors","title":"Introduction - Contributors","type":"extras"},{"doc":"We welcome feedback from our community. We have a public roadmap driven by the features suggested by the community members. Take a look at our feedback board directly here on GitHub. Please let us know if you have any requests and vote on open issues so we can better prioritize. To stay up to date with all the latest news and product updates, make sure to follow us on Twitter , LinkedIn or Mastodon .","ref":"readme.html#feedback-roadmap","title":"Introduction - Feedback & Roadmap","type":"extras"},{"doc":"Plausible is open-source under the GNU Affero General Public License Version 3 (AGPLv3) or any later version. You can find it here . The only exception is our JavaScript tracker which gets included on your website. To avoid issues with AGPL virality, we've released the tracker under the MIT license. You can find it here .","ref":"readme.html#license","title":"Introduction - License","type":"extras"},{"doc":"We welcome everyone to contribute to Plausible. This document is to help you on setting up your environment, finding a task, and opening pull requests.","ref":"contributing.html","title":"Contributing","type":"extras"},{"doc":"The easiest way to get up and running is to install and use Docker for running both Postgres and Clickhouse. Make sure Docker, Elixir, Erlang and Node.js are all installed on your development machine. The .tool-versions file is available to use with asdf or similar tools. Start the environment Run both make postgres and make clickhouse . You can set up everything with make install , alternatively run each command separately: Run mix deps.get . This will download the required Elixir dependencies. Run mix ecto.create . This will create the required databases in both Postgres and Clickhouse. Run mix ecto.migrate to build the database schema. Run mix run priv/repo/seeds.exs to seed the database. Check the Seeds section for more. Run npm ci --prefix assets to install the required client-side dependencies. Run npm ci --prefix tracker to install the required tracker dependencies. Run npm run deploy --prefix tracker to generate tracker files in priv/tracker/js Run mix download_country_database to fetch geolocation database Run make server or mix phx.server to start the Phoenix server. The system is now available on localhost:8000 . Seeds You can optionally seed your database to automatically create an account and a site with stats: Run mix run priv/repo/seeds.exs to seed the database. Start the server with make server and navigate to http://localhost:8000/login . Log in with the following e-mail and password combination: user@plausible.test and plausible . You should now have a dummy.site site with generated stats. Alternatively, you can manually create a new account: Navigate to http://localhost:8000/register and fill in the form. Fill in the rest of the forms and for the domain use dummy.site Skip the JS snippet and click start collecting data. Run mix send_pageview from the terminal to generate a fake pageview event for the dummy site. You should now be all set! Stopping Docker containers Stop and remove the Postgres container with make postgres-stop . Stop and remove the Clickhouse container with make clickhouse-stop . Volumes are preserved. You'll find that the Postgres and Clickhouse state are retained when you bring them up again the next time: no need to re-register and so on. Note: Since we are deleting the containers, be careful when deleting volumes with docker volume prune . You might accidentally delete the database and would have to go through re-registration process. Pre-commit hooks pre-commit requires Python to be available locally and covers Elixir, JavaScript, and CSS. Set up with pip install --user pre-commit followed by pre-commit install . Conversely, if the prompts are far too bothersome, remove with pre-commit uninstall .","ref":"contributing.html#development-setup","title":"Contributing - Development setup","type":"extras"},{"doc":"Bugs can be found in our issue tracker . Issues are usually up for grabs. New features need to be discussed with the core team and the community first. If you're tackling a feature, please make sure it has been already discussed in the Discussions tab . We kindly ask contributors to use the discussion comment section to propose a solution before opening a pull request. Pull requests without an associated issue or discussion may still be merged, but we will focus on changes that have already been talked through.","ref":"contributing.html#finding-a-task","title":"Contributing - Finding a task","type":"extras"},{"doc":"This document explains the account locking feature from a technical perspective. Account locking happens when users have outgrown their accounts, and despite e-mail and dashboard alerts, don't upgrade after a grace period.","ref":"account-locking.html","title":"Account locking","type":"extras"},{"doc":"The Plausible.Workers.CheckUsage daily background job alerts users they have reached their subscription limits. This runs for outgrown users one day after their last billing date. When users reach the number of sites limit, or use >110% of their pageview limit for 2 consecutive billing cycles, the background job sends them an e-mail alert. The e-mail suggests a suitable subscription plan based on usage. For enterprise users, only an internal e-mail is sent to enterprise@plausible.io . The user is given 7 days to upgrade their account after the alert, and this is called grace period. The background starts this grace period by adding a users.grace_period JSON to the user record: // SELECT grace_period FROM users LIMIT 1 { "id": "1aa855bd-022d-4dfc-b572-6853442c3f19", "is_over": true, "end_date": "2022-03-09", "allowance_required": 100, "manual_lock": false } During this period, the following alert pops up on the dashboard for both standard and enterprise users: If the user upgrades to a suitable plan, the grace period is removed (check Plausible.Billing.subscription_updated/1 ), otherwise Account locking ) follows. For enterprise users, the grace period has a manual lock flag set to true, meaning enterprise accounts can only be locked/unlocked through the internal CRM.","ref":"account-locking.html#usage-alert-and-grace-period","title":"Account locking - Usage alert and grace period","type":"extras"},{"doc":"The grace period is checked daily by the Plausible.Workers.LockSites background job. For users that expired their grace period, sites.locked is is set to true , restricting access to dashboards. This does not stop event ingestion, so users can have their stats up to date when they finally upgrade.","ref":"account-locking.html#account-locking","title":"Account locking - Account locking","type":"extras"}] \ No newline at end of file diff --git a/dist/sidebar_items-3D6C76A3.js b/dist/sidebar_items-3D6C76A3.js new file mode 100644 index 000000000..29415da7d --- /dev/null +++ b/dist/sidebar_items-3D6C76A3.js @@ -0,0 +1 @@ +sidebarNodes={"extras":[{"group":"","headers":[{"anchor":"modules","id":"Modules"},{"anchor":"mix-tasks","id":"Mix Tasks"}],"id":"api-reference","title":"API Reference"},{"group":"","headers":[{"anchor":"why-plausible","id":"Why Plausible?"},{"anchor":"why-is-plausible-analytics-cloud-not-free-like-google-analytics","id":"Why is Plausible Analytics Cloud not free like Google Analytics?"},{"anchor":"getting-started-with-plausible","id":"Getting started with Plausible"},{"anchor":"technology","id":"Technology"},{"anchor":"contributors","id":"Contributors"},{"anchor":"feedback-roadmap","id":"Feedback & Roadmap"},{"anchor":"license","id":"License"}],"id":"readme","title":"Introduction"},{"group":"","headers":[{"anchor":"development-setup","id":"Development setup"},{"anchor":"finding-a-task","id":"Finding a task"}],"id":"contributing","title":"Contributing"},{"group":"Features","headers":[{"anchor":"usage-alert-and-grace-period","id":"Usage alert and grace period"},{"anchor":"account-locking","id":"Account locking"}],"id":"account-locking","title":"Account locking"}],"modules":[{"group":"","id":"ObanErrorReporter","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"handle_event/4","id":"handle_event/4","title":"handle_event(list, measure, meta, _)"}]}],"sections":[],"title":"ObanErrorReporter"},{"group":"","id":"Plausible","sections":[],"title":"Plausible"},{"group":"","id":"Plausible.AsyncInsertRepo","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"aggregate/3","id":"aggregate/3","title":"aggregate(queryable, aggregate, opts \\\\ [])"},{"anchor":"aggregate/4","id":"aggregate/4","title":"aggregate(queryable, aggregate, field, opts)"},{"anchor":"all/2","id":"all/2","title":"all(queryable, opts \\\\ [])"},{"anchor":"checked_out?/0","id":"checked_out?/0","title":"checked_out?()"},{"anchor":"checkout/2","id":"checkout/2","title":"checkout(fun, opts \\\\ [])"},{"anchor":"child_spec/1","id":"child_spec/1","title":"child_spec(opts)"},{"anchor":"config/0","id":"config/0","title":"config()"},{"anchor":"default_options/1","id":"default_options/1","title":"default_options(operation)"},{"anchor":"delete/2","id":"delete/2","title":"delete(struct, opts \\\\ [])"},{"anchor":"delete!/2","id":"delete!/2","title":"delete!(struct, opts \\\\ [])"},{"anchor":"delete_all/2","id":"delete_all/2","title":"delete_all(queryable, opts \\\\ [])"},{"anchor":"disconnect_all/2","id":"disconnect_all/2","title":"disconnect_all(interval, opts \\\\ [])"},{"anchor":"exists?/2","id":"exists?/2","title":"exists?(queryable, opts \\\\ [])"},{"anchor":"get/3","id":"get/3","title":"get(queryable, id, opts \\\\ [])"},{"anchor":"get!/3","id":"get!/3","title":"get!(queryable, id, opts \\\\ [])"},{"anchor":"get_by/3","id":"get_by/3","title":"get_by(queryable, clauses, opts \\\\ [])"},{"anchor":"get_by!/3","id":"get_by!/3","title":"get_by!(queryable, clauses, opts \\\\ [])"},{"anchor":"get_dynamic_repo/0","id":"get_dynamic_repo/0","title":"get_dynamic_repo()"},{"anchor":"insert/2","id":"insert/2","title":"insert(struct, opts \\\\ [])"},{"anchor":"insert!/2","id":"insert!/2","title":"insert!(struct, opts \\\\ [])"},{"anchor":"insert_all/3","id":"insert_all/3","title":"insert_all(schema_or_source, entries, opts \\\\ [])"},{"anchor":"insert_or_update/2","id":"insert_or_update/2","title":"insert_or_update(changeset, opts \\\\ [])"},{"anchor":"insert_or_update!/2","id":"insert_or_update!/2","title":"insert_or_update!(changeset, opts \\\\ [])"},{"anchor":"insert_stream/3","id":"insert_stream/3","title":"insert_stream(source_or_schema, rows, opts \\\\ [])"},{"anchor":"load/2","id":"load/2","title":"load(schema_or_types, data)"},{"anchor":"one/2","id":"one/2","title":"one(queryable, opts \\\\ [])"},{"anchor":"one!/2","id":"one!/2","title":"one!(queryable, opts \\\\ [])"},{"anchor":"preload/3","id":"preload/3","title":"preload(struct_or_structs_or_nil, preloads, opts \\\\ [])"},{"anchor":"prepare_query/3","id":"prepare_query/3","title":"prepare_query(operation, query, opts)"},{"anchor":"put_dynamic_repo/1","id":"put_dynamic_repo/1","title":"put_dynamic_repo(dynamic)"},{"anchor":"query/3","id":"query/3","title":"query(sql, params \\\\ [], opts \\\\ [])"},{"anchor":"query!/3","id":"query!/3","title":"query!(sql, params \\\\ [], opts \\\\ [])"},{"anchor":"reload/2","id":"reload/2","title":"reload(queryable, opts \\\\ [])"},{"anchor":"reload!/2","id":"reload!/2","title":"reload!(queryable, opts \\\\ [])"},{"anchor":"start_link/1","id":"start_link/1","title":"start_link(opts \\\\ [])"},{"anchor":"stop/1","id":"stop/1","title":"stop(timeout \\\\ 5000)"},{"anchor":"stream/2","id":"stream/2","title":"stream(queryable, opts \\\\ [])"},{"anchor":"to_sql/2","id":"to_sql/2","title":"to_sql(operation, queryable)"},{"anchor":"update/2","id":"update/2","title":"update(struct, opts \\\\ [])"},{"anchor":"update!/2","id":"update!/2","title":"update!(struct, opts \\\\ [])"},{"anchor":"update_all/3","id":"update_all/3","title":"update_all(queryable, updates, opts \\\\ [])"}]}],"sections":[],"title":"Plausible.AsyncInsertRepo"},{"group":"","id":"Plausible.Auth","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"create_user/3","id":"create_user/3","title":"create_user(name, email, pwd)"},{"anchor":"delete_user/1","id":"delete_user/1","title":"delete_user(user)"},{"anchor":"enterprise?/1","id":"enterprise?/1","title":"enterprise?(user)"},{"anchor":"find_user_by/1","id":"find_user_by/1","title":"find_user_by(opts)"},{"anchor":"has_active_sites?/2","id":"has_active_sites?/2","title":"has_active_sites?(user, roles \\\\ [:owner, :admin, :viewer])"},{"anchor":"is_super_admin?/1","id":"is_super_admin?/1","title":"is_super_admin?(user_id)"},{"anchor":"issue_email_verification/1","id":"issue_email_verification/1","title":"issue_email_verification(user)"},{"anchor":"user_owns_sites?/1","id":"user_owns_sites?/1","title":"user_owns_sites?(user)"},{"anchor":"verify_email/2","id":"verify_email/2","title":"verify_email(user, code)"}]}],"sections":[],"title":"Plausible.Auth"},{"group":"","id":"Plausible.Auth.ApiKey","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"changeset/2","id":"changeset/2","title":"changeset(schema, attrs \\\\ %{})"},{"anchor":"do_hash/1","id":"do_hash/1","title":"do_hash(key)"},{"anchor":"process_key/1","id":"process_key/1","title":"process_key(changeset)"},{"anchor":"update/2","id":"update/2","title":"update(schema, attrs \\\\ %{})"}]}],"sections":[],"title":"Plausible.Auth.ApiKey"},{"group":"","id":"Plausible.Auth.ApiKeyAdmin","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"create_changeset/2","id":"create_changeset/2","title":"create_changeset(schema, attrs)"},{"anchor":"custom_index_query/3","id":"custom_index_query/3","title":"custom_index_query(conn, schema, query)"},{"anchor":"form_fields/1","id":"form_fields/1","title":"form_fields(_)"},{"anchor":"index/1","id":"index/1","title":"index(_)"},{"anchor":"search_fields/1","id":"search_fields/1","title":"search_fields(schema)"},{"anchor":"update_changeset/2","id":"update_changeset/2","title":"update_changeset(schema, attrs)"}]}],"sections":[],"title":"Plausible.Auth.ApiKeyAdmin"},{"group":"","id":"Plausible.Auth.GracePeriod","nodeGroups":[{"key":"types","name":"Types","nodes":[{"anchor":"t:t/0","id":"t/0","title":"t()"}]},{"key":"functions","name":"Functions","nodes":[{"anchor":"active?/1","id":"active?/1","title":"active?(user)"},{"anchor":"end_changeset/1","id":"end_changeset/1","title":"end_changeset(user)"},{"anchor":"expired?/1","id":"expired?/1","title":"expired?(user)"},{"anchor":"remove_changeset/1","id":"remove_changeset/1","title":"remove_changeset(user)"},{"anchor":"start_changeset/2","id":"start_changeset/2","title":"start_changeset(user, allowance_required)"},{"anchor":"start_manual_lock_changeset/2","id":"start_manual_lock_changeset/2","title":"start_manual_lock_changeset(user, allowance_required)"}]}],"sections":[],"title":"Plausible.Auth.GracePeriod"},{"group":"","id":"Plausible.Auth.Invitation","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"new/1","id":"new/1","title":"new(attrs \\\\ %{})"}]}],"sections":[],"title":"Plausible.Auth.Invitation"},{"group":"","id":"Plausible.Auth.Password","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"dummy_calculation/0","id":"dummy_calculation/0","title":"dummy_calculation()"},{"anchor":"hash/1","id":"hash/1","title":"hash(password)"},{"anchor":"match?/2","id":"match?/2","title":"match?(password, hash)"}]}],"sections":[],"title":"Plausible.Auth.Password"},{"group":"","id":"Plausible.Auth.Token","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"sign_password_reset/1","id":"sign_password_reset/1","title":"sign_password_reset(email)"},{"anchor":"sign_shared_link/1","id":"sign_shared_link/1","title":"sign_shared_link(slug)"},{"anchor":"verify_password_reset/1","id":"verify_password_reset/1","title":"verify_password_reset(token)"},{"anchor":"verify_shared_link/1","id":"verify_shared_link/1","title":"verify_shared_link(token)"}]}],"sections":[],"title":"Plausible.Auth.Token"},{"group":"","id":"Plausible.Auth.User","nodeGroups":[{"key":"types","name":"Types","nodes":[{"anchor":"t:t/0","id":"t/0","title":"t()"}]},{"key":"functions","name":"Functions","nodes":[{"anchor":"changeset/2","id":"changeset/2","title":"changeset(user, attrs \\\\ %{})"},{"anchor":"end_trial/1","id":"end_trial/1","title":"end_trial(user)"},{"anchor":"hash_password/1","id":"hash_password/1","title":"hash_password(changeset)"},{"anchor":"new/1","id":"new/1","title":"new(attrs \\\\ %{})"},{"anchor":"remove_trial_expiry/1","id":"remove_trial_expiry/1","title":"remove_trial_expiry(user)"},{"anchor":"set_password/2","id":"set_password/2","title":"set_password(user, password)"},{"anchor":"start_trial/1","id":"start_trial/1","title":"start_trial(user)"}]}],"sections":[],"title":"Plausible.Auth.User"},{"group":"","id":"Plausible.Auth.UserAdmin","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"custom_index_query/3","id":"custom_index_query/3","title":"custom_index_query(conn, schema, query)"},{"anchor":"form_fields/1","id":"form_fields/1","title":"form_fields(_)"},{"anchor":"index/1","id":"index/1","title":"index(_)"},{"anchor":"resource_actions/1","id":"resource_actions/1","title":"resource_actions(_)"}]}],"sections":[],"title":"Plausible.Auth.UserAdmin"},{"group":"","id":"Plausible.Billing","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"active_subscription_for/1","id":"active_subscription_for/1","title":"active_subscription_for(user_id)"},{"anchor":"change_plan/2","id":"change_plan/2","title":"change_plan(user, new_plan_id)"},{"anchor":"change_plan_preview/2","id":"change_plan_preview/2","title":"change_plan_preview(subscription, new_plan_id)"},{"anchor":"has_active_subscription?/1","id":"has_active_subscription?/1","title":"has_active_subscription?(user_id)"},{"anchor":"last_two_billing_cycles/2","id":"last_two_billing_cycles/2","title":"last_two_billing_cycles(user, today \\\\ Timex.today())"},{"anchor":"last_two_billing_months_usage/2","id":"last_two_billing_months_usage/2","title":"last_two_billing_months_usage(user, today \\\\ Timex.today())"},{"anchor":"needs_to_upgrade?/1","id":"needs_to_upgrade?/1","title":"needs_to_upgrade?(user)"},{"anchor":"on_trial?/1","id":"on_trial?/1","title":"on_trial?(user)"},{"anchor":"paddle_api/0","id":"paddle_api/0","title":"paddle_api()"},{"anchor":"sites_limit/1","id":"sites_limit/1","title":"sites_limit(user)"},{"anchor":"subscription_cancelled/1","id":"subscription_cancelled/1","title":"subscription_cancelled(params)"},{"anchor":"subscription_created/1","id":"subscription_created/1","title":"subscription_created(params)"},{"anchor":"subscription_payment_succeeded/1","id":"subscription_payment_succeeded/1","title":"subscription_payment_succeeded(params)"},{"anchor":"subscription_updated/1","id":"subscription_updated/1","title":"subscription_updated(params)"},{"anchor":"trial_days_left/1","id":"trial_days_left/1","title":"trial_days_left(user)"},{"anchor":"usage/1","id":"usage/1","title":"usage(user)"},{"anchor":"usage_breakdown/1","id":"usage_breakdown/1","title":"usage_breakdown(user)"}]}],"sections":[],"title":"Plausible.Billing"},{"group":"","id":"Plausible.Billing.EnterprisePlan","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"changeset/2","id":"changeset/2","title":"changeset(model, attrs \\\\ %{})"}]}],"sections":[],"title":"Plausible.Billing.EnterprisePlan"},{"group":"","id":"Plausible.Billing.EnterprisePlanAdmin","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"custom_index_query/3","id":"custom_index_query/3","title":"custom_index_query(conn, schema, query)"},{"anchor":"form_fields/1","id":"form_fields/1","title":"form_fields(_)"},{"anchor":"index/1","id":"index/1","title":"index(_)"},{"anchor":"search_fields/1","id":"search_fields/1","title":"search_fields(schema)"}]}],"sections":[],"title":"Plausible.Billing.EnterprisePlanAdmin"},{"group":"","id":"Plausible.Billing.PaddleApi","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"checkout_domain/0","id":"checkout_domain/0","title":"checkout_domain()"},{"anchor":"get_invoices/1","id":"get_invoices/1","title":"get_invoices(subscription)"},{"anchor":"get_subscription/1","id":"get_subscription/1","title":"get_subscription(paddle_subscription_id)"},{"anchor":"update_subscription/2","id":"update_subscription/2","title":"update_subscription(paddle_subscription_id, params)"},{"anchor":"update_subscription_preview/2","id":"update_subscription_preview/2","title":"update_subscription_preview(paddle_subscription_id, new_plan_id)"},{"anchor":"vendors_domain/0","id":"vendors_domain/0","title":"vendors_domain()"}]}],"sections":[],"title":"Plausible.Billing.PaddleApi"},{"group":"","id":"Plausible.Billing.Plans","nodeGroups":[{"key":"types","name":"Types","nodes":[{"anchor":"t:plan/0","id":"plan/0","title":"plan()"}]},{"key":"functions","name":"Functions","nodes":[{"anchor":"all_yearly_plan_ids/0","id":"all_yearly_plan_ids/0","title":"all_yearly_plan_ids()"},{"anchor":"allowance/1","id":"allowance/1","title":"allowance(subscription)"},{"anchor":"for_product_id/1","id":"for_product_id/1","title":"for_product_id(product_id)"},{"anchor":"plans_for/1","id":"plans_for/1","title":"plans_for(user)"},{"anchor":"subscription_interval/1","id":"subscription_interval/1","title":"subscription_interval(subscription)"},{"anchor":"suggested_plan/2","id":"suggested_plan/2","title":"suggested_plan(user, usage_during_cycle)"}]}],"sections":[],"title":"Plausible.Billing.Plans"},{"group":"","id":"Plausible.Billing.SiteLocker","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"check_sites_for/1","id":"check_sites_for/1","title":"check_sites_for(user)"},{"anchor":"set_lock_status_for/2","id":"set_lock_status_for/2","title":"set_lock_status_for(user, status)"}]}],"sections":[],"title":"Plausible.Billing.SiteLocker"},{"group":"","id":"Plausible.ChangesetHelpers","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"traverse_errors/1","id":"traverse_errors/1","title":"traverse_errors(changeset)"}]}],"sections":[],"title":"Plausible.ChangesetHelpers"},{"group":"","id":"Plausible.Cldr","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"available_locale_name?/1","id":"available_locale_name?/1","title":"available_locale_name?(locale_name)"},{"anchor":"default_locale/0","id":"default_locale/0","title":"default_locale()"},{"anchor":"default_territory/0","id":"default_territory/0","title":"default_territory()"},{"anchor":"ellipsis/2","id":"ellipsis/2","title":"ellipsis(string, options \\\\ [])"},{"anchor":"get_locale/0","id":"get_locale/0","title":"get_locale()"},{"anchor":"known_calendars/0","id":"known_calendars/0","title":"known_calendars()"},{"anchor":"known_currencies/0","id":"known_currencies/0","title":"known_currencies()"},{"anchor":"known_gettext_locale_name/1","id":"known_gettext_locale_name/1","title":"known_gettext_locale_name(locale_name)"},{"anchor":"known_gettext_locale_name?/1","id":"known_gettext_locale_name?/1","title":"known_gettext_locale_name?(locale_name)"},{"anchor":"known_gettext_locale_names/0","id":"known_gettext_locale_names/0","title":"known_gettext_locale_names()"},{"anchor":"known_locale_name/1","id":"known_locale_name/1","title":"known_locale_name(locale_name)"},{"anchor":"known_locale_name?/1","id":"known_locale_name?/1","title":"known_locale_name?(locale_name)"},{"anchor":"known_locale_names/0","id":"known_locale_names/0","title":"known_locale_names()"},{"anchor":"known_number_system_types/0","id":"known_number_system_types/0","title":"known_number_system_types()"},{"anchor":"known_number_systems/0","id":"known_number_systems/0","title":"known_number_systems()"},{"anchor":"known_rbnf_locale_name/1","id":"known_rbnf_locale_name/1","title":"known_rbnf_locale_name(locale_name)"},{"anchor":"known_rbnf_locale_name?/1","id":"known_rbnf_locale_name?/1","title":"known_rbnf_locale_name?(locale_name)"},{"anchor":"known_rbnf_locale_names/0","id":"known_rbnf_locale_names/0","title":"known_rbnf_locale_names()"},{"anchor":"known_territories/0","id":"known_territories/0","title":"known_territories()"},{"anchor":"normalize_lenient_parse/3","id":"normalize_lenient_parse/3","title":"normalize_lenient_parse(string, scope, locale \\\\ get_locale())"},{"anchor":"put_locale/1","id":"put_locale/1","title":"put_locale(locale_name)"},{"anchor":"quote/2","id":"quote/2","title":"quote(string, options \\\\ [])"},{"anchor":"unknown_locale_names/0","id":"unknown_locale_names/0","title":"unknown_locale_names()"},{"anchor":"validate_calendar/1","id":"validate_calendar/1","title":"validate_calendar(calendar)"},{"anchor":"validate_currency/1","id":"validate_currency/1","title":"validate_currency(currency)"},{"anchor":"validate_locale/1","id":"validate_locale/1","title":"validate_locale(locale)"},{"anchor":"validate_number_system/1","id":"validate_number_system/1","title":"validate_number_system(number_system)"},{"anchor":"validate_number_system_type/1","id":"validate_number_system_type/1","title":"validate_number_system_type(number_system_type)"},{"anchor":"validate_territory/1","id":"validate_territory/1","title":"validate_territory(territory)"},{"anchor":"with_locale/2","id":"with_locale/2","title":"with_locale(locale, fun)"}]}],"sections":[],"title":"Plausible.Cldr"},{"group":"","id":"Plausible.Cldr.AcceptLanguage","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"best_match/1","id":"best_match/1","title":"best_match(accept_language)"},{"anchor":"parse/1","id":"parse/1","title":"parse(tokens_or_string)"},{"anchor":"parse!/1","id":"parse!/1","title":"parse!(accept_language)"}]}],"sections":[],"title":"Plausible.Cldr.AcceptLanguage"},{"group":"","id":"Plausible.Cldr.Currency","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"currencies_for_locale/3","id":"currencies_for_locale/3","title":"currencies_for_locale(locale, only \\\\ :all, except \\\\ nil)"},{"anchor":"currencies_for_locale!/3","id":"currencies_for_locale!/3","title":"currencies_for_locale!(locale, only \\\\ :all, except \\\\ nil)"},{"anchor":"currency_for_code/2","id":"currency_for_code/2","title":"currency_for_code(currency_or_currency_code, options \\\\ [locale: Plausible.Cldr.default_locale()])"},{"anchor":"currency_for_code!/2","id":"currency_for_code!/2","title":"currency_for_code!(currency_or_currency_code, options \\\\ [locale: Plausible.Cldr.default_locale()])"},{"anchor":"currency_from_locale/1","id":"currency_from_locale/1","title":"currency_from_locale(locale)"},{"anchor":"currency_history_for_locale/1","id":"currency_history_for_locale/1","title":"currency_history_for_locale(language_tag)"},{"anchor":"currency_strings/3","id":"currency_strings/3","title":"currency_strings(locale, only \\\\ :all, except \\\\ nil)"},{"anchor":"currency_strings!/3","id":"currency_strings!/3","title":"currency_strings!(locale_name, only \\\\ :all, except \\\\ nil)"},{"anchor":"current_currency_from_locale/1","id":"current_currency_from_locale/1","title":"current_currency_from_locale(locale)"},{"anchor":"current_territory_currencies/0","id":"current_territory_currencies/0","title":"current_territory_currencies()"},{"anchor":"known_currencies/0","id":"known_currencies/0","title":"known_currencies()"},{"anchor":"known_currency?/1","id":"known_currency?/1","title":"known_currency?(code)"},{"anchor":"known_currency_code/1","id":"known_currency_code/1","title":"known_currency_code(currency_code)"},{"anchor":"known_currency_code?/1","id":"known_currency_code?/1","title":"known_currency_code?(currency_code)"},{"anchor":"known_currency_codes/0","id":"known_currency_codes/0","title":"known_currency_codes()"},{"anchor":"new/2","id":"new/2","title":"new(currency, options \\\\ [])"},{"anchor":"pluralize/3","id":"pluralize/3","title":"pluralize(number, currency, options \\\\ [])"},{"anchor":"strings_for_currency/2","id":"strings_for_currency/2","title":"strings_for_currency(currency, locale)"}]}],"sections":[],"title":"Plausible.Cldr.Currency"},{"group":"","id":"Plausible.Cldr.Locale","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"fallback_locale_names/1","id":"fallback_locale_names/1","title":"fallback_locale_names(locale)"},{"anchor":"fallback_locales/1","id":"fallback_locales/1","title":"fallback_locales(locale)"},{"anchor":"locale_for_territory/1","id":"locale_for_territory/1","title":"locale_for_territory(territory)"},{"anchor":"locale_from_host/2","id":"locale_from_host/2","title":"locale_from_host(host, options \\\\ [])"},{"anchor":"new/1","id":"new/1","title":"new(locale_name)"},{"anchor":"new!/1","id":"new!/1","title":"new!(locale_name)"},{"anchor":"territory_from_host/1","id":"territory_from_host/1","title":"territory_from_host(host)"},{"anchor":"territory_from_locale/1","id":"territory_from_locale/1","title":"territory_from_locale(locale)"},{"anchor":"timezone_from_locale/1","id":"timezone_from_locale/1","title":"timezone_from_locale(locale)"}]}],"sections":[],"title":"Plausible.Cldr.Locale"},{"group":"","id":"Plausible.Cldr.Number","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"parse/2","id":"parse/2","title":"parse(string, options \\\\ [])"},{"anchor":"resolve_currencies/2","id":"resolve_currencies/2","title":"resolve_currencies(list, options \\\\ [])"},{"anchor":"resolve_currency/2","id":"resolve_currency/2","title":"resolve_currency(string, options \\\\ [])"},{"anchor":"resolve_per/2","id":"resolve_per/2","title":"resolve_per(string, options \\\\ [])"},{"anchor":"resolve_pers/2","id":"resolve_pers/2","title":"resolve_pers(list, options \\\\ [])"},{"anchor":"scan/2","id":"scan/2","title":"scan(string, options \\\\ [])"},{"anchor":"to_approx_string/2","id":"to_approx_string/2","title":"to_approx_string(number, options \\\\ [])"},{"anchor":"to_at_least_string/2","id":"to_at_least_string/2","title":"to_at_least_string(number, options \\\\ [])"},{"anchor":"to_at_most_string/2","id":"to_at_most_string/2","title":"to_at_most_string(number, options \\\\ [])"},{"anchor":"to_range_string/2","id":"to_range_string/2","title":"to_range_string(range, options \\\\ [])"},{"anchor":"to_string/2","id":"to_string/2","title":"to_string(number, options \\\\ default_options())"},{"anchor":"to_string!/2","id":"to_string!/2","title":"to_string!(number, options \\\\ default_options())"},{"anchor":"validate_number_system/2","id":"validate_number_system/2","title":"validate_number_system(locale, number_system)"}]}],"sections":[],"title":"Plausible.Cldr.Number"},{"group":"","id":"Plausible.Cldr.Number.Cardinal","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"available_locale_names/0","id":"available_locale_names/0","title":"available_locale_names()"},{"anchor":"known_locale_names/0","id":"known_locale_names/0","title":"known_locale_names()"},{"anchor":"plural_rule/3","id":"plural_rule/3","title":"plural_rule(number, locale, rounding \\\\ Math.default_rounding())"},{"anchor":"plural_rules/0","id":"plural_rules/0","title":"plural_rules()"},{"anchor":"plural_rules_for/1","id":"plural_rules_for/1","title":"plural_rules_for(locale_name)"},{"anchor":"pluralize/3","id":"pluralize/3","title":"pluralize(number, locale_name, substitutions)"}]}],"sections":[],"title":"Plausible.Cldr.Number.Cardinal"},{"group":"","id":"Plausible.Cldr.Number.Format","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"all_formats_for/1","id":"all_formats_for/1","title":"all_formats_for(locale \\\\ Plausible.Cldr.get_locale())"},{"anchor":"all_formats_for!/1","id":"all_formats_for!/1","title":"all_formats_for!(locale \\\\ Plausible.Cldr.get_locale())"},{"anchor":"currency_spacing/2","id":"currency_spacing/2","title":"currency_spacing(locale, number_system)"},{"anchor":"decimal_format_list/0","id":"decimal_format_list/0","title":"decimal_format_list()"},{"anchor":"decimal_format_list_for/1","id":"decimal_format_list_for/1","title":"decimal_format_list_for(locale \\\\ Plausible.Cldr.get_locale())"},{"anchor":"default_grouping_for/1","id":"default_grouping_for/1","title":"default_grouping_for(locale \\\\ Plausible.Cldr.get_locale())"},{"anchor":"default_grouping_for!/1","id":"default_grouping_for!/1","title":"default_grouping_for!(locale)"},{"anchor":"formats_for/2","id":"formats_for/2","title":"formats_for(locale \\\\ Plausible.Cldr.default_locale(), number_system \\\\ Cldr.Number.System.default_number_system_type())"},{"anchor":"formats_for!/2","id":"formats_for!/2","title":"formats_for!(locale \\\\ Plausible.Cldr.default_locale(), number_system \\\\ Cldr.Number.System.default_number_system_type())"},{"anchor":"minimum_grouping_digits_for/1","id":"minimum_grouping_digits_for/1","title":"minimum_grouping_digits_for(locale \\\\ Plausible.Cldr.get_locale())"},{"anchor":"minimum_grouping_digits_for!/1","id":"minimum_grouping_digits_for!/1","title":"minimum_grouping_digits_for!(locale)"}]}],"sections":[{"anchor":"module-number-pattern-examples","id":"Number Pattern Examples"}],"title":"Plausible.Cldr.Number.Format"},{"group":"","id":"Plausible.Cldr.Number.Formatter.Decimal","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"metadata!/1","id":"metadata!/1","title":"metadata!(format)"},{"anchor":"to_string/3","id":"to_string/3","title":"to_string(number, format, options \\\\ [])"}]}],"sections":[],"title":"Plausible.Cldr.Number.Formatter.Decimal"},{"group":"","id":"Plausible.Cldr.Number.Ordinal","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"available_locale_names/0","id":"available_locale_names/0","title":"available_locale_names()"},{"anchor":"known_locale_names/0","id":"known_locale_names/0","title":"known_locale_names()"},{"anchor":"plural_rule/3","id":"plural_rule/3","title":"plural_rule(number, locale, rounding \\\\ Math.default_rounding())"},{"anchor":"plural_rules/0","id":"plural_rules/0","title":"plural_rules()"},{"anchor":"plural_rules_for/1","id":"plural_rules_for/1","title":"plural_rules_for(locale_name)"},{"anchor":"pluralize/3","id":"pluralize/3","title":"pluralize(number, locale_name, substitutions)"}]}],"sections":[],"title":"Plausible.Cldr.Number.Ordinal"},{"group":"","id":"Plausible.Cldr.Number.PluralRule.Range","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"plural_rule/3","id":"plural_rule/3","title":"plural_rule(first, last, locale)"}]}],"sections":[],"title":"Plausible.Cldr.Number.PluralRule.Range"},{"group":"","id":"Plausible.Cldr.Number.Symbol","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"all_decimal_symbols/0","id":"all_decimal_symbols/0","title":"all_decimal_symbols()"},{"anchor":"all_decimal_symbols_class/0","id":"all_decimal_symbols_class/0","title":"all_decimal_symbols_class()"},{"anchor":"all_grouping_symbols/0","id":"all_grouping_symbols/0","title":"all_grouping_symbols()"},{"anchor":"all_grouping_symbols_class/0","id":"all_grouping_symbols_class/0","title":"all_grouping_symbols_class()"},{"anchor":"number_symbols_for/1","id":"number_symbols_for/1","title":"number_symbols_for(locale \\\\ Plausible.Cldr.get_locale())"},{"anchor":"number_symbols_for/2","id":"number_symbols_for/2","title":"number_symbols_for(locale, number_system)"}]}],"sections":[],"title":"Plausible.Cldr.Number.Symbol"},{"group":"","id":"Plausible.Cldr.Number.System","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"number_system_for/2","id":"number_system_for/2","title":"number_system_for(locale, system_name)"},{"anchor":"number_system_from_locale/1","id":"number_system_from_locale/1","title":"number_system_from_locale(locale)"},{"anchor":"number_system_names_for/1","id":"number_system_names_for/1","title":"number_system_names_for(locale)"},{"anchor":"number_system_names_for!/1","id":"number_system_names_for!/1","title":"number_system_names_for!(locale)"},{"anchor":"number_system_types_for/1","id":"number_system_types_for/1","title":"number_system_types_for(locale)"},{"anchor":"number_systems_for/1","id":"number_systems_for/1","title":"number_systems_for(locale)"},{"anchor":"number_systems_for!/1","id":"number_systems_for!/1","title":"number_systems_for!(locale)"},{"anchor":"number_systems_like/2","id":"number_systems_like/2","title":"number_systems_like(locale, number_system)"},{"anchor":"system_name_from/2","id":"system_name_from/2","title":"system_name_from(system_name, locale)"},{"anchor":"to_system/2","id":"to_system/2","title":"to_system(number, system)"},{"anchor":"to_system!/2","id":"to_system!/2","title":"to_system!(number, system_name)"}]}],"sections":[],"title":"Plausible.Cldr.Number.System"},{"group":"","id":"Plausible.Cldr.Number.Transliterate","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"transliterate/3","id":"transliterate/3","title":"transliterate(sequence, locale \\\\ Plausible.Cldr.get_locale(), number_system \\\\ System.default_number_system_type())"},{"anchor":"transliterate!/3","id":"transliterate!/3","title":"transliterate!(sequence, locale, number_system)"},{"anchor":"transliterate_digits/3","id":"transliterate_digits/3","title":"transliterate_digits(digits, from_system, to_system)"}]}],"sections":[],"title":"Plausible.Cldr.Number.Transliterate"},{"group":"","id":"Plausible.Cldr.Rbnf.NumberSystem","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"all_rule_sets/0","id":"all_rule_sets/0","title":"all_rule_sets()"},{"anchor":"armenian_lower/1","id":"armenian_lower/1","title":"armenian_lower(number)"},{"anchor":"armenian_lower/2","id":"armenian_lower/2","title":"armenian_lower(number, locale)"},{"anchor":"armenian_upper/1","id":"armenian_upper/1","title":"armenian_upper(number)"},{"anchor":"armenian_upper/2","id":"armenian_upper/2","title":"armenian_upper(number, locale)"},{"anchor":"cyrillic_lower/1","id":"cyrillic_lower/1","title":"cyrillic_lower(number)"},{"anchor":"cyrillic_lower/2","id":"cyrillic_lower/2","title":"cyrillic_lower(number, locale)"},{"anchor":"cyrillic_lower_1_10/2","id":"cyrillic_lower_1_10/2","title":"cyrillic_lower_1_10(number, language_tag)"},{"anchor":"cyrillic_lower_final/2","id":"cyrillic_lower_final/2","title":"cyrillic_lower_final(number, language_tag)"},{"anchor":"cyrillic_lower_post/2","id":"cyrillic_lower_post/2","title":"cyrillic_lower_post(number, language_tag)"},{"anchor":"cyrillic_lower_thousands/2","id":"cyrillic_lower_thousands/2","title":"cyrillic_lower_thousands(number, language_tag)"},{"anchor":"ethiopic/1","id":"ethiopic/1","title":"ethiopic(number)"},{"anchor":"ethiopic/2","id":"ethiopic/2","title":"ethiopic(number, locale)"},{"anchor":"ethiopic_p1/2","id":"ethiopic_p1/2","title":"ethiopic_p1(number, language_tag)"},{"anchor":"ethiopic_p2/2","id":"ethiopic_p2/2","title":"ethiopic_p2(number, language_tag)"},{"anchor":"ethiopic_p3/2","id":"ethiopic_p3/2","title":"ethiopic_p3(number, language_tag)"},{"anchor":"ethiopic_p/2","id":"ethiopic_p/2","title":"ethiopic_p(number, language_tag)"},{"anchor":"georgian/1","id":"georgian/1","title":"georgian(number)"},{"anchor":"georgian/2","id":"georgian/2","title":"georgian(number, locale)"},{"anchor":"greek_lower/1","id":"greek_lower/1","title":"greek_lower(number)"},{"anchor":"greek_lower/2","id":"greek_lower/2","title":"greek_lower(number, locale)"},{"anchor":"greek_numeral_majuscules/2","id":"greek_numeral_majuscules/2","title":"greek_numeral_majuscules(number, language_tag)"},{"anchor":"greek_numeral_minuscules/2","id":"greek_numeral_minuscules/2","title":"greek_numeral_minuscules(number, language_tag)"},{"anchor":"greek_upper/1","id":"greek_upper/1","title":"greek_upper(number)"},{"anchor":"greek_upper/2","id":"greek_upper/2","title":"greek_upper(number, locale)"},{"anchor":"hebrew/1","id":"hebrew/1","title":"hebrew(number)"},{"anchor":"hebrew/2","id":"hebrew/2","title":"hebrew(number, locale)"},{"anchor":"hebrew_0_99/2","id":"hebrew_0_99/2","title":"hebrew_0_99(number, language_tag)"},{"anchor":"hebrew_item/1","id":"hebrew_item/1","title":"hebrew_item(number)"},{"anchor":"hebrew_item/2","id":"hebrew_item/2","title":"hebrew_item(number, locale)"},{"anchor":"hebrew_item_hundreds/2","id":"hebrew_item_hundreds/2","title":"hebrew_item_hundreds(number, language_tag)"},{"anchor":"hebrew_thousands/2","id":"hebrew_thousands/2","title":"hebrew_thousands(number, language_tag)"},{"anchor":"roman_lower/1","id":"roman_lower/1","title":"roman_lower(number)"},{"anchor":"roman_lower/2","id":"roman_lower/2","title":"roman_lower(number, locale)"},{"anchor":"roman_upper/1","id":"roman_upper/1","title":"roman_upper(number)"},{"anchor":"roman_upper/2","id":"roman_upper/2","title":"roman_upper(number, locale)"},{"anchor":"rule_sets/0","id":"rule_sets/0","title":"rule_sets()"},{"anchor":"rule_sets/1","id":"rule_sets/1","title":"rule_sets(rbnf_locale_name)"},{"anchor":"tamil/1","id":"tamil/1","title":"tamil(number)"},{"anchor":"tamil/2","id":"tamil/2","title":"tamil(number, locale)"},{"anchor":"tamil_thousands/2","id":"tamil_thousands/2","title":"tamil_thousands(number, language_tag)"},{"anchor":"zz_default/1","id":"zz_default/1","title":"zz_default(number)"},{"anchor":"zz_default/2","id":"zz_default/2","title":"zz_default(number, locale)"}]}],"sections":[],"title":"Plausible.Cldr.Rbnf.NumberSystem"},{"group":"","id":"Plausible.Cldr.Rbnf.Ordinal","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"all_rule_sets/0","id":"all_rule_sets/0","title":"all_rule_sets()"},{"anchor":"digits_ordinal/2","id":"digits_ordinal/2","title":"digits_ordinal(number, locale)"},{"anchor":"rule_sets/0","id":"rule_sets/0","title":"rule_sets()"},{"anchor":"rule_sets/1","id":"rule_sets/1","title":"rule_sets(rbnf_locale_name)"}]}],"sections":[],"title":"Plausible.Cldr.Rbnf.Ordinal"},{"group":"","id":"Plausible.Cldr.Rbnf.Spellout","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"2d_year/2","id":"2d_year/2","title":"2d_year(number, language_tag)"},{"anchor":"all_rule_sets/0","id":"all_rule_sets/0","title":"all_rule_sets()"},{"anchor":"and/2","id":"and/2","title":"number and language_tag"},{"anchor":"and_o/2","id":"and_o/2","title":"and_o(number, language_tag)"},{"anchor":"commas/2","id":"commas/2","title":"commas(number, language_tag)"},{"anchor":"commas_o/2","id":"commas_o/2","title":"commas_o(number, language_tag)"},{"anchor":"rule_sets/0","id":"rule_sets/0","title":"rule_sets()"},{"anchor":"rule_sets/1","id":"rule_sets/1","title":"rule_sets(rbnf_locale_name)"},{"anchor":"spellout_cardinal/2","id":"spellout_cardinal/2","title":"spellout_cardinal(number, locale)"},{"anchor":"spellout_cardinal_verbose/2","id":"spellout_cardinal_verbose/2","title":"spellout_cardinal_verbose(number, locale)"},{"anchor":"spellout_numbering/2","id":"spellout_numbering/2","title":"spellout_numbering(number, locale)"},{"anchor":"spellout_numbering_verbose/2","id":"spellout_numbering_verbose/2","title":"spellout_numbering_verbose(number, locale)"},{"anchor":"spellout_numbering_year/2","id":"spellout_numbering_year/2","title":"spellout_numbering_year(number, locale)"},{"anchor":"spellout_ordinal/2","id":"spellout_ordinal/2","title":"spellout_ordinal(number, locale)"},{"anchor":"spellout_ordinal_verbose/2","id":"spellout_ordinal_verbose/2","title":"spellout_ordinal_verbose(number, locale)"},{"anchor":"th/2","id":"th/2","title":"th(number, language_tag)"},{"anchor":"tieth/2","id":"tieth/2","title":"tieth(number, language_tag)"}]}],"sections":[],"title":"Plausible.Cldr.Rbnf.Spellout"},{"group":"","id":"Plausible.ClickhouseEventV2","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"new/1","id":"new/1","title":"new(attrs)"}]}],"sections":[],"title":"Plausible.ClickhouseEventV2"},{"group":"","id":"Plausible.ClickhouseRepo","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"aggregate/3","id":"aggregate/3","title":"aggregate(queryable, aggregate, opts \\\\ [])"},{"anchor":"aggregate/4","id":"aggregate/4","title":"aggregate(queryable, aggregate, field, opts)"},{"anchor":"all/2","id":"all/2","title":"all(queryable, opts \\\\ [])"},{"anchor":"checked_out?/0","id":"checked_out?/0","title":"checked_out?()"},{"anchor":"checkout/2","id":"checkout/2","title":"checkout(fun, opts \\\\ [])"},{"anchor":"child_spec/1","id":"child_spec/1","title":"child_spec(opts)"},{"anchor":"config/0","id":"config/0","title":"config()"},{"anchor":"default_options/1","id":"default_options/1","title":"default_options(operation)"},{"anchor":"disconnect_all/2","id":"disconnect_all/2","title":"disconnect_all(interval, opts \\\\ [])"},{"anchor":"exists?/2","id":"exists?/2","title":"exists?(queryable, opts \\\\ [])"},{"anchor":"get/3","id":"get/3","title":"get(queryable, id, opts \\\\ [])"},{"anchor":"get!/3","id":"get!/3","title":"get!(queryable, id, opts \\\\ [])"},{"anchor":"get_by/3","id":"get_by/3","title":"get_by(queryable, clauses, opts \\\\ [])"},{"anchor":"get_by!/3","id":"get_by!/3","title":"get_by!(queryable, clauses, opts \\\\ [])"},{"anchor":"get_dynamic_repo/0","id":"get_dynamic_repo/0","title":"get_dynamic_repo()"},{"anchor":"insert_stream/3","id":"insert_stream/3","title":"insert_stream(source_or_schema, rows, opts \\\\ [])"},{"anchor":"load/2","id":"load/2","title":"load(schema_or_types, data)"},{"anchor":"one/2","id":"one/2","title":"one(queryable, opts \\\\ [])"},{"anchor":"one!/2","id":"one!/2","title":"one!(queryable, opts \\\\ [])"},{"anchor":"parallel_tasks/1","id":"parallel_tasks/1","title":"parallel_tasks(queries)"},{"anchor":"preload/3","id":"preload/3","title":"preload(struct_or_structs_or_nil, preloads, opts \\\\ [])"},{"anchor":"prepare_query/3","id":"prepare_query/3","title":"prepare_query(operation, query, opts)"},{"anchor":"put_dynamic_repo/1","id":"put_dynamic_repo/1","title":"put_dynamic_repo(dynamic)"},{"anchor":"query/3","id":"query/3","title":"query(sql, params \\\\ [], opts \\\\ [])"},{"anchor":"query!/3","id":"query!/3","title":"query!(sql, params \\\\ [], opts \\\\ [])"},{"anchor":"reload/2","id":"reload/2","title":"reload(queryable, opts \\\\ [])"},{"anchor":"reload!/2","id":"reload!/2","title":"reload!(queryable, opts \\\\ [])"},{"anchor":"start_link/1","id":"start_link/1","title":"start_link(opts \\\\ [])"},{"anchor":"stop/1","id":"stop/1","title":"stop(timeout \\\\ 5000)"},{"anchor":"stream/2","id":"stream/2","title":"stream(queryable, opts \\\\ [])"},{"anchor":"to_sql/2","id":"to_sql/2","title":"to_sql(operation, queryable)"}]}],"sections":[],"title":"Plausible.ClickhouseRepo"},{"group":"","id":"Plausible.ClickhouseSessionV2","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"random_uint64/0","id":"random_uint64/0","title":"random_uint64()"}]}],"sections":[],"title":"Plausible.ClickhouseSessionV2"},{"group":"","id":"Plausible.ClickhouseSessionV2.BoolUInt8","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"embed_as/1","id":"embed_as/1","title":"embed_as(_)"},{"anchor":"equal?/2","id":"equal?/2","title":"equal?(term1, term2)"}]}],"sections":[],"title":"Plausible.ClickhouseSessionV2.BoolUInt8"},{"group":"","id":"Plausible.ConfigHelpers","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"get_int_from_path_or_env/3","id":"get_int_from_path_or_env/3","title":"get_int_from_path_or_env(config_dir, var_name, default \\\\ nil)"},{"anchor":"get_var_from_path_or_env/3","id":"get_var_from_path_or_env/3","title":"get_var_from_path_or_env(config_dir, var_name, default \\\\ nil)"}]}],"sections":[],"title":"Plausible.ConfigHelpers"},{"group":"","id":"Plausible.DataCase","sections":[],"title":"Plausible.DataCase"},{"group":"","id":"Plausible.DataMigration","sections":[],"title":"Plausible.DataMigration"},{"group":"","id":"Plausible.DataMigration.NumericIDs","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"confirm/3","id":"confirm/3","title":"confirm(message, func, default_choice \\\\ :yes)"},{"anchor":"run/1","id":"run/1","title":"run(opts \\\\ [])"},{"anchor":"run_sql/2","id":"run_sql/2","title":"run_sql(name, assigns \\\\ [])"},{"anchor":"run_sql_confirm/2","id":"run_sql_confirm/2","title":"run_sql_confirm(name, options \\\\ [])"}]}],"sections":[],"title":"Plausible.DataMigration.NumericIDs"},{"group":"","id":"Plausible.DataMigration.Repo","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"aggregate/3","id":"aggregate/3","title":"aggregate(queryable, aggregate, opts \\\\ [])"},{"anchor":"aggregate/4","id":"aggregate/4","title":"aggregate(queryable, aggregate, field, opts)"},{"anchor":"all/2","id":"all/2","title":"all(queryable, opts \\\\ [])"},{"anchor":"checked_out?/0","id":"checked_out?/0","title":"checked_out?()"},{"anchor":"checkout/2","id":"checkout/2","title":"checkout(fun, opts \\\\ [])"},{"anchor":"child_spec/1","id":"child_spec/1","title":"child_spec(opts)"},{"anchor":"config/0","id":"config/0","title":"config()"},{"anchor":"default_options/1","id":"default_options/1","title":"default_options(operation)"},{"anchor":"delete/2","id":"delete/2","title":"delete(struct, opts \\\\ [])"},{"anchor":"delete!/2","id":"delete!/2","title":"delete!(struct, opts \\\\ [])"},{"anchor":"delete_all/2","id":"delete_all/2","title":"delete_all(queryable, opts \\\\ [])"},{"anchor":"disconnect_all/2","id":"disconnect_all/2","title":"disconnect_all(interval, opts \\\\ [])"},{"anchor":"exists?/2","id":"exists?/2","title":"exists?(queryable, opts \\\\ [])"},{"anchor":"get/3","id":"get/3","title":"get(queryable, id, opts \\\\ [])"},{"anchor":"get!/3","id":"get!/3","title":"get!(queryable, id, opts \\\\ [])"},{"anchor":"get_by/3","id":"get_by/3","title":"get_by(queryable, clauses, opts \\\\ [])"},{"anchor":"get_by!/3","id":"get_by!/3","title":"get_by!(queryable, clauses, opts \\\\ [])"},{"anchor":"get_dynamic_repo/0","id":"get_dynamic_repo/0","title":"get_dynamic_repo()"},{"anchor":"insert/2","id":"insert/2","title":"insert(struct, opts \\\\ [])"},{"anchor":"insert!/2","id":"insert!/2","title":"insert!(struct, opts \\\\ [])"},{"anchor":"insert_all/3","id":"insert_all/3","title":"insert_all(schema_or_source, entries, opts \\\\ [])"},{"anchor":"insert_or_update/2","id":"insert_or_update/2","title":"insert_or_update(changeset, opts \\\\ [])"},{"anchor":"insert_or_update!/2","id":"insert_or_update!/2","title":"insert_or_update!(changeset, opts \\\\ [])"},{"anchor":"insert_stream/3","id":"insert_stream/3","title":"insert_stream(source_or_schema, rows, opts \\\\ [])"},{"anchor":"load/2","id":"load/2","title":"load(schema_or_types, data)"},{"anchor":"one/2","id":"one/2","title":"one(queryable, opts \\\\ [])"},{"anchor":"one!/2","id":"one!/2","title":"one!(queryable, opts \\\\ [])"},{"anchor":"preload/3","id":"preload/3","title":"preload(struct_or_structs_or_nil, preloads, opts \\\\ [])"},{"anchor":"prepare_query/3","id":"prepare_query/3","title":"prepare_query(operation, query, opts)"},{"anchor":"put_dynamic_repo/1","id":"put_dynamic_repo/1","title":"put_dynamic_repo(dynamic)"},{"anchor":"query/3","id":"query/3","title":"query(sql, params \\\\ [], opts \\\\ [])"},{"anchor":"query!/3","id":"query!/3","title":"query!(sql, params \\\\ [], opts \\\\ [])"},{"anchor":"reload/2","id":"reload/2","title":"reload(queryable, opts \\\\ [])"},{"anchor":"reload!/2","id":"reload!/2","title":"reload!(queryable, opts \\\\ [])"},{"anchor":"start/2","id":"start/2","title":"start(url, max_threads)"},{"anchor":"start_link/1","id":"start_link/1","title":"start_link(opts \\\\ [])"},{"anchor":"stop/1","id":"stop/1","title":"stop(timeout \\\\ 5000)"},{"anchor":"stream/2","id":"stream/2","title":"stream(queryable, opts \\\\ [])"},{"anchor":"to_sql/2","id":"to_sql/2","title":"to_sql(operation, queryable)"},{"anchor":"update/2","id":"update/2","title":"update(struct, opts \\\\ [])"},{"anchor":"update!/2","id":"update!/2","title":"update!(struct, opts \\\\ [])"},{"anchor":"update_all/3","id":"update_all/3","title":"update_all(queryable, updates, opts \\\\ [])"}]}],"sections":[],"title":"Plausible.DataMigration.Repo"},{"group":"","id":"Plausible.Ecto.EventName","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"cast/1","id":"cast/1","title":"cast(val)"},{"anchor":"dump/1","id":"dump/1","title":"dump(val)"},{"anchor":"embed_as/1","id":"embed_as/1","title":"embed_as(_)"},{"anchor":"equal?/2","id":"equal?/2","title":"equal?(term1, term2)"},{"anchor":"load/1","id":"load/1","title":"load(val)"},{"anchor":"type/0","id":"type/0","title":"type()"}]}],"sections":[],"title":"Plausible.Ecto.EventName"},{"group":"","id":"Plausible.Event.WriteBuffer","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"child_spec/1","id":"child_spec/1","title":"child_spec(init_arg)"},{"anchor":"flush/0","id":"flush/0","title":"flush()"},{"anchor":"init/1","id":"init/1","title":"init(buffer)"},{"anchor":"insert/1","id":"insert/1","title":"insert(event)"},{"anchor":"start_link/1","id":"start_link/1","title":"start_link(opts)"}]}],"sections":[],"title":"Plausible.Event.WriteBuffer"},{"group":"","id":"Plausible.Factory","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"api_key_factory/0","id":"api_key_factory/0","title":"api_key_factory()"},{"anchor":"build/2","id":"build/2","title":"build(factory_name, attrs \\\\ %{})"},{"anchor":"build_list/3","id":"build_list/3","title":"build_list(number_of_records, factory_name, attrs \\\\ %{})"},{"anchor":"build_pair/2","id":"build_pair/2","title":"build_pair(factory_name, attrs \\\\ %{})"},{"anchor":"ch_session_factory/0","id":"ch_session_factory/0","title":"ch_session_factory()"},{"anchor":"create/1","id":"create/1","title":"create(_)"},{"anchor":"create/2","id":"create/2","title":"create(_, _)"},{"anchor":"create_list/3","id":"create_list/3","title":"create_list(_, _, _)"},{"anchor":"create_pair/2","id":"create_pair/2","title":"create_pair(_, _)"},{"anchor":"custom_domain_factory/0","id":"custom_domain_factory/0","title":"custom_domain_factory()"},{"anchor":"enterprise_plan_factory/0","id":"enterprise_plan_factory/0","title":"enterprise_plan_factory()"},{"anchor":"event_factory/0","id":"event_factory/0","title":"event_factory()"},{"anchor":"factory/1","id":"factory/1","title":"factory(factory_name)"},{"anchor":"goal_factory/0","id":"goal_factory/0","title":"goal_factory()"},{"anchor":"google_auth_factory/0","id":"google_auth_factory/0","title":"google_auth_factory()"},{"anchor":"imported_browsers_factory/0","id":"imported_browsers_factory/0","title":"imported_browsers_factory()"},{"anchor":"imported_devices_factory/0","id":"imported_devices_factory/0","title":"imported_devices_factory()"},{"anchor":"imported_entry_pages_factory/0","id":"imported_entry_pages_factory/0","title":"imported_entry_pages_factory()"},{"anchor":"imported_exit_pages_factory/0","id":"imported_exit_pages_factory/0","title":"imported_exit_pages_factory()"},{"anchor":"imported_locations_factory/0","id":"imported_locations_factory/0","title":"imported_locations_factory()"},{"anchor":"imported_operating_systems_factory/0","id":"imported_operating_systems_factory/0","title":"imported_operating_systems_factory()"},{"anchor":"imported_pages_factory/0","id":"imported_pages_factory/0","title":"imported_pages_factory()"},{"anchor":"imported_sources_factory/0","id":"imported_sources_factory/0","title":"imported_sources_factory()"},{"anchor":"imported_visitors_factory/0","id":"imported_visitors_factory/0","title":"imported_visitors_factory()"},{"anchor":"insert/1","id":"insert/1","title":"insert(already_built_record)"},{"anchor":"insert/2","id":"insert/2","title":"insert(already_built_record, function_opts)"},{"anchor":"insert/3","id":"insert/3","title":"insert(factory_name, attrs, opts)"},{"anchor":"insert_list/3","id":"insert_list/3","title":"insert_list(number_of_records, factory_name, attrs \\\\ %{})"},{"anchor":"insert_list/4","id":"insert_list/4","title":"insert_list(number_of_records, factory_name, attrs, opts)"},{"anchor":"insert_pair/2","id":"insert_pair/2","title":"insert_pair(factory_name, attrs \\\\ %{})"},{"anchor":"insert_pair/3","id":"insert_pair/3","title":"insert_pair(factory_name, attrs, opts)"},{"anchor":"invitation_factory/0","id":"invitation_factory/0","title":"invitation_factory()"},{"anchor":"monthly_report_factory/0","id":"monthly_report_factory/0","title":"monthly_report_factory()"},{"anchor":"pageview_factory/0","id":"pageview_factory/0","title":"pageview_factory()"},{"anchor":"params_for/2","id":"params_for/2","title":"params_for(factory_name, attrs \\\\ %{})"},{"anchor":"params_with_assocs/2","id":"params_with_assocs/2","title":"params_with_assocs(factory_name, attrs \\\\ %{})"},{"anchor":"shared_link_factory/0","id":"shared_link_factory/0","title":"shared_link_factory()"},{"anchor":"site_factory/0","id":"site_factory/0","title":"site_factory()"},{"anchor":"site_membership_factory/0","id":"site_membership_factory/0","title":"site_membership_factory()"},{"anchor":"spike_notification_factory/0","id":"spike_notification_factory/0","title":"spike_notification_factory()"},{"anchor":"string_params_for/2","id":"string_params_for/2","title":"string_params_for(factory_name, attrs \\\\ %{})"},{"anchor":"string_params_with_assocs/2","id":"string_params_with_assocs/2","title":"string_params_with_assocs(factory_name, attrs \\\\ %{})"},{"anchor":"subscription_factory/0","id":"subscription_factory/0","title":"subscription_factory()"},{"anchor":"user_factory/1","id":"user_factory/1","title":"user_factory(attrs)"},{"anchor":"weekly_report_factory/0","id":"weekly_report_factory/0","title":"weekly_report_factory()"}]}],"sections":[],"title":"Plausible.Factory"},{"group":"","id":"Plausible.Funnel","nodeGroups":[{"key":"types","name":"Types","nodes":[{"anchor":"t:t/0","id":"t/0","title":"t()"}]},{"key":"functions","name":"Functions","nodes":[{"anchor":"changeset/2","id":"changeset/2","title":"changeset(funnel \\\\ %__MODULE__{}, attrs \\\\ %{})"},{"anchor":"max_steps/0","id":"max_steps/0","title":"max_steps()"},{"anchor":"min_steps/0","id":"min_steps/0","title":"min_steps()"},{"anchor":"put_step_orders/1","id":"put_step_orders/1","title":"put_step_orders(changeset)"}]}],"sections":[],"title":"Plausible.Funnel"},{"group":"","id":"Plausible.Funnel.Step","nodeGroups":[{"key":"types","name":"Types","nodes":[{"anchor":"t:t/0","id":"t/0","title":"t()"}]},{"key":"functions","name":"Functions","nodes":[{"anchor":"changeset/2","id":"changeset/2","title":"changeset(step, attrs \\\\ %{})"}]}],"sections":[],"title":"Plausible.Funnel.Step"},{"group":"","id":"Plausible.Funnels","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"create/3","id":"create/3","title":"create(site, name, steps)"},{"anchor":"create_changeset/3","id":"create_changeset/3","title":"create_changeset(site, name, steps)"},{"anchor":"delete/2","id":"delete/2","title":"delete(site, funnel_id)"},{"anchor":"enabled_for?/1","id":"enabled_for?/1","title":"enabled_for?(actor)"},{"anchor":"ephemeral_definition/3","id":"ephemeral_definition/3","title":"ephemeral_definition(site, name, steps)"},{"anchor":"get/2","id":"get/2","title":"get(site_id, by)"},{"anchor":"list/1","id":"list/1","title":"list(site)"}]}],"sections":[],"title":"Plausible.Funnels"},{"group":"","id":"Plausible.Geo","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"await_loader/0","id":"await_loader/0","title":"await_loader()"},{"anchor":"database_type/0","id":"database_type/0","title":"database_type()"},{"anchor":"load_db/1","id":"load_db/1","title":"load_db(opts)"},{"anchor":"lookup/1","id":"lookup/1","title":"lookup(ip_address)"}]}],"sections":[],"title":"Plausible.Geo"},{"group":"","id":"Plausible.Goal","nodeGroups":[{"key":"types","name":"Types","nodes":[{"anchor":"t:t/0","id":"t/0","title":"t()"}]},{"key":"functions","name":"Functions","nodes":[{"anchor":"changeset/2","id":"changeset/2","title":"changeset(goal, attrs \\\\ %{})"},{"anchor":"currency_options/0","id":"currency_options/0","title":"currency_options()"},{"anchor":"revenue?/1","id":"revenue?/1","title":"revenue?(goal)"},{"anchor":"valid_currencies/0","id":"valid_currencies/0","title":"valid_currencies()"}]}],"sections":[],"title":"Plausible.Goal"},{"group":"","id":"Plausible.Goals","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"count/1","id":"count/1","title":"count(site)"},{"anchor":"create/3","id":"create/3","title":"create(site, params, now \\\\ DateTime.utc_now())"},{"anchor":"delete/2","id":"delete/2","title":"delete(id, site)"},{"anchor":"find_or_create/2","id":"find_or_create/2","title":"find_or_create(site, map)"},{"anchor":"for_site/2","id":"for_site/2","title":"for_site(site, opts \\\\ [])"}]}],"sections":[],"title":"Plausible.Goals"},{"group":"","id":"Plausible.Google.Api","nodeGroups":[{"key":"types","name":"Types","nodes":[{"anchor":"t:google_analytics_view/0","id":"google_analytics_view/0","title":"google_analytics_view()"},{"anchor":"t:import_auth/0","id":"import_auth/0","title":"import_auth()"}]},{"key":"functions","name":"Functions","nodes":[{"anchor":"fetch_and_persist/3","id":"fetch_and_persist/3","title":"fetch_and_persist(site, report_request, opts \\\\ [])"},{"anchor":"fetch_stats/3","id":"fetch_stats/3","title":"fetch_stats(site, map, limit)"},{"anchor":"fetch_verified_properties/1","id":"fetch_verified_properties/1","title":"fetch_verified_properties(auth)"},{"anchor":"get_view/2","id":"get_view/2","title":"get_view(access_token, lookup_id)"},{"anchor":"import_analytics/4","id":"import_analytics/4","title":"import_analytics(site, date_range, view_id, auth)"},{"anchor":"import_authorize_url/2","id":"import_authorize_url/2","title":"import_authorize_url(site_id, redirect_to)"},{"anchor":"list_views/1","id":"list_views/1","title":"list_views(access_token)"},{"anchor":"search_console_authorize_url/2","id":"search_console_authorize_url/2","title":"search_console_authorize_url(site_id, redirect_to)"}]}],"sections":[],"title":"Plausible.Google.Api"},{"group":"","id":"Plausible.Google.Api.Mock","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"fetch_stats/3","id":"fetch_stats/3","title":"fetch_stats(auth, query, limit)"}]}],"sections":[],"title":"Plausible.Google.Api.Mock"},{"group":"","id":"Plausible.Google.Buffer","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"child_spec/1","id":"child_spec/1","title":"child_spec(init_arg)"},{"anchor":"flush/2","id":"flush/2","title":"flush(pid, timeout \\\\ :infinity)"},{"anchor":"handle_continue/2","id":"handle_continue/2","title":"handle_continue(arg, state)"},{"anchor":"init/1","id":"init/1","title":"init(opts)"},{"anchor":"insert_many/3","id":"insert_many/3","title":"insert_many(pid, table_name, records)"},{"anchor":"size/2","id":"size/2","title":"size(pid, table_name)"},{"anchor":"start_link/0","id":"start_link/0","title":"start_link()"},{"anchor":"stop/1","id":"stop/1","title":"stop(pid)"}]}],"sections":[],"title":"Plausible.Google.Buffer"},{"group":"","id":"Plausible.Google.HTTP","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"fetch_access_token/1","id":"fetch_access_token/1","title":"fetch_access_token(code)"},{"anchor":"get_analytics_start_date/2","id":"get_analytics_start_date/2","title":"get_analytics_start_date(view_id, access_token)"},{"anchor":"get_report/1","id":"get_report/1","title":"get_report(report_request)"},{"anchor":"list_sites/1","id":"list_sites/1","title":"list_sites(access_token)"},{"anchor":"list_stats/5","id":"list_stats/5","title":"list_stats(access_token, property, date_range, limit, page \\\\ nil)"},{"anchor":"list_views_for_user/1","id":"list_views_for_user/1","title":"list_views_for_user(access_token)"},{"anchor":"refresh_auth_token/1","id":"refresh_auth_token/1","title":"refresh_auth_token(refresh_token)"}]}],"sections":[],"title":"Plausible.Google.HTTP"},{"group":"","id":"Plausible.Google.ReportRequest","nodeGroups":[{"key":"types","name":"Types","nodes":[{"anchor":"t:t/0","id":"t/0","title":"t()"}]},{"key":"functions","name":"Functions","nodes":[{"anchor":"full_report/0","id":"full_report/0","title":"full_report()"}]}],"sections":[],"title":"Plausible.Google.ReportRequest"},{"group":"","id":"Plausible.HTTPClient","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"get/2","id":"get/2","title":"get(url, headers \\\\ [])"},{"anchor":"impl/0","id":"impl/0","title":"impl()"},{"anchor":"post/4","id":"post/4","title":"post(url, headers \\\\ [], params \\\\ nil, finch_req_opts \\\\ [])"}]}],"sections":[],"title":"Plausible.HTTPClient"},{"group":"","id":"Plausible.HTTPClient.Interface","nodeGroups":[{"key":"types","name":"Types","nodes":[{"anchor":"t:finch_request_opts/0","id":"finch_request_opts/0","title":"finch_request_opts()"},{"anchor":"t:headers/0","id":"headers/0","title":"headers()"},{"anchor":"t:params/0","id":"params/0","title":"params()"},{"anchor":"t:response/0","id":"response/0","title":"response()"},{"anchor":"t:url/0","id":"url/0","title":"url()"}]},{"key":"callbacks","name":"Callbacks","nodes":[{"anchor":"c:get/1","id":"get/1","title":"get(url)"},{"anchor":"c:get/2","id":"get/2","title":"get(url, headers)"},{"anchor":"c:post/3","id":"post/3","title":"post(url, headers, params)"},{"anchor":"c:post/4","id":"post/4","title":"post(url, headers, params, finch_request_opts)"}]}],"sections":[],"title":"Plausible.HTTPClient.Interface"},{"group":"","id":"Plausible.HTTPClient.Non200Error","nodeGroups":[{"key":"types","name":"Types","nodes":[{"anchor":"t:t/0","id":"t/0","title":"t()"}]},{"key":"functions","name":"Functions","nodes":[{"anchor":"new/1","id":"new/1","title":"new(response)"}]}],"sections":[],"title":"Plausible.HTTPClient.Non200Error"},{"group":"","id":"Plausible.ImportDeletionRepo","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"aggregate/3","id":"aggregate/3","title":"aggregate(queryable, aggregate, opts \\\\ [])"},{"anchor":"aggregate/4","id":"aggregate/4","title":"aggregate(queryable, aggregate, field, opts)"},{"anchor":"all/2","id":"all/2","title":"all(queryable, opts \\\\ [])"},{"anchor":"checked_out?/0","id":"checked_out?/0","title":"checked_out?()"},{"anchor":"checkout/2","id":"checkout/2","title":"checkout(fun, opts \\\\ [])"},{"anchor":"child_spec/1","id":"child_spec/1","title":"child_spec(opts)"},{"anchor":"config/0","id":"config/0","title":"config()"},{"anchor":"default_options/1","id":"default_options/1","title":"default_options(operation)"},{"anchor":"delete/2","id":"delete/2","title":"delete(struct, opts \\\\ [])"},{"anchor":"delete!/2","id":"delete!/2","title":"delete!(struct, opts \\\\ [])"},{"anchor":"delete_all/2","id":"delete_all/2","title":"delete_all(queryable, opts \\\\ [])"},{"anchor":"disconnect_all/2","id":"disconnect_all/2","title":"disconnect_all(interval, opts \\\\ [])"},{"anchor":"exists?/2","id":"exists?/2","title":"exists?(queryable, opts \\\\ [])"},{"anchor":"get/3","id":"get/3","title":"get(queryable, id, opts \\\\ [])"},{"anchor":"get!/3","id":"get!/3","title":"get!(queryable, id, opts \\\\ [])"},{"anchor":"get_by/3","id":"get_by/3","title":"get_by(queryable, clauses, opts \\\\ [])"},{"anchor":"get_by!/3","id":"get_by!/3","title":"get_by!(queryable, clauses, opts \\\\ [])"},{"anchor":"get_dynamic_repo/0","id":"get_dynamic_repo/0","title":"get_dynamic_repo()"},{"anchor":"insert/2","id":"insert/2","title":"insert(struct, opts \\\\ [])"},{"anchor":"insert!/2","id":"insert!/2","title":"insert!(struct, opts \\\\ [])"},{"anchor":"insert_all/3","id":"insert_all/3","title":"insert_all(schema_or_source, entries, opts \\\\ [])"},{"anchor":"insert_or_update/2","id":"insert_or_update/2","title":"insert_or_update(changeset, opts \\\\ [])"},{"anchor":"insert_or_update!/2","id":"insert_or_update!/2","title":"insert_or_update!(changeset, opts \\\\ [])"},{"anchor":"insert_stream/3","id":"insert_stream/3","title":"insert_stream(source_or_schema, rows, opts \\\\ [])"},{"anchor":"load/2","id":"load/2","title":"load(schema_or_types, data)"},{"anchor":"one/2","id":"one/2","title":"one(queryable, opts \\\\ [])"},{"anchor":"one!/2","id":"one!/2","title":"one!(queryable, opts \\\\ [])"},{"anchor":"preload/3","id":"preload/3","title":"preload(struct_or_structs_or_nil, preloads, opts \\\\ [])"},{"anchor":"prepare_query/3","id":"prepare_query/3","title":"prepare_query(operation, query, opts)"},{"anchor":"put_dynamic_repo/1","id":"put_dynamic_repo/1","title":"put_dynamic_repo(dynamic)"},{"anchor":"query/3","id":"query/3","title":"query(sql, params \\\\ [], opts \\\\ [])"},{"anchor":"query!/3","id":"query!/3","title":"query!(sql, params \\\\ [], opts \\\\ [])"},{"anchor":"reload/2","id":"reload/2","title":"reload(queryable, opts \\\\ [])"},{"anchor":"reload!/2","id":"reload!/2","title":"reload!(queryable, opts \\\\ [])"},{"anchor":"start_link/1","id":"start_link/1","title":"start_link(opts \\\\ [])"},{"anchor":"stop/1","id":"stop/1","title":"stop(timeout \\\\ 5000)"},{"anchor":"stream/2","id":"stream/2","title":"stream(queryable, opts \\\\ [])"},{"anchor":"to_sql/2","id":"to_sql/2","title":"to_sql(operation, queryable)"},{"anchor":"update/2","id":"update/2","title":"update(struct, opts \\\\ [])"},{"anchor":"update!/2","id":"update!/2","title":"update!(struct, opts \\\\ [])"},{"anchor":"update_all/3","id":"update_all/3","title":"update_all(queryable, updates, opts \\\\ [])"}]}],"sections":[],"title":"Plausible.ImportDeletionRepo"},{"group":"","id":"Plausible.Imported","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"forget/1","id":"forget/1","title":"forget(site)"},{"anchor":"from_google_analytics/3","id":"from_google_analytics/3","title":"from_google_analytics(data, site_id, table)"},{"anchor":"tables/0","id":"tables/0","title":"tables()"}]}],"sections":[],"title":"Plausible.Imported"},{"group":"","id":"Plausible.IngestRepo","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"aggregate/3","id":"aggregate/3","title":"aggregate(queryable, aggregate, opts \\\\ [])"},{"anchor":"aggregate/4","id":"aggregate/4","title":"aggregate(queryable, aggregate, field, opts)"},{"anchor":"all/2","id":"all/2","title":"all(queryable, opts \\\\ [])"},{"anchor":"checked_out?/0","id":"checked_out?/0","title":"checked_out?()"},{"anchor":"checkout/2","id":"checkout/2","title":"checkout(fun, opts \\\\ [])"},{"anchor":"child_spec/1","id":"child_spec/1","title":"child_spec(opts)"},{"anchor":"config/0","id":"config/0","title":"config()"},{"anchor":"default_options/1","id":"default_options/1","title":"default_options(operation)"},{"anchor":"delete/2","id":"delete/2","title":"delete(struct, opts \\\\ [])"},{"anchor":"delete!/2","id":"delete!/2","title":"delete!(struct, opts \\\\ [])"},{"anchor":"delete_all/2","id":"delete_all/2","title":"delete_all(queryable, opts \\\\ [])"},{"anchor":"disconnect_all/2","id":"disconnect_all/2","title":"disconnect_all(interval, opts \\\\ [])"},{"anchor":"exists?/2","id":"exists?/2","title":"exists?(queryable, opts \\\\ [])"},{"anchor":"get/3","id":"get/3","title":"get(queryable, id, opts \\\\ [])"},{"anchor":"get!/3","id":"get!/3","title":"get!(queryable, id, opts \\\\ [])"},{"anchor":"get_by/3","id":"get_by/3","title":"get_by(queryable, clauses, opts \\\\ [])"},{"anchor":"get_by!/3","id":"get_by!/3","title":"get_by!(queryable, clauses, opts \\\\ [])"},{"anchor":"get_dynamic_repo/0","id":"get_dynamic_repo/0","title":"get_dynamic_repo()"},{"anchor":"insert/2","id":"insert/2","title":"insert(struct, opts \\\\ [])"},{"anchor":"insert!/2","id":"insert!/2","title":"insert!(struct, opts \\\\ [])"},{"anchor":"insert_all/3","id":"insert_all/3","title":"insert_all(schema_or_source, entries, opts \\\\ [])"},{"anchor":"insert_or_update/2","id":"insert_or_update/2","title":"insert_or_update(changeset, opts \\\\ [])"},{"anchor":"insert_or_update!/2","id":"insert_or_update!/2","title":"insert_or_update!(changeset, opts \\\\ [])"},{"anchor":"insert_stream/3","id":"insert_stream/3","title":"insert_stream(source_or_schema, rows, opts \\\\ [])"},{"anchor":"load/2","id":"load/2","title":"load(schema_or_types, data)"},{"anchor":"one/2","id":"one/2","title":"one(queryable, opts \\\\ [])"},{"anchor":"one!/2","id":"one!/2","title":"one!(queryable, opts \\\\ [])"},{"anchor":"preload/3","id":"preload/3","title":"preload(struct_or_structs_or_nil, preloads, opts \\\\ [])"},{"anchor":"prepare_query/3","id":"prepare_query/3","title":"prepare_query(operation, query, opts)"},{"anchor":"put_dynamic_repo/1","id":"put_dynamic_repo/1","title":"put_dynamic_repo(dynamic)"},{"anchor":"query/3","id":"query/3","title":"query(sql, params \\\\ [], opts \\\\ [])"},{"anchor":"query!/3","id":"query!/3","title":"query!(sql, params \\\\ [], opts \\\\ [])"},{"anchor":"reload/2","id":"reload/2","title":"reload(queryable, opts \\\\ [])"},{"anchor":"reload!/2","id":"reload!/2","title":"reload!(queryable, opts \\\\ [])"},{"anchor":"start_link/1","id":"start_link/1","title":"start_link(opts \\\\ [])"},{"anchor":"stop/1","id":"stop/1","title":"stop(timeout \\\\ 5000)"},{"anchor":"stream/2","id":"stream/2","title":"stream(queryable, opts \\\\ [])"},{"anchor":"to_sql/2","id":"to_sql/2","title":"to_sql(operation, queryable)"},{"anchor":"update/2","id":"update/2","title":"update(struct, opts \\\\ [])"},{"anchor":"update!/2","id":"update!/2","title":"update!(struct, opts \\\\ [])"},{"anchor":"update_all/3","id":"update_all/3","title":"update_all(queryable, updates, opts \\\\ [])"}]}],"sections":[],"title":"Plausible.IngestRepo"},{"group":"","id":"Plausible.Ingestion.Counters","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"child_spec/1","id":"child_spec/1","title":"child_spec(opts)"},{"anchor":"enabled?/0","id":"enabled?/0","title":"enabled?()"},{"anchor":"stop/1","id":"stop/1","title":"stop(pid)"}]}],"sections":[],"title":"Plausible.Ingestion.Counters"},{"group":"","id":"Plausible.Ingestion.Counters.Buffer","nodeGroups":[{"key":"types","name":"Types","nodes":[{"anchor":"t:bucket_fn_opt/0","id":"bucket_fn_opt/0","title":"bucket_fn_opt()"},{"anchor":"t:t/0","id":"t/0","title":"t()"},{"anchor":"t:unix_timestamp/0","id":"unix_timestamp/0","title":"unix_timestamp()"}]},{"key":"functions","name":"Functions","nodes":[{"anchor":"aggregate/4","id":"aggregate/4","title":"aggregate(buffer, metric, domain, timestamp)"},{"anchor":"bucket_10s/1","id":"bucket_10s/1","title":"bucket_10s(datetime)"},{"anchor":"flush/2","id":"flush/2","title":"flush(buffer, now \\\\ DateTime.utc_now())"},{"anchor":"new/2","id":"new/2","title":"new(buffer_name, opts \\\\ [])"},{"anchor":"previous_10s/1","id":"previous_10s/1","title":"previous_10s(datetime)"}]}],"sections":[],"title":"Plausible.Ingestion.Counters.Buffer"},{"group":"","id":"Plausible.Ingestion.Counters.Record","nodeGroups":[{"key":"types","name":"Types","nodes":[{"anchor":"t:t/0","id":"t/0","title":"t()"}]}],"sections":[],"title":"Plausible.Ingestion.Counters.Record"},{"group":"","id":"Plausible.Ingestion.Counters.TelemetryHandler","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"handle_event/4","id":"handle_event/4","title":"handle_event(list, measurements, map, buffer)"},{"anchor":"install/1","id":"install/1","title":"install(buffer)"}]}],"sections":[],"title":"Plausible.Ingestion.Counters.TelemetryHandler"},{"group":"","id":"Plausible.Ingestion.Event","nodeGroups":[{"key":"types","name":"Types","nodes":[{"anchor":"t:drop_reason/0","id":"drop_reason/0","title":"drop_reason()"},{"anchor":"t:t/0","id":"t/0","title":"t()"}]},{"key":"functions","name":"Functions","nodes":[{"anchor":"build_and_buffer/1","id":"build_and_buffer/1","title":"build_and_buffer(request)"},{"anchor":"emit_telemetry_buffered/1","id":"emit_telemetry_buffered/1","title":"emit_telemetry_buffered(event)"},{"anchor":"emit_telemetry_dropped/2","id":"emit_telemetry_dropped/2","title":"emit_telemetry_dropped(event, reason)"},{"anchor":"telemetry_event_buffered/0","id":"telemetry_event_buffered/0","title":"telemetry_event_buffered()"},{"anchor":"telemetry_event_dropped/0","id":"telemetry_event_dropped/0","title":"telemetry_event_dropped()"}]}],"sections":[],"title":"Plausible.Ingestion.Event"},{"group":"","id":"Plausible.Ingestion.Request","nodeGroups":[{"key":"types","name":"Types","nodes":[{"anchor":"t:t/0","id":"t/0","title":"t()"}]},{"key":"functions","name":"Functions","nodes":[{"anchor":"build/2","id":"build/2","title":"build(conn, now \\\\ NaiveDateTime.utc_now())"},{"anchor":"sanitize_hostname/1","id":"sanitize_hostname/1","title":"sanitize_hostname(hostname)"}]}],"sections":[],"title":"Plausible.Ingestion.Request"},{"group":"","id":"Plausible.Mailer","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"deliver/1","id":"deliver/1","title":"deliver(email)"},{"anchor":"deliver_later/2","id":"deliver_later/2","title":"deliver_later(email, opts \\\\ [])"},{"anchor":"deliver_later!/2","id":"deliver_later!/2","title":"deliver_later!(email, opts \\\\ [])"},{"anchor":"deliver_now/2","id":"deliver_now/2","title":"deliver_now(email, opts \\\\ [])"},{"anchor":"deliver_now!/2","id":"deliver_now!/2","title":"deliver_now!(email, opts \\\\ [])"},{"anchor":"send/1","id":"send/1","title":"send(email)"}]}],"sections":[],"title":"Plausible.Mailer"},{"group":"","id":"Plausible.OpenTelemetry.Sampler","sections":[],"title":"Plausible.OpenTelemetry.Sampler"},{"group":"","id":"Plausible.PaddleApi.Mock","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"get_invoices/1","id":"get_invoices/1","title":"get_invoices(subscription)"},{"anchor":"get_subscription/1","id":"get_subscription/1","title":"get_subscription(_)"},{"anchor":"update_subscription/2","id":"update_subscription/2","title":"update_subscription(_, map)"}]}],"sections":[],"title":"Plausible.PaddleApi.Mock"},{"group":"","id":"Plausible.PromEx","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"child_spec/1","id":"child_spec/1","title":"child_spec(init_arg)"}]}],"sections":[],"title":"Plausible.PromEx"},{"group":"","id":"Plausible.PromEx.Plugins.PlausibleMetrics","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"execute_cache_metrics/0","id":"execute_cache_metrics/0","title":"execute_cache_metrics()"},{"anchor":"execute_write_buffer_metrics/0","id":"execute_write_buffer_metrics/0","title":"execute_write_buffer_metrics()"}]}],"sections":[],"title":"Plausible.PromEx.Plugins.PlausibleMetrics"},{"group":"","id":"Plausible.Purge","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"delete_imported_stats!/1","id":"delete_imported_stats!/1","title":"delete_imported_stats!(site)"},{"anchor":"delete_native_stats!/1","id":"delete_native_stats!/1","title":"delete_native_stats!(site)"},{"anchor":"reset!/1","id":"reset!/1","title":"reset!(site)"}]}],"sections":[],"title":"Plausible.Purge"},{"group":"","id":"Plausible.Release","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"configure_ref_inspector/0","id":"configure_ref_inspector/0","title":"configure_ref_inspector()"},{"anchor":"configure_ua_inspector/0","id":"configure_ua_inspector/0","title":"configure_ua_inspector()"},{"anchor":"createdb/0","id":"createdb/0","title":"createdb()"},{"anchor":"migrate/0","id":"migrate/0","title":"migrate()"},{"anchor":"rollback/0","id":"rollback/0","title":"rollback()"},{"anchor":"seed/0","id":"seed/0","title":"seed()"},{"anchor":"selfhost?/0","id":"selfhost?/0","title":"selfhost?()"},{"anchor":"should_be_first_launch?/0","id":"should_be_first_launch?/0","title":"should_be_first_launch?()"}]}],"sections":[],"title":"Plausible.Release"},{"group":"","id":"Plausible.Repo","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"aggregate/3","id":"aggregate/3","title":"aggregate(queryable, aggregate, opts \\\\ [])"},{"anchor":"aggregate/4","id":"aggregate/4","title":"aggregate(queryable, aggregate, field, opts)"},{"anchor":"all/2","id":"all/2","title":"all(queryable, opts \\\\ [])"},{"anchor":"checked_out?/0","id":"checked_out?/0","title":"checked_out?()"},{"anchor":"checkout/2","id":"checkout/2","title":"checkout(fun, opts \\\\ [])"},{"anchor":"child_spec/1","id":"child_spec/1","title":"child_spec(opts)"},{"anchor":"config/0","id":"config/0","title":"config()"},{"anchor":"default_options/1","id":"default_options/1","title":"default_options(operation)"},{"anchor":"delete/2","id":"delete/2","title":"delete(struct, opts \\\\ [])"},{"anchor":"delete!/2","id":"delete!/2","title":"delete!(struct, opts \\\\ [])"},{"anchor":"delete_all/2","id":"delete_all/2","title":"delete_all(queryable, opts \\\\ [])"},{"anchor":"disconnect_all/2","id":"disconnect_all/2","title":"disconnect_all(interval, opts \\\\ [])"},{"anchor":"exists?/2","id":"exists?/2","title":"exists?(queryable, opts \\\\ [])"},{"anchor":"explain/3","id":"explain/3","title":"explain(operation, queryable, opts \\\\ [])"},{"anchor":"get/3","id":"get/3","title":"get(queryable, id, opts \\\\ [])"},{"anchor":"get!/3","id":"get!/3","title":"get!(queryable, id, opts \\\\ [])"},{"anchor":"get_by/3","id":"get_by/3","title":"get_by(queryable, clauses, opts \\\\ [])"},{"anchor":"get_by!/3","id":"get_by!/3","title":"get_by!(queryable, clauses, opts \\\\ [])"},{"anchor":"get_dynamic_repo/0","id":"get_dynamic_repo/0","title":"get_dynamic_repo()"},{"anchor":"in_transaction?/0","id":"in_transaction?/0","title":"in_transaction?()"},{"anchor":"insert/2","id":"insert/2","title":"insert(struct, opts \\\\ [])"},{"anchor":"insert!/2","id":"insert!/2","title":"insert!(struct, opts \\\\ [])"},{"anchor":"insert_all/3","id":"insert_all/3","title":"insert_all(schema_or_source, entries, opts \\\\ [])"},{"anchor":"insert_or_update/2","id":"insert_or_update/2","title":"insert_or_update(changeset, opts \\\\ [])"},{"anchor":"insert_or_update!/2","id":"insert_or_update!/2","title":"insert_or_update!(changeset, opts \\\\ [])"},{"anchor":"load/2","id":"load/2","title":"load(schema_or_types, data)"},{"anchor":"one/2","id":"one/2","title":"one(queryable, opts \\\\ [])"},{"anchor":"one!/2","id":"one!/2","title":"one!(queryable, opts \\\\ [])"},{"anchor":"paginate/3","id":"paginate/3","title":"paginate(query, params \\\\ %{}, options \\\\ [])"},{"anchor":"preload/3","id":"preload/3","title":"preload(struct_or_structs_or_nil, preloads, opts \\\\ [])"},{"anchor":"prepare_query/3","id":"prepare_query/3","title":"prepare_query(operation, query, opts)"},{"anchor":"put_dynamic_repo/1","id":"put_dynamic_repo/1","title":"put_dynamic_repo(dynamic)"},{"anchor":"query/3","id":"query/3","title":"query(sql, params \\\\ [], opts \\\\ [])"},{"anchor":"query!/3","id":"query!/3","title":"query!(sql, params \\\\ [], opts \\\\ [])"},{"anchor":"query_many/3","id":"query_many/3","title":"query_many(sql, params \\\\ [], opts \\\\ [])"},{"anchor":"query_many!/3","id":"query_many!/3","title":"query_many!(sql, params \\\\ [], opts \\\\ [])"},{"anchor":"reload/2","id":"reload/2","title":"reload(queryable, opts \\\\ [])"},{"anchor":"reload!/2","id":"reload!/2","title":"reload!(queryable, opts \\\\ [])"},{"anchor":"rollback/1","id":"rollback/1","title":"rollback(value)"},{"anchor":"start_link/1","id":"start_link/1","title":"start_link(opts \\\\ [])"},{"anchor":"stop/1","id":"stop/1","title":"stop(timeout \\\\ 5000)"},{"anchor":"stream/2","id":"stream/2","title":"stream(queryable, opts \\\\ [])"},{"anchor":"to_sql/2","id":"to_sql/2","title":"to_sql(operation, queryable)"},{"anchor":"transaction/2","id":"transaction/2","title":"transaction(fun_or_multi, opts \\\\ [])"},{"anchor":"update/2","id":"update/2","title":"update(struct, opts \\\\ [])"},{"anchor":"update!/2","id":"update!/2","title":"update!(struct, opts \\\\ [])"},{"anchor":"update_all/3","id":"update_all/3","title":"update_all(queryable, updates, opts \\\\ [])"}]}],"sections":[],"title":"Plausible.Repo"},{"group":"","id":"Plausible.Sentry.Client","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"child_spec/0","id":"child_spec/0","title":"child_spec()"},{"anchor":"post/3","id":"post/3","title":"post(url, headers, body)"}]}],"sections":[],"title":"Plausible.Sentry.Client"},{"group":"","id":"Plausible.SentryFilter","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"before_send/1","id":"before_send/1","title":"before_send(event)"},{"anchor":"exclude_exception?/2","id":"exclude_exception?/2","title":"exclude_exception?(exception, source)"}]}],"sections":[],"title":"Plausible.SentryFilter"},{"group":"","id":"Plausible.Session.CacheStore","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"on_event/3","id":"on_event/3","title":"on_event(event, prev_user_id, buffer \\\\ WriteBuffer)"}]}],"sections":[],"title":"Plausible.Session.CacheStore"},{"group":"","id":"Plausible.Session.Salts","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"child_spec/1","id":"child_spec/1","title":"child_spec(arg)"},{"anchor":"fetch/0","id":"fetch/0","title":"fetch()"},{"anchor":"rotate/0","id":"rotate/0","title":"rotate()"},{"anchor":"start_link/1","id":"start_link/1","title":"start_link(opts)"}]}],"sections":[],"title":"Plausible.Session.Salts"},{"group":"","id":"Plausible.Session.WriteBuffer","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"child_spec/1","id":"child_spec/1","title":"child_spec(init_arg)"},{"anchor":"flush/0","id":"flush/0","title":"flush()"},{"anchor":"init/1","id":"init/1","title":"init(buffer)"},{"anchor":"insert/1","id":"insert/1","title":"insert(sessions)"},{"anchor":"start_link/1","id":"start_link/1","title":"start_link(opts)"}]}],"sections":[],"title":"Plausible.Session.WriteBuffer"},{"group":"","id":"Plausible.Site","nodeGroups":[{"key":"types","name":"Types","nodes":[{"anchor":"t:t/0","id":"t/0","title":"t()"}]},{"key":"functions","name":"Functions","nodes":[{"anchor":"changeset/2","id":"changeset/2","title":"changeset(site, attrs \\\\ %{})"},{"anchor":"crm_changeset/2","id":"crm_changeset/2","title":"crm_changeset(site, attrs)"},{"anchor":"feature_toggle_change/3","id":"feature_toggle_change/3","title":"feature_toggle_change(site, property, opts \\\\ [])"},{"anchor":"import_failure/1","id":"import_failure/1","title":"import_failure(site)"},{"anchor":"import_success/1","id":"import_success/1","title":"import_success(site)"},{"anchor":"local_start_date/1","id":"local_start_date/1","title":"local_start_date(site)"},{"anchor":"make_private/1","id":"make_private/1","title":"make_private(site)"},{"anchor":"make_public/1","id":"make_public/1","title":"make_public(site)"},{"anchor":"remove_imported_data/1","id":"remove_imported_data/1","title":"remove_imported_data(site)"},{"anchor":"set_allowed_event_props/2","id":"set_allowed_event_props/2","title":"set_allowed_event_props(site, list)"},{"anchor":"set_imported_source/2","id":"set_imported_source/2","title":"set_imported_source(site, imported_source)"},{"anchor":"set_native_stats_start_at/2","id":"set_native_stats_start_at/2","title":"set_native_stats_start_at(site, val)"},{"anchor":"set_stats_start_date/2","id":"set_stats_start_date/2","title":"set_stats_start_date(site, val)"},{"anchor":"start_import/5","id":"start_import/5","title":"start_import(site, start_date, end_date, imported_source, status \\\\ \"importing\")"},{"anchor":"tz_offset/2","id":"tz_offset/2","title":"tz_offset(site, utc_now \\\\ DateTime.utc_now())"},{"anchor":"update_changeset/3","id":"update_changeset/3","title":"update_changeset(site, attrs \\\\ %{}, opts \\\\ [])"}]}],"sections":[],"title":"Plausible.Site"},{"group":"","id":"Plausible.Site.Cache","nodeGroups":[{"key":"types","name":"Types","nodes":[{"anchor":"t:t/0","id":"t/0","title":"t()"}]},{"key":"functions","name":"Functions","nodes":[{"anchor":"child_spec/1","id":"child_spec/1","title":"child_spec(opts)"},{"anchor":"enabled?/0","id":"enabled?/0","title":"enabled?()"},{"anchor":"get/2","id":"get/2","title":"get(domain, opts \\\\ [])"},{"anchor":"get_site_id/2","id":"get_site_id/2","title":"get_site_id(domain, opts \\\\ [])"},{"anchor":"hit_rate/1","id":"hit_rate/1","title":"hit_rate(cache_name \\\\ :sites_by_domain)"},{"anchor":"merge/2","id":"merge/2","title":"merge(new_items, opts \\\\ [])"},{"anchor":"name/0","id":"name/0","title":"name()"},{"anchor":"ready?/1","id":"ready?/1","title":"ready?(cache_name \\\\ :sites_by_domain)"},{"anchor":"refresh_all/1","id":"refresh_all/1","title":"refresh_all(opts \\\\ [])"},{"anchor":"refresh_updated_recently/1","id":"refresh_updated_recently/1","title":"refresh_updated_recently(opts \\\\ [])"},{"anchor":"size/1","id":"size/1","title":"size(cache_name \\\\ :sites_by_domain)"},{"anchor":"telemetry_event_refresh/2","id":"telemetry_event_refresh/2","title":"telemetry_event_refresh(cache_name \\\\ :sites_by_domain, mode)"}]}],"sections":[],"title":"Plausible.Site.Cache"},{"group":"","id":"Plausible.Site.Cache.Warmer","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"child_spec/1","id":"child_spec/1","title":"child_spec(opts)"},{"anchor":"interval/0","id":"interval/0","title":"interval()"}]}],"sections":[],"title":"Plausible.Site.Cache.Warmer"},{"group":"","id":"Plausible.Site.Cache.Warmer.All","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"child_spec/1","id":"child_spec/1","title":"child_spec(opts)"}]}],"sections":[],"title":"Plausible.Site.Cache.Warmer.All"},{"group":"","id":"Plausible.Site.Cache.Warmer.RecentlyUpdated","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"child_spec/1","id":"child_spec/1","title":"child_spec(opts)"}]}],"sections":[],"title":"Plausible.Site.Cache.Warmer.RecentlyUpdated"},{"group":"","id":"Plausible.Site.CustomDomain","sections":[],"title":"Plausible.Site.CustomDomain"},{"group":"","id":"Plausible.Site.Domain","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"change/3","id":"change/3","title":"change(site, new_domain, opts \\\\ [])"},{"anchor":"expire_change_transitions/1","id":"expire_change_transitions/1","title":"expire_change_transitions(expire_threshold_hours \\\\ 72)"}]}],"sections":[],"title":"Plausible.Site.Domain"},{"group":"","id":"Plausible.Site.GateKeeper","nodeGroups":[{"key":"types","name":"Types","nodes":[{"anchor":"t:policy/0","id":"policy/0","title":"policy()"},{"anchor":"t:t/0","id":"t/0","title":"t()"}]},{"key":"functions","name":"Functions","nodes":[{"anchor":"check/2","id":"check/2","title":"check(domain, opts \\\\ [])"},{"anchor":"key/1","id":"key/1","title":"key(domain)"}]}],"sections":[],"title":"Plausible.Site.GateKeeper"},{"group":"","id":"Plausible.Site.GoogleAuth","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"changeset/2","id":"changeset/2","title":"changeset(auth, attrs \\\\ %{})"},{"anchor":"set_property/2","id":"set_property/2","title":"set_property(auth, attrs \\\\ %{})"}]}],"sections":[],"title":"Plausible.Site.GoogleAuth"},{"group":"","id":"Plausible.Site.ImportedData","sections":[],"title":"Plausible.Site.ImportedData"},{"group":"","id":"Plausible.Site.Membership","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"changeset/2","id":"changeset/2","title":"changeset(schema, attrs)"}]}],"sections":[],"title":"Plausible.Site.Membership"},{"group":"","id":"Plausible.Site.MonthlyReport","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"add_recipient/2","id":"add_recipient/2","title":"add_recipient(report, recipient)"},{"anchor":"changeset/2","id":"changeset/2","title":"changeset(settings, attrs \\\\ %{})"},{"anchor":"remove_recipient/2","id":"remove_recipient/2","title":"remove_recipient(report, recipient)"}]}],"sections":[],"title":"Plausible.Site.MonthlyReport"},{"group":"","id":"Plausible.Site.Removal","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"run/1","id":"run/1","title":"run(domain)"}]}],"sections":[],"title":"Plausible.Site.Removal"},{"group":"","id":"Plausible.Site.SharedLink","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"changeset/2","id":"changeset/2","title":"changeset(link, attrs \\\\ %{})"}]}],"sections":[],"title":"Plausible.Site.SharedLink"},{"group":"","id":"Plausible.Site.SpikeNotification","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"add_recipient/2","id":"add_recipient/2","title":"add_recipient(schema, recipient)"},{"anchor":"changeset/2","id":"changeset/2","title":"changeset(schema, attrs)"},{"anchor":"remove_recipient/2","id":"remove_recipient/2","title":"remove_recipient(schema, recipient)"},{"anchor":"was_sent/1","id":"was_sent/1","title":"was_sent(schema)"}]}],"sections":[],"title":"Plausible.Site.SpikeNotification"},{"group":"","id":"Plausible.Site.WeeklyReport","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"add_recipient/2","id":"add_recipient/2","title":"add_recipient(report, recipient)"},{"anchor":"changeset/2","id":"changeset/2","title":"changeset(settings, attrs \\\\ %{})"},{"anchor":"remove_recipient/2","id":"remove_recipient/2","title":"remove_recipient(report, recipient)"}]}],"sections":[],"title":"Plausible.Site.WeeklyReport"},{"group":"","id":"Plausible.SiteAdmin","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"create_changeset/2","id":"create_changeset/2","title":"create_changeset(schema, attrs)"},{"anchor":"custom_index_query/3","id":"custom_index_query/3","title":"custom_index_query(conn, schema, query)"},{"anchor":"form_fields/1","id":"form_fields/1","title":"form_fields(_)"},{"anchor":"get_struct_fields/1","id":"get_struct_fields/1","title":"get_struct_fields(module)"},{"anchor":"index/1","id":"index/1","title":"index(_)"},{"anchor":"list_actions/1","id":"list_actions/1","title":"list_actions(conn)"},{"anchor":"ordering/1","id":"ordering/1","title":"ordering(schema)"},{"anchor":"search_fields/1","id":"search_fields/1","title":"search_fields(schema)"},{"anchor":"set_allowed_props_for_site/3","id":"set_allowed_props_for_site/3","title":"set_allowed_props_for_site(arg1, arg2, params)"},{"anchor":"update_changeset/2","id":"update_changeset/2","title":"update_changeset(schema, attrs)"}]}],"sections":[],"title":"Plausible.SiteAdmin"},{"group":"","id":"Plausible.Sites","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"create/2","id":"create/2","title":"create(user, params)"},{"anchor":"create_shared_link/3","id":"create_shared_link/3","title":"create_shared_link(site, name, password \\\\ nil)"},{"anchor":"get_by_domain/1","id":"get_by_domain/1","title":"get_by_domain(domain)"},{"anchor":"get_for_user/3","id":"get_for_user/3","title":"get_for_user(user_id, domain, roles \\\\ [:owner, :admin, :viewer])"},{"anchor":"get_for_user!/3","id":"get_for_user!/3","title":"get_for_user!(user_id, domain, roles \\\\ [:owner, :admin, :viewer])"},{"anchor":"has_admin_access?/2","id":"has_admin_access?/2","title":"has_admin_access?(user_id, site)"},{"anchor":"has_goals?/1","id":"has_goals?/1","title":"has_goals?(site)"},{"anchor":"has_stats?/1","id":"has_stats?/1","title":"has_stats?(site)"},{"anchor":"is_member?/2","id":"is_member?/2","title":"is_member?(user_id, site)"},{"anchor":"locked?/1","id":"locked?/1","title":"locked?(site)"},{"anchor":"owned_site_ids/1","id":"owned_site_ids/1","title":"owned_site_ids(user)"},{"anchor":"owned_sites_count/1","id":"owned_sites_count/1","title":"owned_sites_count(user)"},{"anchor":"owned_sites_domains/1","id":"owned_sites_domains/1","title":"owned_sites_domains(user)"},{"anchor":"owner_for/1","id":"owner_for/1","title":"owner_for(site)"},{"anchor":"role/2","id":"role/2","title":"role(user_id, site)"},{"anchor":"shared_link_url/2","id":"shared_link_url/2","title":"shared_link_url(site, link)"},{"anchor":"stats_start_date/1","id":"stats_start_date/1","title":"stats_start_date(site)"}]}],"sections":[],"title":"Plausible.Sites"},{"group":"","id":"Plausible.Stats","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"aggregate/3","id":"aggregate/3","title":"aggregate(site, query, metrics)"},{"anchor":"breakdown/5","id":"breakdown/5","title":"breakdown(site, query, prop, metrics, pagination)"},{"anchor":"current_visitors/1","id":"current_visitors/1","title":"current_visitors(site)"},{"anchor":"filter_suggestions/4","id":"filter_suggestions/4","title":"filter_suggestions(site, query, filter_name, filter_search)"},{"anchor":"funnel/3","id":"funnel/3","title":"funnel(site, query, funnel)"},{"anchor":"timeseries/3","id":"timeseries/3","title":"timeseries(site, query, metrics)"}]}],"sections":[],"title":"Plausible.Stats"},{"group":"","id":"Plausible.Stats.Aggregate","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"aggregate/3","id":"aggregate/3","title":"aggregate(site, query, metrics)"}]}],"sections":[],"title":"Plausible.Stats.Aggregate"},{"group":"","id":"Plausible.Stats.Base","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"apply_entry_prop_filter/3","id":"apply_entry_prop_filter/3","title":"apply_entry_prop_filter(sessions_q, prop_name, arg3)"},{"anchor":"base_event_query/2","id":"base_event_query/2","title":"base_event_query(site, query)"},{"anchor":"filter_by_entry_props/2","id":"filter_by_entry_props/2","title":"filter_by_entry_props(sessions_q, query)"},{"anchor":"filter_converted_sessions/3","id":"filter_converted_sessions/3","title":"filter_converted_sessions(db_query, site, query)"},{"anchor":"page_regex/1","id":"page_regex/1","title":"page_regex(expr)"},{"anchor":"query_events/2","id":"query_events/2","title":"query_events(site, query)"},{"anchor":"query_sessions/2","id":"query_sessions/2","title":"query_sessions(site, query)"},{"anchor":"select_event_metrics/2","id":"select_event_metrics/2","title":"select_event_metrics(q, list)"},{"anchor":"select_session_metrics/3","id":"select_session_metrics/3","title":"select_session_metrics(q, list, query)"},{"anchor":"utc_boundaries/2","id":"utc_boundaries/2","title":"utc_boundaries(query, site)"}]}],"sections":[],"title":"Plausible.Stats.Base"},{"group":"","id":"Plausible.Stats.Breakdown","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"breakdown/5","id":"breakdown/5","title":"breakdown(site, query, property, metrics, pagination)"}]}],"sections":[],"title":"Plausible.Stats.Breakdown"},{"group":"","id":"Plausible.Stats.Clickhouse","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"current_visitors/2","id":"current_visitors/2","title":"current_visitors(site, query)"},{"anchor":"has_pageviews?/1","id":"has_pageviews?/1","title":"has_pageviews?(site)"},{"anchor":"imported_pageview_count/1","id":"imported_pageview_count/1","title":"imported_pageview_count(site)"},{"anchor":"last_24h_visitors/1","id":"last_24h_visitors/1","title":"last_24h_visitors(sites)"},{"anchor":"pageview_start_date_local/1","id":"pageview_start_date_local/1","title":"pageview_start_date_local(site)"},{"anchor":"top_sources/6","id":"top_sources/6","title":"top_sources(site, query, limit, page, show_noref \\\\ false, include_details)"},{"anchor":"usage_breakdown/1","id":"usage_breakdown/1","title":"usage_breakdown(domains_or_site_ids)"},{"anchor":"usage_breakdown/2","id":"usage_breakdown/2","title":"usage_breakdown(domains, date_range)"}]}],"sections":[],"title":"Plausible.Stats.Clickhouse"},{"group":"","id":"Plausible.Stats.Compare","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"calculate_change/3","id":"calculate_change/3","title":"calculate_change(metric, old_stats, new_stats)"}]}],"sections":[],"title":"Plausible.Stats.Compare"},{"group":"","id":"Plausible.Stats.Comparisons","nodeGroups":[{"key":"types","name":"Types","nodes":[{"anchor":"t:mode/0","id":"mode/0","title":"mode()"}]},{"key":"functions","name":"Functions","nodes":[{"anchor":"compare/4","id":"compare/4","title":"compare(site, source_query, mode, opts \\\\ [])"}]}],"sections":[],"title":"Plausible.Stats.Comparisons"},{"group":"","id":"Plausible.Stats.CurrentVisitors","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"current_visitors/1","id":"current_visitors/1","title":"current_visitors(site)"}]}],"sections":[],"title":"Plausible.Stats.CurrentVisitors"},{"group":"","id":"Plausible.Stats.CustomProps","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"maybe_allowed_props_only/2","id":"maybe_allowed_props_only/2","title":"maybe_allowed_props_only(q, allowed_props)"},{"anchor":"props_for_all_event_names/2","id":"props_for_all_event_names/2","title":"props_for_all_event_names(site, query)"},{"anchor":"props_for_goal/2","id":"props_for_goal/2","title":"props_for_goal(site, query)"}]}],"sections":[],"title":"Plausible.Stats.CustomProps"},{"group":"","id":"Plausible.Stats.FilterParser","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"parse_filters/1","id":"parse_filters/1","title":"parse_filters(filters)"}]}],"sections":[],"title":"Plausible.Stats.FilterParser"},{"group":"","id":"Plausible.Stats.FilterSuggestions","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"filter_suggestions/4","id":"filter_suggestions/4","title":"filter_suggestions(site, query, filter_name, filter_search)"}]}],"sections":[],"title":"Plausible.Stats.FilterSuggestions"},{"group":"","id":"Plausible.Stats.Filters","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"add_prefix/1","id":"add_prefix/1","title":"add_prefix(query)"},{"anchor":"visit_props/0","id":"visit_props/0","title":"visit_props()"}]}],"sections":[],"title":"Plausible.Stats.Filters"},{"group":"","id":"Plausible.Stats.Fragments","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"bounce_rate/0","id":"bounce_rate/0","title":"bounce_rate()"},{"anchor":"coalesce_string/2","id":"coalesce_string/2","title":"coalesce_string(fieldA, fieldB)"},{"anchor":"sample_percent/0","id":"sample_percent/0","title":"sample_percent()"},{"anchor":"to_timezone/2","id":"to_timezone/2","title":"to_timezone(date, timezone)"},{"anchor":"total/0","id":"total/0","title":"total()"},{"anchor":"uniq/1","id":"uniq/1","title":"uniq(user_id)"},{"anchor":"visit_duration/0","id":"visit_duration/0","title":"visit_duration()"},{"anchor":"weekstart_not_before/2","id":"weekstart_not_before/2","title":"weekstart_not_before(date, not_before)"},{"anchor":"weekstart_not_before/3","id":"weekstart_not_before/3","title":"weekstart_not_before(date, not_before, timezone)"}]}],"sections":[],"title":"Plausible.Stats.Fragments"},{"group":"","id":"Plausible.Stats.Funnel","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"funnel/3","id":"funnel/3","title":"funnel(site, query, funnel_id)"}]}],"sections":[],"title":"Plausible.Stats.Funnel"},{"group":"","id":"Plausible.Stats.Imported","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"merge_imported/5","id":"merge_imported/5","title":"merge_imported(q, site, query, property, metrics)"},{"anchor":"merge_imported_timeseries/4","id":"merge_imported_timeseries/4","title":"merge_imported_timeseries(native_q, site, query, metrics)"}]}],"sections":[],"title":"Plausible.Stats.Imported"},{"group":"","id":"Plausible.Stats.Interval","nodeGroups":[{"key":"types","name":"Types","nodes":[{"anchor":"t:t/0","id":"t/0","title":"t()"}]},{"key":"functions","name":"Functions","nodes":[{"anchor":"default_for_date_range/1","id":"default_for_date_range/1","title":"default_for_date_range(range)"},{"anchor":"default_for_period/1","id":"default_for_period/1","title":"default_for_period(period)"},{"anchor":"list/0","id":"list/0","title":"list()"},{"anchor":"valid?/1","id":"valid?/1","title":"valid?(interval)"},{"anchor":"valid_by_period/0","id":"valid_by_period/0","title":"valid_by_period()"},{"anchor":"valid_for_period?/2","id":"valid_for_period?/2","title":"valid_for_period?(period, interval)"}]}],"sections":[],"title":"Plausible.Stats.Interval"},{"group":"","id":"Plausible.Stats.Props","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"event_props/0","id":"event_props/0","title":"event_props()"},{"anchor":"valid_prop?/1","id":"valid_prop?/1","title":"valid_prop?(prop)"}]}],"sections":[],"title":"Plausible.Stats.Props"},{"group":"","id":"Plausible.Stats.Query","nodeGroups":[{"key":"types","name":"Types","nodes":[{"anchor":"t:t/0","id":"t/0","title":"t()"}]},{"key":"functions","name":"Functions","nodes":[{"anchor":"from/2","id":"from/2","title":"from(site, params)"},{"anchor":"get_filter_by_prefix/2","id":"get_filter_by_prefix/2","title":"get_filter_by_prefix(query, prefix)"},{"anchor":"has_event_filters?/1","id":"has_event_filters?/1","title":"has_event_filters?(query)"},{"anchor":"include_imported?/3","id":"include_imported?/3","title":"include_imported?(query, site, requested?)"},{"anchor":"put_filter/3","id":"put_filter/3","title":"put_filter(query, key, val)"},{"anchor":"remove_event_filters/2","id":"remove_event_filters/2","title":"remove_event_filters(query, opts)"},{"anchor":"trace/1","id":"trace/1","title":"trace(query)"}]}],"sections":[],"title":"Plausible.Stats.Query"},{"group":"","id":"Plausible.Stats.Timeseries","nodeGroups":[{"key":"types","name":"Types","nodes":[{"anchor":"t:results/0","id":"results/0","title":"results()"}]},{"key":"functions","name":"Functions","nodes":[{"anchor":"timeseries/3","id":"timeseries/3","title":"timeseries(site, query, metrics)"}]}],"sections":[],"title":"Plausible.Stats.Timeseries"},{"group":"","id":"Plausible.Stats.Util","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"remove_internal_visits_metric/1","id":"remove_internal_visits_metric/1","title":"remove_internal_visits_metric(result)"},{"anchor":"remove_internal_visits_metric/2","id":"remove_internal_visits_metric/2","title":"remove_internal_visits_metric(results, metrics)"}]}],"sections":[],"title":"Plausible.Stats.Util"},{"group":"","id":"Plausible.Test.Support.HTML","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"element_exists?/2","id":"element_exists?/2","title":"element_exists?(html, selector)"},{"anchor":"find/2","id":"find/2","title":"find(html, value)"},{"anchor":"form_exists?/2","id":"form_exists?/2","title":"form_exists?(html, action_path)"},{"anchor":"submit_button/2","id":"submit_button/2","title":"submit_button(html, form)"},{"anchor":"text_of_attr/2","id":"text_of_attr/2","title":"text_of_attr(element, attr)"},{"anchor":"text_of_element/2","id":"text_of_element/2","title":"text_of_element(html, element)"}]}],"sections":[],"title":"Plausible.Test.Support.HTML"},{"group":"","id":"Plausible.TestUtils","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"add_imported_data/1","id":"add_imported_data/1","title":"add_imported_data(map)"},{"anchor":"await_clickhouse_count/2","id":"await_clickhouse_count/2","title":"await_clickhouse_count(query, expected)"},{"anchor":"create_api_key/1","id":"create_api_key/1","title":"create_api_key(map)"},{"anchor":"create_events/1","id":"create_events/1","title":"create_events(events)"},{"anchor":"create_new_site/1","id":"create_new_site/1","title":"create_new_site(map)"},{"anchor":"create_pageviews/1","id":"create_pageviews/1","title":"create_pageviews(pageviews)"},{"anchor":"create_sessions/1","id":"create_sessions/1","title":"create_sessions(sessions)"},{"anchor":"create_site/1","id":"create_site/1","title":"create_site(map)"},{"anchor":"create_user/1","id":"create_user/1","title":"create_user(_)"},{"anchor":"eventually/3","id":"eventually/3","title":"eventually(expectation, wait_time_ms \\\\ 50, retries \\\\ 10)"},{"anchor":"init_session/1","id":"init_session/1","title":"init_session(conn)"},{"anchor":"log_in/1","id":"log_in/1","title":"log_in(map)"},{"anchor":"patch_env/2","id":"patch_env/2","title":"patch_env(env_key, value)"},{"anchor":"populate_stats/1","id":"populate_stats/1","title":"populate_stats(events)"},{"anchor":"populate_stats/2","id":"populate_stats/2","title":"populate_stats(site, events)"},{"anchor":"relative_time/1","id":"relative_time/1","title":"relative_time(shifts)"},{"anchor":"setup_patch_env/2","id":"setup_patch_env/2","title":"setup_patch_env(env_key, value)"},{"anchor":"to_naive_truncate/1","id":"to_naive_truncate/1","title":"to_naive_truncate(dt)"},{"anchor":"use_api_key/1","id":"use_api_key/1","title":"use_api_key(map)"}]}],"sections":[],"title":"Plausible.TestUtils"},{"group":"","id":"Plausible.Themes","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"options/0","id":"options/0","title":"options()"}]}],"sections":[],"title":"Plausible.Themes"},{"group":"","id":"Plausible.Timezones","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"options/1","id":"options/1","title":"options(now \\\\ DateTime.utc_now())"}]}],"sections":[],"title":"Plausible.Timezones"},{"group":"","id":"Plausible.Workers.CheckUsage","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"check_enterprise_subscriber/2","id":"check_enterprise_subscriber/2","title":"check_enterprise_subscriber(subscriber, billing_mod)"},{"anchor":"day_of_month/1","id":"day_of_month/1","title":"day_of_month(date)"},{"anchor":"last_day_of_month/1","id":"last_day_of_month/1","title":"last_day_of_month(day)"},{"anchor":"least/2","id":"least/2","title":"least(left, right)"},{"anchor":"yesterday/0","id":"yesterday/0","title":"yesterday()"}]}],"sections":[],"title":"Plausible.Workers.CheckUsage"},{"group":"","id":"Plausible.Workers.CleanEmailVerificationCodes","sections":[],"title":"Plausible.Workers.CleanEmailVerificationCodes"},{"group":"","id":"Plausible.Workers.CleanInvitations","sections":[],"title":"Plausible.Workers.CleanInvitations"},{"group":"","id":"Plausible.Workers.ExpireDomainChangeTransitions","sections":[],"title":"Plausible.Workers.ExpireDomainChangeTransitions"},{"group":"","id":"Plausible.Workers.ImportGoogleAnalytics","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"import_failed/1","id":"import_failed/1","title":"import_failed(site)"}]}],"sections":[],"title":"Plausible.Workers.ImportGoogleAnalytics"},{"group":"","id":"Plausible.Workers.LockSites","sections":[],"title":"Plausible.Workers.LockSites"},{"group":"","id":"Plausible.Workers.NotifyAnnualRenewal","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"perform/1","id":"perform/1","title":"perform(job)"}]}],"sections":[],"title":"Plausible.Workers.NotifyAnnualRenewal"},{"group":"","id":"Plausible.Workers.RotateSalts","sections":[],"title":"Plausible.Workers.RotateSalts"},{"group":"","id":"Plausible.Workers.ScheduleEmailReports","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"first_of_month_9am/1","id":"first_of_month_9am/1","title":"first_of_month_9am(timezone)"},{"anchor":"monday_9am/1","id":"monday_9am/1","title":"monday_9am(timezone)"},{"anchor":"perform/1","id":"perform/1","title":"perform(job)"}]}],"sections":[],"title":"Plausible.Workers.ScheduleEmailReports"},{"group":"","id":"Plausible.Workers.SendCheckStatsEmails","sections":[],"title":"Plausible.Workers.SendCheckStatsEmails"},{"group":"","id":"Plausible.Workers.SendEmailReport","sections":[],"title":"Plausible.Workers.SendEmailReport"},{"group":"","id":"Plausible.Workers.SendSiteSetupEmails","sections":[],"title":"Plausible.Workers.SendSiteSetupEmails"},{"group":"","id":"Plausible.Workers.SendTrialNotifications","sections":[],"title":"Plausible.Workers.SendTrialNotifications"},{"group":"","id":"Plausible.Workers.SpikeNotifier","sections":[],"title":"Plausible.Workers.SpikeNotifier"},{"group":"","id":"PlausibleWeb","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"__using__/1","id":"__using__/1","title":"__using__(which)"},{"anchor":"channel/0","id":"channel/0","title":"channel()"},{"anchor":"controller/0","id":"controller/0","title":"controller()"},{"anchor":"router/0","id":"router/0","title":"router()"},{"anchor":"view/0","id":"view/0","title":"view()"}]}],"sections":[],"title":"PlausibleWeb"},{"group":"","id":"PlausibleWeb.Api.ExternalController","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"error/2","id":"error/2","title":"error(conn, params)"},{"anchor":"event/2","id":"event/2","title":"event(conn, params)"},{"anchor":"health/2","id":"health/2","title":"health(conn, params)"},{"anchor":"info/2","id":"info/2","title":"info(conn, params)"}]}],"sections":[],"title":"PlausibleWeb.Api.ExternalController"},{"group":"","id":"PlausibleWeb.Api.ExternalSitesController","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"create_site/2","id":"create_site/2","title":"create_site(conn, params)"},{"anchor":"delete_goal/2","id":"delete_goal/2","title":"delete_goal(conn, params)"},{"anchor":"delete_site/2","id":"delete_site/2","title":"delete_site(conn, map)"},{"anchor":"find_or_create_goal/2","id":"find_or_create_goal/2","title":"find_or_create_goal(conn, params)"},{"anchor":"find_or_create_shared_link/2","id":"find_or_create_shared_link/2","title":"find_or_create_shared_link(conn, params)"},{"anchor":"get_site/2","id":"get_site/2","title":"get_site(conn, map)"},{"anchor":"update_site/2","id":"update_site/2","title":"update_site(conn, params)"}]}],"sections":[],"title":"PlausibleWeb.Api.ExternalSitesController"},{"group":"","id":"PlausibleWeb.Api.ExternalStatsController","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"aggregate/2","id":"aggregate/2","title":"aggregate(conn, params)"},{"anchor":"breakdown/2","id":"breakdown/2","title":"breakdown(conn, params)"},{"anchor":"realtime_visitors/2","id":"realtime_visitors/2","title":"realtime_visitors(conn, params)"},{"anchor":"timeseries/2","id":"timeseries/2","title":"timeseries(conn, params)"}]}],"sections":[],"title":"PlausibleWeb.Api.ExternalStatsController"},{"group":"","id":"PlausibleWeb.Api.Helpers","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"bad_request/2","id":"bad_request/2","title":"bad_request(conn, msg)"},{"anchor":"not_found/2","id":"not_found/2","title":"not_found(conn, msg)"},{"anchor":"payment_required/2","id":"payment_required/2","title":"payment_required(conn, msg)"},{"anchor":"too_many_requests/2","id":"too_many_requests/2","title":"too_many_requests(conn, msg)"},{"anchor":"unauthorized/2","id":"unauthorized/2","title":"unauthorized(conn, msg)"}]}],"sections":[],"title":"PlausibleWeb.Api.Helpers"},{"group":"","id":"PlausibleWeb.Api.InternalController","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"disable_feature/2","id":"disable_feature/2","title":"disable_feature(conn, map)"},{"anchor":"domain_status/2","id":"domain_status/2","title":"domain_status(conn, map)"},{"anchor":"sites/2","id":"sites/2","title":"sites(conn, params)"}]}],"sections":[],"title":"PlausibleWeb.Api.InternalController"},{"group":"","id":"PlausibleWeb.Api.PaddleController","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"verified_signature?/1","id":"verified_signature?/1","title":"verified_signature?(params)"},{"anchor":"verify_signature/2","id":"verify_signature/2","title":"verify_signature(conn, opts)"},{"anchor":"webhook/2","id":"webhook/2","title":"webhook(conn, params)"}]}],"sections":[],"title":"PlausibleWeb.Api.PaddleController"},{"group":"","id":"PlausibleWeb.Api.StatsController","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"all_props_breakdown/2","id":"all_props_breakdown/2","title":"all_props_breakdown(conn, params)"},{"anchor":"browser_versions/2","id":"browser_versions/2","title":"browser_versions(conn, params)"},{"anchor":"browsers/2","id":"browsers/2","title":"browsers(conn, params)"},{"anchor":"cities/2","id":"cities/2","title":"cities(conn, params)"},{"anchor":"conversions/2","id":"conversions/2","title":"conversions(conn, params)"},{"anchor":"countries/2","id":"countries/2","title":"countries(conn, params)"},{"anchor":"current_visitors/2","id":"current_visitors/2","title":"current_visitors(conn, _)"},{"anchor":"entry_pages/2","id":"entry_pages/2","title":"entry_pages(conn, params)"},{"anchor":"exit_pages/2","id":"exit_pages/2","title":"exit_pages(conn, params)"},{"anchor":"filter_suggestions/2","id":"filter_suggestions/2","title":"filter_suggestions(conn, params)"},{"anchor":"funnel/2","id":"funnel/2","title":"funnel(conn, params)"},{"anchor":"main_graph/2","id":"main_graph/2","title":"main_graph(conn, params)"},{"anchor":"operating_system_versions/2","id":"operating_system_versions/2","title":"operating_system_versions(conn, params)"},{"anchor":"operating_systems/2","id":"operating_systems/2","title":"operating_systems(conn, params)"},{"anchor":"pages/2","id":"pages/2","title":"pages(conn, params)"},{"anchor":"prop_breakdown/2","id":"prop_breakdown/2","title":"prop_breakdown(conn, params)"},{"anchor":"referrer_drilldown/2","id":"referrer_drilldown/2","title":"referrer_drilldown(conn, params)"},{"anchor":"regions/2","id":"regions/2","title":"regions(conn, params)"},{"anchor":"screen_sizes/2","id":"screen_sizes/2","title":"screen_sizes(conn, params)"},{"anchor":"sources/2","id":"sources/2","title":"sources(conn, params)"},{"anchor":"top_stats/2","id":"top_stats/2","title":"top_stats(conn, params)"},{"anchor":"utm_campaigns/2","id":"utm_campaigns/2","title":"utm_campaigns(conn, params)"},{"anchor":"utm_contents/2","id":"utm_contents/2","title":"utm_contents(conn, params)"},{"anchor":"utm_mediums/2","id":"utm_mediums/2","title":"utm_mediums(conn, params)"},{"anchor":"utm_sources/2","id":"utm_sources/2","title":"utm_sources(conn, params)"},{"anchor":"utm_terms/2","id":"utm_terms/2","title":"utm_terms(conn, params)"}]}],"sections":[],"title":"PlausibleWeb.Api.StatsController"},{"group":"","id":"PlausibleWeb.AuthController","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"activate/2","id":"activate/2","title":"activate(conn, map)"},{"anchor":"activate_form/2","id":"activate_form/2","title":"activate_form(conn, params)"},{"anchor":"create_api_key/2","id":"create_api_key/2","title":"create_api_key(conn, map)"},{"anchor":"delete_api_key/2","id":"delete_api_key/2","title":"delete_api_key(conn, map)"},{"anchor":"delete_me/2","id":"delete_me/2","title":"delete_me(conn, params)"},{"anchor":"google_auth_callback/2","id":"google_auth_callback/2","title":"google_auth_callback(conn, params)"},{"anchor":"login/2","id":"login/2","title":"login(conn, map)"},{"anchor":"login_form/2","id":"login_form/2","title":"login_form(conn, params)"},{"anchor":"logout/2","id":"logout/2","title":"logout(conn, params)"},{"anchor":"new_api_key/2","id":"new_api_key/2","title":"new_api_key(conn, params)"},{"anchor":"password_form/2","id":"password_form/2","title":"password_form(conn, params)"},{"anchor":"password_reset/2","id":"password_reset/2","title":"password_reset(conn, map)"},{"anchor":"password_reset_form/2","id":"password_reset_form/2","title":"password_reset_form(conn, map)"},{"anchor":"password_reset_request/2","id":"password_reset_request/2","title":"password_reset_request(conn, params)"},{"anchor":"password_reset_request_form/2","id":"password_reset_request_form/2","title":"password_reset_request_form(conn, _)"},{"anchor":"register/2","id":"register/2","title":"register(conn, params)"},{"anchor":"register_form/2","id":"register_form/2","title":"register_form(conn, params)"},{"anchor":"register_from_invitation/2","id":"register_from_invitation/2","title":"register_from_invitation(conn, params)"},{"anchor":"register_from_invitation_form/2","id":"register_from_invitation_form/2","title":"register_from_invitation_form(conn, map)"},{"anchor":"request_activation_code/2","id":"request_activation_code/2","title":"request_activation_code(conn, params)"},{"anchor":"save_settings/2","id":"save_settings/2","title":"save_settings(conn, map)"},{"anchor":"set_password/2","id":"set_password/2","title":"set_password(conn, map)"},{"anchor":"user_settings/2","id":"user_settings/2","title":"user_settings(conn, params)"}]}],"sections":[],"title":"PlausibleWeb.AuthController"},{"group":"","id":"PlausibleWeb.AuthPlug","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"call/2","id":"call/2","title":"call(conn, opts)"},{"anchor":"init/1","id":"init/1","title":"init(options)"}]}],"sections":[],"title":"PlausibleWeb.AuthPlug"},{"group":"","id":"PlausibleWeb.AuthView","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"__resource__/0","id":"__resource__/0","title":"__resource__()"},{"anchor":"activate.html/1","id":"activate.html/1","title":"activate.html(assigns)"},{"anchor":"base_domain/0","id":"base_domain/0","title":"base_domain()"},{"anchor":"delimit_integer/1","id":"delimit_integer/1","title":"delimit_integer(number)"},{"anchor":"format_invoices/1","id":"format_invoices/1","title":"format_invoices(invoice_list)"},{"anchor":"invitation_expired.html/1","id":"invitation_expired.html/1","title":"invitation_expired.html(assigns)"},{"anchor":"login_form.html/1","id":"login_form.html/1","title":"login_form.html(assigns)"},{"anchor":"new_api_key.html/1","id":"new_api_key.html/1","title":"new_api_key.html(assigns)"},{"anchor":"password_form.html/1","id":"password_form.html/1","title":"password_form.html(assigns)"},{"anchor":"password_reset_form.html/1","id":"password_reset_form.html/1","title":"password_reset_form.html(assigns)"},{"anchor":"password_reset_request_form.html/1","id":"password_reset_request_form.html/1","title":"password_reset_request_form.html(assigns)"},{"anchor":"password_reset_request_success.html/1","id":"password_reset_request_success.html/1","title":"password_reset_request_success.html(assigns)"},{"anchor":"plausible_url/0","id":"plausible_url/0","title":"plausible_url()"},{"anchor":"present_subscription_status/1","id":"present_subscription_status/1","title":"present_subscription_status(status)"},{"anchor":"register_form.html/1","id":"register_form.html/1","title":"register_form.html(assigns)"},{"anchor":"register_from_invitation_form.html/1","id":"register_from_invitation_form.html/1","title":"register_from_invitation_form.html(assigns)"},{"anchor":"register_success.html/1","id":"register_success.html/1","title":"register_success.html(assigns)"},{"anchor":"render/2","id":"render/2","title":"render(template, assigns \\\\ %{})"},{"anchor":"subscription_colors/1","id":"subscription_colors/1","title":"subscription_colors(_)"},{"anchor":"subscription_interval/1","id":"subscription_interval/1","title":"subscription_interval(subscription)"},{"anchor":"subscription_quota/1","id":"subscription_quota/1","title":"subscription_quota(subscription)"},{"anchor":"template_not_found/2","id":"template_not_found/2","title":"template_not_found(template, assigns)"},{"anchor":"user_settings.html/1","id":"user_settings.html/1","title":"user_settings.html(assigns)"}]}],"sections":[],"title":"PlausibleWeb.AuthView"},{"group":"","id":"PlausibleWeb.AuthorizeSiteAccess","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"call/2","id":"call/2","title":"call(conn, allowed_roles)"},{"anchor":"init/1","id":"init/1","title":"init(allowed_roles)"}]}],"sections":[],"title":"PlausibleWeb.AuthorizeSiteAccess"},{"group":"","id":"PlausibleWeb.AuthorizeSitesApiPlug","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"call/2","id":"call/2","title":"call(conn, opts)"},{"anchor":"init/1","id":"init/1","title":"init(options)"}]}],"sections":[],"title":"PlausibleWeb.AuthorizeSitesApiPlug"},{"group":"","id":"PlausibleWeb.AuthorizeStatsApiPlug","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"call/2","id":"call/2","title":"call(conn, opts)"},{"anchor":"init/1","id":"init/1","title":"init(options)"}]}],"sections":[],"title":"PlausibleWeb.AuthorizeStatsApiPlug"},{"group":"","id":"PlausibleWeb.BillingController","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"change_enterprise_plan/2","id":"change_enterprise_plan/2","title":"change_enterprise_plan(conn, map)"},{"anchor":"change_plan/2","id":"change_plan/2","title":"change_plan(conn, map)"},{"anchor":"change_plan_form/2","id":"change_plan_form/2","title":"change_plan_form(conn, params)"},{"anchor":"change_plan_preview/2","id":"change_plan_preview/2","title":"change_plan_preview(conn, map)"},{"anchor":"ping_subscription/2","id":"ping_subscription/2","title":"ping_subscription(conn, params)"},{"anchor":"preview_susbcription/2","id":"preview_susbcription/2","title":"preview_susbcription(_, _)"},{"anchor":"upgrade/2","id":"upgrade/2","title":"upgrade(conn, params)"},{"anchor":"upgrade_enterprise_plan/2","id":"upgrade_enterprise_plan/2","title":"upgrade_enterprise_plan(conn, map)"},{"anchor":"upgrade_success/2","id":"upgrade_success/2","title":"upgrade_success(conn, params)"}]}],"sections":[],"title":"PlausibleWeb.BillingController"},{"group":"","id":"PlausibleWeb.BillingView","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"__resource__/0","id":"__resource__/0","title":"__resource__()"},{"anchor":"base_domain/0","id":"base_domain/0","title":"base_domain()"},{"anchor":"change_enterprise_plan.html/1","id":"change_enterprise_plan.html/1","title":"change_enterprise_plan.html(assigns)"},{"anchor":"change_enterprise_plan_contact_us.html/1","id":"change_enterprise_plan_contact_us.html/1","title":"change_enterprise_plan_contact_us.html(assigns)"},{"anchor":"change_plan.html/1","id":"change_plan.html/1","title":"change_plan.html(assigns)"},{"anchor":"change_plan_preview.html/1","id":"change_plan_preview.html/1","title":"change_plan_preview.html(assigns)"},{"anchor":"plausible_url/0","id":"plausible_url/0","title":"plausible_url()"},{"anchor":"present_currency/1","id":"present_currency/1","title":"present_currency(arg)"},{"anchor":"present_date/1","id":"present_date/1","title":"present_date(date)"},{"anchor":"reccommended_plan/1","id":"reccommended_plan/1","title":"reccommended_plan(usage)"},{"anchor":"render/2","id":"render/2","title":"render(template, assigns \\\\ %{})"},{"anchor":"template_not_found/2","id":"template_not_found/2","title":"template_not_found(template, assigns)"},{"anchor":"upgrade.html/1","id":"upgrade.html/1","title":"upgrade.html(assigns)"},{"anchor":"upgrade_success.html/1","id":"upgrade_success.html/1","title":"upgrade_success.html(assigns)"},{"anchor":"upgrade_to_plan.html/1","id":"upgrade_to_plan.html/1","title":"upgrade_to_plan.html(assigns)"}]}],"sections":[],"title":"PlausibleWeb.BillingView"},{"group":"","id":"PlausibleWeb.CRMAuthPlug","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"call/2","id":"call/2","title":"call(conn, opts)"},{"anchor":"init/1","id":"init/1","title":"init(options)"}]}],"sections":[],"title":"PlausibleWeb.CRMAuthPlug"},{"group":"","id":"PlausibleWeb.Captcha","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"enabled?/0","id":"enabled?/0","title":"enabled?()"},{"anchor":"sitekey/0","id":"sitekey/0","title":"sitekey()"},{"anchor":"verify/1","id":"verify/1","title":"verify(token)"}]}],"sections":[],"title":"PlausibleWeb.Captcha"},{"group":"","id":"PlausibleWeb.Components.Generic","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"notice/1","id":"notice/1","title":"notice(assigns)"}]}],"sections":[],"title":"PlausibleWeb.Components.Generic"},{"group":"","id":"PlausibleWeb.Components.Site.Feature","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"__resource__/0","id":"__resource__/0","title":"__resource__()"},{"anchor":"button_active/1","id":"button_active/1","title":"button_active(assigns)"},{"anchor":"button_inactive/1","id":"button_inactive/1","title":"button_inactive(assigns)"},{"anchor":"render/2","id":"render/2","title":"render(template, assigns \\\\ %{})"},{"anchor":"target/4","id":"target/4","title":"target(site, setting, conn, set_to)"},{"anchor":"template_not_found/2","id":"template_not_found/2","title":"template_not_found(template, assigns)"},{"anchor":"toggle/1","id":"toggle/1","title":"toggle(assigns)"}]}],"sections":[],"title":"PlausibleWeb.Components.Site.Feature"},{"group":"","id":"PlausibleWeb.ConnCase","sections":[],"title":"PlausibleWeb.ConnCase"},{"group":"","id":"PlausibleWeb.ControllerHelpers","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"render_error/2","id":"render_error/2","title":"render_error(conn, status)"},{"anchor":"render_error/3","id":"render_error/3","title":"render_error(conn, status, message)"}]}],"sections":[],"title":"PlausibleWeb.ControllerHelpers"},{"group":"","id":"PlausibleWeb.Email","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"activation_email/2","id":"activation_email/2","title":"activation_email(user, code)"},{"anchor":"base_email/0","id":"base_email/0","title":"base_email()"},{"anchor":"base_email/1","id":"base_email/1","title":"base_email(map)"},{"anchor":"cancellation_email/1","id":"cancellation_email/1","title":"cancellation_email(user)"},{"anchor":"check_stats_email/1","id":"check_stats_email/1","title":"check_stats_email(user)"},{"anchor":"create_site_email/1","id":"create_site_email/1","title":"create_site_email(user)"},{"anchor":"dashboard_locked/4","id":"dashboard_locked/4","title":"dashboard_locked(user, usage, last_cycle, suggested_plan)"},{"anchor":"enterprise_over_limit_internal_email/5","id":"enterprise_over_limit_internal_email/5","title":"enterprise_over_limit_internal_email(user, usage, last_cycle, site_usage, site_allowance)"},{"anchor":"error_report/3","id":"error_report/3","title":"error_report(reported_by, trace_id, feedback)"},{"anchor":"existing_user_invitation/1","id":"existing_user_invitation/1","title":"existing_user_invitation(invitation)"},{"anchor":"import_failure/2","id":"import_failure/2","title":"import_failure(user, site)"},{"anchor":"import_success/2","id":"import_success/2","title":"import_success(user, site)"},{"anchor":"invitation_accepted/1","id":"invitation_accepted/1","title":"invitation_accepted(invitation)"},{"anchor":"invitation_rejected/1","id":"invitation_rejected/1","title":"invitation_rejected(invitation)"},{"anchor":"mailer_email_from/0","id":"mailer_email_from/0","title":"mailer_email_from()"},{"anchor":"new_user_invitation/1","id":"new_user_invitation/1","title":"new_user_invitation(invitation)"},{"anchor":"over_limit_email/4","id":"over_limit_email/4","title":"over_limit_email(user, usage, last_cycle, suggested_plan)"},{"anchor":"ownership_transfer_accepted/1","id":"ownership_transfer_accepted/1","title":"ownership_transfer_accepted(invitation)"},{"anchor":"ownership_transfer_rejected/1","id":"ownership_transfer_rejected/1","title":"ownership_transfer_rejected(invitation)"},{"anchor":"ownership_transfer_request/2","id":"ownership_transfer_request/2","title":"ownership_transfer_request(invitation, new_owner_account)"},{"anchor":"password_reset_email/2","id":"password_reset_email/2","title":"password_reset_email(email, reset_link)"},{"anchor":"render/3","id":"render/3","title":"render(email, template, assigns \\\\ [])"},{"anchor":"site_member_removed/1","id":"site_member_removed/1","title":"site_member_removed(membership)"},{"anchor":"site_setup_help/2","id":"site_setup_help/2","title":"site_setup_help(user, site)"},{"anchor":"site_setup_success/2","id":"site_setup_success/2","title":"site_setup_success(user, site)"},{"anchor":"spike_notification/5","id":"spike_notification/5","title":"spike_notification(email, site, current_visitors, sources, dashboard_link)"},{"anchor":"trial_one_week_reminder/1","id":"trial_one_week_reminder/1","title":"trial_one_week_reminder(user)"},{"anchor":"trial_over_email/1","id":"trial_over_email/1","title":"trial_over_email(user)"},{"anchor":"trial_upgrade_email/3","id":"trial_upgrade_email/3","title":"trial_upgrade_email(user, day, arg)"},{"anchor":"weekly_report/3","id":"weekly_report/3","title":"weekly_report(email, site, assigns)"},{"anchor":"welcome_email/1","id":"welcome_email/1","title":"welcome_email(user)"},{"anchor":"yearly_expiration_notification/1","id":"yearly_expiration_notification/1","title":"yearly_expiration_notification(user)"},{"anchor":"yearly_renewal_notification/1","id":"yearly_renewal_notification/1","title":"yearly_renewal_notification(user)"}]}],"sections":[],"title":"PlausibleWeb.Email"},{"group":"","id":"PlausibleWeb.EmailView","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"__resource__/0","id":"__resource__/0","title":"__resource__()"},{"anchor":"activation_email.html/1","id":"activation_email.html/1","title":"activation_email.html(assigns)"},{"anchor":"base_domain/0","id":"base_domain/0","title":"base_domain()"},{"anchor":"cancellation_email.html/1","id":"cancellation_email.html/1","title":"cancellation_email.html(assigns)"},{"anchor":"check_stats_email.html/1","id":"check_stats_email.html/1","title":"check_stats_email.html(assigns)"},{"anchor":"create_site_email.html/1","id":"create_site_email.html/1","title":"create_site_email.html(assigns)"},{"anchor":"dashboard_locked.html/1","id":"dashboard_locked.html/1","title":"dashboard_locked.html(assigns)"},{"anchor":"date_format/1","id":"date_format/1","title":"date_format(date)"},{"anchor":"enterprise_over_limit_internal.html/1","id":"enterprise_over_limit_internal.html/1","title":"enterprise_over_limit_internal.html(assigns)"},{"anchor":"error_report_email.html/1","id":"error_report_email.html/1","title":"error_report_email.html(assigns)"},{"anchor":"existing_user_invitation.html/1","id":"existing_user_invitation.html/1","title":"existing_user_invitation.html(assigns)"},{"anchor":"google_analytics_import.html/1","id":"google_analytics_import.html/1","title":"google_analytics_import.html(assigns)"},{"anchor":"greet_recipient/1","id":"greet_recipient/1","title":"greet_recipient(_)"},{"anchor":"invitation_accepted.html/1","id":"invitation_accepted.html/1","title":"invitation_accepted.html(assigns)"},{"anchor":"invitation_rejected.html/1","id":"invitation_rejected.html/1","title":"invitation_rejected.html(assigns)"},{"anchor":"new_user_invitation.html/1","id":"new_user_invitation.html/1","title":"new_user_invitation.html(assigns)"},{"anchor":"over_limit.html/1","id":"over_limit.html/1","title":"over_limit.html(assigns)"},{"anchor":"ownership_transfer_accepted.html/1","id":"ownership_transfer_accepted.html/1","title":"ownership_transfer_accepted.html(assigns)"},{"anchor":"ownership_transfer_rejected.html/1","id":"ownership_transfer_rejected.html/1","title":"ownership_transfer_rejected.html(assigns)"},{"anchor":"ownership_transfer_request.html/1","id":"ownership_transfer_request.html/1","title":"ownership_transfer_request.html(assigns)"},{"anchor":"password_reset_email.html/1","id":"password_reset_email.html/1","title":"password_reset_email.html(assigns)"},{"anchor":"plausible_url/0","id":"plausible_url/0","title":"plausible_url()"},{"anchor":"render/2","id":"render/2","title":"render(template, assigns \\\\ %{})"},{"anchor":"sentry_link/2","id":"sentry_link/2","title":"sentry_link(trace_id, dsn \\\\ Sentry.Config.dsn())"},{"anchor":"site_member_removed.html/1","id":"site_member_removed.html/1","title":"site_member_removed.html(assigns)"},{"anchor":"site_setup_help_email.html/1","id":"site_setup_help_email.html/1","title":"site_setup_help_email.html(assigns)"},{"anchor":"site_setup_success_email.html/1","id":"site_setup_success_email.html/1","title":"site_setup_success_email.html(assigns)"},{"anchor":"spike_notification.html/1","id":"spike_notification.html/1","title":"spike_notification.html(assigns)"},{"anchor":"template_not_found/2","id":"template_not_found/2","title":"template_not_found(template, assigns)"},{"anchor":"trial_one_week_reminder.html/1","id":"trial_one_week_reminder.html/1","title":"trial_one_week_reminder.html(assigns)"},{"anchor":"trial_over_email.html/1","id":"trial_over_email.html/1","title":"trial_over_email.html(assigns)"},{"anchor":"trial_upgrade_email.html/1","id":"trial_upgrade_email.html/1","title":"trial_upgrade_email.html(assigns)"},{"anchor":"weekly_report.html/1","id":"weekly_report.html/1","title":"weekly_report.html(assigns)"},{"anchor":"welcome_email.html/1","id":"welcome_email.html/1","title":"welcome_email.html(assigns)"},{"anchor":"yearly_expiration_notification.html/1","id":"yearly_expiration_notification.html/1","title":"yearly_expiration_notification.html(assigns)"},{"anchor":"yearly_renewal_notification.html/1","id":"yearly_renewal_notification.html/1","title":"yearly_renewal_notification.html(assigns)"}]}],"sections":[],"title":"PlausibleWeb.EmailView"},{"group":"","id":"PlausibleWeb.Endpoint","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"broadcast/3","id":"broadcast/3","title":"broadcast(topic, event, msg)"},{"anchor":"broadcast!/3","id":"broadcast!/3","title":"broadcast!(topic, event, msg)"},{"anchor":"broadcast_from/4","id":"broadcast_from/4","title":"broadcast_from(from, topic, event, msg)"},{"anchor":"broadcast_from!/4","id":"broadcast_from!/4","title":"broadcast_from!(from, topic, event, msg)"},{"anchor":"call/2","id":"call/2","title":"call(conn, opts)"},{"anchor":"child_spec/1","id":"child_spec/1","title":"child_spec(opts)"},{"anchor":"config/2","id":"config/2","title":"config(key, default \\\\ nil)"},{"anchor":"config_change/2","id":"config_change/2","title":"config_change(changed, removed)"},{"anchor":"host/0","id":"host/0","title":"host()"},{"anchor":"init/1","id":"init/1","title":"init(opts)"},{"anchor":"local_broadcast/3","id":"local_broadcast/3","title":"local_broadcast(topic, event, msg)"},{"anchor":"local_broadcast_from/4","id":"local_broadcast_from/4","title":"local_broadcast_from(from, topic, event, msg)"},{"anchor":"patch_session_opts/0","id":"patch_session_opts/0","title":"patch_session_opts()"},{"anchor":"path/1","id":"path/1","title":"path(path)"},{"anchor":"script_name/0","id":"script_name/0","title":"script_name()"},{"anchor":"start_link/1","id":"start_link/1","title":"start_link(opts \\\\ [])"},{"anchor":"static_integrity/1","id":"static_integrity/1","title":"static_integrity(path)"},{"anchor":"static_lookup/1","id":"static_lookup/1","title":"static_lookup(path)"},{"anchor":"static_path/1","id":"static_path/1","title":"static_path(path)"},{"anchor":"static_url/0","id":"static_url/0","title":"static_url()"},{"anchor":"struct_url/0","id":"struct_url/0","title":"struct_url()"},{"anchor":"subscribe/2","id":"subscribe/2","title":"subscribe(topic, opts \\\\ [])"},{"anchor":"unsubscribe/1","id":"unsubscribe/1","title":"unsubscribe(topic)"},{"anchor":"url/0","id":"url/0","title":"url()"},{"anchor":"websocket_url/0","id":"websocket_url/0","title":"websocket_url()"}]}],"sections":[],"title":"PlausibleWeb.Endpoint"},{"group":"","id":"PlausibleWeb.ErrorHelpers","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"error_tag/2","id":"error_tag/2","title":"error_tag(form, field)"}]}],"sections":[],"title":"PlausibleWeb.ErrorHelpers"},{"group":"","id":"PlausibleWeb.ErrorReportController","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"submit_error_report/2","id":"submit_error_report/2","title":"submit_error_report(conn, arg2)"}]}],"sections":[],"title":"PlausibleWeb.ErrorReportController"},{"group":"","id":"PlausibleWeb.ErrorView","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"__resource__/0","id":"__resource__/0","title":"__resource__()"},{"anchor":"generic_error.html/1","id":"generic_error.html/1","title":"generic_error.html(assigns)"},{"anchor":"render/2","id":"render/2","title":"render(template, assigns \\\\ %{})"},{"anchor":"server_error.html/1","id":"server_error.html/1","title":"server_error.html(assigns)"},{"anchor":"server_error_report_thanks.html/1","id":"server_error_report_thanks.html/1","title":"server_error_report_thanks.html(assigns)"},{"anchor":"template_not_found/2","id":"template_not_found/2","title":"template_not_found(template, assigns)"}]}],"sections":[],"title":"PlausibleWeb.ErrorView"},{"group":"","id":"PlausibleWeb.Favicon","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"call/2","id":"call/2","title":"call(conn, list)"},{"anchor":"init/1","id":"init/1","title":"init(_)"}]}],"sections":[],"title":"PlausibleWeb.Favicon"},{"group":"","id":"PlausibleWeb.FirstLaunchPlug","sections":[],"title":"PlausibleWeb.FirstLaunchPlug"},{"group":"","id":"PlausibleWeb.FormHelpers","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"styled_error/1","id":"styled_error/1","title":"styled_error(error)"},{"anchor":"styled_label/4","id":"styled_label/4","title":"styled_label(form, field, text, opts \\\\ [])"},{"anchor":"styled_select/4","id":"styled_select/4","title":"styled_select(form, field, options, opts \\\\ [])"},{"anchor":"styled_text_input/3","id":"styled_text_input/3","title":"styled_text_input(form, field, opts \\\\ [])"}]}],"sections":[],"title":"PlausibleWeb.FormHelpers"},{"group":"","id":"PlausibleWeb.InvitationController","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"accept_invitation/2","id":"accept_invitation/2","title":"accept_invitation(conn, map)"},{"anchor":"reject_invitation/2","id":"reject_invitation/2","title":"reject_invitation(conn, map)"},{"anchor":"remove_invitation/2","id":"remove_invitation/2","title":"remove_invitation(conn, map)"}]}],"sections":[],"title":"PlausibleWeb.InvitationController"},{"group":"","id":"PlausibleWeb.LastSeenPlug","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"call/2","id":"call/2","title":"call(conn, opts)"},{"anchor":"init/1","id":"init/1","title":"init(opts)"}]}],"sections":[],"title":"PlausibleWeb.LastSeenPlug"},{"group":"","id":"PlausibleWeb.LayoutView","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"__resource__/0","id":"__resource__/0","title":"__resource__()"},{"anchor":"app.html/1","id":"app.html/1","title":"app.html(assigns)"},{"anchor":"base_domain/0","id":"base_domain/0","title":"base_domain()"},{"anchor":"base_email.html/1","id":"base_email.html/1","title":"base_email.html(assigns)"},{"anchor":"base_error.html/1","id":"base_error.html/1","title":"base_error.html(assigns)"},{"anchor":"embedded.html/1","id":"embedded.html/1","title":"embedded.html(assigns)"},{"anchor":"focus.html/1","id":"focus.html/1","title":"focus.html(assigns)"},{"anchor":"grace_period_end/1","id":"grace_period_end/1","title":"grace_period_end(user)"},{"anchor":"home_dest/1","id":"home_dest/1","title":"home_dest(conn)"},{"anchor":"is_current_tab/2","id":"is_current_tab/2","title":"is_current_tab(conn, tab)"},{"anchor":"plausible_url/0","id":"plausible_url/0","title":"plausible_url()"},{"anchor":"render/2","id":"render/2","title":"render(template, assigns \\\\ %{})"},{"anchor":"render_layout/3","id":"render_layout/3","title":"render_layout(layout, assigns, list)"},{"anchor":"settings_tabs/1","id":"settings_tabs/1","title":"settings_tabs(conn)"},{"anchor":"site_settings.html/1","id":"site_settings.html/1","title":"site_settings.html(assigns)"},{"anchor":"template_not_found/2","id":"template_not_found/2","title":"template_not_found(template, assigns)"},{"anchor":"trial_notificaton/1","id":"trial_notificaton/1","title":"trial_notificaton(user)"},{"anchor":"websocket_url/0","id":"websocket_url/0","title":"websocket_url()"}]}],"sections":[],"title":"PlausibleWeb.LayoutView"},{"group":"","id":"PlausibleWeb.Live.Flash","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"clear_flash_button/1","id":"clear_flash_button/1","title":"clear_flash_button(assigns)"},{"anchor":"flash/1","id":"flash/1","title":"flash(assigns)"},{"anchor":"icon_error/1","id":"icon_error/1","title":"icon_error(assigns)"},{"anchor":"icon_success/1","id":"icon_success/1","title":"icon_success(assigns)"},{"anchor":"render/1","id":"render/1","title":"render(assigns)"}]}],"sections":[],"title":"PlausibleWeb.Live.Flash"},{"group":"","id":"PlausibleWeb.Live.FunnelSettings","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"handle_event/3","id":"handle_event/3","title":"handle_event(binary, arg2, socket)"},{"anchor":"handle_info/2","id":"handle_info/2","title":"handle_info(arg1, socket)"},{"anchor":"mount/3","id":"mount/3","title":"mount(params, map, socket)"},{"anchor":"render/1","id":"render/1","title":"render(assigns)"}]}],"sections":[],"title":"PlausibleWeb.Live.FunnelSettings"},{"group":"","id":"PlausibleWeb.Live.FunnelSettings.ComboBox","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"dropdown/1","id":"dropdown/1","title":"dropdown(assigns)"},{"anchor":"dropdown_anchor/1","id":"dropdown_anchor/1","title":"dropdown_anchor(assigns)"},{"anchor":"handle_event/3","id":"handle_event/3","title":"handle_event(binary, params, socket)"},{"anchor":"option/1","id":"option/1","title":"option(assigns)"},{"anchor":"render/1","id":"render/1","title":"render(assigns)"},{"anchor":"select_option/4","id":"select_option/4","title":"select_option(js \\\\ %JS{}, id, submit_value, display_value)"},{"anchor":"suggest/2","id":"suggest/2","title":"suggest(input, options)"},{"anchor":"update/2","id":"update/2","title":"update(assigns, socket)"}]}],"sections":[],"title":"PlausibleWeb.Live.FunnelSettings.ComboBox"},{"group":"","id":"PlausibleWeb.Live.FunnelSettings.Form","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"add_step_button/1","id":"add_step_button/1","title":"add_step_button(assigns)"},{"anchor":"cancel_button/1","id":"cancel_button/1","title":"cancel_button(assigns)"},{"anchor":"error/1","id":"error/1","title":"error(assigns)"},{"anchor":"evaluation/1","id":"evaluation/1","title":"evaluation(assigns)"},{"anchor":"handle_event/3","id":"handle_event/3","title":"handle_event(binary, arg2, socket)"},{"anchor":"handle_info/2","id":"handle_info/2","title":"handle_info(arg1, socket)"},{"anchor":"input/1","id":"input/1","title":"input(assigns)"},{"anchor":"mount/3","id":"mount/3","title":"mount(params, map, socket)"},{"anchor":"remove_step_button/1","id":"remove_step_button/1","title":"remove_step_button(assigns)"},{"anchor":"render/1","id":"render/1","title":"render(assigns)"},{"anchor":"submit_button/1","id":"submit_button/1","title":"submit_button(assigns)"},{"anchor":"submit_button_inactive/1","id":"submit_button_inactive/1","title":"submit_button_inactive(assigns)"}]}],"sections":[],"title":"PlausibleWeb.Live.FunnelSettings.Form"},{"group":"","id":"PlausibleWeb.Live.FunnelSettings.List","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"render/1","id":"render/1","title":"render(assigns)"}]}],"sections":[],"title":"PlausibleWeb.Live.FunnelSettings.List"},{"group":"","id":"PlausibleWeb.PageController","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"index/2","id":"index/2","title":"index(conn, params)"}]}],"sections":[],"title":"PlausibleWeb.PageController"},{"group":"","id":"PlausibleWeb.PageView","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"__resource__/0","id":"__resource__/0","title":"__resource__()"},{"anchor":"index.html/1","id":"index.html/1","title":"index.html(assigns)"},{"anchor":"render/2","id":"render/2","title":"render(template, assigns \\\\ %{})"},{"anchor":"template_not_found/2","id":"template_not_found/2","title":"template_not_found(template, assigns)"}]}],"sections":[],"title":"PlausibleWeb.PageView"},{"group":"","id":"PlausibleWeb.Plugs.NoRobots","sections":[],"title":"PlausibleWeb.Plugs.NoRobots"},{"group":"","id":"PlausibleWeb.Plugs.RuntimeSessionAdapter","sections":[],"title":"PlausibleWeb.Plugs.RuntimeSessionAdapter"},{"group":"","id":"PlausibleWeb.RefInspector","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"parse/1","id":"parse/1","title":"parse(ref)"},{"anchor":"right_uri?/1","id":"right_uri?/1","title":"right_uri?(arg1)"}]}],"sections":[],"title":"PlausibleWeb.RefInspector"},{"group":"","id":"PlausibleWeb.RemoteIp","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"get/1","id":"get/1","title":"get(conn)"}]}],"sections":[],"title":"PlausibleWeb.RemoteIp"},{"group":"","id":"PlausibleWeb.RequireAccountPlug","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"call/2","id":"call/2","title":"call(conn, opts)"},{"anchor":"init/1","id":"init/1","title":"init(options)"}]}],"sections":[],"title":"PlausibleWeb.RequireAccountPlug"},{"group":"","id":"PlausibleWeb.RequireLoggedOutPlug","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"call/2","id":"call/2","title":"call(conn, opts)"},{"anchor":"init/1","id":"init/1","title":"init(options)"}]}],"sections":[],"title":"PlausibleWeb.RequireLoggedOutPlug"},{"group":"","id":"PlausibleWeb.Router","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"api/2","id":"api/2","title":"api(conn, _)"},{"anchor":"browser/2","id":"browser/2","title":"browser(conn, _)"},{"anchor":"call/2","id":"call/2","title":"call(conn, opts)"},{"anchor":"csrf/2","id":"csrf/2","title":"csrf(conn, _)"},{"anchor":"flags/2","id":"flags/2","title":"flags(conn, _)"},{"anchor":"init/1","id":"init/1","title":"init(opts)"},{"anchor":"internal_stats_api/2","id":"internal_stats_api/2","title":"internal_stats_api(conn, _)"},{"anchor":"kaffy_browser/2","id":"kaffy_browser/2","title":"kaffy_browser(conn, _)"},{"anchor":"public_api/2","id":"public_api/2","title":"public_api(conn, _)"},{"anchor":"shared_link/2","id":"shared_link/2","title":"shared_link(conn, _)"}]}],"sections":[],"title":"PlausibleWeb.Router"},{"group":"","id":"PlausibleWeb.SessionTimeoutPlug","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"call/2","id":"call/2","title":"call(conn, opts)"},{"anchor":"init/1","id":"init/1","title":"init(opts \\\\ [])"}]}],"sections":[],"title":"PlausibleWeb.SessionTimeoutPlug"},{"group":"","id":"PlausibleWeb.Site.MembershipController","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"invite_member/2","id":"invite_member/2","title":"invite_member(conn, map)"},{"anchor":"invite_member_form/2","id":"invite_member_form/2","title":"invite_member_form(conn, params)"},{"anchor":"remove_member/2","id":"remove_member/2","title":"remove_member(conn, map)"},{"anchor":"transfer_ownership/2","id":"transfer_ownership/2","title":"transfer_ownership(conn, map)"},{"anchor":"transfer_ownership_form/2","id":"transfer_ownership_form/2","title":"transfer_ownership_form(conn, params)"},{"anchor":"update_role/2","id":"update_role/2","title":"update_role(conn, map)"}]}],"sections":[],"title":"PlausibleWeb.Site.MembershipController"},{"group":"","id":"PlausibleWeb.Site.MembershipView","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"__resource__/0","id":"__resource__/0","title":"__resource__()"},{"anchor":"invite_member_form.html/1","id":"invite_member_form.html/1","title":"invite_member_form.html(assigns)"},{"anchor":"render/2","id":"render/2","title":"render(template, assigns \\\\ %{})"},{"anchor":"template_not_found/2","id":"template_not_found/2","title":"template_not_found(template, assigns)"},{"anchor":"transfer_ownership_form.html/1","id":"transfer_ownership_form.html/1","title":"transfer_ownership_form.html(assigns)"}]}],"sections":[],"title":"PlausibleWeb.Site.MembershipView"},{"group":"","id":"PlausibleWeb.SiteController","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"add_monthly_report_recipient/2","id":"add_monthly_report_recipient/2","title":"add_monthly_report_recipient(conn, map)"},{"anchor":"add_snippet/2","id":"add_snippet/2","title":"add_snippet(conn, params)"},{"anchor":"add_snippet_after_domain_change/2","id":"add_snippet_after_domain_change/2","title":"add_snippet_after_domain_change(conn, params)"},{"anchor":"add_spike_notification_recipient/2","id":"add_spike_notification_recipient/2","title":"add_spike_notification_recipient(conn, map)"},{"anchor":"add_weekly_report_recipient/2","id":"add_weekly_report_recipient/2","title":"add_weekly_report_recipient(conn, map)"},{"anchor":"change_domain/2","id":"change_domain/2","title":"change_domain(conn, params)"},{"anchor":"change_domain_submit/2","id":"change_domain_submit/2","title":"change_domain_submit(conn, map)"},{"anchor":"create_goal/2","id":"create_goal/2","title":"create_goal(conn, map)"},{"anchor":"create_shared_link/2","id":"create_shared_link/2","title":"create_shared_link(conn, map)"},{"anchor":"create_site/2","id":"create_site/2","title":"create_site(conn, map)"},{"anchor":"delete_custom_domain/2","id":"delete_custom_domain/2","title":"delete_custom_domain(conn, map)"},{"anchor":"delete_goal/2","id":"delete_goal/2","title":"delete_goal(conn, map)"},{"anchor":"delete_google_auth/2","id":"delete_google_auth/2","title":"delete_google_auth(conn, params)"},{"anchor":"delete_shared_link/2","id":"delete_shared_link/2","title":"delete_shared_link(conn, map)"},{"anchor":"delete_site/2","id":"delete_site/2","title":"delete_site(conn, params)"},{"anchor":"disable_monthly_report/2","id":"disable_monthly_report/2","title":"disable_monthly_report(conn, params)"},{"anchor":"disable_spike_notification/2","id":"disable_spike_notification/2","title":"disable_spike_notification(conn, params)"},{"anchor":"disable_weekly_report/2","id":"disable_weekly_report/2","title":"disable_weekly_report(conn, params)"},{"anchor":"edit_shared_link/2","id":"edit_shared_link/2","title":"edit_shared_link(conn, map)"},{"anchor":"enable_monthly_report/2","id":"enable_monthly_report/2","title":"enable_monthly_report(conn, params)"},{"anchor":"enable_spike_notification/2","id":"enable_spike_notification/2","title":"enable_spike_notification(conn, params)"},{"anchor":"enable_weekly_report/2","id":"enable_weekly_report/2","title":"enable_weekly_report(conn, params)"},{"anchor":"forget_imported/2","id":"forget_imported/2","title":"forget_imported(conn, params)"},{"anchor":"import_from_google/2","id":"import_from_google/2","title":"import_from_google(conn, map)"},{"anchor":"import_from_google_confirm/2","id":"import_from_google_confirm/2","title":"import_from_google_confirm(conn, map)"},{"anchor":"import_from_google_user_metric_notice/2","id":"import_from_google_user_metric_notice/2","title":"import_from_google_user_metric_notice(conn, map)"},{"anchor":"import_from_google_view_id/2","id":"import_from_google_view_id/2","title":"import_from_google_view_id(conn, map)"},{"anchor":"import_from_google_view_id_form/2","id":"import_from_google_view_id_form/2","title":"import_from_google_view_id_form(conn, map)"},{"anchor":"index/2","id":"index/2","title":"index(conn, params)"},{"anchor":"make_private/2","id":"make_private/2","title":"make_private(conn, params)"},{"anchor":"make_public/2","id":"make_public/2","title":"make_public(conn, params)"},{"anchor":"new/2","id":"new/2","title":"new(conn, params)"},{"anchor":"new_goal/2","id":"new_goal/2","title":"new_goal(conn, params)"},{"anchor":"new_shared_link/2","id":"new_shared_link/2","title":"new_shared_link(conn, params)"},{"anchor":"remove_monthly_report_recipient/2","id":"remove_monthly_report_recipient/2","title":"remove_monthly_report_recipient(conn, map)"},{"anchor":"remove_spike_notification_recipient/2","id":"remove_spike_notification_recipient/2","title":"remove_spike_notification_recipient(conn, map)"},{"anchor":"remove_weekly_report_recipient/2","id":"remove_weekly_report_recipient/2","title":"remove_weekly_report_recipient(conn, map)"},{"anchor":"reset_stats/2","id":"reset_stats/2","title":"reset_stats(conn, params)"},{"anchor":"settings/2","id":"settings/2","title":"settings(conn, map)"},{"anchor":"settings_custom_domain/2","id":"settings_custom_domain/2","title":"settings_custom_domain(conn, params)"},{"anchor":"settings_danger_zone/2","id":"settings_danger_zone/2","title":"settings_danger_zone(conn, params)"},{"anchor":"settings_email_reports/2","id":"settings_email_reports/2","title":"settings_email_reports(conn, params)"},{"anchor":"settings_funnels/2","id":"settings_funnels/2","title":"settings_funnels(conn, params)"},{"anchor":"settings_general/2","id":"settings_general/2","title":"settings_general(conn, params)"},{"anchor":"settings_goals/2","id":"settings_goals/2","title":"settings_goals(conn, params)"},{"anchor":"settings_people/2","id":"settings_people/2","title":"settings_people(conn, params)"},{"anchor":"settings_search_console/2","id":"settings_search_console/2","title":"settings_search_console(conn, params)"},{"anchor":"settings_visibility/2","id":"settings_visibility/2","title":"settings_visibility(conn, params)"},{"anchor":"update_feature_visibility/2","id":"update_feature_visibility/2","title":"update_feature_visibility(conn, map)"},{"anchor":"update_google_auth/2","id":"update_google_auth/2","title":"update_google_auth(conn, map)"},{"anchor":"update_settings/2","id":"update_settings/2","title":"update_settings(conn, map)"},{"anchor":"update_shared_link/2","id":"update_shared_link/2","title":"update_shared_link(conn, map)"},{"anchor":"update_spike_notification/2","id":"update_spike_notification/2","title":"update_spike_notification(conn, map)"}]}],"sections":[],"title":"PlausibleWeb.SiteController"},{"group":"","id":"PlausibleWeb.SiteView","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"__resource__/0","id":"__resource__/0","title":"__resource__()"},{"anchor":"base_domain/0","id":"base_domain/0","title":"base_domain()"},{"anchor":"change_domain.html/1","id":"change_domain.html/1","title":"change_domain.html(assigns)"},{"anchor":"edit_shared_link.html/1","id":"edit_shared_link.html/1","title":"edit_shared_link.html(assigns)"},{"anchor":"goal_name/1","id":"goal_name/1","title":"goal_name(arg)"},{"anchor":"google_logo/1","id":"google_logo/1","title":"google_logo(assigns \\\\ %{})"},{"anchor":"gravatar/2","id":"gravatar/2","title":"gravatar(email, opts)"},{"anchor":"import_from_google_confirm.html/1","id":"import_from_google_confirm.html/1","title":"import_from_google_confirm.html(assigns)"},{"anchor":"import_from_google_user_metric_form.html/1","id":"import_from_google_user_metric_form.html/1","title":"import_from_google_user_metric_form.html(assigns)"},{"anchor":"import_from_google_view_id_form.html/1","id":"import_from_google_view_id_form.html/1","title":"import_from_google_view_id_form.html(assigns)"},{"anchor":"index.html/1","id":"index.html/1","title":"index.html(assigns)"},{"anchor":"new.html/1","id":"new.html/1","title":"new.html(assigns)"},{"anchor":"new_goal.html/1","id":"new_goal.html/1","title":"new_goal.html(assigns)"},{"anchor":"new_shared_link.html/1","id":"new_shared_link.html/1","title":"new_shared_link.html(assigns)"},{"anchor":"plausible_url/0","id":"plausible_url/0","title":"plausible_url()"},{"anchor":"render/2","id":"render/2","title":"render(template, assigns \\\\ %{})"},{"anchor":"render_snippet/1","id":"render_snippet/1","title":"render_snippet(site)"},{"anchor":"settings_custom_domain.html/1","id":"settings_custom_domain.html/1","title":"settings_custom_domain.html(assigns)"},{"anchor":"settings_danger_zone.html/1","id":"settings_danger_zone.html/1","title":"settings_danger_zone.html(assigns)"},{"anchor":"settings_email_reports.html/1","id":"settings_email_reports.html/1","title":"settings_email_reports.html(assigns)"},{"anchor":"settings_funnels.html/1","id":"settings_funnels.html/1","title":"settings_funnels.html(assigns)"},{"anchor":"settings_general.html/1","id":"settings_general.html/1","title":"settings_general.html(assigns)"},{"anchor":"settings_goals.html/1","id":"settings_goals.html/1","title":"settings_goals.html(assigns)"},{"anchor":"settings_people.html/1","id":"settings_people.html/1","title":"settings_people.html(assigns)"},{"anchor":"settings_search_console.html/1","id":"settings_search_console.html/1","title":"settings_search_console.html(assigns)"},{"anchor":"settings_visibility.html/1","id":"settings_visibility.html/1","title":"settings_visibility.html(assigns)"},{"anchor":"shared_link_dest/2","id":"shared_link_dest/2","title":"shared_link_dest(site, link)"},{"anchor":"snippet.html/1","id":"snippet.html/1","title":"snippet.html(assigns)"},{"anchor":"snippet_after_domain_change.html/1","id":"snippet_after_domain_change.html/1","title":"snippet_after_domain_change.html(assigns)"},{"anchor":"template_not_found/2","id":"template_not_found/2","title":"template_not_found(template, assigns)"},{"anchor":"with_indefinite_article/1","id":"with_indefinite_article/1","title":"with_indefinite_article(word)"}]}],"sections":[],"title":"PlausibleWeb.SiteView"},{"group":"","id":"PlausibleWeb.StatsController","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"authenticate_shared_link/2","id":"authenticate_shared_link/2","title":"authenticate_shared_link(conn, map)"},{"anchor":"csv_export/2","id":"csv_export/2","title":"csv_export(conn, params)"},{"anchor":"shared_link/2","id":"shared_link/2","title":"shared_link(conn, arg2)"},{"anchor":"stats/2","id":"stats/2","title":"stats(conn, params)"}]}],"sections":[],"title":"PlausibleWeb.StatsController"},{"group":"","id":"PlausibleWeb.StatsView","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"__resource__/0","id":"__resource__/0","title":"__resource__()"},{"anchor":"base_domain/0","id":"base_domain/0","title":"base_domain()"},{"anchor":"large_number_format/1","id":"large_number_format/1","title":"large_number_format(n)"},{"anchor":"plausible_url/0","id":"plausible_url/0","title":"plausible_url()"},{"anchor":"pretty_stats_url/1","id":"pretty_stats_url/1","title":"pretty_stats_url(arg)"},{"anchor":"render/2","id":"render/2","title":"render(template, assigns \\\\ %{})"},{"anchor":"shared_link_password.html/1","id":"shared_link_password.html/1","title":"shared_link_password.html(assigns)"},{"anchor":"site_locked.html/1","id":"site_locked.html/1","title":"site_locked.html(assigns)"},{"anchor":"stats.html/1","id":"stats.html/1","title":"stats.html(assigns)"},{"anchor":"stats_container_class/1","id":"stats_container_class/1","title":"stats_container_class(conn)"},{"anchor":"template_not_found/2","id":"template_not_found/2","title":"template_not_found(template, assigns)"},{"anchor":"waiting_first_pageview.html/1","id":"waiting_first_pageview.html/1","title":"waiting_first_pageview.html(assigns)"}]}],"sections":[],"title":"PlausibleWeb.StatsView"},{"group":"","id":"PlausibleWeb.Tracker","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"call/2","id":"call/2","title":"call(conn, list)"},{"anchor":"child_spec/1","id":"child_spec/1","title":"child_spec(arg)"},{"anchor":"init/1","id":"init/1","title":"init(opts)"}]}],"sections":[],"title":"PlausibleWeb.Tracker"},{"group":"","id":"PlausibleWeb.UnsubscribeController","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"monthly_report/2","id":"monthly_report/2","title":"monthly_report(conn, map)"},{"anchor":"weekly_report/2","id":"weekly_report/2","title":"weekly_report(conn, map)"}]}],"sections":[],"title":"PlausibleWeb.UnsubscribeController"},{"group":"","id":"PlausibleWeb.UnsubscribeView","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"__resource__/0","id":"__resource__/0","title":"__resource__()"},{"anchor":"render/2","id":"render/2","title":"render(template, assigns \\\\ %{})"},{"anchor":"success.html/1","id":"success.html/1","title":"success.html(assigns)"},{"anchor":"template_not_found/2","id":"template_not_found/2","title":"template_not_found(template, assigns)"}]}],"sections":[],"title":"PlausibleWeb.UnsubscribeView"}],"tasks":[{"group":"","id":"Mix.Tasks.AnalyzePlans","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"run/1","id":"run/1","title":"run(_)"}]}],"sections":[],"title":"mix analyze_plans"},{"group":"","id":"Mix.Tasks.CleanClickhouse","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"run/1","id":"run/1","title":"run(_)"}]}],"sections":[],"title":"mix clean_clickhouse"},{"group":"","id":"Mix.Tasks.CreateFreeSubscription","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"execute/1","id":"execute/1","title":"execute(user_id)"},{"anchor":"run/1","id":"run/1","title":"run(arg1)"}]}],"sections":[],"title":"mix create_free_subscription"},{"group":"","id":"Mix.Tasks.DownloadCountryDatabase","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"run/1","id":"run/1","title":"run(_)"}]}],"sections":[],"title":"mix download_country_database"},{"group":"","id":"Mix.Tasks.GenerateReferrerFavicons","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"run/1","id":"run/1","title":"run(_)"}]}],"sections":[],"title":"mix generate_referrer_favicons"},{"group":"","id":"Mix.Tasks.PullSandboxSubscription","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"run/1","id":"run/1","title":"run(list)"}]}],"sections":[],"title":"mix pull_sandbox_subscription"},{"group":"","id":"Mix.Tasks.SendPageview","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"run/1","id":"run/1","title":"run(opts)"}]}],"sections":[],"title":"mix send_pageview"}]} \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 000000000..2b6b2d9cf --- /dev/null +++ b/index.html @@ -0,0 +1,10 @@ + + + + + Plausible v0.0.1 — Documentation + + + + + diff --git a/readme.html b/readme.html new file mode 100644 index 000000000..d1edb2725 --- /dev/null +++ b/readme.html @@ -0,0 +1,231 @@ + + + + + + + + + + Introduction — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
    + + + + + +
    + +
    +
    + +

    + + + + + + View Source + + + + Plausible Analytics +

    + +

    + Plausible Analytics +

    Simple Metrics | + Lightweight Script | + Privacy Focused | + Open Source | + Docs | + Contributing +

    Plausible Analytics is a simple, lightweight (< 1 KB), open source and privacy-friendly alternative to Google Analytics. It doesn’t use cookies and is fully compliant with GDPR, CCPA and PECR. You can self-host or have us run Plausible for you in the cloud. Here's the live demo of our own website stats. Made and hosted in the EU 🇪🇺

    We are dedicated to making web analytics more privacy-friendly. Our mission is to reduce corporate surveillance by providing an alternative web analytics tool which doesn’t come from the AdTech world. We are completely independent and solely funded by our subscribers.

    Plausible Analytics

    + +

    why-plausible

    +
    + Why Plausible? +

    +

    Here's what makes Plausible a great Google Analytics alternative and why we're trusted by thousands of paying subscribers to deliver their website and business insights:

    • Clutter Free: Plausible Analytics provides simple web analytics and it cuts through the noise. No layers of menus, no need for custom reports. Get all the important insights on one single page. No training necessary.
    • GDPR/CCPA/PECR compliant: Measure traffic, not individuals. No personal data or IP addresses are ever stored in our database. We don't use cookies or any other persistent identifiers. Read more about our data policy
    • Lightweight: Plausible Analytics works by loading a script on your website, like Google Analytics. Our script is 45x smaller, making your website quicker to load.
    • Email or Slack reports: Keep an eye on your traffic with weekly and/or monthly email or Slack reports. You can also get traffic spike notifications.
    • Open website stats: You have the option to be transparent and open your web analytics to everyone. Your website stats are private by default but you can choose to make them public so anyone with your custom link can view them.
    • Define key goals and track conversions: Set custom events or page URLs as your goals and see how they convert over time to understand and identify the trends that matter. Includes easy ways to track outbound link clicks and 404 error pages.
    • Search keywords: Integrate your dashboard with Google Search Console to get the most accurate reporting on your search keywords.
    • SPA support: Plausible is built with modern web frameworks in mind and it works automatically with any pushState based router on the frontend. We also support frameworks that use the URL hash for routing. See our documentation.

    Interested to learn more? Read more on our website, learn more about the team and the goals of the project on our about page or explore the documentation.

    + +

    why-is-plausible-analytics-cloud-not-free-like-google-analytics

    +
    + Why is Plausible Analytics Cloud not free like Google Analytics? +

    +

    Plausible Analytics is an independently owned and actively developed project. To keep the project development going, to stay in business, to continue putting effort into building a better product and to cover our costs, we need to charge a fee.

    Google Analytics is free because Google has built their company and their wealth by collecting and analyzing huge amounts of personal information from web users and using these personal and behavioral insights to sell advertisements.

    Plausible has no part in that business model. No personal data is being collected and analyzed either. With Plausible, you 100% own and control all of your website data. This data is not being shared with or sold to any third-parties.

    We choose the subscription business model rather than the business model of surveillance capitalism. See reasons why we believe you should stop using Google Analytics on your website.

    + +

    getting-started-with-plausible

    +
    + Getting started with Plausible +

    +

    The easiest way to get started with Plausible is with our official managed service in the cloud. It takes 2 minutes to start counting your stats with a worldwide CDN, high availability, backups, security and maintenance all done for you by us.

    In order to be compliant with the GDPR and the Schrems II ruling, all visitor data for our managed service in the cloud is exclusively processed on servers and cloud infrastructure owned and operated by European providers. Your website data never leaves the EU.

    Our managed hosting can save a substantial amount of developer time and resources. For most sites this ends up being the best value option and the revenue goes to funding the maintenance and further development of Plausible. So you’ll be supporting open source software and getting a great service!

    + +

    can-plausible-analytics-be-self-hosted

    +
    + Can Plausible Analytics be self-hosted? +

    +

    Plausible is fully open source web analytics and we have a free as in beer Plausible Analytics Self-Hosted solution. It’s exactly the same product as our cloud solution with a less frequent release schedule (think of it as a long term support release).

    Bug fixes and new features are released to the cloud version several times per week. Features are battle-tested in the cloud which allows us to fix any bugs before the general self-hosted release. Every six months or so we combine all the changes into a new self-hosted release.

    The main difference between the two is that the self-hosted version you have to install, host and manage yourself on your own infrastructure while the cloud version we manage everything for your ease and convenience. Here's the overview of all the differences:

    Plausible CloudSelf-Hosting
    HostingEasy and convenient. It takes 2 minutes to start counting your stats with a worldwide CDN, high availability, backups, security and maintenance all done for you by us. We manage everything so you don’t have to worry about anything and can focus on your stats.You do it all yourself. You need to get a server and you need to manage your infrastructure. You are responsible for installation, maintenance, upgrades, server capacity, uptime, backup, security, stability, consistency, loading time and so on.
    StorageAll visitor data is exclusively processed on EU-owned cloud infrastructure. We keep your site data on a secure, encrypted and green energy powered server in Germany. This ensures that your site data is protected by the strict European Union data privacy laws and ensures compliance with GDPR. Your website data never leaves the EU.You have full control and can host your instance on any server in any country that you wish. Host it on a server in your basement or host it with any cloud provider wherever you want, even those that are not GDPR compliant.
    ReleasesContinuously developed and improved with new features and updates multiple times per week.It's a long term release published approximately twice per year so latest features won't be immediately available. You can see all the currently unreleased features in the changelog.
    Raw dataYou see all your site stats and metrics on our modern-looking, simple to use and fast loading dashboard. You can only see the stats aggregated in the dashboard. You can download the stats using the CSV export, stats API or tools such as the Data Studio Connector.Do you want access to the raw data? Self-hosting gives you that option. You can take the data directly from the ClickHouse database.
    Premium SupportReal support delivered by real human beings who build and maintain Plausible.Premium support is not included. Self-hosting is community supported only.
    CostsThere's a cost associated with providing an analytics service so we charge a subscription fee. We choose the subscription business model rather than the business model of surveillance capitalism. Your money funds further development of Plausible.You need to pay for your server, CDN, backups and whatever other cost there is associated with running the infrastructure. You never have to pay any fees to us. Your money goes to 3rd party companies with no connection to us.

    Interested in self-hosting Plausible on your server? Take a look at our self-hosting installation instructions.

    Plausible Self-Hosted is a community supported project and there are no guarantees that you will get support from the creators of Plausible to troubleshoot your self-hosting issues. There is a community supported forum where you can ask for help.

    Our only source of funding is our premium, managed service for running Plausible in the cloud. If you're looking for an alternative way to support the project, we've put together some sponsorship packages. If you choose to self-host Plausible you can become a sponsor which is a great way to give back to the community and to contribute to the long-term sustainability of the project.

    + +

    technology

    +
    + Technology +

    +

    Plausible Analytics is a standard Elixir/Phoenix application backed by a PostgreSQL database for general data and a Clickhouse +database for stats. On the frontend we use TailwindCSS for styling and React to make the dashboard interactive.

    + +

    contributors

    +
    + Contributors +

    +

    For anyone wishing to contribute to Plausible, we recommend taking a look at our contributor guide.

    + +

    feedback-roadmap

    +
    + Feedback & Roadmap +

    +

    We welcome feedback from our community. We have a public roadmap driven by the features suggested by the community members. Take a look at our feedback board directly here on GitHub. Please let us know if you have any requests and vote on open issues so we can better prioritize.

    To stay up to date with all the latest news and product updates, make sure to follow us on Twitter, LinkedIn or Mastodon.

    + +

    license

    +
    + License +

    +

    Plausible is open-source under the GNU Affero General Public License Version 3 (AGPLv3) or any later version. You can find it here.

    The only exception is our JavaScript tracker which gets included on your website. To avoid issues with AGPL virality, we've +released the tracker under the MIT license. You can find it here.

    + + +
    +
    +
    +
    + + + + + + diff --git a/search.html b/search.html new file mode 100644 index 000000000..310bb92a2 --- /dev/null +++ b/search.html @@ -0,0 +1,143 @@ + + + + + + + + + + Search — Plausible v0.0.1 + + + + + + + + + + + + + + + + +
    + + + + + +
    + +
    +
    + + + + +
    +
    +
    +
    + + + + + +