Documentation
¶
Overview ¶
Package embedopen implements the "rill_open" param of open links in emails from reports and alerts created from an embed. The runtime appends the param to the embedder's open URL. The embedder forwards it to the admin service's GetIFrame API without reading it, and the admin service decodes it to open the report or alert in the embed.
The param is an unpadded base64url encoding of a JSON object. It isn't signed: it only identifies a resource, and the embed access token decides access.
Index ¶
Constants ¶
const QueryParam = "rill_open"
QueryParam is the name of the query param that Rill appends to the embedder's open URL.
Variables ¶
This section is empty.
Functions ¶
func Link ¶
Link returns the open URL with the encoded payload appended as the last param of its query string. The rest of the open URL is kept as-is, including the order and encoding of its query params. The param is always added to the query string before any fragment, also for apps that route with the fragment, since a fragment can't reliably be told apart from an anchor.
func ValidateOpenURL ¶
ValidateOpenURL returns an error if the URL is not an absolute http(s) URL, or if it already has the param.
Types ¶
type Payload ¶
type Payload struct {
Kind Kind `json:"kind"`
Name string `json:"name"`
// ExecutionTime is the time of the run, used to resolve relative time ranges; optional.
ExecutionTime time.Time `json:"execution_time,omitzero"`
}
Payload is the information encoded in the param.