Documentation
¶
Overview ¶
Package requestflows compiles the DiscoverResources handler example of the Exchange request-flows page against typed stubs, so a variable used before it is declared, a name that is never defined or a wrong SDK call fails `go build` instead of sitting in the documentation. handler.go is extracted from the page by conformance/docgo_test.go; this file is the scaffold the example needs and the only hand-written part.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct{ BillingRef string }
Account is the registered account a key directory resolves to.
type Billing ¶
type Billing interface {
CheckSubscription(ctx context.Context, billingRef, tenantID string) (*SubscriptionStatus, error)
SubscriptionQuota(ctx context.Context, subscriptionID, tenantID string) []*forav1.SubscriptionQuotaInfo
}
Billing answers subscription questions for the account the query resolved.
type ExchangeHandler ¶
type ExchangeHandler struct {
// contains filtered or unexported fields
}
ExchangeHandler is the handler the example is a method of. Every field is an interface the example calls; none has an implementation here.
func (*ExchangeHandler) DiscoverResources ¶
func (h *ExchangeHandler) DiscoverResources( ctx context.Context, req *connect.Request[forav1.ResourceQuery], ) (*connect.Response[forav1.ResourceResponse], error)
type SubscriptionRecord ¶
type SubscriptionRecord struct {
ID string
TrustedIssuers []helpers.TrustedIssuer
}
SubscriptionRecord is one subscription with the root issuer keys it trusts.
type SubscriptionStatus ¶
SubscriptionStatus is the billing view of one subscription.
type TenantConfig ¶
type TenantConfig struct{ ID, Identity string }
TenantConfig is the publisher tenant the queried URIs belong to. Identity is the Exchange's own recipient identity, the value a delegation's aud must name.