tenancyep

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetCurrentUserEndpoint

type GetCurrentUserEndpoint struct{}

Returns the profile of the user the request is authenticated as.

This can be called before an account is selected, such as immediately after authentication. Unlike elsewhere, the `image_url` returned here is a short-lived signed link to the image itself, and it is only produced when the request targets an account; without one, no `image_url` is returned even for a user who has uploaded a photo.

func (*GetCurrentUserEndpoint) Materialize

type GetCurrentUserRequest

type GetCurrentUserRequest struct{}

Request to retrieve the authenticated user's profile.

type GetTenancyEndpoint

type GetTenancyEndpoint struct{}

Returns the authenticated user's tenancy context.

The tenancy describes which account the user is currently acting in and every other account they can switch to, including sandboxes. It can be called before an account is selected, such as immediately after authentication; when the request does not target an account, one is chosen automatically, preferring paid accounts and then the account the user most recently used.

Accounts where the user has been disabled or removed are left out, and sandboxes are only listed when the current account is a production account and the user is an administrator of it. A user who belongs to no usable account gets an empty tenancy, along with any registration they started but never finished.

func (*GetTenancyEndpoint) Materialize

type GetTenancyRequest

type GetTenancyRequest struct{}

Request to retrieve the authenticated user's tenancy context.

type ListCustomerAccountsEndpoint

type ListCustomerAccountsEndpoint struct{}

Returns the customer accounts of the given seller account that the authenticated user belongs to.

This is how a buyer with access to more than one of a seller's customer accounts chooses which one to act as. Only accounts where the user's membership is still active are returned. The paging and search parameters are ignored: every match comes back in a single page.

type ListCustomerAccountsRequest

type ListCustomerAccountsRequest struct {
	// ID of the seller account whose customers to list.
	VendorAccountID string `path:"vendor_account_id" validate:"required"`
	apiresource.PaginationRequest
}

Request to list customer accounts accessible to the authenticated user under a seller account.

type SwitchAccountEndpoint

type SwitchAccountEndpoint struct{}

Switches the authenticated user's active account and returns the updated tenancy context.

The user must have access to the requested account; switching to an account where the user is disabled or removed, or to a suspended or deactivated account, is rejected. Switching into a sandbox is also rejected when the user is disabled or removed on the production account that owns it.

A successful switch marks the account as the user's most recently used one, which Get Tenancy takes into account when it picks a current account for a request that does not target one.

func (*SwitchAccountEndpoint) Materialize

type SwitchAccountRequest

type SwitchAccountRequest struct {
	// ID of the account to switch to.
	AccountID string `json:"account_id" validate:"required"`
}

Request to switch the authenticated user's active account.

func (*SwitchAccountRequest) SchemaExample

func (*SwitchAccountRequest) SchemaExample() any

type TenancySvcConfig

type TenancySvcConfig struct {
	// CoreClient (required) is the core-service gRPC client.
	CoreClient pb.CoreServiceClient
}

Jump to

Keyboard shortcuts

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