Documentation ¶
Index ¶
- func AuthRequiredMiddleware() echo.MiddlewareFunc
- func ContextMiddleware(fn func(ctx context.Context) context.Context) echo.MiddlewareFunc
- func GraphqlAPI(conf GraphQLConfig, dev bool) echo.HandlerFunc
- func M2MAuthMiddleware(cfg *Config) echo.MiddlewareFunc
- func NewLogMonitor() *event.CommandMonitor
- func NotifyHandler() echo.HandlerFunc
- func Ping() echo.HandlerFunc
- func Signup() echo.HandlerFunc
- func Start(debug bool, version string)
- func UsecaseMiddleware(r *repo.Container, g *gateway.Container, ar *accountrepo.Container, ...) echo.MiddlewareFunc
- func Web(e *echo.Echo, config map[string]any, disabled bool, fs afero.Fs)
- type Auth0Config
- type AuthConfig
- type AuthConfigs
- type AuthM2MConfig
- type CognitoConfig
- type Config
- type FirebaseConfig
- type GCSConfig
- type GraphQLConfig
- type JSON
- type S3Config
- type SMTPConfig
- type SendGridConfig
- type ServerConfig
- type WebServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthRequiredMiddleware ¶
func AuthRequiredMiddleware() echo.MiddlewareFunc
func ContextMiddleware ¶
func GraphqlAPI ¶
func GraphqlAPI(conf GraphQLConfig, dev bool) echo.HandlerFunc
func M2MAuthMiddleware ¶
func M2MAuthMiddleware(cfg *Config) echo.MiddlewareFunc
func NewLogMonitor ¶
func NewLogMonitor() *event.CommandMonitor
func NotifyHandler ¶
func NotifyHandler() echo.HandlerFunc
func UsecaseMiddleware ¶
func UsecaseMiddleware(r *repo.Container, g *gateway.Container, ar *accountrepo.Container, ag *accountgateway.Container, config interactor.ContainerConfig) echo.MiddlewareFunc
Types ¶
type Auth0Config ¶
type Auth0Config struct { Domain string `pp:",omitempty"` Audience string `pp:",omitempty"` ClientID string `pp:",omitempty"` ClientSecret string `pp:",omitempty"` WebClientID string `pp:",omitempty"` }
func (Auth0Config) AuthConfig ¶
func (c Auth0Config) AuthConfig() *AuthConfig
func (Auth0Config) AuthConfigForWeb ¶
func (c Auth0Config) AuthConfigForWeb() *AuthConfig
type AuthConfig ¶
type AuthConfig struct { ISS string `pp:",omitempty"` AUD []string `pp:",omitempty"` ALG *string `pp:",omitempty"` TTL *int `pp:",omitempty"` ClientID *string `pp:",omitempty"` JWKSURI *string `pp:",omitempty"` }
func (AuthConfig) JWTProvider ¶
func (a AuthConfig) JWTProvider() appx.JWTProvider
type AuthConfigs ¶
type AuthConfigs []AuthConfig
func (*AuthConfigs) Decode ¶
func (ipd *AuthConfigs) Decode(value string) error
Decode is a custom decoder for AuthConfigs
func (AuthConfigs) JWTProviders ¶
func (a AuthConfigs) JWTProviders() []appx.JWTProvider
type AuthM2MConfig ¶
type AuthM2MConfig struct { ISS string `pp:",omitempty"` AUD []string `pp:",omitempty"` ALG *string `pp:",omitempty"` TTL *int `pp:",omitempty"` Email string `pp:",omitempty"` JWKSURI *string `pp:",omitempty"` }
func (AuthM2MConfig) JWTProvider ¶
func (a AuthM2MConfig) JWTProvider() []appx.JWTProvider
type CognitoConfig ¶
type Config ¶
type Config struct { Port string `default:"8080" envconfig:"PORT"` ServerHost string `pp:",omitempty"` Host string `default:"http://localhost:8080"` Dev bool `pp:",omitempty"` Host_Web string `pp:",omitempty"` GraphQL GraphQLConfig `pp:",omitempty"` Origins []string `pp:",omitempty"` DB string `default:"mongodb://localhost"` Mailer string `pp:",omitempty"` SMTP SMTPConfig `pp:",omitempty"` SendGrid SendGridConfig `pp:",omitempty"` SignupSecret string `pp:",omitempty"` GCS GCSConfig `pp:",omitempty"` S3 S3Config `pp:",omitempty"` Task gcp.TaskConfig `pp:",omitempty"` AWSTask aws.TaskConfig `pp:",omitempty"` AssetBaseURL string `pp:",omitempty"` Web map[string]string `pp:",omitempty"` Web_Config JSON `pp:",omitempty"` Web_Disabled bool `pp:",omitempty"` // auth Auth AuthConfigs `pp:",omitempty"` Auth0 Auth0Config `pp:",omitempty"` Cognito CognitoConfig `pp:",omitempty"` Firebase FirebaseConfig `pp:",omitempty"` Auth_ISS string `pp:",omitempty"` Auth_AUD string `pp:",omitempty"` Auth_ALG *string `pp:",omitempty"` Auth_TTL *int `pp:",omitempty"` Auth_ClientID *string `pp:",omitempty"` Auth_JWKSURI *string `pp:",omitempty"` // auth for m2m AuthM2M AuthM2MConfig `pp:",omitempty"` DB_Account string `default:"reearth_account" pp:",omitempty"` DB_CMS string `default:"reearth_cms" pp:",omitempty"` DB_Users []appx.NamedURI `pp:",omitempty"` }
func ReadConfig ¶
func (*Config) AuthForWeb ¶
func (c *Config) AuthForWeb() *AuthConfig
func (*Config) Auths ¶
func (c *Config) Auths() (res AuthConfigs)
func (*Config) JWTProviders ¶
func (c *Config) JWTProviders() (res []appx.JWTProvider)
type FirebaseConfig ¶
type GraphQLConfig ¶
type GraphQLConfig struct {
ComplexityLimit int `default:"6000"`
}
type SMTPConfig ¶
type SendGridConfig ¶
type ServerConfig ¶
type ServerConfig struct { Config *Config Debug bool Repos *repo.Container Gateways *gateway.Container AcRepos *accountrepo.Container AcGateways *accountgateway.Container }
Click to show internal directories.
Click to hide internal directories.