Documentation
¶
Index ¶
- Constants
- Variables
- func APIHandlerStruct(handler interface{}) (interface{}, error)
- func Key(keys []*crypto.Key, name string) *crypto.Key
- type ActorKey
- type ActorKeyData
- type AddCodesParams
- type AddMediatorPublicKeysParams
- type AddMediatorPublicKeysSignedParams
- type AdminSettings
- type AggregatedProviderAppointments
- type Appointment
- type AppointmentAggregated
- type AppointmentsSettings
- type BaseDatabase
- type BookAppointmentParams
- type BookAppointmentSignedParams
- type Booking
- type CancelAppointmentParams
- type CancelAppointmentSignedParams
- type CheckProviderDataParams
- type CheckProviderDataSignedParams
- type ClientSettings
- type CodesData
- type CommandsDefinition
- type CommandsDefinitions
- type CommandsMaker
- type ConfirmProviderParams
- type ConfirmProviderSignedParams
- type ConfirmedProviderData
- type Context
- type CorsSettings
- type Database
- type DatabaseDefinition
- type DatabaseDefinitions
- type DatabaseMaker
- type DatabaseOps
- type DatabaseSettings
- type Definitions
- type DeleteSettingsParams
- type Distance
- type GetAppointmentParams
- type GetAppointmentsAggregatedParams
- type GetAppointmentsByZipCodeParams
- type GetConfigurablesParams
- type GetKeysParams
- type GetProviderAppointmentsByPropertyParams
- type GetProviderAppointmentsByPropertySignedParams
- type GetProviderAppointmentsParams
- type GetProviderAppointmentsSignedParams
- type GetProviderDataParams
- type GetProviderDataSignedParams
- type GetProviderResult
- type GetProvidersByZipCodeParams
- type GetProvidersDataParams
- type GetProvidersDataSignedParams
- type GetSettingsParams
- type GetStatsParams
- type GetTokenParams
- type HTTPServerSettings
- type Integer
- type JSONRPCServerSettings
- type KeyChain
- type KeyLists
- type Keys
- type Level
- type List
- type Lock
- type Logger
- func (l *Logger) Debug(args ...interface{})
- func (l *Logger) Debugf(format string, args ...interface{})
- func (l *Logger) Error(args ...interface{})
- func (l *Logger) Errorf(format string, args ...interface{})
- func (l *Logger) Fatal(args ...interface{})
- func (l *Logger) Info(args ...interface{})
- func (l *Logger) Infof(format string, args ...interface{})
- func (l *Logger) SetLevel(level Level)
- func (l *Logger) Trace(args ...interface{})
- func (l *Logger) Tracef(format string, args ...interface{})
- func (l *Logger) Warning(args ...interface{})
- func (l *Logger) Warningf(format string, args ...interface{})
- type MailSettings
- type Map
- type MediatorKeyData
- type Meter
- type MeterDefinition
- type MeterDefinitions
- type MeterMaker
- type MeterSettings
- type Metric
- type MetricSettings
- type MetricsServer
- type Object
- type PriorityToken
- type ProviderAppointments
- type ProviderData
- type ProviderKeyData
- type ProviderQueueData
- type PublishAppointmentsParams
- type PublishAppointmentsSignedParams
- type RESTServerSettings
- type RPCSettings
- type RateLimit
- type RawProviderData
- type Request
- type ResetDBParams
- type ResetDBSignedParams
- type Response
- type Set
- type SetEntry
- type Settings
- type SettingsValidator
- type SignedAppointment
- type SignedMediatorKeyData
- type SignedParams
- type SignedProviderData
- type SignedProviderKeyData
- type SignedTokenData
- type SigningSettings
- type Slot
- type SortedSet
- type SortedSetEntry
- type StatsValue
- type StorageSettings
- type StoreProviderDataParams
- type StoreProviderDataSignedParams
- type StoreSettingsParams
- type TLSSettings
- type TimeWindow
- func Day(value int64) TimeWindow
- func Hour(value int64) TimeWindow
- func MakeTimeWindow(t int64, twType string) TimeWindow
- func Minute(value int64) TimeWindow
- func Month(value int64) TimeWindow
- func QuarterHour(value int64) TimeWindow
- func Second(value int64) TimeWindow
- func Week(value int64) TimeWindow
- type TimeWindowFunc
- type TokenData
- type UploadDistancesParams
- type UploadDistancesSignedParams
- type ValidateSettings
- type ValidateUserParams
- type ValidateUserSignedParams
- type Value
Constants ¶
View Source
const ( PanicLogLevel = Level(log.PanicLevel) FatalLogLevel = Level(log.FatalLevel) ErrorLogLevel = Level(log.ErrorLevel) WarnLogLevel = Level(log.WarnLevel) InfoLogLevel = Level(log.InfoLevel) DebugLogLevel = Level(log.DebugLevel) TraceLogLevel = Level(log.TraceLevel) )
Variables ¶
View Source
var Log = Logger{}
Functions ¶
func APIHandlerStruct ¶
func APIHandlerStruct(handler interface{}) (interface{}, error)
returns a new struct that we can coerce the valid form parameters into
Types ¶
type ActorKey ¶
type ActorKey struct {
ID []byte `json:"id"`
Data string `json:"data"`
Signature []byte `json:"signature"`
PublicKey []byte `json:"publicKey"`
// contains filtered or unexported fields
}
func (*ActorKey) KeyData ¶
func (a *ActorKey) KeyData() (*ActorKeyData, error)
func (*ActorKey) ProviderKeyData ¶
func (a *ActorKey) ProviderKeyData() (*ProviderKeyData, error)
type ActorKeyData ¶
type AddCodesParams ¶
type AddMediatorPublicKeysParams ¶
type AddMediatorPublicKeysParams struct {
Timestamp time.Time `json:"timestamp"`
SignedKeyData *SignedMediatorKeyData `json:"signedKeyData"`
}
type AddMediatorPublicKeysSignedParams ¶
type AddMediatorPublicKeysSignedParams struct {
JSON string `json:"data" coerce:"name:json"`
Data *AddMediatorPublicKeysParams `json:"-" coerce:"name:data"`
Signature []byte `json:"signature"`
PublicKey []byte `json:"publicKey"`
}
type AdminSettings ¶
type AdminSettings struct {
Signing *SigningSettings `json:"signing,omitempty"`
Client *ClientSettings `json:"client,omitempty"`
}
type AggregatedProviderAppointments ¶
type AggregatedProviderAppointments struct {
Provider *ProviderData `json:"provider"`
Appointments []*AppointmentAggregated `json:"appointments"`
}
type Appointment ¶
type Appointment struct {
ID []byte `json:"id"`
Duration int64 `json:"duration"`
Properties map[string]string `json:"properties"`
SlotData []*Slot `json:"slotData"`
Timestamp time.Time `json:"timestamp"`
Vaccine string `json:"vaccine"`
PublicKey []byte `json:"publicKey"`
}
func MakeAppointment ¶
func MakeAppointment(timestamp time.Time, slots, duration int64) (*Appointment, error)
func (*Appointment) Sign ¶
func (k *Appointment) Sign(key *crypto.Key) (*SignedAppointment, error)
type AppointmentAggregated ¶
type AppointmentsSettings ¶
type AppointmentsSettings struct {
DataTTLDays int64 `json:"data_ttl_days,omitempty"`
HTTP *HTTPServerSettings `json:"http,omitempty"`
REST *RESTServerSettings `json:"rest,omitempty"`
JSONRPC *JSONRPCServerSettings `json:"jsonrpc,omitempty"`
Keys []*crypto.Key `json:"keys,omitempty"`
Secret []byte `json:"secret,omitempty"`
ProviderCodesEnabled bool `json:"provider_codes_enabled,omitempty"`
UserCodesEnabled bool `json:"user_codes_enabled,omitempty"`
UserCodesReuseLimit int64 `json:"user_codes_reuse_limit"`
ProviderCodesReuseLimit int64 `json:"provider_codes_reuse_limit"`
ResponseMaxProvider int64 `json:"response_max_provider"`
ResponseMaxAppointment int64 `json:"response_max_appointment"`
ResponseMinNAggregated int64 `json:"response_min_n_aggregated"`
ResponseMaxDaysAggregated int64 `json:"response_max_days_aggregated"`
MaxTokensPerUser int64 `json:"max_tokens_per_user"`
Validate *ValidateSettings `json:"validate"`
}
type BaseDatabase ¶
type BaseDatabase struct {
}
type BookAppointmentParams ¶
type BookAppointmentParams struct {
ProviderID []byte `json:"providerID"`
ID []byte `json:"id"`
EncryptedData *crypto.ECDHEncryptedData `json:"encryptedData"`
SignedTokenData *SignedTokenData `json:"signedTokenData"`
Timestamp time.Time `json:"timestamp"`
}
type BookAppointmentSignedParams ¶
type BookAppointmentSignedParams struct {
JSON string `json:"data" coerce:"name:json"`
Data *BookAppointmentParams `json:"-" coerce:"name:data"`
Signature []byte `json:"signature"`
PublicKey []byte `json:"publicKey"`
}
type Booking ¶
type Booking struct {
ID []byte `json:"id"`
PublicKey []byte `json:"publicKey"`
Token []byte `json:"token"`
EncryptedData *crypto.ECDHEncryptedData `json:"encryptedData"`
}
type CancelAppointmentParams ¶
type CancelAppointmentParams struct {
Timestamp time.Time `json:"timestamp"`
ProviderID []byte `json:"providerID"`
SignedTokenData *SignedTokenData `json:"signedTokenData"`
ID []byte `json:"id"`
}
type CancelAppointmentSignedParams ¶
type CancelAppointmentSignedParams struct {
JSON string `json:"data" coerce:"name:json"`
Data *CancelAppointmentParams `json:"-" coerce:"name:data"`
Signature []byte `json:"signature"`
PublicKey []byte `json:"publicKey"`
}
type CheckProviderDataParams ¶
type CheckProviderDataSignedParams ¶
type CheckProviderDataSignedParams struct {
JSON string `json:"data" coerce:"name:json"`
Data *CheckProviderDataParams `json:"-" coerce:"name:data"`
Signature []byte `json:"signature"`
PublicKey []byte `json:"publicKey"`
}
type ClientSettings ¶
type CommandsDefinition ¶
type CommandsDefinition struct {
Name string `json:"name"`
Description string `json:"description"`
Maker CommandsMaker `json:"-"`
}
type CommandsDefinitions ¶
type CommandsDefinitions []CommandsDefinition
type ConfirmProviderParams ¶
type ConfirmProviderParams struct {
Timestamp time.Time `json:"timestamp"`
PublicProviderData *SignedProviderData `json:"publicProviderData"`
ConfirmedProviderData *ConfirmedProviderData `json:"confirmedProviderData"`
SignedKeyData *SignedProviderKeyData `json:"signedKeyData"`
}
this data is accessible to the provider, nothing "secret" should be stored here...
type ConfirmProviderSignedParams ¶
type ConfirmProviderSignedParams struct {
JSON string `json:"data" coerce:"name:json"`
Data *ConfirmProviderParams `json:"-" coerce:"name:data"`
Signature []byte `json:"signature"`
PublicKey []byte `json:"publicKey"`
}
type ConfirmedProviderData ¶
type ConfirmedProviderData struct {
JSON string `json:"data" coerce:"name:json"`
Data *crypto.ECDHEncryptedData `json:"-" coerce:"name:data"`
Signature []byte `json:"signature"`
PublicKey []byte `json:"publicKey"`
}
type Context ¶
type Context interface {
Params() map[string]interface{}
Result(data interface{}) Response
Error(code int, message string, data interface{}) Response
InternalError() Response
InvalidParams(err error) Response
IsInternalError(err Response) bool
MethodNotFound() Response
NotFound() Response
Acknowledge() Response
Nil() Response
}
type CorsSettings ¶
type Database ¶
type Database interface {
Close() error
Open() error
Reset() error
Lock(key string, lockWait, ttl time.Duration) (Lock, error)
LockDefault(key string) (Lock, error)
DatabaseOps
}
A database can deliver and accept message
type DatabaseDefinition ¶
type DatabaseDefinition struct {
Name string `json:"name"`
Description string `json:"description"`
Maker DatabaseMaker `json:"-"`
SettingsValidator SettingsValidator `json:"-"`
}
type DatabaseDefinitions ¶
type DatabaseDefinitions map[string]DatabaseDefinition
type DatabaseMaker ¶
type DatabaseOps ¶
type DatabaseOps interface {
Expire(table string, key []byte, ttl time.Duration) error
ExpireAt(table string, key []byte, tm time.Time) error
Integer(table string, key []byte) Integer
List(table string, key []byte) List
Map(table string, key []byte) Map
Set(table string, key []byte) Set
SortedSet(table string, key []byte) SortedSet
Value(table string, key []byte) Value
}
type DatabaseSettings ¶
type DatabaseSettings struct {
Type string `json:"type"`
Settings interface{}
}
type Definitions ¶
type Definitions struct {
CommandsDefinitions
DatabaseDefinitions
MeterDefinitions
}
func MergeDefinitions ¶
func MergeDefinitions(a, b Definitions) Definitions
func (Definitions) Marshal ¶
func (d Definitions) Marshal() map[string]interface{}
func (Definitions) MarshalJSON ¶
func (d Definitions) MarshalJSON() ([]byte, error)
We perform JSON marshalling manually to gain more flexibility...
type DeleteSettingsParams ¶
type DeleteSettingsParams struct {
ID []byte `json:"id"`
}
type GetAppointmentParams ¶
type GetProviderAppointmentsByPropertySignedParams ¶
type GetProviderAppointmentsByPropertySignedParams struct {
JSON string `json:"data" coerce:"name:json"`
Data *GetProviderAppointmentsByPropertyParams `json:"-" coerce:"name:data"`
Signature []byte `json:"signature"`
PublicKey []byte `json:"publicKey"`
}
type GetProviderAppointmentsSignedParams ¶
type GetProviderAppointmentsSignedParams struct {
JSON string `json:"data" coerce:"name:json"`
Data *GetProviderAppointmentsParams `json:"-" coerce:"name:data"`
Signature []byte `json:"signature"`
PublicKey []byte `json:"publicKey"`
}
type GetProviderDataParams ¶
type GetProviderDataSignedParams ¶
type GetProviderDataSignedParams struct {
JSON string `json:"data" coerce:"name:json"`
Data *GetProviderDataParams `json:"-" coerce:"name:data"`
Signature []byte `json:"signature"`
PublicKey []byte `json:"publicKey"`
}
type GetProviderResult ¶
type GetProviderResult struct {
UnverifiedData *RawProviderData `json:"unverifiedData"`
VerifiedData *RawProviderData `json:"verifiedData"`
}
type GetProvidersDataParams ¶ added in v0.8.1
type GetProvidersDataSignedParams ¶ added in v0.8.1
type GetProvidersDataSignedParams struct {
JSON string `json:"data" coerce:"name:json"`
Data *GetProvidersDataParams `json:"-" coerce:"name:data"`
Signature []byte `json:"signature"`
PublicKey []byte `json:"publicKey"`
}
type GetSettingsParams ¶
type GetSettingsParams struct {
ID []byte `json:"id"`
}
type GetStatsParams ¶
type GetTokenParams ¶
type HTTPServerSettings ¶
type HTTPServerSettings struct {
TLS *TLSSettings `json:"tls,omitempty"`
BindAddress string `json:"bind_address"`
TCPRateLimits []*RateLimit `json:"tcp_rate_limits"`
}
type JSONRPCServerSettings ¶
type JSONRPCServerSettings struct {
Cors *CorsSettings `json:"cors,omitempty"`
HTTP *HTTPServerSettings `json:"http,omitempty"`
}
Settings for the JSON-RPC server
type MailSettings ¶
type MailSettings struct {
SmtpHost string `json:"smtp_host"`
SmtpPort int64 `json:"smtp_port"`
SmtpUser string `json:"smtp_user"`
SmtpPassword string `json:"smtp_password"`
Sender string `json:"sender"`
MailSubject string `json:"mail_subject"`
MailTemplate string `json:"mail_template"`
MailDelay int64 `json:"mail_delay"`
}
type MediatorKeyData ¶
type MediatorKeyData struct {
Signing []byte `json:"signing"`
Encryption []byte `json:"encryption"`
}
func (*MediatorKeyData) Sign ¶
func (k *MediatorKeyData) Sign(key *crypto.Key) (*SignedMediatorKeyData, error)
type Meter ¶
type Meter interface {
// Add the given value to the metric
Add(id string, name string, data map[string]string, tw TimeWindow, value int64) error
// Add the given value to the metric, but only if the given uid hasn't been counted yet
AddOnce(id string, name string, uid string, data map[string]string, tw TimeWindow, value int64) error
// Add the maximum value to the metric
AddMax(id string, name string, uid string, data map[string]string, tw TimeWindow, value int64) error
// Return the metric and its assigned quota
Get(id string, name string, data map[string]string, tw TimeWindow) (*Metric, error)
// Return metrics for a given ID and time interval
Range(id string, from, to int64, name, twType string) ([]*Metric, error)
N(id string, to int64, n int64, name, twType string) ([]*Metric, error)
}
type MeterDefinition ¶
type MeterDefinition struct {
Name string `json:"name"`
Description string `json:"description"`
Maker MeterMaker `json:"-"`
SettingsValidator SettingsValidator `json:"-"`
}
type MeterDefinitions ¶
type MeterDefinitions map[string]MeterDefinition
type MeterMaker ¶
type MeterSettings ¶
type MeterSettings struct {
Type string `json:"type"`
Settings interface{}
}
type Metric ¶
type Metric struct {
Name string
TimeWindow TimeWindow
Value int64
Data map[string]string
}
type MetricSettings ¶
type MetricSettings struct {
BindAddress string `json:"bind_address"`
}
type MetricsServer ¶
type PriorityToken ¶
type PriorityToken struct {
N int64 `json:"n"`
}
func (*PriorityToken) Marshal ¶
func (p *PriorityToken) Marshal() ([]byte, error)
type ProviderAppointments ¶
type ProviderAppointments struct {
Provider *SignedProviderData `json:"provider"`
Appointments []*SignedAppointment `json:"appointments"`
KeyChain *KeyChain `json:"keyChain"`
}
type ProviderData ¶
type ProviderData struct {
ID []byte `json:"id,omitempty"`
Name string `json:"name"`
Street string `json:"street"`
City string `json:"city"`
ZipCode string `json:"zipCode"`
Description string `json:"description"`
Accessible bool `json:"accessible"`
}
func (*ProviderData) Sign ¶
func (k *ProviderData) Sign(key *crypto.Key) (*SignedProviderData, error)
type ProviderKeyData ¶
type ProviderKeyData struct {
Signing []byte `json:"signing"`
Encryption []byte `json:"encryption"`
QueueData *ProviderQueueData `json:"queueData"`
}
func (*ProviderKeyData) Sign ¶
func (k *ProviderKeyData) Sign(key *crypto.Key) (*SignedProviderKeyData, error)
type ProviderQueueData ¶
type PublishAppointmentsParams ¶
type PublishAppointmentsParams struct {
Timestamp time.Time `json:"timestamp"`
Appointments []*SignedAppointment `json:"appointments"`
}
type PublishAppointmentsSignedParams ¶
type PublishAppointmentsSignedParams struct {
JSON string `json:"data" coerce:"name:json"`
Data *PublishAppointmentsParams `json:"-" coerce:"name:data"`
Signature []byte `json:"signature"`
PublicKey []byte `json:"publicKey"`
}
type RESTServerSettings ¶
type RESTServerSettings struct {
Cors *CorsSettings `json:"cors,omitempty"`
HTTP *HTTPServerSettings `json:"http,omitempty"`
}
Settings for the REST server
type RPCSettings ¶
type RPCSettings struct {
BindAddress string `json:"bind_address"`
}
type RateLimit ¶
type RateLimit struct {
TimeWindow *TimeWindow `json:"timeWindow"`
Type string `json:"type"`
Limit int64 `json:"limit"`
}
type RawProviderData ¶
type RawProviderData struct {
ID []byte `json:"id,omitempty"`
Verified bool `json:"verified,omitempty"`
Status string `json:"status,omitempty"`
EncryptedData *crypto.ECDHEncryptedData `json:"encryptedData"`
}
type ResetDBParams ¶
type ResetDBSignedParams ¶
type ResetDBSignedParams struct {
JSON string `json:"data" coerce:"name:json"`
Data *ResetDBParams `json:"-" coerce:"name:data"`
Signature []byte `json:"signature"`
PublicKey []byte `json:"publicKey"`
}
type Response ¶
type Response interface {
}
func HandleAPICall ¶
func HandleAPICall(
handler interface{},
form *forms.Form,
validateSettings *ValidateSettings,
context Context) Response
type Settings ¶
type Settings struct {
Test bool `json:"test,omitempty"`
Admin *AdminSettings `json:"admin,omitempty"`
Definitions *Definitions `json:"definitions,omitempty"`
Storage *StorageSettings `json:"storage,omitempty"`
Appointments *AppointmentsSettings `json:"appointments,omitempty"`
Database *DatabaseSettings `json:"database,omitempty"`
Meter *MeterSettings `json:"meter,omitempty"`
Metrics *MetricSettings `json:"metrics,omitempty"`
DatabaseObj Database `json:"-"`
MeterObj Meter `json:"-"`
MetricsObj MetricsServer `json:"-"`
}
type SettingsValidator ¶
type SignedAppointment ¶
type SignedAppointment struct {
UpdatedAt time.Time `json:"updatedAt"`
Bookings []*Booking `json:"bookings"` // only for providers
BookedSlots []*Slot `json:"bookedSlots"` // for users
JSON string `json:"data" coerce:"name:json"`
Data *Appointment `json:"-" coerce:"name:data"`
Signature []byte `json:"signature"`
PublicKey []byte `json:"publicKey"`
}
type SignedMediatorKeyData ¶
type SignedMediatorKeyData struct {
JSON string `json:"data" coerce:"name:json"`
Data *MediatorKeyData `json:"-" coerce:"name:data"`
Signature []byte `json:"signature"`
PublicKey []byte `json:"publicKey"`
}
type SignedParams ¶
type SignedProviderData ¶
type SignedProviderData struct {
JSON string `json:"data" coerce:"name:json"`
Data *ProviderData `json:"-" coerce:"name:data"`
Signature []byte `json:"signature"`
PublicKey []byte `json:"publicKey"`
ID []byte `json:"id"`
}
type SignedProviderKeyData ¶
type SignedProviderKeyData struct {
JSON string `json:"data" coerce:"name:json"`
Data *ProviderKeyData `json:"-" coerce:"name:data"`
Signature []byte `json:"signature"`
PublicKey []byte `json:"publicKey"`
}
type SignedTokenData ¶
type SigningSettings ¶
type SortedSet ¶
type SortedSet interface {
Object
Del([]byte) (bool, error)
Add([]byte, int64) error
Range(int64, int64) ([]*SortedSetEntry, error)
RangeByScore(int64, int64) ([]*SortedSetEntry, error)
At(int64) (*SortedSetEntry, error)
Score([]byte) (int64, error)
PopMin(int64) ([]*SortedSetEntry, error)
RemoveRangeByScore(int64, int64) error
}
type SortedSetEntry ¶
type StatsValue ¶
type StorageSettings ¶
type StorageSettings struct {
Keys []*crypto.Key `json:"keys,omitempty"`
SettingsTTLDays int64 `json:"settings_ttl_days"`
HTTP *HTTPServerSettings `json:"http,omitempty"`
JSONRPC *JSONRPCServerSettings `json:"jsonrpc,omitempty"`
REST *RESTServerSettings `json:"rest,omitempty"`
}
type StoreProviderDataParams ¶
type StoreProviderDataParams struct {
Timestamp time.Time `json:"timestamp"`
EncryptedData *crypto.ECDHEncryptedData `json:"encryptedData"`
Code []byte `json:"code"`
}
type StoreProviderDataSignedParams ¶
type StoreProviderDataSignedParams struct {
JSON string `json:"data" coerce:"name:json"`
Data *StoreProviderDataParams `json:"-" coerce:"name:data"`
Signature []byte `json:"signature"`
PublicKey []byte `json:"publicKey"`
}
type StoreSettingsParams ¶
type StoreSettingsParams struct {
ID []byte `json:"id"`
Data interface{} `json:"data"`
}
type TLSSettings ¶
type TimeWindow ¶
func Day ¶
func Day(value int64) TimeWindow
func Hour ¶
func Hour(value int64) TimeWindow
func MakeTimeWindow ¶
func MakeTimeWindow(t int64, twType string) TimeWindow
func Minute ¶
func Minute(value int64) TimeWindow
func Month ¶
func Month(value int64) TimeWindow
func QuarterHour ¶
func QuarterHour(value int64) TimeWindow
func Second ¶
func Second(value int64) TimeWindow
func Week ¶
func Week(value int64) TimeWindow
func (*TimeWindow) Copy ¶
func (t *TimeWindow) Copy() TimeWindow
func (*TimeWindow) EqualTo ¶
func (t *TimeWindow) EqualTo(tw *TimeWindow) bool
func (*TimeWindow) IncreaseBy ¶
func (t *TimeWindow) IncreaseBy(n int64)
type TimeWindowFunc ¶
type TimeWindowFunc func(int64) TimeWindow
type TokenData ¶
type TokenData struct {
JSON string `json:"data" coerce:"name:json"`
Data *PriorityToken `json:"-" coerce:"name:data"`
PublicKey []byte `json:"publicKey"`
Token []byte `json:"token"`
Hash []byte `json:"hash"`
}
type UploadDistancesParams ¶
type UploadDistancesSignedParams ¶
type UploadDistancesSignedParams struct {
JSON string `json:"data" coerce:"name:json"`
Data *UploadDistancesParams `json:"-" coerce:"name:data"`
Signature []byte `json:"signature"`
PublicKey []byte `json:"publicKey"`
}
type ValidateSettings ¶
type ValidateSettings struct {
AppointmentDurationMax int64 `json:"appointment_duration_max"`
AppointmentDurationMin int64 `json:"appointment_duration_min"`
AnonMaxTimeWindow int64 `json:"anon_max_time_window"`
AnonAggregatedMaxTimeWindow int64 `json:"anon_aggregated_max_time_window"`
ProviderMaxTimeWindow int64 `json:"provider_max_time_window"`
Vaccines []string `json:"vaccines"`
}
Settings for the appointments server validator
type ValidateUserParams ¶
type ValidateUserParams struct {
SignedTokenData *SignedTokenData `json:"signedTokenData"`
Timestamp time.Time `json:"timestamp"`
}
type ValidateUserSignedParams ¶
type ValidateUserSignedParams struct {
JSON string `json:"data" coerce:"name:json"`
Data *ValidateUserParams `json:"-" coerce:"name:data"`
Signature []byte `json:"signature"`
PublicKey []byte `json:"publicKey"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.