Documentation
¶
Index ¶
- func DefaultEvaluationJourney(completionSource string) app.UserJourneys
- func DefaultEvaluationJourneyWithAttribution(attribution map[string]interface{}, completionSource string) app.UserJourneys
- func NoUserJourneys() app.UserJourneys
- func RevokeDerivedCredentials(tx *gorm.DB, sourceType app.TokenSourceType, sourceIDs []string) error
- func ServiceAccountEmail(id string) string
- type Client
- func (m *Client) CreateAccount(ctx context.Context, email, subject string, userJourneys app.UserJourneys) (*app.Account, error)
- func (m *Client) CreateAuthAccount(ctx context.Context, email, subject string, userJourneys app.UserJourneys) (*app.Account, error)
- func (c *Client) CreateServiceAccount(ctx context.Context, svcAcctID, name string) (*app.Account, error)
- func (c *Client) CreateToken(ctx context.Context, subjectOrEmail string, dur time.Duration) (*app.Token, error)
- func (c *Client) DeleteInstallStackServiceAccounts(ctx context.Context, installID string) error
- func (c *Client) DeleteServiceAccount(ctx context.Context, svcAcctID string) error
- func (c *Client) EnsureServiceAccount(ctx context.Context, svcAcctID, name string) (*app.Account, error)
- func (c *Client) ExtendToken(ctx context.Context, subjectOrEmail string, dur time.Duration) error
- func (m *Client) FetchAccount(ctx context.Context, acctID string) (*app.Account, error)
- func (c *Client) FindAccount(ctx context.Context, emailOrSubjectOrID string) (*app.Account, error)
- func (c *Client) InvalidateOldTokens(ctx context.Context, subjectOrEmail string) (int64, error)
- func (c *Client) InvalidateTokens(ctx context.Context, subjectOrEmail string) error
- func (c *Client) RevokeToken(ctx context.Context, tokenID string) error
- type Params
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultEvaluationJourney ¶
func DefaultEvaluationJourney(completionSource string) app.UserJourneys
DefaultEvaluationJourney returns the evaluation journey for self-signup users This is the 6-step journey: account_created, org_created, cli_installed, app_created, app_synced, install_created
func DefaultEvaluationJourneyWithAttribution ¶
func DefaultEvaluationJourneyWithAttribution(attribution map[string]interface{}, completionSource string) app.UserJourneys
DefaultEvaluationJourneyWithAttribution returns the evaluation journey with attribution data stored in the account_created step's metadata. This enables tracking marketing source for ROI analysis.
func NoUserJourneys ¶
func NoUserJourneys() app.UserJourneys
NoUserJourneys returns an empty journey slice for invited/support users
func RevokeDerivedCredentials ¶ added in v0.19.1236
func ServiceAccountEmail ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateAccount ¶
func (*Client) CreateAuthAccount ¶
func (*Client) CreateServiceAccount ¶
func (*Client) CreateToken ¶
func (*Client) DeleteInstallStackServiceAccounts ¶ added in v0.19.1149
DeleteInstallStackServiceAccounts removes the stack accounts for an install's stacks. Must run before the install row is deleted: the account is tied to the stack by naming convention, not a foreign key, so nothing cascades to it and the IDs are unrecoverable afterwards.
func (*Client) DeleteServiceAccount ¶ added in v0.19.1149
DeleteServiceAccount removes an account's role bindings, stack roles, tokens, and the row itself. A missing account is success — delete workflows retry.
func (*Client) EnsureServiceAccount ¶ added in v0.19.1101
func (c *Client) EnsureServiceAccount(ctx context.Context, svcAcctID, name string) (*app.Account, error)
EnsureServiceAccount returns the service account for svcAcctID, creating it if it does not exist yet. CreateServiceAccount is a bare insert that conflicts on the unique email, so callers that may run against entities predating service-account creation need this instead.
func (*Client) ExtendToken ¶
func (*Client) FetchAccount ¶
TODO(jm): this entire file should probably live in `pkg/account`