Documentation ¶
Index ¶
- Variables
- func ConfigureAdminAPIRoute(route httproute.Route) httproute.Route
- func ConfigureGraphQLRoute(route httproute.Route) httproute.Route
- func ConfigureOsanoRoute(route httproute.Route) httproute.Route
- func ConfigureStripeWebhookRoute(route httproute.Route) httproute.Route
- func ConfigureSystemConfigRoute(route httproute.Route) httproute.Route
- type AdminAPIAuthzService
- type AdminAPIHandler
- type AdminAPILogger
- type AdminAPIService
- type GraphQLHandler
- type OsanoHandler
- type ResourceManager
- type StaticAssetsHandler
- type StripeService
- type StripeWebhookHandler
- type StripeWebhookLogger
- type SubscriptionService
- type SystemConfigHandler
- type SystemConfigProvider
Constants ¶
This section is empty.
Variables ¶
View Source
var DependencySet = wire.NewSet( wire.Struct(new(GraphQLHandler), "*"), wire.Struct(new(SystemConfigHandler), "*"), NewAdminAPILogger, wire.Struct(new(AdminAPIHandler), "*"), wire.Struct(new(StaticAssetsHandler), "*"), NewStripeWebhookLogger, wire.Struct(new(StripeWebhookHandler), "*"), wire.Struct(new(OsanoHandler), "*"), )
Functions ¶
Types ¶
type AdminAPIAuthzService ¶
type AdminAPIHandler ¶
type AdminAPIHandler struct { Database *globaldb.Handle Authz AdminAPIAuthzService AdminAPI AdminAPIService Logger AdminAPILogger }
func (*AdminAPIHandler) ServeHTTP ¶
func (h *AdminAPIHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type AdminAPILogger ¶
func NewAdminAPILogger ¶
func NewAdminAPILogger(lf *log.Factory) AdminAPILogger
type AdminAPIService ¶
type GraphQLHandler ¶
func (*GraphQLHandler) ServeHTTP ¶
func (h *GraphQLHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type OsanoHandler ¶
type OsanoHandler struct {
OsanoConfig *portalconfig.OsanoConfig
}
func (*OsanoHandler) ServeHTTP ¶
func (h *OsanoHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type ResourceManager ¶
type StaticAssetsHandler ¶
type StaticAssetsHandler struct {
Resources ResourceManager
}
func (*StaticAssetsHandler) Open ¶
func (h *StaticAssetsHandler) Open(name string) (http.File, error)
func (*StaticAssetsHandler) ServeHTTP ¶
func (h *StaticAssetsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type StripeService ¶
type StripeService interface { ConstructEvent(r *http.Request) (libstripe.Event, error) CreateSubscriptionIfNotExists(ctx context.Context, stripeCheckoutSessionID string, subscriptionPlans []*model.SubscriptionPlan) error FetchSubscriptionPlans(ctx context.Context) (subscriptionPlans []*model.SubscriptionPlan, err error) }
type StripeWebhookHandler ¶
type StripeWebhookHandler struct { StripeService StripeService Logger StripeWebhookLogger Subscriptions SubscriptionService Database *globaldb.Handle }
func (*StripeWebhookHandler) ServeHTTP ¶
func (h *StripeWebhookHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type StripeWebhookLogger ¶
func NewStripeWebhookLogger ¶
func NewStripeWebhookLogger(lf *log.Factory) StripeWebhookLogger
type SubscriptionService ¶
type SubscriptionService interface { GetSubscription0(ctx context.Context, appID string) (*model.Subscription, error) MarkCheckoutSubscribed0(ctx context.Context, appID string, customerID string) error MarkCheckoutCancelled0(ctx context.Context, appID string, customerID string) error UpsertSubscription0(ctx context.Context, appID string, stripeSubscriptionID string, stripeCustomerID string) (*model.Subscription, error) ArchiveSubscription0(ctx context.Context, sub *model.Subscription) error UpdateAppPlan0(ctx context.Context, appID string, planName string) error UpdateAppPlanToDefault0(ctx context.Context, appID string) error MarkCheckoutCompleted(ctx context.Context, appID string, stripCheckoutSessionID string, customerID string) error MarkCheckoutExpired(ctx context.Context, appID string, customerID string) error }
type SystemConfigHandler ¶
type SystemConfigHandler struct { SystemConfig SystemConfigProvider FilesystemCache *httputil.FilesystemCache }
func (*SystemConfigHandler) ServeHTTP ¶
func (h *SystemConfigHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type SystemConfigProvider ¶
type SystemConfigProvider interface {
SystemConfig() (*model.SystemConfig, error)
}
Click to show internal directories.
Click to hide internal directories.