Documentation ¶
Index ¶
- Variables
- func WithContext(ctx context.Context, gqlContext *Context) context.Context
- type AnalyticChartService
- type AppLoader
- type AppResourceManagerFactory
- type AppSecretKey
- type AppService
- type AuditService
- type AuthzService
- type CollaboratorInvitationLoader
- type CollaboratorLoader
- type CollaboratorService
- type Context
- type DenoService
- type DomainLoader
- type DomainService
- type Logger
- type NodeResolver
- type OnboardService
- type SMTPService
- type StripeService
- type SubscriptionService
- type TutorialService
- type UsageService
- type UserLoader
Constants ¶
This section is empty.
Variables ¶
View Source
var AccessDenied = apierrors.Forbidden.WithReason("AccessDenied")
View Source
var AppConfig = graphqlutil.NewJSONObjectScalar(
"AppConfig",
"The `AppConfig` scalar type represents an app config JSON object",
)
View Source
var FeatureConfig = graphqlutil.NewJSONObjectScalar(
"FeatureConfig",
"The `FeatureConfig` scalar type represents an feature config JSON object",
)
View Source
var QuotaExceeded = apierrors.Invalid.WithReason("QuotaExceeded")
View Source
var Schema *graphql.Schema
View Source
var StripeError = graphqlutil.NewJSONObjectScalar(
"StripeError",
"The `StripeError` scalar type represents Stripe error",
)
View Source
var TutorialStatusData = graphqlutil.NewJSONObjectScalar(
"TutorialStatusData",
"The `TutorialStatusData` scalar type represents tutorial status data",
)
View Source
var Unauthenticated = apierrors.Unauthorized.WithReason("Unauthenticated")
Functions ¶
Types ¶
type AnalyticChartService ¶
type AnalyticChartService interface { GetActiveUserChart(ctx context.Context, appID string, periodical string, rangeFrom time.Time, rangeTo time.Time) (*analytic.Chart, error) GetTotalUserCountChart(ctx context.Context, appID string, rangeFrom time.Time, rangeTo time.Time) (*analytic.Chart, error) GetSignupConversionRate(ctx context.Context, appID string, rangeFrom time.Time, rangeTo time.Time) (*analytic.SignupConversionRateData, error) GetSignupByMethodsChart(ctx context.Context, appID string, rangeFrom time.Time, rangeTo time.Time) (*analytic.Chart, error) }
type AppLoader ¶
type AppLoader interface { graphqlutil.DataLoaderInterface }
type AppResourceManagerFactory ¶
type AppResourceManagerFactory interface {
NewManagerWithAppContext(appContext *config.AppContext) *appresource.Manager
}
type AppSecretKey ¶
type AppSecretKey string
const ( AppSecretKeyOauthSSOProviderClientSecrets AppSecretKey = "oauthSSOProviderClientSecrets" // nolint:gosec AppSecretKeyWebhookSecret AppSecretKey = "webhookSecret" AppSecretKeyAdminAPISecrets AppSecretKey = "adminAPISecrets" AppSecretKeySmtpSecret AppSecretKey = "smtpSecret" AppSecretKeyOauthClientSecrets AppSecretKey = "oauthClientSecrets" // nolint:gosec AppSecretKeyBotProtectionProviderSecret AppSecretKey = "botProtectionProviderSecret" AppSecretKeySAMLIdpSigningSecrets AppSecretKey = "samlIdpSigningSecrets" // nolint:gosec AppSecretKeySAMLSpSigningSecrets AppSecretKey = "samlSpSigningSecrets" // nolint:gosec )
type AppService ¶
type AppService interface { LoadRawAppConfig(app *model.App) (*config.AppConfig, string, error) RenderSAMLEntityID(appID string) string Get(ctx context.Context, id string) (*model.App, error) GetAppList(ctx context.Context, userID string) ([]*model.AppListItem, error) Create(ctx context.Context, userID string, id string) (*model.App, error) UpdateResources(ctx context.Context, app *model.App, updates []appresource.Update) error UpdateResources0(ctx context.Context, app *model.App, updates []appresource.Update) error GetProjectQuota(ctx context.Context, userID string) (int, error) LoadAppSecretConfig(ctx context.Context, app *model.App, sessionInfo *apimodel.SessionInfo, token string) (*model.SecretConfig, string, error) GenerateSecretVisitToken(ctx context.Context, app *model.App, sessionInfo *apimodel.SessionInfo, visitingSecrets []config.SecretKey, ) (*appsecret.AppSecretVisitToken, error) GenerateTesterToken(ctx context.Context, app *model.App, returnURI string, ) (*tester.TesterToken, error) }
type AuditService ¶
type AuthzService ¶
type CollaboratorInvitationLoader ¶
type CollaboratorInvitationLoader interface { graphqlutil.DataLoaderInterface }
type CollaboratorLoader ¶
type CollaboratorLoader interface { graphqlutil.DataLoaderInterface }
type CollaboratorService ¶
type CollaboratorService interface { GetCollaborator(ctx context.Context, id string) (*model.Collaborator, error) GetCollaboratorByAppAndUser(ctx context.Context, appID string, userID string) (*model.Collaborator, error) ListCollaborators(ctx context.Context, appID string) ([]*model.Collaborator, error) ListCollaboratorsByUser(ctx context.Context, userID string) ([]*model.Collaborator, error) DeleteCollaborator(ctx context.Context, c *model.Collaborator) error GetProjectOwnerCount(ctx context.Context, userID string) (int, error) GetInvitation(ctx context.Context, id string) (*model.CollaboratorInvitation, error) GetInvitationWithCode(ctx context.Context, id string) (*model.CollaboratorInvitation, error) ListInvitations(ctx context.Context, appID string) ([]*model.CollaboratorInvitation, error) DeleteInvitation(ctx context.Context, i *model.CollaboratorInvitation) error SendInvitation(ctx context.Context, appID string, inviteeEmail string) (*model.CollaboratorInvitation, error) AcceptInvitation(ctx context.Context, code string) (*model.Collaborator, error) CheckInviteeEmail(ctx context.Context, i *model.CollaboratorInvitation, actorID string) error }
type Context ¶
type Context struct { Request *http.Request GQLLogger Logger GlobalDatabase *globaldb.Handle TrustProxy config.TrustProxy Users UserLoader Apps AppLoader Domains DomainLoader Collaborators CollaboratorLoader CollaboratorInvitations CollaboratorInvitationLoader AuthzService AuthzService AppService AppService DomainService DomainService CollaboratorService CollaboratorService SMTPService SMTPService AppResMgrFactory AppResourceManagerFactory AnalyticChartService AnalyticChartService TutorialService TutorialService StripeService StripeService SubscriptionService SubscriptionService UsageService UsageService DenoService DenoService AuditService AuditService OnboardService OnboardService }
func GQLContext ¶
type DomainLoader ¶
type DomainLoader interface { graphqlutil.DataLoaderInterface }
type DomainService ¶
type DomainService interface { ListDomains(ctx context.Context, appID string) ([]*apimodel.Domain, error) CreateCustomDomain(ctx context.Context, appID string, domain string) (*apimodel.Domain, error) DeleteDomain(ctx context.Context, appID string, id string) error VerifyDomain(ctx context.Context, appID string, id string) (*apimodel.Domain, error) }
type OnboardService ¶
type SMTPService ¶
type StripeService ¶
type StripeService interface { GenerateCustomerPortalSession(appID string, customerID string) (*stripe.BillingPortalSession, error) SetSubscriptionCancelAtPeriodEnd(stripeSubscriptionID string, cancelAtPeriodEnd bool) (*time.Time, error) FetchSubscriptionPlans(ctx context.Context) ([]*model.SubscriptionPlan, error) CreateCheckoutSession(ctx context.Context, appID string, customerEmail string, subscriptionPlan *model.SubscriptionPlan) (*libstripe.CheckoutSession, error) FetchCheckoutSession(ctx context.Context, checkoutSessionID string) (*libstripe.CheckoutSession, error) GetSubscriptionPlan(ctx context.Context, planName string) (*model.SubscriptionPlan, error) UpdateSubscription(ctx context.Context, stripeSubscriptionID string, subscriptionPlan *model.SubscriptionPlan) error PreviewUpdateSubscription(ctx context.Context, stripeSubscriptionID string, subscriptionPlan *model.SubscriptionPlan) (*model.SubscriptionUpdatePreview, error) GetLastPaymentError(ctx context.Context, stripeCustomerID string) (*stripe.Error, error) GetSubscription(ctx context.Context, stripeCustomerID string) (*stripe.Subscription, error) CancelSubscriptionImmediately(ctx context.Context, subscriptionID string) error }
type SubscriptionService ¶
type SubscriptionService interface { GetSubscription(ctx context.Context, appID string) (*model.Subscription, error) CreateSubscriptionCheckout(ctx context.Context, stripeCheckoutSession *libstripe.CheckoutSession) (*model.SubscriptionCheckout, error) MarkCheckoutCompleted(ctx context.Context, appID string, stripCheckoutSessionID string, customerID string) error GetSubscriptionUsage(ctx context.Context, appID string, planName string, date time.Time, subscriptionPlans []*model.SubscriptionPlan, ) (*model.SubscriptionUsage, error) UpdateAppPlan(ctx context.Context, appID string, planName string) error SetSubscriptionCancelledStatus(ctx context.Context, id string, cancelled bool, endedAt *time.Time) error GetLastProcessingCustomerID(ctx context.Context, appID string) (*string, error) MarkCheckoutExpired(ctx context.Context, appID string, customerID string) error }
type TutorialService ¶
type UsageService ¶
type UserLoader ¶
type UserLoader interface { graphqlutil.DataLoaderInterface }
Source Files ¶
- app.go
- app_mutation.go
- billing.go
- billing_mutation.go
- chart.go
- collaborator.go
- collaborator_mutation.go
- context.go
- deps.go
- domain.go
- domain_mutation.go
- errors.go
- hook_mutation.go
- mutation.go
- nodes.go
- query.go
- resource.go
- scalars.go
- schema.go
- smtp_mutation.go
- survey_mutation.go
- tutorial.go
- usage.go
- user.go
- viewer.go
Click to show internal directories.
Click to hide internal directories.