Documentation
¶
Overview ¶
Package addongate recognises the platform saying "this needs a paid add-on".
The site answers a gated write or device route with a real HTTP 402 and a JSON body naming the add-on, and (for a read, or an older deploy) with HTTP 200 and a soft marker `planLocked: true`. Neither is a success: a client that parses the 200 as an answer drops the events it just "sent" and applies an empty config. Callers turn both into one *Error, keep what they hold and back off.
Index ¶
Constants ¶
const BillingURL = "https://www.vulnetix.com/resolve/billing#addons"
BillingURL is where an add-on is bought.
Variables ¶
This section is empty.
Functions ¶
func DisplayName ¶
DisplayName is the name a person knows the add-on by.
Types ¶
type Error ¶
type Error struct {
Method, Path string
Status int
// Addon is AddonSubscription.kind from the body: soc_intelligence or
// package_firewall. Empty when the site did not name one.
Addon string
// Soft is true when the denial arrived as HTTP 200 with planLocked.
Soft bool
}
Error is a denial for a missing add-on (or a plan floor).
func FromResponse ¶
FromResponse returns the denial a response carries, or nil. A 402 is always one; a 2xx is one when its JSON body has planLocked true. Any other status, and any body that is not that marker, is not a denial.