helpers

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2022 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EnvSettingsName = "KIEBITZ_SETTINGS"

Functions

func InitializeAppointmentsServer

func InitializeAppointmentsServer(settings *services.Settings) (*servers.Appointments, error)

func InitializeDatabase

func InitializeDatabase(settings *services.Settings) (services.Database, error)

func InitializeMeter

func InitializeMeter(settings *services.Settings) (services.Meter, error)

func InitializeMetricsServer

func InitializeMetricsServer(settings *services.Settings) (*metrics.PrometheusMetricsServer, error)

func InitializeStorageServer

func InitializeStorageServer(settings *services.Settings) (*servers.Storage, error)

func RealSettingsPaths

func RealSettingsPaths() ([]string, error)

func Settings

func Settings(settingsPaths []string, fs fs.FS, definitions *services.Definitions) (*services.Settings, error)

func SettingsPaths

func SettingsPaths() ([]string, fs.FS, error)

Types

type AppointmentsClient

type AppointmentsClient struct {
	// contains filtered or unexported fields
}

func MakeAppointmentsClient

func MakeAppointmentsClient(settings *services.Settings, client *http.Client) *AppointmentsClient

func (*AppointmentsClient) AddCodes

func (a *AppointmentsClient) AddCodes(params *services.AddCodesParams) (*Response, error)

func (*AppointmentsClient) AddMediatorPublicKeys

func (a *AppointmentsClient) AddMediatorPublicKeys(mediator *crypto.Actor) (*Response, error)

func (*AppointmentsClient) BookAppointment

func (a *AppointmentsClient) BookAppointment(params interface{}) (*Response, error)

func (*AppointmentsClient) CancelAppointment

func (a *AppointmentsClient) CancelAppointment(params interface{}) (*Response, error)

func (*AppointmentsClient) CheckProviderData

func (a *AppointmentsClient) CheckProviderData(provider *Provider) (*Response, error)

func (*AppointmentsClient) ConfirmProvider

func (a *AppointmentsClient) ConfirmProvider(provider *Provider, mediator *crypto.Actor) (*Response, error)

func (*AppointmentsClient) GetAppointmentsByZipCode

func (a *AppointmentsClient) GetAppointmentsByZipCode(params *services.GetAppointmentsByZipCodeParams) (*Response, error)

func (*AppointmentsClient) GetKeys

func (a *AppointmentsClient) GetKeys() (*Response, error)

func (*AppointmentsClient) GetPendingProviderData

func (a *AppointmentsClient) GetPendingProviderData(params interface{}) (*Response, error)

func (*AppointmentsClient) GetProviderAppointments

func (a *AppointmentsClient) GetProviderAppointments(params *services.GetProviderAppointmentsParams) (*Response, error)

func (*AppointmentsClient) GetStats

func (a *AppointmentsClient) GetStats(params *services.GetStatsParams) (*Response, error)

func (*AppointmentsClient) GetToken

func (a *AppointmentsClient) GetToken(params interface{}) (*Response, error)

func (*AppointmentsClient) GetVerifiedProviderData

func (a *AppointmentsClient) GetVerifiedProviderData(params interface{}) (*Response, error)

func (*AppointmentsClient) PublishAppointments

func (a *AppointmentsClient) PublishAppointments(params *services.PublishAppointmentsParams, provider *Provider) (*Response, error)

func (*AppointmentsClient) ResetDB

func (a *AppointmentsClient) ResetDB() (*Response, error)

func (*AppointmentsClient) StoreProviderData

func (a *AppointmentsClient) StoreProviderData(provider *Provider) (*Response, error)

func (*AppointmentsClient) UploadDistances

func (a *AppointmentsClient) UploadDistances(params *services.UploadDistancesParams) (*Response, error)

type Client

type Client struct {
	Storage      *StorageClient
	Appointments *AppointmentsClient
	// contains filtered or unexported fields
}

func MakeClient

func MakeClient(settings *services.Settings) *Client

type ConfirmProviderData

type ConfirmProviderData struct {
	Data       *services.ProviderData `json:"data"`
	PublicKeys *PublicKeys            `json:"publicKeys"`
}

type Provider

type Provider struct {
	Actor      *crypto.Actor
	DataKey    *crypto.Key
	QueueData  *services.ProviderQueueData
	PublicData *services.ProviderData
}

type PublicKeys

type PublicKeys struct {
	Signing    []byte `json:"signing"`
	Encryption []byte `json:"encryption"`
}

type Requester

type Requester func(method string, params interface{}, key *crypto.Key) (*Response, error)

func MakeAPIClient

func MakeAPIClient(url string, client *http.Client) Requester

type Response

type Response struct {
	*http.Response
	// contains filtered or unexported fields
}

func Request

func Request(url, method string, params interface{}, key *crypto.Key, client *http.Client) (*Response, error)

func (*Response) Bytes

func (r *Response) Bytes() ([]byte, error)

func (*Response) CoerceResult

func (r *Response) CoerceResult(target interface{}, form *forms.Form) error

func (*Response) JSON

func (r *Response) JSON() (map[string]interface{}, error)

func (*Response) Read

func (r *Response) Read() error

type StorageClient

type StorageClient struct {
	// contains filtered or unexported fields
}

func MakeStorageClient

func MakeStorageClient(settings *services.Settings, client *http.Client) *StorageClient

func (*StorageClient) ResetDB

func (a *StorageClient) ResetDB() (*Response, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL