Documentation ¶
Index ¶
- Constants
- Variables
- func MakeVerificationNonce() string
- type AdminAPIDefaultDomainService
- type AdminAPIService
- func (s *AdminAPIService) Director(appID string, p string, actorUserID string, usage Usage) (director func(*http.Request), err error)
- func (s *AdminAPIService) ResolveConfig(appID string) (*config.Config, error)
- func (s *AdminAPIService) ResolveEndpoint(appID string) (*url.URL, error)
- func (s *AdminAPIService) SelfDirector(actorUserID string, usage Usage) (director func(*http.Request), err error)
- type AppAuthzService
- type AppConfigService
- type AppDefaultDomainService
- type AppPlanService
- type AppResourceManagerFactory
- type AppSecretVisitTokenStore
- type AppService
- func (s *AppService) Create(userID string, id string) (*model.App, error)
- func (s *AppService) GenerateSecretVisitToken(app *model.App, sessionInfo *apimodel.SessionInfo, ...) (*appsecret.AppSecretVisitToken, error)
- func (s *AppService) GenerateTesterToken(app *model.App, returnURI string) (*tester.TesterToken, error)
- func (s *AppService) Get(id string) (*model.App, error)
- func (s *AppService) GetAppList(userID string) ([]*model.AppListItem, error)
- func (s *AppService) GetMany(ids []string) (out []*model.App, err error)
- func (s *AppService) GetManyProjectQuota(userIDs []string) ([]int, error)
- func (s *AppService) GetProjectQuota(userID string) (int, error)
- func (s *AppService) LoadAppSecretConfig(app *model.App, sessionInfo *apimodel.SessionInfo, token string) (*model.SecretConfig, string, error)
- func (s *AppService) LoadRawAppConfig(app *model.App) (*config.AppConfig, string, error)
- func (s *AppService) UpdateResources(app *model.App, updates []appresource.Update) error
- type AppServiceLogger
- type AppTesterTokenStore
- type AuditService
- type AuditServiceAppService
- type AuthzAdder
- type AuthzCollaboratorService
- type AuthzConfigService
- type AuthzService
- type CollaboratorAppConfigService
- type CollaboratorService
- func (s *CollaboratorService) AcceptInvitation(code string) (*model.Collaborator, error)
- func (s *CollaboratorService) CheckInviteeEmail(i *model.CollaboratorInvitation, actorID string) error
- func (s *CollaboratorService) CreateCollaborator(c *model.Collaborator) error
- func (s *CollaboratorService) DeleteCollaborator(c *model.Collaborator) error
- func (s *CollaboratorService) DeleteInvitation(i *model.CollaboratorInvitation) error
- func (s *CollaboratorService) GetCollaborator(id string) (*model.Collaborator, error)
- func (s *CollaboratorService) GetCollaboratorByAppAndUser(appID string, userID string) (*model.Collaborator, error)
- func (s *CollaboratorService) GetInvitation(id string) (*model.CollaboratorInvitation, error)
- func (s *CollaboratorService) GetInvitationWithCode(code string) (*model.CollaboratorInvitation, error)
- func (s *CollaboratorService) GetManyCollaborators(ids []string) ([]*model.Collaborator, error)
- func (s *CollaboratorService) GetManyInvitations(ids []string) ([]*model.CollaboratorInvitation, error)
- func (s *CollaboratorService) GetManyProjectOwnerCount(userIDs []string) ([]int, error)
- func (s *CollaboratorService) GetProjectOwnerCount(userID string) (int, error)
- func (s *CollaboratorService) ListCollaborators(appID string) ([]*model.Collaborator, error)
- func (s *CollaboratorService) ListCollaboratorsByUser(userID string) ([]*model.Collaborator, error)
- func (s *CollaboratorService) ListInvitations(appID string) ([]*model.CollaboratorInvitation, error)
- func (s *CollaboratorService) NewCollaborator(appID string, userID string, role model.CollaboratorRole) *model.Collaborator
- func (s *CollaboratorService) SendInvitation(appID string, inviteeEmail string) (*model.CollaboratorInvitation, error)
- type CollaboratorServiceAdminAPIService
- type CollaboratorServiceEndpointsProvider
- type CollaboratorServiceTaskQueue
- type ConfigService
- func (s *ConfigService) Create(opts *CreateAppOptions) error
- func (s *ConfigService) CreateDomain(appID string, domainID string, domain string, isCustom bool) error
- func (s *ConfigService) DeleteDomain(domain *apimodel.Domain) error
- func (s *ConfigService) GetStaticAppIDs() ([]string, error)
- func (s *ConfigService) ResolveContext(appID string) (*config.AppContext, error)
- func (s *ConfigService) UpdateResources(appID string, files []*resource.ResourceFile) error
- type ConfigServiceLogger
- type CreateAppOptions
- type DefaultDomainDomainService
- type DefaultDomainService
- type DomainConfigService
- type DomainService
- func (s *DomainService) CreateCustomDomain(appID string, domain string) (*apimodel.Domain, error)
- func (s *DomainService) CreateDomain(appID string, domain string, isVerified bool, isCustom bool) (*apimodel.Domain, error)
- func (s *DomainService) DeleteDomain(appID string, id string) error
- func (s *DomainService) GetMany(ids []string) ([]*apimodel.Domain, error)
- func (s *DomainService) ListDomains(appID string) ([]*apimodel.Domain, error)
- func (s *DomainService) VerifyDomain(appID string, id string) (*apimodel.Domain, error)
- type GetContractMetadataResponse
- type IngressTemplateData
- type Kubernetes
- type KubernetesLogger
- type KubernetesResource
- type NFTService
- type NoopAttributesService
- type NoopRolesAndGroupsService
- type OnboardService
- type OnboardServiceAdminAPIService
- type PortalAdminAPIAuthContext
- type ProbeColletionResponse
- type ResourceManager
- type ResourceTemplateData
- type SubscriptionConfigSourceStore
- type SubscriptionPlanStore
- type SubscriptionService
- func (s *SubscriptionService) ArchiveSubscription(sub *model.Subscription) error
- func (s *SubscriptionService) CreateSubscriptionCheckout(checkoutSession *libstripe.CheckoutSession) (*model.SubscriptionCheckout, error)
- func (s *SubscriptionService) GetLastProcessingCustomerID(appID string) (*string, error)
- func (s *SubscriptionService) GetSubscription(appID string) (*model.Subscription, error)
- func (s *SubscriptionService) GetSubscriptionUsage(appID string, planName string, date time.Time, ...) (*model.SubscriptionUsage, error)
- func (s *SubscriptionService) MarkCheckoutCancelled(appID string, customerID string) error
- func (s *SubscriptionService) MarkCheckoutCompleted(appID string, stripCheckoutSessionID string, customerID string) error
- func (s *SubscriptionService) MarkCheckoutExpired(appID string, customerID string) error
- func (s *SubscriptionService) MarkCheckoutSubscribed(appID string, customerID string) error
- func (s *SubscriptionService) SetSubscriptionCancelledStatus(id string, cancelled bool, endedAt *time.Time) error
- func (s *SubscriptionService) UpdateAppPlan(appID string, planName string) error
- func (s *SubscriptionService) UpdateAppPlanToDefault(appID string) error
- func (s *SubscriptionService) UpsertSubscription(appID string, stripeSubscriptionID string, stripeCustomerID string) (*model.Subscription, error)
- type SystemConfigProvider
- type Usage
- type UsageStore
Constants ¶
View Source
const DefaultPrivacyPolicyLink string = "https://www.authgear.com/data-privacy"
View Source
const DefaultTermsOfServiceLink string = "https://www.authgear.com/terms"
View Source
const DomainVerificationTimeout = 10 * time.Second
View Source
const SecretVisitTokenValidDuration = duration.Short
View Source
const SecretVisitTokenVisibleSecrets string = "visible_secrets"
Variables ¶
View Source
var AuthgearDependencySet = wire.NewSet( wire.FieldsOf(new(*model.App), "Context", ), wire.FieldsOf(new(*config.AppContext), "Resources", "Config", ), wire.Value(&NoopAttributesService{}), wire.Value(&NoopRolesAndGroupsService{}), deps.ConfigDeps, clock.DependencySet, auditdb.DependencySet, audit.DependencySet, hook.DependencySet, wire.Bind(new(hook.ResourceManager), new(*resource.Manager)), wire.Bind(new(hook.StandardAttributesServiceNoEvent), new(*NoopAttributesService)), wire.Bind(new(hook.CustomAttributesServiceNoEvent), new(*NoopAttributesService)), wire.Bind(new(hook.RolesAndGroupsServiceNoEvent), new(*NoopRolesAndGroupsService)), )
View Source
var DependencySet = wire.NewSet( appsecret.DependencySet, tester.DependencySet, wire.Struct(new(AppService), "*"), wire.Struct(new(AdminAPIService), "*"), wire.Struct(new(AuthzService), "*"), wire.Struct(new(ConfigService), "*"), wire.Struct(new(Kubernetes), "*"), wire.Struct(new(DomainService), "*"), wire.Struct(new(DefaultDomainService), "*"), wire.Struct(new(CollaboratorService), "*"), wire.Struct(new(SystemConfigProvider), "*"), wire.Struct(new(SubscriptionService), "*"), wire.Struct(new(NFTService), "*"), wire.Struct(new(AuditService), "*"), wire.Struct(new(OnboardService), "*"), NewConfigServiceLogger, NewAppServiceLogger, NewKubernetesLogger, wire.Bind(new(AppAuthzService), new(*AuthzService)), wire.Bind(new(AppConfigService), new(*ConfigService)), wire.Bind(new(CollaboratorAppConfigService), new(*ConfigService)), wire.Bind(new(AuthzConfigService), new(*ConfigService)), wire.Bind(new(AuthzCollaboratorService), new(*CollaboratorService)), wire.Bind(new(DomainConfigService), new(*ConfigService)), wire.Bind(new(AppSecretVisitTokenStore), new(*appsecret.AppSecretVisitTokenStoreImpl)), wire.Bind(new(AppTesterTokenStore), new(*tester.TesterStore)), wire.Bind(new(AppDefaultDomainService), new(*DefaultDomainService)), wire.Bind(new(AdminAPIDefaultDomainService), new(*DefaultDomainService)), wire.Bind(new(DefaultDomainDomainService), new(*DomainService)), wire.Bind(new(AuditServiceAppService), new(*AppService)), )
View Source
var DomainVerificationFailed = apierrors.Forbidden.WithReason("DomainVerificationFailed")
View Source
var ErrAppIDInvalid = apierrors.Invalid.WithReason("InvalidAppID").
New("invalid app ID")
View Source
var ErrAppIDReserved = apierrors.Forbidden.WithReason("AppIDReserved").
New("requested app ID is reserved")
View Source
var ErrCollaboratorDuplicate = apierrors.AlreadyExists.WithReason("CollaboratorDuplicate").New("collaborator duplicate")
View Source
var ErrCollaboratorInvitationDuplicate = apierrors.AlreadyExists.WithReason("CollaboratorInvitationDuplicate").New("collaborator invitation duplicate")
View Source
var ErrCollaboratorInvitationInvalidCode = apierrors.Invalid.WithReason("CollaboratorInvitationInvalidCode").New("collaborator invitation invalid code")
View Source
var ErrCollaboratorInvitationInvalidEmail = apierrors.Invalid.WithReason("CollaboratorInvitationInvalidEmail").New("the email with the actor does match the invitee email")
View Source
var ErrCollaboratorInvitationNotFound = apierrors.NotFound.WithReason("CollaboratorInvitationNotFound").New("collaborator invitation not found")
View Source
var ErrCollaboratorNotFound = apierrors.NotFound.WithReason("CollaboratorNotFound").New("collaborator not found")
View Source
var ErrCollaboratorQuotaExceeded = apierrors.Invalid.WithReason("CollaboratorQuotaExceeded").New("collaborator quota exceeded")
View Source
var ErrCollaboratorSelfDeletion = apierrors.Forbidden.WithReason("CollaboratorSelfDeletion").New("cannot remove self from collaborator")
View Source
var ErrDomainDuplicated = apierrors.AlreadyExists.WithReason("DuplicatedDomain").
New("requested domain is already in use")
View Source
var ErrDomainNotCustom = apierrors.Forbidden.WithReason("DomainNotCustom").
New("requested domain is not a custom domain")
View Source
var ErrDomainNotFound = apierrors.NotFound.WithReason("DomainNotFound").
New("domain not found")
View Source
var ErrDomainVerified = apierrors.AlreadyExists.WithReason("DomainVerified").
New("requested domain is already verified")
View Source
var ErrDuplicatedAppID = apierrors.AlreadyExists.WithReason("DuplicatedAppID").
New("duplicated app ID")
View Source
var ErrForbidden = apierrors.Forbidden.WithReason("Forbidden").New("forbidden")
View Source
var ErrGetStaticAppIDsNotSupported = errors.New("only local FS config source can get static app ID")
View Source
var ErrHostSuffixNotConfigured = errors.New("host suffix not configured")
View Source
var ErrReauthRequrired = apierrors.Forbidden.WithReason("ReauthRequrired").
New("reauthentication required")
View Source
var ErrSubscriptionCheckoutNotFound = apierrors.NotFound.WithReason("ErrSubscriptionCheckoutNotFound").
New("subscription checkout not found")
View Source
var ErrSubscriptionNotFound = apierrors.NotFound.WithReason("ErrSubscriptionNotFound").New("subscription not found")
View Source
var InvalidDomain = apierrors.Invalid.WithReason("InvalidDomain")
View Source
var LabelAppID = "authgear.com/app-id"
View Source
var LabelDomainID = "authgear.com/domain-id"
Functions ¶
func MakeVerificationNonce ¶
func MakeVerificationNonce() string
Types ¶
type AdminAPIService ¶
type AdminAPIService struct { AuthgearConfig *portalconfig.AuthgearConfig AdminAPIConfig *portalconfig.AdminAPIConfig ConfigSource *configsource.ConfigSource AuthzAdder AuthzAdder DefaultDomains AdminAPIDefaultDomainService }
func (*AdminAPIService) ResolveConfig ¶
func (s *AdminAPIService) ResolveConfig(appID string) (*config.Config, error)
func (*AdminAPIService) ResolveEndpoint ¶
func (s *AdminAPIService) ResolveEndpoint(appID string) (*url.URL, error)
func (*AdminAPIService) SelfDirector ¶
type AppAuthzService ¶
type AppConfigService ¶
type AppConfigService interface { ResolveContext(appID string) (*config.AppContext, error) UpdateResources(appID string, updates []*resource.ResourceFile) error Create(opts *CreateAppOptions) error }
type AppDefaultDomainService ¶
type AppPlanService ¶
type AppResourceManagerFactory ¶
type AppResourceManagerFactory interface { NewManagerWithNewAppFS(appFs resource.Fs) *appresource.Manager NewManagerWithAppContext(appContext *config.AppContext) *appresource.Manager }
type AppService ¶
type AppService struct { Logger AppServiceLogger SQLBuilder *globaldb.SQLBuilder SQLExecutor *globaldb.SQLExecutor AppConfig *portalconfig.AppConfig AppConfigs AppConfigService AppAuthz AppAuthzService DefaultDomains AppDefaultDomainService Resources ResourceManager AppResMgrFactory AppResourceManagerFactory Plan AppPlanService Clock clock.Clock AppSecretVisitTokenStore AppSecretVisitTokenStore AppTesterTokenStore AppTesterTokenStore }
func (*AppService) GenerateSecretVisitToken ¶
func (s *AppService) GenerateSecretVisitToken( app *model.App, sessionInfo *apimodel.SessionInfo, visitingSecrets []config.SecretKey, ) (*appsecret.AppSecretVisitToken, error)
func (*AppService) GenerateTesterToken ¶
func (s *AppService) GenerateTesterToken( app *model.App, returnURI string, ) (*tester.TesterToken, error)
func (*AppService) GetAppList ¶
func (s *AppService) GetAppList(userID string) ([]*model.AppListItem, error)
func (*AppService) GetMany ¶
func (s *AppService) GetMany(ids []string) (out []*model.App, err error)
func (*AppService) GetManyProjectQuota ¶
func (s *AppService) GetManyProjectQuota(userIDs []string) ([]int, error)
func (*AppService) GetProjectQuota ¶
func (s *AppService) GetProjectQuota(userID string) (int, error)
func (*AppService) LoadAppSecretConfig ¶
func (s *AppService) LoadAppSecretConfig( app *model.App, sessionInfo *apimodel.SessionInfo, token string) (*model.SecretConfig, string, error)
func (*AppService) LoadRawAppConfig ¶
func (*AppService) UpdateResources ¶
func (s *AppService) UpdateResources(app *model.App, updates []appresource.Update) error
type AppServiceLogger ¶
func NewAppServiceLogger ¶
func NewAppServiceLogger(lf *log.Factory) AppServiceLogger
type AppTesterTokenStore ¶
type AuditService ¶
type AuditService struct { Context context.Context RemoteIP httputil.RemoteIP UserAgentString httputil.UserAgentString Request *http.Request Apps AuditServiceAppService Authgear *portalconfig.AuthgearConfig DenoEndpoint config.DenoEndpoint SQLBuilder *globaldb.SQLBuilder SQLExecutor *globaldb.SQLExecutor AuditDatabase *auditdb.WriteHandle Clock clock.Clock LoggerFactory *log.Factory }
func (*AuditService) Log ¶
func (s *AuditService) Log(app *model.App, payload event.NonBlockingPayload) (err error)
type AuditServiceAppService ¶
type AuthzAdder ¶
type AuthzAdder interface { AddAuthz( auth config.AdminAPIAuth, appID config.AppID, authKey *config.AdminAPIAuthKey, auditContext interface{}, hdr http.Header) (err error) }
type AuthzCollaboratorService ¶
type AuthzCollaboratorService interface { NewCollaborator(appID string, userID string, role model.CollaboratorRole) *model.Collaborator CreateCollaborator(c *model.Collaborator) error ListCollaboratorsByUser(userID string) ([]*model.Collaborator, error) GetCollaboratorByAppAndUser(appID string, userID string) (*model.Collaborator, error) }
type AuthzConfigService ¶
type AuthzService ¶
type AuthzService struct { Context context.Context Configs AuthzConfigService Collaborators AuthzCollaboratorService }
func (*AuthzService) AddAuthorizedUser ¶
func (s *AuthzService) AddAuthorizedUser(appID string, userID string, role model.CollaboratorRole) error
func (*AuthzService) CheckAccessOfViewer ¶
func (s *AuthzService) CheckAccessOfViewer(appID string) (userID string, err error)
func (*AuthzService) ListAuthorizedApps ¶
func (s *AuthzService) ListAuthorizedApps(userID string) ([]string, error)
type CollaboratorAppConfigService ¶
type CollaboratorAppConfigService interface {
ResolveContext(appID string) (*config.AppContext, error)
}
type CollaboratorService ¶
type CollaboratorService struct { Context context.Context Clock clock.Clock SQLBuilder *globaldb.SQLBuilder SQLExecutor *globaldb.SQLExecutor MailConfig *portalconfig.MailConfig TaskQueue CollaboratorServiceTaskQueue Endpoints CollaboratorServiceEndpointsProvider TemplateEngine *template.Engine AdminAPI CollaboratorServiceAdminAPIService AppConfigs CollaboratorAppConfigService }
func (*CollaboratorService) AcceptInvitation ¶
func (s *CollaboratorService) AcceptInvitation(code string) (*model.Collaborator, error)
func (*CollaboratorService) CheckInviteeEmail ¶
func (s *CollaboratorService) CheckInviteeEmail(i *model.CollaboratorInvitation, actorID string) error
func (*CollaboratorService) CreateCollaborator ¶
func (s *CollaboratorService) CreateCollaborator(c *model.Collaborator) error
func (*CollaboratorService) DeleteCollaborator ¶
func (s *CollaboratorService) DeleteCollaborator(c *model.Collaborator) error
func (*CollaboratorService) DeleteInvitation ¶
func (s *CollaboratorService) DeleteInvitation(i *model.CollaboratorInvitation) error
func (*CollaboratorService) GetCollaborator ¶
func (s *CollaboratorService) GetCollaborator(id string) (*model.Collaborator, error)
func (*CollaboratorService) GetCollaboratorByAppAndUser ¶
func (s *CollaboratorService) GetCollaboratorByAppAndUser(appID string, userID string) (*model.Collaborator, error)
func (*CollaboratorService) GetInvitation ¶
func (s *CollaboratorService) GetInvitation(id string) (*model.CollaboratorInvitation, error)
func (*CollaboratorService) GetInvitationWithCode ¶
func (s *CollaboratorService) GetInvitationWithCode(code string) (*model.CollaboratorInvitation, error)
func (*CollaboratorService) GetManyCollaborators ¶
func (s *CollaboratorService) GetManyCollaborators(ids []string) ([]*model.Collaborator, error)
func (*CollaboratorService) GetManyInvitations ¶
func (s *CollaboratorService) GetManyInvitations(ids []string) ([]*model.CollaboratorInvitation, error)
func (*CollaboratorService) GetManyProjectOwnerCount ¶
func (s *CollaboratorService) GetManyProjectOwnerCount(userIDs []string) ([]int, error)
func (*CollaboratorService) GetProjectOwnerCount ¶
func (s *CollaboratorService) GetProjectOwnerCount(userID string) (int, error)
func (*CollaboratorService) ListCollaborators ¶
func (s *CollaboratorService) ListCollaborators(appID string) ([]*model.Collaborator, error)
func (*CollaboratorService) ListCollaboratorsByUser ¶
func (s *CollaboratorService) ListCollaboratorsByUser(userID string) ([]*model.Collaborator, error)
func (*CollaboratorService) ListInvitations ¶
func (s *CollaboratorService) ListInvitations(appID string) ([]*model.CollaboratorInvitation, error)
func (*CollaboratorService) NewCollaborator ¶
func (s *CollaboratorService) NewCollaborator(appID string, userID string, role model.CollaboratorRole) *model.Collaborator
func (*CollaboratorService) SendInvitation ¶
func (s *CollaboratorService) SendInvitation( appID string, inviteeEmail string, ) (*model.CollaboratorInvitation, error)
type ConfigService ¶
type ConfigService struct { Context context.Context Logger ConfigServiceLogger AppConfig *portalconfig.AppConfig Controller *configsource.Controller ConfigSource *configsource.ConfigSource DomainImplementation portalconfig.DomainImplementationType Kubernetes *Kubernetes }
func (*ConfigService) Create ¶
func (s *ConfigService) Create(opts *CreateAppOptions) error
func (*ConfigService) CreateDomain ¶
func (*ConfigService) DeleteDomain ¶
func (s *ConfigService) DeleteDomain(domain *apimodel.Domain) error
func (*ConfigService) GetStaticAppIDs ¶
func (s *ConfigService) GetStaticAppIDs() ([]string, error)
func (*ConfigService) ResolveContext ¶
func (s *ConfigService) ResolveContext(appID string) (*config.AppContext, error)
func (*ConfigService) UpdateResources ¶
func (s *ConfigService) UpdateResources(appID string, files []*resource.ResourceFile) error
type ConfigServiceLogger ¶
func NewConfigServiceLogger ¶
func NewConfigServiceLogger(lf *log.Factory) ConfigServiceLogger
type CreateAppOptions ¶
type DefaultDomainService ¶
type DefaultDomainService struct { AppHostSuffixes config.AppHostSuffixes AppConfig *portalconfig.AppConfig Domains DefaultDomainDomainService }
func (*DefaultDomainService) CreateAllDefaultDomains ¶
func (s *DefaultDomainService) CreateAllDefaultDomains(appID string) error
func (*DefaultDomainService) GetLatestAppHost ¶
func (s *DefaultDomainService) GetLatestAppHost(appID string) (string, error)
type DomainConfigService ¶
type DomainService ¶
type DomainService struct { Context context.Context Clock clock.Clock DomainConfig DomainConfigService SQLBuilder *globaldb.SQLBuilder SQLExecutor *globaldb.SQLExecutor }
func (*DomainService) CreateCustomDomain ¶
func (*DomainService) CreateDomain ¶
func (*DomainService) DeleteDomain ¶
func (s *DomainService) DeleteDomain(appID string, id string) error
func (*DomainService) GetMany ¶
func (s *DomainService) GetMany(ids []string) ([]*apimodel.Domain, error)
func (*DomainService) ListDomains ¶
func (s *DomainService) ListDomains(appID string) ([]*apimodel.Domain, error)
func (*DomainService) VerifyDomain ¶
type GetContractMetadataResponse ¶
type GetContractMetadataResponse struct { Result apimodel.GetContractMetadataResult `json:"result"` Error *apierrors.APIError `json:"error"` }
type IngressTemplateData ¶
type Kubernetes ¶
type Kubernetes struct { KubernetesConfig *portalconfig.KubernetesConfig AppConfig *portalconfig.AppConfig Logger KubernetesLogger Context context.Context `wire:"-"` Namespace string `wire:"-"` KubeConfig *rest.Config `wire:"-"` Client kubernetes.Interface `wire:"-"` CertManagerClient certmanagerclientset.Interface `wire:"-"` DynamicClient dynamic.Interface `wire:"-"` DiscoveryRESTMapper meta.RESTMapper `wire:"-"` }
func (*Kubernetes) CreateResourcesForDomain ¶
func (*Kubernetes) DeleteResourcesForDomain ¶
func (k *Kubernetes) DeleteResourcesForDomain(domainID string) error
type KubernetesLogger ¶
func NewKubernetesLogger ¶
func NewKubernetesLogger(lf *log.Factory) KubernetesLogger
type KubernetesResource ¶
type KubernetesResource struct { Object *unstructured.Unstructured GVK *schema.GroupVersionKind }
func GenerateResources ¶
func GenerateResources(def *ResourceTemplateData, templateBytes []byte) ([]*KubernetesResource, error)
type NFTService ¶
type NFTService struct {
APIEndpoint config.NFTIndexerAPIEndpoint
}
func (*NFTService) GetContractMetadata ¶
func (s *NFTService) GetContractMetadata(contracts []web3.ContractID) ([]apimodel.NFTCollection, error)
func (*NFTService) ProbeNFTCollection ¶
func (s *NFTService) ProbeNFTCollection(contractID web3.ContractID) (*apimodel.ProbeCollectionResult, error)
type NoopAttributesService ¶
type NoopAttributesService struct{}
func (*NoopAttributesService) UpdateAllCustomAttributes ¶
func (*NoopAttributesService) UpdateAllCustomAttributes(role accesscontrol.Role, userID string, stdAttrs map[string]interface{}) error
func (*NoopAttributesService) UpdateStandardAttributes ¶
func (*NoopAttributesService) UpdateStandardAttributes(role accesscontrol.Role, userID string, stdAttrs map[string]interface{}) error
type NoopRolesAndGroupsService ¶
type NoopRolesAndGroupsService struct{}
func (*NoopRolesAndGroupsService) ResetUserGroup ¶
func (*NoopRolesAndGroupsService) ResetUserGroup(options *rolesgroups.ResetUserGroupOptions) error
func (*NoopRolesAndGroupsService) ResetUserRole ¶
func (*NoopRolesAndGroupsService) ResetUserRole(options *rolesgroups.ResetUserRoleOptions) error
type OnboardService ¶
type OnboardService struct { AuthgearConfig *portalconfig.AuthgearConfig AdminAPI OnboardServiceAdminAPIService }
func (*OnboardService) SubmitOnboardEntry ¶
func (s *OnboardService) SubmitOnboardEntry(entry model.OnboardEntry, actorID string) error
type ProbeColletionResponse ¶
type ProbeColletionResponse struct { Result apimodel.ProbeCollectionResult `json:"result"` Error *apierrors.APIError `json:"error"` }
type ResourceManager ¶
type ResourceManager interface {
Read(desc resource.Descriptor, view resource.View) (interface{}, error)
}
type ResourceTemplateData ¶
type SubscriptionConfigSourceStore ¶
type SubscriptionConfigSourceStore interface { GetDatabaseSourceByAppID(appID string) (*configsource.DatabaseSource, error) UpdateDatabaseSource(dbs *configsource.DatabaseSource) error }
type SubscriptionPlanStore ¶
type SubscriptionService ¶
type SubscriptionService struct { SQLBuilder *globaldb.SQLBuilder SQLExecutor *globaldb.SQLExecutor ConfigSourceStore SubscriptionConfigSourceStore PlanStore SubscriptionPlanStore UsageStore UsageStore Clock clock.Clock AppConfig *portalconfig.AppConfig }
func (*SubscriptionService) ArchiveSubscription ¶
func (s *SubscriptionService) ArchiveSubscription(sub *model.Subscription) error
func (*SubscriptionService) CreateSubscriptionCheckout ¶
func (s *SubscriptionService) CreateSubscriptionCheckout(checkoutSession *libstripe.CheckoutSession) (*model.SubscriptionCheckout, error)
func (*SubscriptionService) GetLastProcessingCustomerID ¶
func (s *SubscriptionService) GetLastProcessingCustomerID(appID string) (*string, error)
func (*SubscriptionService) GetSubscription ¶
func (s *SubscriptionService) GetSubscription(appID string) (*model.Subscription, error)
func (*SubscriptionService) GetSubscriptionUsage ¶
func (s *SubscriptionService) GetSubscriptionUsage( appID string, planName string, date time.Time, subscriptionPlans []*model.SubscriptionPlan, ) (*model.SubscriptionUsage, error)
GetSubscriptionUsage uses the current plan to estimate the usage and the cost. However, if we ever adjust the prices, the estimation will become inaccurate. A accurate estimation should use the Prices in the Stripe Subscription to perform calculation.
func (*SubscriptionService) MarkCheckoutCancelled ¶
func (s *SubscriptionService) MarkCheckoutCancelled(appID string, customerID string) error
func (*SubscriptionService) MarkCheckoutCompleted ¶
func (s *SubscriptionService) MarkCheckoutCompleted(appID string, stripCheckoutSessionID string, customerID string) error
MarkCheckoutCompleted marks subscription checkout as completed. It returns ErrSubscriptionCheckoutNotFound when the checkout is not found or the checkout status is already subscribed.
func (*SubscriptionService) MarkCheckoutExpired ¶
func (s *SubscriptionService) MarkCheckoutExpired(appID string, customerID string) error
func (*SubscriptionService) MarkCheckoutSubscribed ¶
func (s *SubscriptionService) MarkCheckoutSubscribed(appID string, customerID string) error
MarkCheckoutSubscribed marks subscription checkout as subscribed. It returns ErrSubscriptionCheckoutNotFound when the checkout is not found or the checkout status is already subscribed.
func (*SubscriptionService) SetSubscriptionCancelledStatus ¶
func (*SubscriptionService) UpdateAppPlan ¶
func (s *SubscriptionService) UpdateAppPlan(appID string, planName string) error
func (*SubscriptionService) UpdateAppPlanToDefault ¶
func (s *SubscriptionService) UpdateAppPlanToDefault(appID string) error
func (*SubscriptionService) UpsertSubscription ¶
func (s *SubscriptionService) UpsertSubscription(appID string, stripeSubscriptionID string, stripeCustomerID string) (*model.Subscription, error)
type SystemConfigProvider ¶
type SystemConfigProvider struct { AuthgearConfig *config.AuthgearConfig AppConfig *config.AppConfig SearchConfig *config.SearchConfig Web3Config *config.Web3Config AuditLogConfig *config.AuditLogConfig AnalyticConfig *configlib.AnalyticConfig GTMConfig *config.GoogleTagManagerConfig FrontendSentryConfig *config.PortalFrontendSentryConfig Resources ResourceManager }
func (*SystemConfigProvider) SystemConfig ¶
func (p *SystemConfigProvider) SystemConfig() (*model.SystemConfig, error)
type UsageStore ¶
type UsageStore interface { FetchUploadedUsageRecords( appID string, recordName usage.RecordName, period periodical.Type, stripeStart time.Time, stripeEnd time.Time, ) ([]*usage.UsageRecord, error) FetchUsageRecords( appID string, recordName usage.RecordName, period periodical.Type, startTime time.Time, ) ([]*usage.UsageRecord, error) }
Click to show internal directories.
Click to hide internal directories.