Documentation ¶
Index ¶
- Variables
- type ABTesting
- type APIKeyManagementHandler
- type APIKeyManagementService
- type APIKeys
- func (keys *APIKeys) CreateAPIKey(w http.ResponseWriter, r *http.Request)
- func (keys *APIKeys) DeleteByIDs(w http.ResponseWriter, r *http.Request)
- func (keys *APIKeys) DeleteByNameAndProjectID(w http.ResponseWriter, r *http.Request)
- func (keys *APIKeys) GetAllAPIKeyNames(w http.ResponseWriter, r *http.Request)
- func (keys *APIKeys) GetProjectAPIKeys(w http.ResponseWriter, r *http.Request)
- type AccountActionData
- type Analytics
- type Auth
- func (a *Auth) ActivateAccount(w http.ResponseWriter, r *http.Request)
- func (a *Auth) ChangeEmail(w http.ResponseWriter, r *http.Request)
- func (a *Auth) ChangePassword(w http.ResponseWriter, r *http.Request)
- func (a *Auth) DeleteAccount(w http.ResponseWriter, r *http.Request)
- func (a *Auth) DisableUserMFA(w http.ResponseWriter, r *http.Request)
- func (a *Auth) EnableUserMFA(w http.ResponseWriter, r *http.Request)
- func (a *Auth) ForgotPassword(w http.ResponseWriter, r *http.Request)
- func (a *Auth) GenerateMFARecoveryCodes(w http.ResponseWriter, r *http.Request)
- func (a *Auth) GenerateMFASecretKey(w http.ResponseWriter, r *http.Request)
- func (a *Auth) GetAccount(w http.ResponseWriter, r *http.Request)
- func (a *Auth) GetActiveSessions(w http.ResponseWriter, r *http.Request)
- func (a *Auth) GetFreezeStatus(w http.ResponseWriter, r *http.Request)
- func (a *Auth) GetUserSettings(w http.ResponseWriter, r *http.Request)
- func (a *Auth) InvalidateSessionByID(w http.ResponseWriter, r *http.Request)
- func (a *Auth) Logout(w http.ResponseWriter, r *http.Request)
- func (a *Auth) RefreshSession(w http.ResponseWriter, r *http.Request)
- func (a *Auth) RegenerateMFARecoveryCodes(w http.ResponseWriter, r *http.Request)
- func (a *Auth) Register(w http.ResponseWriter, r *http.Request)
- func (a *Auth) RequestLimitIncrease(w http.ResponseWriter, r *http.Request)
- func (a *Auth) ResendEmail(w http.ResponseWriter, r *http.Request)
- func (a *Auth) ResetPassword(w http.ResponseWriter, r *http.Request)
- func (a *Auth) SetOnboardingStatus(w http.ResponseWriter, r *http.Request)
- func (a *Auth) SetUserSettings(w http.ResponseWriter, r *http.Request)
- func (a *Auth) SetupAccount(w http.ResponseWriter, r *http.Request)
- func (a *Auth) Token(w http.ResponseWriter, r *http.Request)
- func (a *Auth) TokenByAPIKey(w http.ResponseWriter, r *http.Request)
- func (a *Auth) UpdateAccount(w http.ResponseWriter, r *http.Request)
- type Buckets
- type ContextChannel
- type Domains
- type Invitation
- type Member
- type Payments
- func (p *Payments) AccountBalance(w http.ResponseWriter, r *http.Request)
- func (p *Payments) AddCardByPaymentMethodID(w http.ResponseWriter, r *http.Request)
- func (p *Payments) AddCreditCard(w http.ResponseWriter, r *http.Request)
- func (p *Payments) AddTaxID(w http.ResponseWriter, r *http.Request)
- func (p *Payments) ApplyCouponCode(w http.ResponseWriter, r *http.Request)
- func (p *Payments) BillingHistory(w http.ResponseWriter, r *http.Request)
- func (p *Payments) ClaimWallet(w http.ResponseWriter, r *http.Request)
- func (p *Payments) GetBillingInformation(w http.ResponseWriter, r *http.Request)
- func (p *Payments) GetCountryTaxes(w http.ResponseWriter, r *http.Request)
- func (p *Payments) GetCoupon(w http.ResponseWriter, r *http.Request)
- func (p *Payments) GetProjectUsagePriceModel(w http.ResponseWriter, r *http.Request)
- func (p *Payments) GetTaxCountries(w http.ResponseWriter, r *http.Request)
- func (p *Payments) GetWallet(w http.ResponseWriter, r *http.Request)
- func (p *Payments) InvoiceHistory(w http.ResponseWriter, r *http.Request)
- func (p *Payments) ListCreditCards(w http.ResponseWriter, r *http.Request)
- func (p *Payments) MakeCreditCardDefault(w http.ResponseWriter, r *http.Request)
- func (p *Payments) PackageAvailable(w http.ResponseWriter, r *http.Request)
- func (p *Payments) ProjectsCharges(w http.ResponseWriter, r *http.Request)
- func (p *Payments) PurchasePackage(w http.ResponseWriter, r *http.Request)
- func (p *Payments) RemoveCreditCard(w http.ResponseWriter, r *http.Request)
- func (p *Payments) RemoveTaxID(w http.ResponseWriter, r *http.Request)
- func (p *Payments) SaveBillingAddress(w http.ResponseWriter, r *http.Request)
- func (p *Payments) SetupAccount(w http.ResponseWriter, r *http.Request)
- func (p *Payments) TriggerAttemptPayment(w http.ResponseWriter, r *http.Request)
- func (p *Payments) WalletPayments(w http.ResponseWriter, r *http.Request)
- func (p *Payments) WalletPaymentsWithConfirmations(w http.ResponseWriter, r *http.Request)
- type ProjectManagementHandler
- type ProjectManagementService
- type ProjectMembersPage
- type Projects
- func (p *Projects) CreateProject(w http.ResponseWriter, r *http.Request)
- func (p *Projects) DeleteMembersAndInvitations(w http.ResponseWriter, r *http.Request)
- func (p *Projects) GetConfig(w http.ResponseWriter, r *http.Request)
- func (p *Projects) GetEmissionImpact(w http.ResponseWriter, r *http.Request)
- func (p *Projects) GetInviteLink(w http.ResponseWriter, r *http.Request)
- func (p *Projects) GetMember(w http.ResponseWriter, r *http.Request)
- func (p *Projects) GetMembersAndInvitations(w http.ResponseWriter, r *http.Request)
- func (p *Projects) GetPagedProjects(w http.ResponseWriter, r *http.Request)
- func (p *Projects) GetSalt(w http.ResponseWriter, r *http.Request)
- func (p *Projects) GetUserInvitations(w http.ResponseWriter, r *http.Request)
- func (p *Projects) GetUserProjects(w http.ResponseWriter, r *http.Request)
- func (p *Projects) InviteUser(w http.ResponseWriter, r *http.Request)
- func (p *Projects) OptInToVersioning(w http.ResponseWriter, r *http.Request)
- func (p *Projects) ReinviteUsers(w http.ResponseWriter, r *http.Request)
- func (p *Projects) RequestLimitIncrease(w http.ResponseWriter, r *http.Request)
- func (p *Projects) RespondToInvitation(w http.ResponseWriter, r *http.Request)
- func (p *Projects) UpdateMemberRole(w http.ResponseWriter, r *http.Request)
- func (p *Projects) UpdateProject(w http.ResponseWriter, r *http.Request)
- func (p *Projects) UpdateUserSpecifiedLimits(w http.ResponseWriter, r *http.Request)
- type UsageLimits
- func (ul *UsageLimits) DailyUsage(w http.ResponseWriter, r *http.Request)
- func (ul *UsageLimits) ProjectUsageLimits(w http.ResponseWriter, r *http.Request)
- func (ul *UsageLimits) TotalUsageLimits(w http.ResponseWriter, r *http.Request)
- func (ul *UsageLimits) UsageReport(w http.ResponseWriter, r *http.Request)
- type UserManagementHandler
- type UserManagementService
Constants ¶
This section is empty.
Variables ¶
var ErrABAPI = errs.Class("consoleapi ab testing error")
ErrABAPI - console ab testing api error type.
var ( // ErrAPIKeysAPI - console api keys api error type. ErrAPIKeysAPI = errs.Class("console api keys") )
var ErrAnalyticsAPI = errs.Class("consoleapi analytics")
ErrAnalyticsAPI - console analytics api error type.
var ErrApikeysAPI = errs.Class("consoleapi apikeys api")
var ( // ErrAuthAPI - console auth api error type. ErrAuthAPI = errs.Class("consoleapi auth") )
var ( // ErrBucketsAPI - console buckets api error type. ErrBucketsAPI = errs.Class("console api buckets") )
var ( // ErrPaymentsAPI - console payments api error type. ErrPaymentsAPI = errs.Class("consoleapi payments") )
var ErrProjectsAPI = errs.Class("consoleapi projects api")
var ( // ErrUsageLimitsAPI - console usage and limits api error type. ErrUsageLimitsAPI = errs.Class("console usage and limits") )
var ErrUsersAPI = errs.Class("consoleapi users api")
var ( // ErrUtils - console utils error type. ErrUtils = errs.Class("console api utils") )
Functions ¶
This section is empty.
Types ¶
type ABTesting ¶ added in v1.67.1
type ABTesting struct {
// contains filtered or unexported fields
}
ABTesting is an api controller that exposes all ab testing functionality.
func NewABTesting ¶ added in v1.67.1
NewABTesting is a constructor for AB testing controller.
func (*ABTesting) GetABValues ¶ added in v1.67.1
func (a *ABTesting) GetABValues(w http.ResponseWriter, r *http.Request)
GetABValues gets AB test values for a specific user.
type APIKeyManagementHandler ¶ added in v1.57.1
type APIKeyManagementHandler struct {
// contains filtered or unexported fields
}
APIKeyManagementHandler is an api handler that implements all APIKeyManagement API endpoints functionality.
func NewAPIKeyManagement ¶ added in v1.57.1
func NewAPIKeyManagement(log *zap.Logger, mon *monkit.Scope, service APIKeyManagementService, router *mux.Router, auth api.Auth) *APIKeyManagementHandler
type APIKeyManagementService ¶ added in v1.57.1
type APIKeys ¶ added in v1.26.2
type APIKeys struct {
// contains filtered or unexported fields
}
APIKeys is an api controller that exposes all api keys related functionality.
func NewAPIKeys ¶ added in v1.26.2
NewAPIKeys is a constructor for api api keys controller.
func (*APIKeys) CreateAPIKey ¶ added in v1.86.1
func (keys *APIKeys) CreateAPIKey(w http.ResponseWriter, r *http.Request)
CreateAPIKey creates new API key for given project.
func (*APIKeys) DeleteByIDs ¶ added in v1.86.1
func (keys *APIKeys) DeleteByIDs(w http.ResponseWriter, r *http.Request)
DeleteByIDs deletes API keys by given IDs.
func (*APIKeys) DeleteByNameAndProjectID ¶ added in v1.26.2
func (keys *APIKeys) DeleteByNameAndProjectID(w http.ResponseWriter, r *http.Request)
DeleteByNameAndProjectID deletes specific API key by it's name and project ID. ID here may be project.publicID or project.ID.
func (*APIKeys) GetAllAPIKeyNames ¶ added in v1.82.1
func (keys *APIKeys) GetAllAPIKeyNames(w http.ResponseWriter, r *http.Request)
GetAllAPIKeyNames returns all API key names by project ID.
func (*APIKeys) GetProjectAPIKeys ¶ added in v1.86.1
func (keys *APIKeys) GetProjectAPIKeys(w http.ResponseWriter, r *http.Request)
GetProjectAPIKeys returns paged API keys by project ID.
type AccountActionData ¶ added in v1.107.1
type AccountActionData struct { Step console.AccountActionStep `json:"step"` Data string `json:"data"` }
AccountActionData holds data needed to perform change email or account delete actions.
type Analytics ¶ added in v1.27.0
type Analytics struct {
// contains filtered or unexported fields
}
Analytics is an api controller that exposes analytics related functionality.
func NewAnalytics ¶ added in v1.27.0
NewAnalytics is a constructor for api analytics controller.
func (*Analytics) EventTriggered ¶ added in v1.27.0
func (a *Analytics) EventTriggered(w http.ResponseWriter, r *http.Request)
EventTriggered tracks the occurrence of an arbitrary event on the client.
func (*Analytics) PageEventTriggered ¶ added in v1.58.1
func (a *Analytics) PageEventTriggered(w http.ResponseWriter, r *http.Request)
PageEventTriggered tracks the occurrence of an arbitrary page visit event on the client.
func (*Analytics) PageViewTriggered ¶ added in v1.103.2
func (a *Analytics) PageViewTriggered(w http.ResponseWriter, r *http.Request)
PageViewTriggered sends a pageview event to plausible.
type Auth ¶
type Auth struct { ExternalAddress string LetUsKnowURL string TermsAndConditionsURL string ContactInfoURL string GeneralRequestURL string PasswordRecoveryURL string CancelPasswordRecoveryURL string ActivateAccountURL string ActivationCodeEnabled bool SatelliteName string // contains filtered or unexported fields }
Auth is an api controller that exposes all auth functionality.
func NewAuth ¶
func NewAuth(log *zap.Logger, service *console.Service, accountFreezeService *console.AccountFreezeService, mailService *mailservice.Service, cookieAuth *consolewebauth.CookieAuth, analytics *analytics.Service, satelliteName, externalAddress, letUsKnowURL, termsAndConditionsURL, contactInfoURL, generalRequestURL string, activationCodeEnabled bool, badPasswords map[string]struct{}) *Auth
NewAuth is a constructor for api auth controller.
func (*Auth) ActivateAccount ¶ added in v1.94.1
func (a *Auth) ActivateAccount(w http.ResponseWriter, r *http.Request)
ActivateAccount verifies a signup activation code.
func (*Auth) ChangeEmail ¶ added in v1.17.1
func (a *Auth) ChangeEmail(w http.ResponseWriter, r *http.Request)
ChangeEmail handles change email flow requests.
func (*Auth) ChangePassword ¶
func (a *Auth) ChangePassword(w http.ResponseWriter, r *http.Request)
ChangePassword auth user, changes users password for a new one.
func (*Auth) DeleteAccount ¶ added in v0.25.0
func (a *Auth) DeleteAccount(w http.ResponseWriter, r *http.Request)
DeleteAccount handles self-serve delete account flow requests.
func (*Auth) DisableUserMFA ¶ added in v1.36.1
func (a *Auth) DisableUserMFA(w http.ResponseWriter, r *http.Request)
DisableUserMFA disables multi-factor authentication for the user.
func (*Auth) EnableUserMFA ¶ added in v1.36.1
func (a *Auth) EnableUserMFA(w http.ResponseWriter, r *http.Request)
EnableUserMFA enables multi-factor authentication for the user.
func (*Auth) ForgotPassword ¶
func (a *Auth) ForgotPassword(w http.ResponseWriter, r *http.Request)
ForgotPassword creates password-reset token and sends email to user.
func (*Auth) GenerateMFARecoveryCodes ¶ added in v1.36.1
func (a *Auth) GenerateMFARecoveryCodes(w http.ResponseWriter, r *http.Request)
GenerateMFARecoveryCodes creates a new set of MFA recovery codes for the user.
func (*Auth) GenerateMFASecretKey ¶ added in v1.36.1
func (a *Auth) GenerateMFASecretKey(w http.ResponseWriter, r *http.Request)
GenerateMFASecretKey creates a new TOTP secret key for the user.
func (*Auth) GetAccount ¶ added in v0.25.0
func (a *Auth) GetAccount(w http.ResponseWriter, r *http.Request)
GetAccount gets authorized user and take it's params.
func (*Auth) GetActiveSessions ¶ added in v1.111.4
func (a *Auth) GetActiveSessions(w http.ResponseWriter, r *http.Request)
GetActiveSessions gets user's active sessions.
func (*Auth) GetFreezeStatus ¶ added in v1.78.1
func (a *Auth) GetFreezeStatus(w http.ResponseWriter, r *http.Request)
GetFreezeStatus checks to see if an account is frozen or warned.
func (*Auth) GetUserSettings ¶ added in v1.76.1
func (a *Auth) GetUserSettings(w http.ResponseWriter, r *http.Request)
GetUserSettings gets a user's settings.
func (*Auth) InvalidateSessionByID ¶ added in v1.111.4
func (a *Auth) InvalidateSessionByID(w http.ResponseWriter, r *http.Request)
InvalidateSessionByID invalidates user session by ID.
func (*Auth) Logout ¶ added in v0.31.6
func (a *Auth) Logout(w http.ResponseWriter, r *http.Request)
Logout removes auth cookie.
func (*Auth) RefreshSession ¶ added in v1.63.1
func (a *Auth) RefreshSession(w http.ResponseWriter, r *http.Request)
RefreshSession refreshes the user's session.
func (*Auth) RegenerateMFARecoveryCodes ¶ added in v1.89.2
func (a *Auth) RegenerateMFARecoveryCodes(w http.ResponseWriter, r *http.Request)
RegenerateMFARecoveryCodes requires MFA code to create a new set of MFA recovery codes for the user.
func (*Auth) Register ¶
func (a *Auth) Register(w http.ResponseWriter, r *http.Request)
Register creates new user, sends activation e-mail. If a user with the given e-mail address already exists, a password reset e-mail is sent instead.
func (*Auth) RequestLimitIncrease ¶ added in v1.90.1
func (a *Auth) RequestLimitIncrease(w http.ResponseWriter, r *http.Request)
RequestLimitIncrease handles requesting increase for project limit.
func (*Auth) ResendEmail ¶
func (a *Auth) ResendEmail(w http.ResponseWriter, r *http.Request)
ResendEmail generates activation token by e-mail address and sends email account activation email to user. If the account is already activated, a password reset e-mail is sent instead.
func (*Auth) ResetPassword ¶ added in v1.37.1
func (a *Auth) ResetPassword(w http.ResponseWriter, r *http.Request)
ResetPassword resets user's password using recovery token.
func (*Auth) SetOnboardingStatus ¶ added in v1.76.1
func (a *Auth) SetOnboardingStatus(w http.ResponseWriter, r *http.Request)
SetOnboardingStatus updates a user's onboarding status.
func (*Auth) SetUserSettings ¶ added in v1.77.2
func (a *Auth) SetUserSettings(w http.ResponseWriter, r *http.Request)
SetUserSettings updates a user's settings.
func (*Auth) SetupAccount ¶ added in v1.94.1
func (a *Auth) SetupAccount(w http.ResponseWriter, r *http.Request)
SetupAccount updates user's full name and short name.
func (*Auth) Token ¶
func (a *Auth) Token(w http.ResponseWriter, r *http.Request)
Token authenticates user by credentials and returns auth token.
func (*Auth) TokenByAPIKey ¶ added in v1.80.3
func (a *Auth) TokenByAPIKey(w http.ResponseWriter, r *http.Request)
TokenByAPIKey authenticates user by API key and returns auth token.
func (*Auth) UpdateAccount ¶ added in v0.25.0
func (a *Auth) UpdateAccount(w http.ResponseWriter, r *http.Request)
UpdateAccount updates user's full name and short name.
type Buckets ¶ added in v1.18.1
type Buckets struct {
// contains filtered or unexported fields
}
Buckets is an api controller that exposes all buckets related functionality.
func NewBuckets ¶ added in v1.18.1
NewBuckets is a constructor for api buckets controller.
func (*Buckets) AllBucketNames ¶ added in v1.18.1
func (b *Buckets) AllBucketNames(w http.ResponseWriter, r *http.Request)
AllBucketNames returns all bucket names for a specific project.
func (*Buckets) GetBucketMetadata ¶ added in v1.101.1
func (b *Buckets) GetBucketMetadata(w http.ResponseWriter, r *http.Request)
GetBucketMetadata returns all bucket names and metadata (placement and versioning) for a specific project.
func (*Buckets) GetBucketTotals ¶ added in v1.86.1
func (b *Buckets) GetBucketTotals(w http.ResponseWriter, r *http.Request)
GetBucketTotals returns a page of bucket usage totals since project creation.
type ContextChannel ¶ added in v1.46.3
type ContextChannel struct {
// contains filtered or unexported fields
}
ContextChannel is a generic, context-aware channel.
type Domains ¶ added in v1.110.1
type Domains struct {
// contains filtered or unexported fields
}
Domains is an api controller that exposes all domains functionality.
func NewDomains ¶ added in v1.110.1
NewDomains is a constructor for Domains controller.
func (*Domains) CheckDNSRecords ¶ added in v1.110.1
func (d *Domains) CheckDNSRecords(w http.ResponseWriter, r *http.Request)
CheckDNSRecords checks DNS records by provided domain.
type Invitation ¶ added in v1.86.1
type Invitation struct { Email string `json:"email"` CreatedAt time.Time `json:"createdAt"` Expired bool `json:"expired"` }
Invitation is a project invitation in a ProjectMembersPage.
type Member ¶ added in v1.86.1
type Member struct { ID uuid.UUID `json:"id"` FullName string `json:"fullName"` ShortName string `json:"shortName"` Email string `json:"email"` Role console.ProjectMemberRole `json:"role"` JoinedAt time.Time `json:"joinedAt"` }
Member is a project member in a ProjectMembersPage.
type Payments ¶
type Payments struct {
// contains filtered or unexported fields
}
Payments is an api controller that exposes all payment related functionality.
func NewPayments ¶
func NewPayments(log *zap.Logger, service *console.Service, accountFreezeService *console.AccountFreezeService, packagePlans paymentsconfig.PackagePlans) *Payments
NewPayments is a constructor for api payments controller.
func (*Payments) AccountBalance ¶
func (p *Payments) AccountBalance(w http.ResponseWriter, r *http.Request)
AccountBalance returns an integer amount in cents that represents the current balance of payment account.
func (*Payments) AddCardByPaymentMethodID ¶ added in v1.92.1
func (p *Payments) AddCardByPaymentMethodID(w http.ResponseWriter, r *http.Request)
AddCardByPaymentMethodID is used to save new credit card and attach it to payment account. It uses payment method id instead of token.
func (*Payments) AddCreditCard ¶
func (p *Payments) AddCreditCard(w http.ResponseWriter, r *http.Request)
AddCreditCard is used to save new credit card and attach it to payment account.
func (*Payments) AddTaxID ¶ added in v1.104.1
func (p *Payments) AddTaxID(w http.ResponseWriter, r *http.Request)
AddTaxID adds a tax ID to a user.
func (*Payments) ApplyCouponCode ¶ added in v1.35.2
func (p *Payments) ApplyCouponCode(w http.ResponseWriter, r *http.Request)
ApplyCouponCode applies a coupon code to the user's account.
func (*Payments) BillingHistory ¶ added in v0.25.0
func (p *Payments) BillingHistory(w http.ResponseWriter, r *http.Request)
BillingHistory returns a list of invoices, transactions and all others billing history items for payment account.
func (*Payments) ClaimWallet ¶ added in v1.56.1
func (p *Payments) ClaimWallet(w http.ResponseWriter, r *http.Request)
ClaimWallet will claim a new wallet address. Returns with existing if it's already claimed.
func (*Payments) GetBillingInformation ¶ added in v1.104.1
func (p *Payments) GetBillingInformation(w http.ResponseWriter, r *http.Request)
GetBillingInformation gets the billing information for a user.
func (*Payments) GetCountryTaxes ¶ added in v1.104.1
func (p *Payments) GetCountryTaxes(w http.ResponseWriter, r *http.Request)
GetCountryTaxes returns a list of taxes supported for a country.
func (*Payments) GetCoupon ¶ added in v1.37.1
func (p *Payments) GetCoupon(w http.ResponseWriter, r *http.Request)
GetCoupon returns the coupon applied to the user's account.
func (*Payments) GetProjectUsagePriceModel ¶ added in v1.71.1
func (p *Payments) GetProjectUsagePriceModel(w http.ResponseWriter, r *http.Request)
GetProjectUsagePriceModel returns the project usage price model for the user.
func (*Payments) GetTaxCountries ¶ added in v1.104.1
func (p *Payments) GetTaxCountries(w http.ResponseWriter, r *http.Request)
GetTaxCountries returns a list of countries whose taxes are supported.
func (*Payments) GetWallet ¶ added in v1.56.1
func (p *Payments) GetWallet(w http.ResponseWriter, r *http.Request)
GetWallet returns the wallet address (with balance) already assigned to the user.
func (*Payments) InvoiceHistory ¶ added in v1.87.1
func (p *Payments) InvoiceHistory(w http.ResponseWriter, r *http.Request)
InvoiceHistory returns a paged list of invoice history items for payment account.
func (*Payments) ListCreditCards ¶
func (p *Payments) ListCreditCards(w http.ResponseWriter, r *http.Request)
ListCreditCards returns a list of credit cards for a given payment account.
func (*Payments) MakeCreditCardDefault ¶
func (p *Payments) MakeCreditCardDefault(w http.ResponseWriter, r *http.Request)
MakeCreditCardDefault makes a credit card default payment method.
func (*Payments) PackageAvailable ¶ added in v1.75.2
func (p *Payments) PackageAvailable(w http.ResponseWriter, r *http.Request)
PackageAvailable returns whether a package plan is configured for the user's partner.
func (*Payments) ProjectsCharges ¶ added in v0.26.0
func (p *Payments) ProjectsCharges(w http.ResponseWriter, r *http.Request)
ProjectsCharges returns how much money current user will be charged for each project which he owns.
func (*Payments) PurchasePackage ¶ added in v1.74.1
func (p *Payments) PurchasePackage(w http.ResponseWriter, r *http.Request)
PurchasePackage purchases one of the configured paymentsconfig.PackagePlans.
func (*Payments) RemoveCreditCard ¶
func (p *Payments) RemoveCreditCard(w http.ResponseWriter, r *http.Request)
RemoveCreditCard is used to detach a credit card from payment account.
func (*Payments) RemoveTaxID ¶ added in v1.104.1
func (p *Payments) RemoveTaxID(w http.ResponseWriter, r *http.Request)
RemoveTaxID adds a tax ID to a user.
func (*Payments) SaveBillingAddress ¶ added in v1.104.1
func (p *Payments) SaveBillingAddress(w http.ResponseWriter, r *http.Request)
SaveBillingAddress saves billing address for a user.
func (*Payments) SetupAccount ¶
func (p *Payments) SetupAccount(w http.ResponseWriter, r *http.Request)
SetupAccount creates a payment account for the user.
func (*Payments) TriggerAttemptPayment ¶ added in v1.111.4
func (p *Payments) TriggerAttemptPayment(w http.ResponseWriter, r *http.Request)
TriggerAttemptPayment attempts payment of overdue invoices and unfreezes/unwarn user if needed.
func (*Payments) WalletPayments ¶ added in v1.62.1
func (p *Payments) WalletPayments(w http.ResponseWriter, r *http.Request)
WalletPayments returns with the list of storjscan transactions for user`s wallet.
func (*Payments) WalletPaymentsWithConfirmations ¶ added in v1.84.1
func (p *Payments) WalletPaymentsWithConfirmations(w http.ResponseWriter, r *http.Request)
WalletPaymentsWithConfirmations returns with the list of storjscan transactions (including confirmations count) for user`s wallet.
type ProjectManagementHandler ¶ added in v1.57.1
type ProjectManagementHandler struct {
// contains filtered or unexported fields
}
ProjectManagementHandler is an api handler that implements all ProjectManagement API endpoints functionality.
func NewProjectManagement ¶ added in v1.49.3
func NewProjectManagement(log *zap.Logger, mon *monkit.Scope, service ProjectManagementService, router *mux.Router, auth api.Auth) *ProjectManagementHandler
type ProjectManagementService ¶ added in v1.49.3
type ProjectManagementService interface { GenCreateProject(ctx context.Context, request console.UpsertProjectInfo) (*console.Project, api.HTTPError) GenUpdateProject(ctx context.Context, id uuid.UUID, request console.UpsertProjectInfo) (*console.Project, api.HTTPError) GenDeleteProject(ctx context.Context, id uuid.UUID) api.HTTPError GenGetUsersProjects(ctx context.Context) ([]console.Project, api.HTTPError) GenGetSingleBucketUsageRollup(ctx context.Context, projectID uuid.UUID, bucket string, since, before time.Time) (*accounting.BucketUsageRollup, api.HTTPError) GenGetBucketUsageRollups(ctx context.Context, projectID uuid.UUID, since, before time.Time) ([]accounting.BucketUsageRollup, api.HTTPError) GenGetAPIKeys(ctx context.Context, projectID uuid.UUID, search string, limit, page uint, order console.APIKeyOrder, orderDirection console.OrderDirection) (*console.APIKeyPage, api.HTTPError) }
type ProjectMembersPage ¶ added in v1.86.1
type ProjectMembersPage struct { Members []Member `json:"projectMembers"` Invitations []Invitation `json:"projectInvitations"` TotalCount int `json:"totalCount"` Offset int `json:"offset"` Limit int `json:"limit"` Order int `json:"order"` OrderDirection int `json:"orderDirection"` Search string `json:"search"` CurrentPage int `json:"currentPage"` PageCount int `json:"pageCount"` }
ProjectMembersPage contains information about a page of project members and invitations.
type Projects ¶ added in v1.65.1
type Projects struct {
// contains filtered or unexported fields
}
Projects is an api controller that exposes projects related functionality.
func NewProjects ¶ added in v1.65.1
NewProjects is a constructor for api analytics controller.
func (*Projects) CreateProject ¶ added in v1.87.1
func (p *Projects) CreateProject(w http.ResponseWriter, r *http.Request)
CreateProject handles creating projects.
func (*Projects) DeleteMembersAndInvitations ¶ added in v1.86.1
func (p *Projects) DeleteMembersAndInvitations(w http.ResponseWriter, r *http.Request)
DeleteMembersAndInvitations deletes members and invitations from a project.
func (*Projects) GetConfig ¶ added in v1.100.2
func (p *Projects) GetConfig(w http.ResponseWriter, r *http.Request)
GetConfig returns config specific to a project.
func (*Projects) GetEmissionImpact ¶ added in v1.98.1
func (p *Projects) GetEmissionImpact(w http.ResponseWriter, r *http.Request)
GetEmissionImpact returns CO2 emission impact.
func (*Projects) GetInviteLink ¶ added in v1.82.1
func (p *Projects) GetInviteLink(w http.ResponseWriter, r *http.Request)
GetInviteLink returns a link to an invitation given project ID and invitee's email.
func (*Projects) GetMember ¶ added in v1.105.2
func (p *Projects) GetMember(w http.ResponseWriter, r *http.Request)
GetMember returns project member.
func (*Projects) GetMembersAndInvitations ¶ added in v1.86.1
func (p *Projects) GetMembersAndInvitations(w http.ResponseWriter, r *http.Request)
GetMembersAndInvitations returns the project's members and invitees.
func (*Projects) GetPagedProjects ¶ added in v1.86.1
func (p *Projects) GetPagedProjects(w http.ResponseWriter, r *http.Request)
GetPagedProjects returns paged projects for a user.
func (*Projects) GetSalt ¶ added in v1.65.1
func (p *Projects) GetSalt(w http.ResponseWriter, r *http.Request)
GetSalt returns the project's salt.
func (*Projects) GetUserInvitations ¶ added in v1.81.2
func (p *Projects) GetUserInvitations(w http.ResponseWriter, r *http.Request)
GetUserInvitations returns the user's pending project member invitations.
func (*Projects) GetUserProjects ¶ added in v1.86.1
func (p *Projects) GetUserProjects(w http.ResponseWriter, r *http.Request)
GetUserProjects returns the user's projects.
func (*Projects) InviteUser ¶ added in v1.91.2
func (p *Projects) InviteUser(w http.ResponseWriter, r *http.Request)
InviteUser sends a project invitation to a user.
func (*Projects) OptInToVersioning ¶ added in v1.102.2
func (p *Projects) OptInToVersioning(w http.ResponseWriter, r *http.Request)
OptInToVersioning handles opting in/out of versioning.
func (*Projects) ReinviteUsers ¶ added in v1.91.2
func (p *Projects) ReinviteUsers(w http.ResponseWriter, r *http.Request)
ReinviteUsers resends expired project invitations.
func (*Projects) RequestLimitIncrease ¶ added in v1.88.2
func (p *Projects) RequestLimitIncrease(w http.ResponseWriter, r *http.Request)
RequestLimitIncrease handles requesting limit increase for projects.
func (*Projects) RespondToInvitation ¶ added in v1.81.2
func (p *Projects) RespondToInvitation(w http.ResponseWriter, r *http.Request)
RespondToInvitation handles accepting or declining a user's project member invitation.
func (*Projects) UpdateMemberRole ¶ added in v1.104.1
func (p *Projects) UpdateMemberRole(w http.ResponseWriter, r *http.Request)
UpdateMemberRole updates project member role.
func (*Projects) UpdateProject ¶ added in v1.86.1
func (p *Projects) UpdateProject(w http.ResponseWriter, r *http.Request)
UpdateProject handles updating projects.
func (*Projects) UpdateUserSpecifiedLimits ¶ added in v1.107.1
func (p *Projects) UpdateUserSpecifiedLimits(w http.ResponseWriter, r *http.Request)
UpdateUserSpecifiedLimits is a method for updating project user specified limits.
type UsageLimits ¶ added in v1.34.1
type UsageLimits struct {
// contains filtered or unexported fields
}
UsageLimits is an api controller that exposes all usage and limits related functionality.
func NewUsageLimits ¶ added in v1.34.1
func NewUsageLimits(log *zap.Logger, service *console.Service, allowedReportDateRange time.Duration) *UsageLimits
NewUsageLimits is a constructor for api usage and limits controller.
func (*UsageLimits) DailyUsage ¶ added in v1.48.1
func (ul *UsageLimits) DailyUsage(w http.ResponseWriter, r *http.Request)
DailyUsage returns daily usage by project ID.
func (*UsageLimits) ProjectUsageLimits ¶ added in v1.34.1
func (ul *UsageLimits) ProjectUsageLimits(w http.ResponseWriter, r *http.Request)
ProjectUsageLimits returns usage and limits by project ID.
func (*UsageLimits) TotalUsageLimits ¶ added in v1.34.1
func (ul *UsageLimits) TotalUsageLimits(w http.ResponseWriter, r *http.Request)
TotalUsageLimits returns total usage and limits for all the projects that user owns.
func (*UsageLimits) UsageReport ¶ added in v1.92.1
func (ul *UsageLimits) UsageReport(w http.ResponseWriter, r *http.Request)
UsageReport returns usage report for all the projects that user owns or a single user's project.
type UserManagementHandler ¶ added in v1.57.1
type UserManagementHandler struct {
// contains filtered or unexported fields
}
UserManagementHandler is an api handler that implements all UserManagement API endpoints functionality.
func NewUserManagement ¶ added in v1.57.1
func NewUserManagement(log *zap.Logger, mon *monkit.Scope, service UserManagementService, router *mux.Router, auth api.Auth) *UserManagementHandler