Versions in this module Expand all Collapse all v0 v0.8.1 Feb 21, 2022 Changes in this version + type GetProvidersDataParams struct + Limit int64 + Timestamp time.Time + type GetProvidersDataSignedParams struct + Data *GetProvidersDataParams + JSON string + PublicKey []byte + Signature []byte type RawProviderData + Status string v0.8.0 Feb 11, 2022 Changes in this version + const DebugLogLevel + const ErrorLogLevel + const FatalLogLevel + const InfoLogLevel + const PanicLogLevel + const TraceLogLevel + const WarnLogLevel + var Log = Logger + func APIHandlerStruct(handler interface{}) (interface{}, error) + func Key(keys []*crypto.Key, name string) *crypto.Key + type ActorKey struct + Data string + ID []byte + PublicKey []byte + Signature []byte + func (a *ActorKey) KeyData() (*ActorKeyData, error) + func (a *ActorKey) ProviderKeyData() (*ProviderKeyData, error) + type ActorKeyData struct + Encryption []byte + Signing []byte + type AddCodesParams struct + Data *CodesData + JSON string + PublicKey []byte + Signature []byte + type AddMediatorPublicKeysParams struct + SignedKeyData *SignedMediatorKeyData + Timestamp time.Time + type AddMediatorPublicKeysSignedParams struct + Data *AddMediatorPublicKeysParams + JSON string + PublicKey []byte + Signature []byte + type AdminSettings struct + Client *ClientSettings + Signing *SigningSettings + type AggregatedProviderAppointments struct + Appointments []*AppointmentAggregated + Provider *ProviderData + type Appointment struct + Duration int64 + ID []byte + Properties map[string]string + PublicKey []byte + SlotData []*Slot + Timestamp time.Time + Vaccine string + func MakeAppointment(timestamp time.Time, slots, duration int64) (*Appointment, error) + func (k *Appointment) Sign(key *crypto.Key) (*SignedAppointment, error) + type AppointmentAggregated struct + Duration int64 + ID []byte + Properties map[string]string + SlotN int + Timestamp time.Time + Vaccine string + type AppointmentsSettings struct + DataTTLDays int64 + HTTP *HTTPServerSettings + JSONRPC *JSONRPCServerSettings + Keys []*crypto.Key + MaxTokensPerUser int64 + ProviderCodesEnabled bool + ProviderCodesReuseLimit int64 + REST *RESTServerSettings + ResponseMaxAppointment int64 + ResponseMaxDaysAggregated int64 + ResponseMaxProvider int64 + ResponseMinNAggregated int64 + Secret []byte + UserCodesEnabled bool + UserCodesReuseLimit int64 + Validate *ValidateSettings + func (a *AppointmentsSettings) Key(name string) *crypto.Key + type BaseDatabase struct + type BookAppointmentParams struct + EncryptedData *crypto.ECDHEncryptedData + ID []byte + ProviderID []byte + SignedTokenData *SignedTokenData + Timestamp time.Time + type BookAppointmentSignedParams struct + Data *BookAppointmentParams + JSON string + PublicKey []byte + Signature []byte + type Booking struct + EncryptedData *crypto.ECDHEncryptedData + ID []byte + PublicKey []byte + Token []byte + type CancelAppointmentParams struct + ID []byte + ProviderID []byte + SignedTokenData *SignedTokenData + Timestamp time.Time + type CancelAppointmentSignedParams struct + Data *CancelAppointmentParams + JSON string + PublicKey []byte + Signature []byte + type CheckProviderDataParams struct + Timestamp time.Time + type CheckProviderDataSignedParams struct + Data *CheckProviderDataParams + JSON string + PublicKey []byte + Signature []byte + type ClientSettings struct + AppointmentsEndpoint string + StorageEndpoint string + type CodesData struct + Actor string + Codes [][]byte + Timestamp time.Time + type CommandsDefinition struct + Description string + Maker CommandsMaker + Name string + type CommandsDefinitions []CommandsDefinition + type CommandsMaker func(settings *Settings) ([]cli.Command, error) + type ConfirmProviderParams struct + ConfirmedProviderData *ConfirmedProviderData + PublicProviderData *SignedProviderData + SignedKeyData *SignedProviderKeyData + Timestamp time.Time + type ConfirmProviderSignedParams struct + Data *ConfirmProviderParams + JSON string + PublicKey []byte + Signature []byte + type ConfirmedProviderData struct + Data *crypto.ECDHEncryptedData + JSON string + PublicKey []byte + Signature []byte + type Context interface + Acknowledge func() Response + Error func(code int, message string, data interface{}) Response + InternalError func() Response + InvalidParams func(err error) Response + IsInternalError func(err Response) bool + MethodNotFound func() Response + Nil func() Response + NotFound func() Response + Params func() map[string]interface{} + Result func(data interface{}) Response + type CorsSettings struct + AllowedHeaders []string + AllowedHosts []string + AllowedMethods []string + type Database interface + Close func() error + Lock func(key string, lockWait, ttl time.Duration) (Lock, error) + LockDefault func(key string) (Lock, error) + Open func() error + Reset func() error + type DatabaseDefinition struct + Description string + Maker DatabaseMaker + Name string + SettingsValidator SettingsValidator + type DatabaseDefinitions map[string]DatabaseDefinition + type DatabaseMaker func(settings interface{}) (Database, error) + type DatabaseOps interface + Expire func(table string, key []byte, ttl time.Duration) error + ExpireAt func(table string, key []byte, tm time.Time) error + Integer func(table string, key []byte) Integer + List func(table string, key []byte) List + Map func(table string, key []byte) Map + Set func(table string, key []byte) Set + SortedSet func(table string, key []byte) SortedSet + Value func(table string, key []byte) Value + type DatabaseSettings struct + Settings interface{} + Type string + type Definitions struct + func MergeDefinitions(a, b Definitions) Definitions + func (d Definitions) Marshal() map[string]interface{} + func (d Definitions) MarshalJSON() ([]byte, error) + type DeleteSettingsParams struct + ID []byte + type Distance struct + Distance float64 + From string + To string + type GetAppointmentParams struct + ID []byte + ProviderID []byte + type GetAppointmentsAggregatedParams struct + Date time.Time + ZipFrom string + ZipTo string + type GetAppointmentsByZipCodeParams struct + From time.Time + Radius int64 + To time.Time + ZipCode string + type GetConfigurablesParams struct + type GetKeysParams struct + type GetPendingProviderDataParams struct + Limit int64 + Timestamp time.Time + type GetPendingProviderDataSignedParams struct + Data *GetPendingProviderDataParams + JSON string + PublicKey []byte + Signature []byte + type GetProviderAppointmentsByPropertyParams struct + Key string + Timestamp time.Time + Value string + type GetProviderAppointmentsByPropertySignedParams struct + Data *GetProviderAppointmentsByPropertyParams + JSON string + PublicKey []byte + Signature []byte + type GetProviderAppointmentsParams struct + From time.Time + Timestamp time.Time + To time.Time + UpdatedSince *time.Time + type GetProviderAppointmentsSignedParams struct + Data *GetProviderAppointmentsParams + JSON string + PublicKey []byte + Signature []byte + type GetProviderDataParams struct + ProviderID []byte + Timestamp time.Time + type GetProviderDataSignedParams struct + Data *GetProviderDataParams + JSON string + PublicKey []byte + Signature []byte + type GetProviderResult struct + UnverifiedData *RawProviderData + VerifiedData *RawProviderData + type GetProvidersByZipCodeParams struct + ZipFrom string + ZipTo string + type GetSettingsParams struct + ID []byte + type GetStatsParams struct + Filter map[string]interface{} + From *time.Time + ID string + Metric string + N *int64 + Name string + To *time.Time + Type string + type GetTokenParams struct + Code []byte + Hash []byte + PublicKey []byte + type GetVerifiedProviderDataParams struct + Limit int64 + Timestamp time.Time + type GetVerifiedProviderDataSignedParams struct + Data *GetVerifiedProviderDataParams + JSON string + PublicKey []byte + Signature []byte + type HTTPServerSettings struct + BindAddress string + TCPRateLimits []*RateLimit + TLS *TLSSettings + type Integer interface + DecrBy func(int64) (int64, error) + Del func() error + Get func() (int64, error) + IncrBy func(int64) (int64, error) + Set func(value int64, ttl time.Duration) error + type JSONRPCServerSettings struct + Cors *CorsSettings + HTTP *HTTPServerSettings + type KeyChain struct + Mediator *ActorKey + Provider *ActorKey + type KeyLists struct + Mediators []*ActorKey + Providers []*ActorKey + type Keys struct + ProviderData []byte + RootKey []byte + TokenKey []byte + type Level log.Level + func ParseLevel(level string) (Level, error) + type List interface + type Lock interface + Release func() error + type Logger struct + 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 struct + MailDelay int64 + MailSubject string + MailTemplate string + Sender string + SmtpHost string + SmtpPassword string + SmtpPort int64 + SmtpUser string + type Map interface + Del func(key []byte) error + Get func(key []byte) ([]byte, error) + GetAll func() (map[string][]byte, error) + Set func(key []byte, value []byte) error + type MediatorKeyData struct + Encryption []byte + Signing []byte + func (k *MediatorKeyData) Sign(key *crypto.Key) (*SignedMediatorKeyData, error) + type Meter interface + Add func(id string, name string, data map[string]string, tw TimeWindow, value int64) error + AddMax func(id string, name string, uid string, data map[string]string, tw TimeWindow, ...) error + AddOnce func(id string, name string, uid string, data map[string]string, tw TimeWindow, ...) error + Get func(id string, name string, data map[string]string, tw TimeWindow) (*Metric, error) + N func(id string, to int64, n int64, name, twType string) ([]*Metric, error) + Range func(id string, from, to int64, name, twType string) ([]*Metric, error) + type MeterDefinition struct + Description string + Maker MeterMaker + Name string + SettingsValidator SettingsValidator + type MeterDefinitions map[string]MeterDefinition + type MeterMaker func(settings interface{}) (Meter, error) + type MeterSettings struct + Settings interface{} + Type string + type Metric struct + Data map[string]string + Name string + TimeWindow TimeWindow + Value int64 + type MetricSettings struct + BindAddress string + type MetricsServer interface + Start func() error + Stop func() error + type Object interface + type PriorityToken struct + N int64 + func (p *PriorityToken) Marshal() ([]byte, error) + type ProviderAppointments struct + Appointments []*SignedAppointment + KeyChain *KeyChain + Provider *SignedProviderData + type ProviderData struct + Accessible bool + City string + Description string + ID []byte + Name string + Street string + ZipCode string + func (k *ProviderData) Sign(key *crypto.Key) (*SignedProviderData, error) + type ProviderKeyData struct + Encryption []byte + QueueData *ProviderQueueData + Signing []byte + func (k *ProviderKeyData) Sign(key *crypto.Key) (*SignedProviderKeyData, error) + type ProviderQueueData struct + Accessible bool + ZipCode string + type PublishAppointmentsParams struct + Appointments []*SignedAppointment + Timestamp time.Time + type PublishAppointmentsSignedParams struct + Data *PublishAppointmentsParams + JSON string + PublicKey []byte + Signature []byte + type RESTServerSettings struct + Cors *CorsSettings + HTTP *HTTPServerSettings + type RPCSettings struct + BindAddress string + type RateLimit struct + Limit int64 + TimeWindow *TimeWindow + Type string + type RawProviderData struct + EncryptedData *crypto.ECDHEncryptedData + ID []byte + Verified bool + type Request interface + type ResetDBParams struct + Timestamp time.Time + type ResetDBSignedParams struct + Data *ResetDBParams + JSON string + PublicKey []byte + Signature []byte + type Response interface + func HandleAPICall(handler interface{}, form *forms.Form, validateSettings *ValidateSettings, ...) Response + type Set interface + Add func([]byte) error + Del func(key []byte) error + Has func([]byte) (bool, error) + Members func() ([]*SetEntry, error) + type SetEntry struct + Data []byte + type Settings struct + Admin *AdminSettings + Appointments *AppointmentsSettings + Database *DatabaseSettings + DatabaseObj Database + Definitions *Definitions + Meter *MeterSettings + MeterObj Meter + Metrics *MetricSettings + MetricsObj MetricsServer + Storage *StorageSettings + Test bool + type SettingsValidator func(settings map[string]interface{}) (interface{}, error) + type SignedAppointment struct + BookedSlots []*Slot + Bookings []*Booking + Data *Appointment + JSON string + PublicKey []byte + Signature []byte + UpdatedAt time.Time + type SignedMediatorKeyData struct + Data *MediatorKeyData + JSON string + PublicKey []byte + Signature []byte + type SignedParams struct + ExtraData interface{} + JSON string + PublicKey []byte + Signature []byte + Timestamp time.Time + type SignedProviderData struct + Data *ProviderData + ID []byte + JSON string + PublicKey []byte + Signature []byte + type SignedProviderKeyData struct + Data *ProviderKeyData + JSON string + PublicKey []byte + Signature []byte + type SignedTokenData struct + Data *TokenData + JSON string + PublicKey []byte + Signature []byte + type SigningSettings struct + Keys []*crypto.Key + func (s *SigningSettings) Key(name string) *crypto.Key + type Slot struct + ID []byte + type SortedSet interface + Add func([]byte, int64) error + At func(int64) (*SortedSetEntry, error) + Del func([]byte) (bool, error) + PopMin func(int64) ([]*SortedSetEntry, error) + Range func(int64, int64) ([]*SortedSetEntry, error) + RangeByScore func(int64, int64) ([]*SortedSetEntry, error) + RemoveRangeByScore func(int64, int64) error + Score func([]byte) (int64, error) + type SortedSetEntry struct + Data []byte + Score int64 + type StatsValue struct + Data map[string]string + From time.Time + Name string + To time.Time + Value int64 + type StorageSettings struct + HTTP *HTTPServerSettings + JSONRPC *JSONRPCServerSettings + Keys []*crypto.Key + REST *RESTServerSettings + SettingsTTLDays int64 + type StoreProviderDataParams struct + Code []byte + EncryptedData *crypto.ECDHEncryptedData + Timestamp time.Time + type StoreProviderDataSignedParams struct + Data *StoreProviderDataParams + JSON string + PublicKey []byte + Signature []byte + type StoreSettingsParams struct + Data interface{} + ID []byte + type TLSSettings struct + CACertificateFile string + CertificateFile string + KeyFile string + type TimeWindow struct + From int64 + To int64 + Type string + 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 + func (t *TimeWindow) Copy() TimeWindow + func (t *TimeWindow) EqualTo(tw *TimeWindow) bool + func (t *TimeWindow) IncreaseBy(n int64) + type TimeWindowFunc func(int64) TimeWindow + type TokenData struct + Data *PriorityToken + Hash []byte + JSON string + PublicKey []byte + Token []byte + func (k *TokenData) Sign(key *crypto.Key) (*SignedTokenData, error) + type UploadDistancesParams struct + Distances []Distance + Timestamp time.Time + Type string + type UploadDistancesSignedParams struct + Data *UploadDistancesParams + JSON string + PublicKey []byte + Signature []byte + type ValidateSettings struct + AnonAggregatedMaxTimeWindow int64 + AnonMaxTimeWindow int64 + AppointmentDurationMax int64 + AppointmentDurationMin int64 + ProviderMaxTimeWindow int64 + Vaccines []string + type ValidateUserParams struct + SignedTokenData *SignedTokenData + Timestamp time.Time + type ValidateUserSignedParams struct + Data *ValidateUserParams + JSON string + PublicKey []byte + Signature []byte + type Value interface + Del func() error + Get func() ([]byte, error) + Set func(value []byte, ttl time.Duration) error