transport

package
v0.0.0-...-09efcc3 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 22 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(ctx context.Context, 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(ctx context.Context, appID string, p string, userID string, usage service.Usage) (func(*http.Request), error)
}

type GraphQLHandler

type GraphQLHandler struct {
	GraphQLContext *graphql.Context
}

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(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

type StripeWebhookLogger struct{ *log.Logger }

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)
}

Jump to

Keyboard shortcuts

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