Documentation
¶
Overview ¶
Package permissionspolicy provides simple tools to create and modify a Permissions Policy.
Index ¶
Constants ¶
View Source
const ( HeaderName = "Permissions-Policy" Accelerometer = "accelerometer" AmbientLightSensor = "ambient-light-sensor" AttributionReporting = "attribution-reporting" Autoplay = "autoplay" Bluetooth = "bluetooth" BrowsingTopics = "browsing-topics" Camera = "camera" ComputePressure = "compute-pressure" CrossOriginIsolated = "cross-origin-isolated" DisplayCapture = "display-capture" DocumentDomain = "document-domain" EncryptedMedia = "encrypted-media" Fullscreen = "fullscreen" Geolocation = "geolocation" Gyroscope = "gyroscope" Hid = "hid" IdentityCredentialsGet = "identity-credentials-get" IdleDetection = "idle-detection" InterestCohort = "interest-cohort" LocalFonts = "local-fonts" Magnetometer = "magnetometer" Microphone = "microphone" Midi = "midi" OtpCredentials = "otp-credentials" Payment = "payment" PictureInPicture = "picture-in-picture" PublickeyCredentialsCreate = "publickey-credentials-create" PublickeyCredentialsGet = "publickey-credentials-get" ScreenWakeLock = "screen-wake-lock" Serial = "serial" StorageAccess = "storage-access" Usb = "usb" Wildcards = "wildcards" WindowManagement = "window-management" XrSpatialTracking = "xr-spatial-tracking" )
Policy values.
Variables ¶
View Source
var DefaultPolicy = Policy{ Accelerometer: []string{}, AmbientLightSensor: []string{}, AttributionReporting: []string{}, Autoplay: []string{}, Bluetooth: []string{}, BrowsingTopics: []string{}, Camera: []string{}, ComputePressure: []string{}, CrossOriginIsolated: []string{}, DisplayCapture: []string{}, DocumentDomain: []string{}, EncryptedMedia: []string{}, Fullscreen: []string{}, Geolocation: []string{}, Gyroscope: []string{}, Hid: []string{}, IdentityCredentialsGet: []string{}, IdleDetection: []string{}, InterestCohort: []string{}, LocalFonts: []string{}, Magnetometer: []string{}, Microphone: []string{}, Midi: []string{}, OtpCredentials: []string{}, Payment: []string{}, PictureInPicture: []string{}, PublickeyCredentialsCreate: []string{}, PublickeyCredentialsGet: []string{}, ScreenWakeLock: []string{}, Serial: []string{}, StorageAccess: []string{}, Usb: []string{}, WebShare: []string{}, Wildcards: []string{}, WindowManagement: []string{}, XrSpatialTracking: []string{}, }
DefaultPolicy is a default Policy that denies everything.
Functions ¶
This section is empty.
Types ¶
type Policy ¶
Policy is a map of permission directives. It's the same data structure as http.Header, with a different serialization.
Click to show internal directories.
Click to hide internal directories.