server

package
v1.0.0-beta.227 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BaseURL             string
	NamespaceDecoder    namespacedriver.NamespaceDecoder
	ErrorHandler        errorsx.Handler
	Middlewares         []server.MiddlewareFunc
	PostAuthMiddlewares []server.MiddlewareFunc

	// services
	AppService              app.Service
	BillingService          billing.Service
	MeterService            meter.ManageService
	IngestService           ingest.Service
	CustomerService         customer.Service
	EntitlementService      entitlement.Service
	PlanService             plan.Service
	PlanSubscriptionService plansubscription.PlanSubscriptionService
	StripeService           appstripe.Service
	SubscriptionService     subscription.Service
}

func (*Config) Validate

func (c *Config) Validate() error

type Server

type Server struct {
	*Config
	// contains filtered or unexported fields
}

func NewServer

func NewServer(config *Config) (*Server, error)

func (*Server) CancelSubscription

func (s *Server) CancelSubscription(w http.ResponseWriter, r *http.Request, subscriptionId api.ULID)

func (*Server) ChangeSubscription

func (s *Server) ChangeSubscription(w http.ResponseWriter, r *http.Request, subscriptionId api.ULID)

func (*Server) CreateBillingProfile

func (s *Server) CreateBillingProfile(w http.ResponseWriter, r *http.Request)

func (*Server) CreateCustomer

func (s *Server) CreateCustomer(w http.ResponseWriter, r *http.Request)

func (*Server) CreateCustomerStripeCheckoutSession

func (s *Server) CreateCustomerStripeCheckoutSession(w http.ResponseWriter, r *http.Request, customerId api.ULID)

func (*Server) CreateCustomerStripePortalSession

func (s *Server) CreateCustomerStripePortalSession(w http.ResponseWriter, r *http.Request, customerId api.ULID)

func (*Server) CreateMeter

func (s *Server) CreateMeter(w http.ResponseWriter, r *http.Request)

func (*Server) CreateSubscription

func (s *Server) CreateSubscription(w http.ResponseWriter, r *http.Request)

func (*Server) DeleteBillingProfile

func (s *Server) DeleteBillingProfile(w http.ResponseWriter, r *http.Request, id api.ULID)

func (*Server) DeleteCustomer

func (s *Server) DeleteCustomer(w http.ResponseWriter, r *http.Request, customerId api.ULID)

func (*Server) DeleteMeter

func (s *Server) DeleteMeter(w http.ResponseWriter, r *http.Request, meterId api.ULID)

func (*Server) GetApp

func (s *Server) GetApp(w http.ResponseWriter, r *http.Request, appId api.ULID)

func (*Server) GetBillingProfile

func (s *Server) GetBillingProfile(w http.ResponseWriter, r *http.Request, id api.ULID)

func (*Server) GetCustomer

func (s *Server) GetCustomer(w http.ResponseWriter, r *http.Request, customerId api.ULID)

func (*Server) GetCustomerBilling

func (s *Server) GetCustomerBilling(w http.ResponseWriter, r *http.Request, customerId api.ULID)

func (*Server) GetMeter

func (s *Server) GetMeter(w http.ResponseWriter, r *http.Request, meterId api.ULID)

func (*Server) GetSubscription

func (s *Server) GetSubscription(w http.ResponseWriter, r *http.Request, subscriptionId api.ULID)

func (*Server) IngestMeteringEvents

func (s *Server) IngestMeteringEvents(w http.ResponseWriter, r *http.Request)

func (*Server) ListApps

func (s *Server) ListApps(w http.ResponseWriter, r *http.Request, params api.ListAppsParams)

func (*Server) ListBillingProfiles

func (s *Server) ListBillingProfiles(w http.ResponseWriter, r *http.Request, params api.ListBillingProfilesParams)

func (*Server) ListCustomerEntitlementAccess

func (s *Server) ListCustomerEntitlementAccess(w http.ResponseWriter, r *http.Request, customerId api.ULID)

func (*Server) ListCustomers

func (s *Server) ListCustomers(w http.ResponseWriter, r *http.Request, params api.ListCustomersParams)

func (*Server) ListMeters

func (s *Server) ListMeters(w http.ResponseWriter, r *http.Request, params api.ListMetersParams)

func (*Server) ListSubscriptions

func (s *Server) ListSubscriptions(w http.ResponseWriter, r *http.Request, params api.ListSubscriptionsParams)

func (*Server) RegisterRoutes

func (s *Server) RegisterRoutes(r chi.Router) error

func (*Server) UnscheduleCancelation

func (s *Server) UnscheduleCancelation(w http.ResponseWriter, r *http.Request, subscriptionId api.ULID)

func (*Server) UpdateBillingProfile

func (s *Server) UpdateBillingProfile(w http.ResponseWriter, r *http.Request, id api.ULID)

func (*Server) UpdateCustomerBilling

func (s *Server) UpdateCustomerBilling(w http.ResponseWriter, r *http.Request, customerId api.ULID)

func (*Server) UpdateCustomerBillingAppData

func (s *Server) UpdateCustomerBillingAppData(w http.ResponseWriter, r *http.Request, customerId api.ULID)

func (*Server) UpsertCustomer

func (s *Server) UpsertCustomer(w http.ResponseWriter, r *http.Request, customerId api.ULID)

Jump to

Keyboard shortcuts

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