transport

package
v0.0.0-...-122f59b Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func ConfigureAdminAPIRoute

func ConfigureAdminAPIRoute(route httproute.Route) httproute.Route

func ConfigureGraphQLRoute

func ConfigureGraphQLRoute(route httproute.Route) httproute.Route

func ConfigureOsanoRoute

func ConfigureOsanoRoute(route httproute.Route) httproute.Route

func ConfigureStripeWebhookRoute

func ConfigureStripeWebhookRoute(route httproute.Route) httproute.Route

func ConfigureSystemConfigRoute

func ConfigureSystemConfigRoute(route httproute.Route) httproute.Route

Types

type AdminAPIAuthzService

type AdminAPIAuthzService interface {
	ListAuthorizedApps(userID string) ([]string, error)
}

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

type AdminAPILogger struct{ *log.Logger }

func NewAdminAPILogger

func NewAdminAPILogger(lf *log.Factory) AdminAPILogger

type AdminAPIService

type AdminAPIService interface {
	Director(appID string, p string, userID string, usage service.Usage) (func(*http.Request), error)
}

type GraphQLHandler

type GraphQLHandler struct {
	DevMode        config.DevMode
	GraphQLContext *graphql.Context
	Database       *globaldb.Handle
	AuditDatabase  *auditdb.ReadHandle
}

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 ResourceManager interface {
	Filesystems() []resource.Fs
}

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(stripeCheckoutSessionID string, subscriptionPlans []*model.SubscriptionPlan) error
	FetchSubscriptionPlans() (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

type StripeWebhookLogger struct{ *log.Logger }

func NewStripeWebhookLogger

func NewStripeWebhookLogger(lf *log.Factory) StripeWebhookLogger

type SubscriptionService

type SubscriptionService interface {
	GetSubscription(appID string) (*model.Subscription, error)
	MarkCheckoutCompleted(appID string, stripCheckoutSessionID string, customerID string) error
	MarkCheckoutSubscribed(appID string, customerID string) error
	MarkCheckoutCancelled(appID string, customerID string) error
	MarkCheckoutExpired(appID string, customerID string) error
	UpsertSubscription(appID string, stripeSubscriptionID string, stripeCustomerID string) (*model.Subscription, error)
	ArchiveSubscription(sub *model.Subscription) error
	UpdateAppPlan(appID string, planName string) error
	UpdateAppPlanToDefault(appID 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)
}

Jump to

Keyboard shortcuts

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