Documentation ¶
Index ¶
Constants ¶
const EhridRegex = `e[A-Z]{6}[0-9]{3}`
EhridRegex Regex for eHrid.
Variables ¶
SeededRand Seeded random
var Validate *validator.Validate
Validate -_-
Functions ¶
Types ¶
type KeyServerConfig ¶ added in v0.3.1
type KeyServerConfig struct {
URL string `env:"KEY_SERVER_URL, required"`
}
KeyServerConfig Configuration of KeyServer.
func LoadKeyServerConfig ¶ added in v0.3.1
func LoadKeyServerConfig(ctx context.Context) (*KeyServerConfig, error)
LoadKeyServerConfig Load KeyServer config.
func (*KeyServerConfig) GetURL ¶ added in v0.3.1
func (c *KeyServerConfig) GetURL(path string) string
GetURL Gets configured url with given path set. It does URL verification but it also ensures that a valid URL comes out of it, no matter if the original one (passed to ENV) included some path or trailing slash etc.
type VerificationServerConfig ¶ added in v0.3.1
type VerificationServerConfig struct { AdminURL string `env:"VERIFICATION_SERVER_ADMIN_URL, required"` DeviceURL string `env:"VERIFICATION_SERVER_DEVICE_URL, required"` AdminKey string DeviceKey string }
VerificationServerConfig Configuration of Verification server.
func LoadVerificationServerConfig ¶ added in v0.3.1
func LoadVerificationServerConfig(ctx context.Context) (*VerificationServerConfig, error)
LoadVerificationServerConfig Load Verification server config.
func (*VerificationServerConfig) GetAdminURL ¶ added in v0.3.1
func (c *VerificationServerConfig) GetAdminURL(path string) string
GetAdminURL Gets configured admin url with given path set. It does URL verification but it also ensures that a valid URL comes out of it, no matter if the original one (passed to ENV) included some path or trailing slash etc.
func (*VerificationServerConfig) GetDeviceURL ¶ added in v0.3.1
func (c *VerificationServerConfig) GetDeviceURL(path string) string
GetDeviceURL Gets configured device url with given path set. It does URL verification but it also ensures that a valid URL comes out of it, no matter if the original one (passed to ENV) included some path or trailing slash etc.