43 lines
1.1 KiB
Go
Executable File
43 lines
1.1 KiB
Go
Executable File
package apiimp
|
|
|
|
import "github.com/tech/sendico/pkg/messaging"
|
|
|
|
type CORSSettings struct {
|
|
MaxAge int `yaml:"max_age"`
|
|
AllowedOrigins []string `yaml:"allowed_origins"`
|
|
AllowedMethods []string `yaml:"allowed_methods"`
|
|
AllowedHeaders []string `yaml:"allowed_headers"`
|
|
ExposedHeaders []string `yaml:"exposed_headers"`
|
|
AllowCredentials bool `yaml:"allow_credentials"`
|
|
}
|
|
|
|
type SignatureConf struct {
|
|
PublicKey any
|
|
PrivateKey []byte
|
|
Algorithm string
|
|
}
|
|
|
|
type Signature struct {
|
|
PublicKeyEnv string `yaml:"public_key_env,omitempty"`
|
|
PrivateKeyEnv string `yaml:"secret_key_env"`
|
|
Algorithm string `yaml:"algorithm"`
|
|
}
|
|
|
|
type WebSocketConfig struct {
|
|
EndpointEnv string `yaml:"endpoint_env"`
|
|
Timeout int `yaml:"timeout"`
|
|
}
|
|
|
|
type MessagingConfig struct {
|
|
BufferSize int `yaml:"buffer_size"`
|
|
}
|
|
|
|
type Config struct {
|
|
DomainEnv string `yaml:"domain_env"`
|
|
EndPointEnv string `yaml:"api_endpoint_env"`
|
|
APIProtocolEnv string `yaml:"api_protocol_env"`
|
|
Messaging messaging.Config `yaml:"message_broker"`
|
|
}
|
|
|
|
type MapClaims = map[string]any
|