Documentation ¶
Overview ¶
Package model is a model abstraction of authorized apps.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizedApp ¶
type AuthorizedApp struct { // AppPackageName is the name of the package like com.company.app. AppPackageName string // AllowedRegions is the list of allowed regions for this app. If the list is // empty, all regions are permitted. AllowedRegions map[string]struct{} // AllowedHealthAuthorityIDs represents the set of allowed health authorities // that this app can obtain and verify diagnosis verification certificates from. AllowedHealthAuthorityIDs map[int64]struct{} BypassHealthAuthorityVerification bool // If true - revision tokens will still be accepted and checked, but will not // enforce correctness. They will still be generated as output. BypassRevisionToken bool }
AuthorizedApp represents the configuration for a single exposure notification application and their access to and requirements for using the API. DB times of 0 are interpreted to be "unbounded" in that direction.
func NewAuthorizedApp ¶
func NewAuthorizedApp() *AuthorizedApp
func (*AuthorizedApp) AllAllowedHealthAuthorityIDs ¶
func (c *AuthorizedApp) AllAllowedHealthAuthorityIDs() []int64
func (*AuthorizedApp) AllAllowedRegions ¶
func (c *AuthorizedApp) AllAllowedRegions() []string
func (*AuthorizedApp) IsAllowedRegion ¶
func (c *AuthorizedApp) IsAllowedRegion(s string) bool
IsAllowedRegion returns true if the regions list is empty or if the given region is in the list of allowed regions.
func (*AuthorizedApp) RegionsOnePerLine ¶
func (c *AuthorizedApp) RegionsOnePerLine() string
func (*AuthorizedApp) Validate ¶
func (c *AuthorizedApp) Validate() []string
Click to show internal directories.
Click to hide internal directories.