config

package
v1.6.14 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	IdmURL                     string   `env:"IDM_URL" json:"idmURL"`
	RosterdURL                 string   `env:"ROSTERD_URL" json:"rosterdUrl"`
	CustomerServiceURL         string   `env:"CUSTOMERD_URL" json:"customerdUrl"`
	Country                    string   `env:"COUNTRY,default=AT" json:"country"`
	MongoURL                   string   `env:"MONGO_URL" json:"mongoUrl"`
	Database                   string   `env:"DATABASE" json:"database"`
	AllowedOrigins             []string `env:"ALLOWED_ORIGINS" json:"allowedOrigins"`
	ListenAddress              string   `env:"LISTEN" json:"listenAddress"`
	RosterTypeName             string   `env:"ROSTER_TYPE" json:"rosterType"`
	UserPhoneExtensionKeys     []string `env:"PHONE_EXTENSION_KEYS" json:"phoneExtensionKeys"`
	FailoverTransferTarget     string   `env:"FAILOVER_TRANSFER_TARGET" json:"failoverTransferTarget"`
	DefaultOnCallInboundNumber string   `env:"DEFAULT_INBOUND_NUMBER" json:"defaultInboundNumber"`
	VoiceMailStoragePath       string   `env:"STORAGE_PATH" json:"storagePath"`
	EventsServiceURL           string   `env:"EVENTS_SERVICE_URL" json:"eventsServiceUrl"`
	NotificationSenderId       string   `env:"NOTIFICATION_SENDER_ID" json:"notificationSenderId"`
}

func LoadConfig

func LoadConfig(ctx context.Context, path string) (*Config, error)

type Providers

func NewProviders

func NewProviders(ctx context.Context, cfg Config) (*Providers, error)

func (*Providers) FetchUserProfile added in v1.6.1

func (svc *Providers) FetchUserProfile(ctx context.Context, userId string) (*idmv1.Profile, error)

func (*Providers) GetUserTransferTarget added in v1.6.1

func (svc *Providers) GetUserTransferTarget(profile *idmv1.Profile) string

func (*Providers) PublishEvent added in v1.6.6

func (svc *Providers) PublishEvent(event proto.Message, retained bool)

func (*Providers) ResolveOnCallTarget added in v1.6.1

func (svc *Providers) ResolveOnCallTarget(ctx context.Context, dateTime time.Time, ignoreOverwrites bool, inboundNumber string) (*pbx3cxv1.GetOnCallResponse, error)

func (*Providers) ResolveOverwriteTarget added in v1.6.1

func (svc *Providers) ResolveOverwriteTarget(ctx context.Context, overwrite structs.Overwrite) (string, *idmv1.Profile, error)

Jump to

Keyboard shortcuts

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