Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAppSettingsNotAPointer = errors.New("app settings must be a pointer")
Functions ¶
This section is empty.
Types ¶
type AuthProviderConfig ¶
type AuthProviderConfig struct {
Enabled bool `json:"enabled"`
ClientId string `json:"clientId"`
ClientSecret string `json:"clientSecret"`
AuthUrl string `json:"authUrl"`
TokenUrl string `json:"tokenUrl"`
DisplayName string `json:"displayName"`
}
func (AuthProviderConfig) SetupProvider ¶
func (a AuthProviderConfig) SetupProvider(provider auth.Provider) error
type CloudFrontConfig ¶
type EventBridgeConfig ¶
type EventBridgeConfig struct {
EventBus string `yaml:"eventBus" json:"eventBus"`
}
type GcloudConfig ¶
type GcloudConfig struct {
ProjectId string `yaml:"projectId" json:"projectId"`
CredfileLocation string `yaml:"credfileLocation" json:"credfileLocation"`
PubSub struct {
Topic string `yaml:"topic" json:"topic"`
} `yaml:"pubsub" json:"pubsub"`
Storage struct {
Enabled bool `yaml:"enabled" json:"enabled"`
Bucket string `yaml:"bucket" json:"bucket"`
CredfileLocation string `yaml:"credfileLocation" json:"credfileLocation"`
} `yaml:"storage" json:"storage"`
}
type InMemoryConfig ¶
type InMemoryConfig struct {
Enabled bool `yaml:"enabled" json:"enabled"`
}
type Settings ¶
type Settings struct {
Domain string `yaml:"domain" json:"domain"`
AuthTokenSecret string `yaml:"authTokenSecret" json:"authTokenSecret"`
AuthTokenRefreshSecret string `yaml:"authTokenRefreshSecret" json:"authTokenRefreshSecret"`
OtpGenerationSecret string `yaml:"otpGenerationSecret" json:"otpGenerationSecret"`
OtpPeriod uint `yaml:"otpPeriod" json:"otpPeriod"`
AuthTokenDuration int64 `yaml:"authTokenDuration" json:"authTokenDuration"`
AuthRefreshTokenExpiryDuration int64 `yaml:"authRefreshTokenExpiryDuration" json:"authRefreshTokenExpiryDuration"`
GoogleAuth AuthProviderConfig `yaml:"googleAuth" json:"googleAuth"`
FacebookAuth AuthProviderConfig `yaml:"facebookAuth" json:"facebookAuth"`
AppleAuth AuthProviderConfig `yaml:"appleAuth" json:"appleAuth"`
Aws AwsConfig `yaml:"aws" json:"aws"`
S3 S3Config `yaml:"s3" json:"s3"`
CloudFront CloudFrontConfig `yaml:"cloudFront" json:"cloudFront"`
EventBridge EventBridgeConfig `yaml:"eventBridge" json:"eventBridge"`
InMemory InMemoryConfig `yaml:"inMemoryConfig" json:"inMemoryConfig"`
Glcoud GcloudConfig `yaml:"gcloud" json:"gcloud"`
EventClient types.EventClient `yaml:"eventClient" json:"eventClient"`
AppSettings any `yaml:"appSettings" json:"appSettings"`
}
func NewSettings ¶
func NewSettings() *Settings
func (*Settings) LoadSettings ¶
func (*Settings) NamedAuthProviderConfig ¶
func (s *Settings) NamedAuthProviderConfig(providerName string) (AuthProviderConfig, bool)
Click to show internal directories.
Click to hide internal directories.