Documentation
¶
Overview ¶
Package httpapi is the HTTP face of the service: the ogen handler (thin: extract params, call one scenario, translate the outcome), JSON:API rendering, the error mapping and the full middleware pipeline (request id, path normalisation, content negotiation, authentication, response signing).
The license route handlers: thin extract→scenario→render shells.
The typed-params body validation of the license routes: create, update, the relationship patches, attach/detach, validate, validate-key, usage and checkout — every unknown key an "unpermitted parameter", every wrong-typed value a "type mismatch", the bearer-dependent keys gated like the reference's conditional schemas.
The licenses index filters (the reference's has_scope declarations).
Request-layer metadata containers have typed_params' depth limit of two. Arrays consume a nesting level just like hashes and include their index in the error pointer. The model separately enforces its depth-four limit.
The middleware pipeline of the architecture contract: request id, bare-path rewrite, routing (Keygen 404), content negotiation, API version check, account resolution, body decoding, the password throttle, authentication, the default header set and the response signature.
Index ¶
- func ConsoleContext(ctx context.Context, accountID uuid.UUID) context.Context
- func New(deps Deps) http.Handler
- func PolicyAttributes(attrs map[string]any, productID uuid.UUID) (policies.Input, error)
- type API
- func (a *API) AttachGroupOwners(ctx context.Context, _ oas.AttachGroupOwnersReq, ...) (*oas.GroupOwnerCollectionDocument, error)
- func (a *API) AttachLicenseEntitlements(ctx context.Context, _ oas.AttachLicenseEntitlementsReq, ...) (*oas.LicenseEntitlementListDocument, error)
- func (a *API) AttachLicenseUsers(ctx context.Context, _ oas.AttachLicenseUsersReq, ...) (*oas.LicenseUserListDocument, error)
- func (a *API) AttachPolicyEntitlements(ctx context.Context, _ oas.AttachPolicyEntitlementsReq, ...) (*oas.PolicyEntitlementListDocument, error)
- func (a *API) BanUser(ctx context.Context, params oas.BanUserParams) (*oas.UserDocument, error)
- func (a *API) CheckInLicense(ctx context.Context, params oas.CheckInLicenseParams) (*oas.LicenseDocument, error)
- func (a *API) CheckoutLicense(ctx context.Context, _ oas.CheckoutLicenseReq, ...) (*oas.LicenseFileDocument, error)
- func (a *API) CheckoutLicenseFile(ctx context.Context, params oas.CheckoutLicenseFileParams) (*oas.CheckoutLicenseFileOKHeaders, error)
- func (a *API) CheckoutMachine(ctx context.Context, _ oas.CheckoutMachineReq, ...) (*oas.MachineFileDocument, error)
- func (a *API) CheckoutMachineRaw(ctx context.Context, params oas.CheckoutMachineRawParams) (*oas.CheckoutMachineRawOKHeaders, error)
- func (a *API) CreateComponent(ctx context.Context, _ oas.CreateComponentReq, _ oas.CreateComponentParams) (*oas.ComponentDocumentHeaders, error)
- func (a *API) CreateEntitlement(ctx context.Context, _ oas.CreateEntitlementReq, _ oas.CreateEntitlementParams) (*oas.EntitlementDocumentHeaders, error)
- func (a *API) CreateGroup(ctx context.Context, _ oas.CreateGroupReq, _ oas.CreateGroupParams) (*oas.GroupDocumentHeaders, error)
- func (a *API) CreateKey(ctx context.Context, _ oas.CreateKeyReq, _ oas.CreateKeyParams) (*oas.KeyDocumentHeaders, error)
- func (a *API) CreateLicense(ctx context.Context, _ oas.CreateLicenseReq, _ oas.CreateLicenseParams) (*oas.LicenseDocumentHeaders, error)
- func (a *API) CreateLicenseToken(ctx context.Context, _ oas.CreateLicenseTokenReq, ...) (*oas.TokenDocument, error)
- func (a *API) CreateMachine(ctx context.Context, _ oas.CreateMachineReq, _ oas.CreateMachineParams) (*oas.MachineDocumentHeaders, error)
- func (a *API) CreatePolicy(ctx context.Context, _ oas.CreatePolicyReq, _ oas.CreatePolicyParams) (*oas.PolicyDocumentHeaders, error)
- func (a *API) CreateProcess(ctx context.Context, _ oas.CreateProcessReq, _ oas.CreateProcessParams) (*oas.ProcessDocumentHeaders, error)
- func (a *API) CreateProduct(ctx context.Context, _ oas.CreateProductReq, _ oas.CreateProductParams) (*oas.ProductDocumentHeaders, error)
- func (a *API) CreateProductToken(ctx context.Context, _ oas.CreateProductTokenReq, ...) (*oas.TokenDocument, error)
- func (a *API) CreateUser(ctx context.Context, _ oas.CreateUserReq, _ oas.CreateUserParams) (*oas.UserDocumentHeaders, error)
- func (a *API) CreateUserSecondFactor(ctx context.Context, _ oas.CreateUserSecondFactorReq, ...) (*oas.SecondFactorDocumentHeaders, error)
- func (a *API) CreateUserToken(ctx context.Context, _ oas.CreateUserTokenReq, ...) (*oas.TokenDocument, error)
- func (a *API) CreateWebhookEndpoint(ctx context.Context, _ oas.CreateWebhookEndpointReq, ...) (*oas.WebhookEndpointDocumentHeaders, error)
- func (a *API) DecrementLicenseUsage(ctx context.Context, _ oas.DecrementLicenseUsageReq, ...) (*oas.LicenseDocument, error)
- func (a *API) DeleteComponent(ctx context.Context, params oas.DeleteComponentParams) error
- func (a *API) DeleteGroup(ctx context.Context, params oas.DeleteGroupParams) error
- func (a *API) DeleteMachine(ctx context.Context, params oas.DeleteMachineParams) error
- func (a *API) DeleteProcess(ctx context.Context, params oas.DeleteProcessParams) error
- func (a *API) DeleteUser(ctx context.Context, params oas.DeleteUserParams) error
- func (a *API) DeleteUserSecondFactor(ctx context.Context, _ oas.DeleteUserSecondFactorReq, ...) error
- func (a *API) DestroyEntitlement(ctx context.Context, params oas.DestroyEntitlementParams) error
- func (a *API) DestroyKey(ctx context.Context, params oas.DestroyKeyParams) error
- func (a *API) DestroyLicense(ctx context.Context, params oas.DestroyLicenseParams) error
- func (a *API) DestroyPolicy(ctx context.Context, params oas.DestroyPolicyParams) error
- func (a *API) DestroyProduct(ctx context.Context, params oas.DestroyProductParams) error
- func (a *API) DestroyWebhookEndpoint(ctx context.Context, params oas.DestroyWebhookEndpointParams) error
- func (a *API) DestroyWebhookEvent(ctx context.Context, params oas.DestroyWebhookEventParams) error
- func (a *API) DetachGroupOwners(ctx context.Context, _ oas.DetachGroupOwnersReq, ...) error
- func (a *API) DetachLicenseEntitlements(ctx context.Context, _ oas.DetachLicenseEntitlementsReq, ...) error
- func (a *API) DetachLicenseUsers(ctx context.Context, _ oas.DetachLicenseUsersReq, ...) error
- func (a *API) DetachPolicyEntitlements(ctx context.Context, _ oas.DetachPolicyEntitlementsReq, ...) error
- func (a *API) GenerateMachineProof(ctx context.Context, _ oas.GenerateMachineProofReq, ...) (*oas.MachineProofDocument, error)
- func (a *API) GenerateToken(ctx context.Context, _ oas.GenerateTokenReq, _ oas.GenerateTokenParams) (*oas.TokenDocumentHeaders, error)
- func (a *API) GetAccount(ctx context.Context, _ oas.GetAccountParams) (*oas.AccountDocument, error)
- func (a *API) Health(context.Context) error
- func (a *API) IncrementLicenseUsage(ctx context.Context, _ oas.IncrementLicenseUsageReq, ...) (*oas.LicenseDocument, error)
- func (a *API) IndexComponents(ctx context.Context, _ oas.IndexComponentsParams) (*oas.ComponentListDocument, error)
- func (a *API) IndexEntitlements(ctx context.Context, _ oas.IndexEntitlementsParams) (*oas.EntitlementListDocument, error)
- func (a *API) IndexKeys(ctx context.Context, _ oas.IndexKeysParams) (*oas.KeyListDocument, error)
- func (a *API) IndexLicenseEntitlements(ctx context.Context, params oas.IndexLicenseEntitlementsParams) (*oas.EntitlementListDocument, error)
- func (a *API) IndexLicenseMachines(ctx context.Context, params oas.IndexLicenseMachinesParams) (*oas.MachineListDocument, error)
- func (a *API) IndexLicenseTokens(ctx context.Context, params oas.IndexLicenseTokensParams) (*oas.TokenCollectionDocument, error)
- func (a *API) IndexLicenseUsers(ctx context.Context, params oas.IndexLicenseUsersParams) (*oas.UserCollectionDocument, error)
- func (a *API) IndexLicenses(ctx context.Context, _ oas.IndexLicensesParams) (*oas.LicenseListDocument, error)
- func (a *API) IndexMachineComponents(ctx context.Context, params oas.IndexMachineComponentsParams) (*oas.ComponentListDocument, error)
- func (a *API) IndexMachineProcesses(ctx context.Context, params oas.IndexMachineProcessesParams) (*oas.ProcessListDocument, error)
- func (a *API) IndexMachines(ctx context.Context, _ oas.IndexMachinesParams) (*oas.MachineListDocument, error)
- func (a *API) IndexPolicies(ctx context.Context, _ oas.IndexPoliciesParams) (*oas.PolicyListDocument, error)
- func (a *API) IndexPolicyEntitlements(ctx context.Context, params oas.IndexPolicyEntitlementsParams) (*oas.EntitlementListDocument, error)
- func (a *API) IndexPolicyLicenses(ctx context.Context, params oas.IndexPolicyLicensesParams) (*oas.LicenseListDocument, error)
- func (a *API) IndexPolicyPool(ctx context.Context, params oas.IndexPolicyPoolParams) (*oas.KeyListDocument, error)
- func (a *API) IndexProcesses(ctx context.Context, _ oas.IndexProcessesParams) (*oas.ProcessListDocument, error)
- func (a *API) IndexProductLicenses(ctx context.Context, params oas.IndexProductLicensesParams) (*oas.LicenseListDocument, error)
- func (a *API) IndexProductMachines(ctx context.Context, params oas.IndexProductMachinesParams) (*oas.MachineListDocument, error)
- func (a *API) IndexProductPolicies(ctx context.Context, params oas.IndexProductPoliciesParams) (*oas.PolicyListDocument, error)
- func (a *API) IndexProductTokens(ctx context.Context, params oas.IndexProductTokensParams) (*oas.ProductTokenListDocument, error)
- func (a *API) IndexProductUsers(ctx context.Context, params oas.IndexProductUsersParams) (*oas.ProductUserListDocument, error)
- func (a *API) IndexProducts(ctx context.Context, _ oas.IndexProductsParams) (*oas.ProductListDocument, error)
- func (a *API) ListGroupLicenses(ctx context.Context, params oas.ListGroupLicensesParams) (*oas.LicenseListDocument, error)
- func (a *API) ListGroupMachines(ctx context.Context, params oas.ListGroupMachinesParams) (*oas.MachineListDocument, error)
- func (a *API) ListGroupOwners(ctx context.Context, params oas.ListGroupOwnersParams) (*oas.GroupOwnerCollectionDocument, error)
- func (a *API) ListGroupUsers(ctx context.Context, params oas.ListGroupUsersParams) (*oas.UserCollectionDocument, error)
- func (a *API) ListGroups(ctx context.Context, _ oas.ListGroupsParams) (*oas.GroupCollectionDocument, error)
- func (a *API) ListTokens(ctx context.Context, _ oas.ListTokensParams) (*oas.TokenCollectionDocument, error)
- func (a *API) ListUserLicenses(ctx context.Context, params oas.ListUserLicensesParams) (*oas.LicenseListDocument, error)
- func (a *API) ListUserMachines(ctx context.Context, params oas.ListUserMachinesParams) (*oas.MachineListDocument, error)
- func (a *API) ListUserProducts(ctx context.Context, params oas.ListUserProductsParams) (*oas.UserProductCollectionDocument, error)
- func (a *API) ListUserSecondFactors(ctx context.Context, params oas.ListUserSecondFactorsParams) (*oas.SecondFactorCollectionDocument, error)
- func (a *API) ListUserTokens(ctx context.Context, params oas.ListUserTokensParams) (*oas.TokenCollectionDocument, error)
- func (a *API) ListUsers(ctx context.Context, _ oas.ListUsersParams) (*oas.UserCollectionDocument, error)
- func (a *API) ListWebhookEndpoints(ctx context.Context, _ oas.ListWebhookEndpointsParams) (*oas.WebhookEndpointListDocument, error)
- func (a *API) ListWebhookEvents(ctx context.Context, _ oas.ListWebhookEventsParams) (*oas.WebhookEventListDocument, error)
- func (a *API) Me(ctx context.Context, _ oas.MeParams) (*oas.MeDocument, error)
- func (a *API) NewError(ctx context.Context, err error) *oas.ErrorStatusCode
- func (a *API) Ping(context.Context) error
- func (a *API) PingMachine(ctx context.Context, params oas.PingMachineParams) (*oas.MachineDocument, error)
- func (a *API) PingMachineHeartbeat(ctx context.Context, _ oas.PingMachineHeartbeatReq, ...) (*oas.MachineDocument, error)
- func (a *API) PingProcess(ctx context.Context, _ oas.PingProcessReq, params oas.PingProcessParams) (*oas.ProcessDocument, error)
- func (a *API) PopPolicyPool(ctx context.Context, params oas.PopPolicyPoolParams) (*oas.KeyDocument, error)
- func (a *API) Profile(ctx context.Context, _ oas.ProfileParams) (*oas.ProfileDocument, error)
- func (a *API) QuickValidateLicense(ctx context.Context, params oas.QuickValidateLicenseParams) (*oas.LicenseValidateDocument, error)
- func (a *API) RegenerateCurrentToken(ctx context.Context, _ oas.RegenerateCurrentTokenParams) (*oas.TokenDocument, error)
- func (a *API) RegenerateToken(ctx context.Context, params oas.RegenerateTokenParams) (*oas.TokenDocument, error)
- func (a *API) ReinstateLicense(ctx context.Context, params oas.ReinstateLicenseParams) (*oas.LicenseDocument, error)
- func (a *API) RenewLicense(ctx context.Context, params oas.RenewLicenseParams) (*oas.LicenseDocument, error)
- func (a *API) ReplaceUserSecondFactor(ctx context.Context, _ oas.ReplaceUserSecondFactorReq, ...) (*oas.SecondFactorDocument, error)
- func (a *API) ReportMachineUsage(ctx context.Context, _ oas.ReportMachineUsageReq, ...) (*oas.MachineUsageAckDocument, error)
- func (a *API) RequestPasswordReset(ctx context.Context, _ oas.RequestPasswordResetReq, ...) error
- func (a *API) ResetLicenseUsage(ctx context.Context, params oas.ResetLicenseUsageParams) (*oas.LicenseDocument, error)
- func (a *API) ResetMachine(ctx context.Context, params oas.ResetMachineParams) (*oas.MachineDocument, error)
- func (a *API) ResetMachineHeartbeat(ctx context.Context, _ oas.ResetMachineHeartbeatReq, ...) (*oas.MachineDocument, error)
- func (a *API) ResetUserPassword(ctx context.Context, _ oas.ResetUserPasswordReq, ...) (*oas.UserDocument, error)
- func (a *API) RetryWebhookEvent(ctx context.Context, _ oas.RetryWebhookEventReq, ...) (*oas.WebhookEventDocumentHeaders, error)
- func (a *API) RevokeLicense(ctx context.Context, params oas.RevokeLicenseParams) error
- func (a *API) RevokeToken(ctx context.Context, params oas.RevokeTokenParams) error
- func (a *API) Search(ctx context.Context, _ oas.SearchReq, _ oas.SearchParams) (jx.Raw, error)
- func (a *API) ShowComponent(ctx context.Context, params oas.ShowComponentParams) (*oas.ComponentDocument, error)
- func (a *API) ShowComponentLicense(ctx context.Context, params oas.ShowComponentLicenseParams) (*oas.LicenseDocument, error)
- func (a *API) ShowComponentMachine(ctx context.Context, params oas.ShowComponentMachineParams) (*oas.MachineDocument, error)
- func (a *API) ShowComponentProduct(ctx context.Context, params oas.ShowComponentProductParams) (*oas.ProductDocument, error)
- func (a *API) ShowEntitlement(ctx context.Context, params oas.ShowEntitlementParams) (*oas.EntitlementDocument, error)
- func (a *API) ShowGroup(ctx context.Context, params oas.ShowGroupParams) (*oas.GroupDocument, error)
- func (a *API) ShowGroupLicense(ctx context.Context, params oas.ShowGroupLicenseParams) (*oas.LicenseDocument, error)
- func (a *API) ShowGroupMachine(ctx context.Context, params oas.ShowGroupMachineParams) (*oas.MachineDocument, error)
- func (a *API) ShowGroupOwner(ctx context.Context, params oas.ShowGroupOwnerParams) (*oas.GroupOwnerDocument, error)
- func (a *API) ShowGroupUser(ctx context.Context, params oas.ShowGroupUserParams) (*oas.UserDocument, error)
- func (a *API) ShowKey(ctx context.Context, params oas.ShowKeyParams) (*oas.KeyDocument, error)
- func (a *API) ShowKeyPolicy(ctx context.Context, params oas.ShowKeyPolicyParams) (*oas.PolicyDocument, error)
- func (a *API) ShowKeyProduct(ctx context.Context, params oas.ShowKeyProductParams) (*oas.ProductDocument, error)
- func (a *API) ShowLicense(ctx context.Context, params oas.ShowLicenseParams) (*oas.LicenseDocument, error)
- func (a *API) ShowLicenseEntitlement(ctx context.Context, params oas.ShowLicenseEntitlementParams) (*oas.EntitlementDocument, error)
- func (a *API) ShowLicenseGroup(ctx context.Context, params oas.ShowLicenseGroupParams) (*oas.GroupDocument, error)
- func (a *API) ShowLicenseMachine(ctx context.Context, params oas.ShowLicenseMachineParams) (*oas.MachineDocument, error)
- func (a *API) ShowLicenseOwner(ctx context.Context, params oas.ShowLicenseOwnerParams) (*oas.LicenseOwnerDocument, error)
- func (a *API) ShowLicensePolicy(ctx context.Context, params oas.ShowLicensePolicyParams) (*oas.PolicyDocument, error)
- func (a *API) ShowLicenseProduct(ctx context.Context, params oas.ShowLicenseProductParams) (*oas.ProductDocument, error)
- func (a *API) ShowLicenseToken(ctx context.Context, params oas.ShowLicenseTokenParams) (*oas.TokenDocument, error)
- func (a *API) ShowLicenseUser(ctx context.Context, params oas.ShowLicenseUserParams) (*oas.LicenseOwnerDocument, error)
- func (a *API) ShowLicenseUserAlias(ctx context.Context, params oas.ShowLicenseUserAliasParams) (*oas.LicenseOwnerDocument, error)
- func (a *API) ShowMachine(ctx context.Context, params oas.ShowMachineParams) (*oas.MachineDocument, error)
- func (a *API) ShowMachineComponent(ctx context.Context, params oas.ShowMachineComponentParams) (*oas.ComponentDocument, error)
- func (a *API) ShowMachineGroup(ctx context.Context, params oas.ShowMachineGroupParams) (*oas.GroupDocument, error)
- func (a *API) ShowMachineLicense(ctx context.Context, params oas.ShowMachineLicenseParams) (*oas.LicenseDocument, error)
- func (a *API) ShowMachineOwner(ctx context.Context, params oas.ShowMachineOwnerParams) (*oas.LicenseOwnerDocument, error)
- func (a *API) ShowMachineProcess(ctx context.Context, params oas.ShowMachineProcessParams) (*oas.ProcessDocument, error)
- func (a *API) ShowMachineProduct(ctx context.Context, params oas.ShowMachineProductParams) (*oas.ProductDocument, error)
- func (a *API) ShowMachineUsage(ctx context.Context, params oas.ShowMachineUsageParams) (*oas.MachineUsageDocument, error)
- func (a *API) ShowMachineUserAlias(ctx context.Context, params oas.ShowMachineUserAliasParams) (*oas.LicenseOwnerDocument, error)
- func (a *API) ShowPolicy(ctx context.Context, params oas.ShowPolicyParams) (*oas.PolicyDocument, error)
- func (a *API) ShowPolicyEntitlement(ctx context.Context, params oas.ShowPolicyEntitlementParams) (*oas.EntitlementDocument, error)
- func (a *API) ShowPolicyLicense(ctx context.Context, params oas.ShowPolicyLicenseParams) (*oas.LicenseDocument, error)
- func (a *API) ShowPolicyPoolKey(ctx context.Context, params oas.ShowPolicyPoolKeyParams) (*oas.KeyDocument, error)
- func (a *API) ShowPolicyProduct(ctx context.Context, params oas.ShowPolicyProductParams) (*oas.ProductDocument, error)
- func (a *API) ShowProcess(ctx context.Context, params oas.ShowProcessParams) (*oas.ProcessDocument, error)
- func (a *API) ShowProcessLicense(ctx context.Context, params oas.ShowProcessLicenseParams) (*oas.LicenseDocument, error)
- func (a *API) ShowProcessMachine(ctx context.Context, params oas.ShowProcessMachineParams) (*oas.MachineDocument, error)
- func (a *API) ShowProcessProduct(ctx context.Context, params oas.ShowProcessProductParams) (*oas.ProductDocument, error)
- func (a *API) ShowProduct(ctx context.Context, params oas.ShowProductParams) (*oas.ProductDocument, error)
- func (a *API) ShowProductLicense(ctx context.Context, params oas.ShowProductLicenseParams) (*oas.LicenseDocument, error)
- func (a *API) ShowProductMachine(ctx context.Context, params oas.ShowProductMachineParams) (oas.ShowProductMachineOK, error)
- func (a *API) ShowProductPolicy(ctx context.Context, params oas.ShowProductPolicyParams) (*oas.PolicyDocument, error)
- func (a *API) ShowProductToken(ctx context.Context, params oas.ShowProductTokenParams) (*oas.TokenDocument, error)
- func (a *API) ShowProductUser(ctx context.Context, params oas.ShowProductUserParams) (*oas.UserDocument, error)
- func (a *API) ShowToken(ctx context.Context, params oas.ShowTokenParams) (*oas.TokenDocument, error)
- func (a *API) ShowUser(ctx context.Context, params oas.ShowUserParams) (*oas.UserDocument, error)
- func (a *API) ShowUserGroup(ctx context.Context, params oas.ShowUserGroupParams) (*oas.GroupDocument, error)
- func (a *API) ShowUserLicense(ctx context.Context, params oas.ShowUserLicenseParams) (*oas.LicenseDocument, error)
- func (a *API) ShowUserMachine(ctx context.Context, params oas.ShowUserMachineParams) (*oas.MachineDocument, error)
- func (a *API) ShowUserProduct(ctx context.Context, params oas.ShowUserProductParams) (*oas.UserProductDocument, error)
- func (a *API) ShowUserSecondFactor(ctx context.Context, params oas.ShowUserSecondFactorParams) (*oas.SecondFactorDocument, error)
- func (a *API) ShowUserToken(ctx context.Context, params oas.ShowUserTokenParams) (*oas.TokenDocument, error)
- func (a *API) ShowWebhookEndpoint(ctx context.Context, params oas.ShowWebhookEndpointParams) (*oas.WebhookEndpointDocument, error)
- func (a *API) ShowWebhookEvent(ctx context.Context, params oas.ShowWebhookEventParams) (*oas.WebhookEventDocument, error)
- func (a *API) SuspendLicense(ctx context.Context, params oas.SuspendLicenseParams) (*oas.LicenseDocument, error)
- func (a *API) UnbanUser(ctx context.Context, params oas.UnbanUserParams) (*oas.UserDocument, error)
- func (a *API) UpdateComponent(ctx context.Context, _ oas.UpdateComponentReq, ...) (*oas.ComponentDocument, error)
- func (a *API) UpdateEntitlement(ctx context.Context, _ oas.UpdateEntitlementReq, ...) (*oas.EntitlementDocument, error)
- func (a *API) UpdateGroup(ctx context.Context, _ oas.UpdateGroupReq, params oas.UpdateGroupParams) (*oas.GroupDocument, error)
- func (a *API) UpdateKey(ctx context.Context, _ oas.UpdateKeyReq, params oas.UpdateKeyParams) (*oas.KeyDocument, error)
- func (a *API) UpdateLicense(ctx context.Context, _ oas.UpdateLicenseReq, params oas.UpdateLicenseParams) (*oas.LicenseDocument, error)
- func (a *API) UpdateLicenseGroup(ctx context.Context, _ oas.UpdateLicenseGroupReq, ...) (*oas.LicenseDocument, error)
- func (a *API) UpdateLicenseOwner(ctx context.Context, _ oas.UpdateLicenseOwnerReq, ...) (*oas.LicenseDocument, error)
- func (a *API) UpdateLicensePolicy(ctx context.Context, _ oas.UpdateLicensePolicyReq, ...) (*oas.LicenseDocument, error)
- func (a *API) UpdateLicenseUserAlias(ctx context.Context, _ oas.UpdateLicenseUserAliasReq, ...) (*oas.LicenseDocument, error)
- func (a *API) UpdateMachine(ctx context.Context, _ oas.UpdateMachineReq, params oas.UpdateMachineParams) (*oas.MachineDocument, error)
- func (a *API) UpdateMachineGroup(ctx context.Context, _ oas.UpdateMachineGroupReq, ...) (*oas.MachineDocument, error)
- func (a *API) UpdateMachineOwner(ctx context.Context, _ oas.UpdateMachineOwnerReq, ...) (*oas.MachineDocument, error)
- func (a *API) UpdatePolicy(ctx context.Context, _ oas.UpdatePolicyReq, params oas.UpdatePolicyParams) (*oas.PolicyDocument, error)
- func (a *API) UpdateProcess(ctx context.Context, _ oas.UpdateProcessReq, params oas.UpdateProcessParams) (*oas.ProcessDocument, error)
- func (a *API) UpdateProduct(ctx context.Context, _ oas.UpdateProductReq, params oas.UpdateProductParams) (*oas.ProductDocument, error)
- func (a *API) UpdateUser(ctx context.Context, _ oas.UpdateUserReq, params oas.UpdateUserParams) (*oas.UserDocument, error)
- func (a *API) UpdateUserGroup(ctx context.Context, _ oas.UpdateUserGroupReq, ...) (*oas.UserDocument, error)
- func (a *API) UpdateUserPassword(ctx context.Context, _ oas.UpdateUserPasswordReq, ...) (*oas.UserDocument, error)
- func (a *API) UpdateUserSecondFactor(ctx context.Context, _ oas.UpdateUserSecondFactorReq, ...) (*oas.SecondFactorDocument, error)
- func (a *API) UpdateWebhookEndpoint(ctx context.Context, _ oas.UpdateWebhookEndpointReq, ...) (*oas.WebhookEndpointDocument, error)
- func (a *API) ValidateLicense(ctx context.Context, _ oas.ValidateLicenseReq, ...) (*oas.LicenseValidateDocument, error)
- func (a *API) ValidateLicenseKey(ctx context.Context, _ oas.ValidateLicenseKeyReq, ...) (*oas.LicenseValidateDocument, error)
- type Accounts
- type Deps
- type MemoryThrottler
- type Spec
- type Throttler
- type ValkeyThrottler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConsoleContext ¶
ConsoleContext marks only an in-process console request. Neither HTTP headers nor the public API can set this context key. The internal RPC checks OperatorOf before calling it; the check here is defense in depth.
Types ¶
type API ¶
type API struct {
oas.UnimplementedHandler
// contains filtered or unexported fields
}
API implements the ogen handler over the app's scenarios. The unimplemented base answers the routes whose groups have not landed.
func (*API) AttachGroupOwners ¶
func (a *API) AttachGroupOwners( ctx context.Context, _ oas.AttachGroupOwnersReq, params oas.AttachGroupOwnersParams, ) (*oas.GroupOwnerCollectionDocument, error)
AttachGroupOwners implements POST /groups/{groupId}/owners.
func (*API) AttachLicenseEntitlements ¶
func (a *API) AttachLicenseEntitlements( ctx context.Context, _ oas.AttachLicenseEntitlementsReq, params oas.AttachLicenseEntitlementsParams, ) (*oas.LicenseEntitlementListDocument, error)
AttachLicenseEntitlements implements POST …/licenses/{licenseId}/entitlements.
func (*API) AttachLicenseUsers ¶
func (a *API) AttachLicenseUsers( ctx context.Context, _ oas.AttachLicenseUsersReq, params oas.AttachLicenseUsersParams, ) (*oas.LicenseUserListDocument, error)
AttachLicenseUsers implements POST …/licenses/{licenseId}/users.
func (*API) AttachPolicyEntitlements ¶
func (a *API) AttachPolicyEntitlements( ctx context.Context, _ oas.AttachPolicyEntitlementsReq, params oas.AttachPolicyEntitlementsParams, ) (*oas.PolicyEntitlementListDocument, error)
AttachPolicyEntitlements implements POST /v1/accounts/{account}/policies/{policyId}/entitlements.
func (*API) BanUser ¶
func (a *API) BanUser(ctx context.Context, params oas.BanUserParams) (*oas.UserDocument, error)
BanUser implements the ban action.
func (*API) CheckInLicense ¶
func (a *API) CheckInLicense(ctx context.Context, params oas.CheckInLicenseParams) (*oas.LicenseDocument, error)
CheckInLicense implements POST …/licenses/{licenseId}/actions/check-in.
func (*API) CheckoutLicense ¶
func (a *API) CheckoutLicense( ctx context.Context, _ oas.CheckoutLicenseReq, params oas.CheckoutLicenseParams, ) (*oas.LicenseFileDocument, error)
CheckoutLicense implements POST …/licenses/{licenseId}/actions/check-out.
func (*API) CheckoutLicenseFile ¶
func (a *API) CheckoutLicenseFile( ctx context.Context, params oas.CheckoutLicenseFileParams, ) (*oas.CheckoutLicenseFileOKHeaders, error)
CheckoutLicenseFile implements GET …/licenses/{licenseId}/actions/check-out (the binary certificate).
func (*API) CheckoutMachine ¶ added in v0.0.5
func (a *API) CheckoutMachine( ctx context.Context, _ oas.CheckoutMachineReq, params oas.CheckoutMachineParams, ) (*oas.MachineFileDocument, error)
CheckoutMachine implements POST …/machines/{id}/actions/check-out.
func (*API) CheckoutMachineRaw ¶ added in v0.0.5
func (a *API) CheckoutMachineRaw( ctx context.Context, params oas.CheckoutMachineRawParams, ) (*oas.CheckoutMachineRawOKHeaders, error)
CheckoutMachineRaw implements GET …/machines/{id}/actions/check-out (the certificate itself).
func (*API) CreateComponent ¶ added in v0.0.5
func (a *API) CreateComponent( ctx context.Context, _ oas.CreateComponentReq, _ oas.CreateComponentParams, ) (*oas.ComponentDocumentHeaders, error)
CreateComponent implements POST …/components.
func (*API) CreateEntitlement ¶
func (a *API) CreateEntitlement( ctx context.Context, _ oas.CreateEntitlementReq, _ oas.CreateEntitlementParams, ) (*oas.EntitlementDocumentHeaders, error)
CreateEntitlement implements POST /v1/accounts/{account}/entitlements.
func (*API) CreateGroup ¶
func (a *API) CreateGroup( ctx context.Context, _ oas.CreateGroupReq, _ oas.CreateGroupParams, ) (*oas.GroupDocumentHeaders, error)
CreateGroup implements POST /v1/accounts/{account}/groups.
func (*API) CreateKey ¶
func (a *API) CreateKey( ctx context.Context, _ oas.CreateKeyReq, _ oas.CreateKeyParams, ) (*oas.KeyDocumentHeaders, error)
CreateKey implements POST /v1/accounts/{account}/keys.
func (*API) CreateLicense ¶
func (a *API) CreateLicense( ctx context.Context, _ oas.CreateLicenseReq, _ oas.CreateLicenseParams, ) (*oas.LicenseDocumentHeaders, error)
CreateLicense implements POST /v1/accounts/{account}/licenses.
func (*API) CreateLicenseToken ¶
func (a *API) CreateLicenseToken( ctx context.Context, _ oas.CreateLicenseTokenReq, params oas.CreateLicenseTokenParams, ) (*oas.TokenDocument, error)
CreateLicenseToken implements POST …/licenses/{licenseId}/tokens.
func (*API) CreateMachine ¶ added in v0.0.5
func (a *API) CreateMachine( ctx context.Context, _ oas.CreateMachineReq, _ oas.CreateMachineParams, ) (*oas.MachineDocumentHeaders, error)
CreateMachine implements POST …/machines (an activation).
func (*API) CreatePolicy ¶
func (a *API) CreatePolicy( ctx context.Context, _ oas.CreatePolicyReq, _ oas.CreatePolicyParams, ) (*oas.PolicyDocumentHeaders, error)
CreatePolicy implements POST /v1/accounts/{account}/policies.
func (*API) CreateProcess ¶ added in v0.0.5
func (a *API) CreateProcess( ctx context.Context, _ oas.CreateProcessReq, _ oas.CreateProcessParams, ) (*oas.ProcessDocumentHeaders, error)
CreateProcess implements POST …/processes (a spawn).
func (*API) CreateProduct ¶
func (a *API) CreateProduct( ctx context.Context, _ oas.CreateProductReq, _ oas.CreateProductParams, ) (*oas.ProductDocumentHeaders, error)
CreateProduct implements POST /v1/accounts/{account}/products.
func (*API) CreateProductToken ¶
func (a *API) CreateProductToken( ctx context.Context, _ oas.CreateProductTokenReq, params oas.CreateProductTokenParams, ) (*oas.TokenDocument, error)
CreateProductToken implements POST /v1/accounts/{account}/products/{productId}/tokens: a 200 (not 201) with the raw secret exactly once.
func (*API) CreateUser ¶
func (a *API) CreateUser( ctx context.Context, _ oas.CreateUserReq, _ oas.CreateUserParams, ) (*oas.UserDocumentHeaders, error)
CreateUser implements POST /v1/accounts/{account}/users.
func (*API) CreateUserSecondFactor ¶
func (a *API) CreateUserSecondFactor( ctx context.Context, _ oas.CreateUserSecondFactorReq, params oas.CreateUserSecondFactorParams, ) (*oas.SecondFactorDocumentHeaders, error)
CreateUserSecondFactor implements POST /users/{userId}/second-factors.
func (*API) CreateUserToken ¶
func (a *API) CreateUserToken( ctx context.Context, _ oas.CreateUserTokenReq, params oas.CreateUserTokenParams, ) (*oas.TokenDocument, error)
CreateUserToken implements POST /users/{userId}/tokens (200 + secret).
func (*API) CreateWebhookEndpoint ¶
func (a *API) CreateWebhookEndpoint( ctx context.Context, _ oas.CreateWebhookEndpointReq, _ oas.CreateWebhookEndpointParams, ) (*oas.WebhookEndpointDocumentHeaders, error)
CreateWebhookEndpoint implements POST /v1/accounts/{account}/webhook-endpoints.
func (*API) DecrementLicenseUsage ¶
func (a *API) DecrementLicenseUsage( ctx context.Context, _ oas.DecrementLicenseUsageReq, params oas.DecrementLicenseUsageParams, ) (*oas.LicenseDocument, error)
DecrementLicenseUsage implements POST …/licenses/{licenseId}/actions/decrement-usage.
func (*API) DeleteComponent ¶ added in v0.0.5
DeleteComponent implements DELETE …/components/{id}.
func (*API) DeleteGroup ¶
DeleteGroup implements DELETE /v1/accounts/{account}/groups/{groupId}.
func (*API) DeleteMachine ¶ added in v0.0.5
DeleteMachine implements DELETE …/machines/{id} (a deactivation).
func (*API) DeleteProcess ¶ added in v0.0.5
DeleteProcess implements DELETE …/processes/{id} (a kill).
func (*API) DeleteUser ¶
DeleteUser implements DELETE /v1/accounts/{account}/users/{userId}.
func (*API) DeleteUserSecondFactor ¶
func (a *API) DeleteUserSecondFactor( ctx context.Context, _ oas.DeleteUserSecondFactorReq, params oas.DeleteUserSecondFactorParams, ) error
DeleteUserSecondFactor implements DELETE /users/{userId}/second-factors/{id}.
func (*API) DestroyEntitlement ¶
DestroyEntitlement implements DELETE /v1/accounts/{account}/entitlements/{entitlementId}.
func (*API) DestroyKey ¶
DestroyKey implements DELETE /v1/accounts/{account}/keys/{keyId}.
func (*API) DestroyLicense ¶
DestroyLicense implements DELETE /v1/accounts/{account}/licenses/{licenseId}.
func (*API) DestroyPolicy ¶
DestroyPolicy implements DELETE /v1/accounts/{account}/policies/{policyId}.
func (*API) DestroyProduct ¶
DestroyProduct implements DELETE /v1/accounts/{account}/products/{productId}.
func (*API) DestroyWebhookEndpoint ¶
func (a *API) DestroyWebhookEndpoint(ctx context.Context, params oas.DestroyWebhookEndpointParams) error
DestroyWebhookEndpoint implements DELETE /v1/accounts/{account}/webhook-endpoints/{webhookEndpointId}.
func (*API) DestroyWebhookEvent ¶
DestroyWebhookEvent implements DELETE /v1/accounts/{account}/webhook-events/{webhookEventId}.
func (*API) DetachGroupOwners ¶
func (a *API) DetachGroupOwners( ctx context.Context, _ oas.DetachGroupOwnersReq, params oas.DetachGroupOwnersParams, ) error
DetachGroupOwners implements DELETE /groups/{groupId}/owners.
func (*API) DetachLicenseEntitlements ¶
func (a *API) DetachLicenseEntitlements( ctx context.Context, _ oas.DetachLicenseEntitlementsReq, params oas.DetachLicenseEntitlementsParams, ) error
DetachLicenseEntitlements implements DELETE …/licenses/{licenseId}/entitlements.
func (*API) DetachLicenseUsers ¶
func (a *API) DetachLicenseUsers( ctx context.Context, _ oas.DetachLicenseUsersReq, params oas.DetachLicenseUsersParams, ) error
DetachLicenseUsers implements DELETE …/licenses/{licenseId}/users.
func (*API) DetachPolicyEntitlements ¶
func (a *API) DetachPolicyEntitlements( ctx context.Context, _ oas.DetachPolicyEntitlementsReq, params oas.DetachPolicyEntitlementsParams, ) error
DetachPolicyEntitlements implements DELETE /v1/accounts/{account}/policies/{policyId}/entitlements.
func (*API) GenerateMachineProof ¶ added in v0.0.5
func (a *API) GenerateMachineProof( ctx context.Context, _ oas.GenerateMachineProofReq, params oas.GenerateMachineProofParams, ) (*oas.MachineProofDocument, error)
GenerateMachineProof implements POST …/machines/{id}/actions/generate-offline-proof.
func (*API) GenerateToken ¶
func (a *API) GenerateToken( ctx context.Context, _ oas.GenerateTokenReq, _ oas.GenerateTokenParams, ) (*oas.TokenDocumentHeaders, error)
GenerateToken implements POST /v1/accounts/{account}/tokens: Basic email:password (with meta.otp for two-factor users) or any token authentication. The raw secret rides the response exactly once.
func (*API) GetAccount ¶
func (a *API) GetAccount(ctx context.Context, _ oas.GetAccountParams) (*oas.AccountDocument, error)
GetAccount implements GET /v1/accounts/{account}: the configured account with its public keys in the data-level meta. The pipeline has already resolved and authenticated the account.
func (*API) IncrementLicenseUsage ¶
func (a *API) IncrementLicenseUsage( ctx context.Context, _ oas.IncrementLicenseUsageReq, params oas.IncrementLicenseUsageParams, ) (*oas.LicenseDocument, error)
IncrementLicenseUsage implements POST …/licenses/{licenseId}/actions/increment-usage.
func (*API) IndexComponents ¶ added in v0.0.5
func (a *API) IndexComponents(ctx context.Context, _ oas.IndexComponentsParams) (*oas.ComponentListDocument, error)
IndexComponents implements GET …/components.
func (*API) IndexEntitlements ¶
func (a *API) IndexEntitlements( ctx context.Context, _ oas.IndexEntitlementsParams, ) (*oas.EntitlementListDocument, error)
IndexEntitlements implements GET /v1/accounts/{account}/entitlements.
func (*API) IndexKeys ¶
func (a *API) IndexKeys(ctx context.Context, _ oas.IndexKeysParams) (*oas.KeyListDocument, error)
IndexKeys implements GET /v1/accounts/{account}/keys.
func (*API) IndexLicenseEntitlements ¶
func (a *API) IndexLicenseEntitlements( ctx context.Context, params oas.IndexLicenseEntitlementsParams, ) (*oas.EntitlementListDocument, error)
IndexLicenseEntitlements implements GET …/licenses/{licenseId}/entitlements.
func (*API) IndexLicenseMachines ¶
func (a *API) IndexLicenseMachines( ctx context.Context, params oas.IndexLicenseMachinesParams, ) (*oas.MachineListDocument, error)
IndexLicenseMachines implements GET …/licenses/{licenseId}/machines.
func (*API) IndexLicenseTokens ¶
func (a *API) IndexLicenseTokens( ctx context.Context, params oas.IndexLicenseTokensParams, ) (*oas.TokenCollectionDocument, error)
IndexLicenseTokens implements GET …/licenses/{licenseId}/tokens.
func (*API) IndexLicenseUsers ¶
func (a *API) IndexLicenseUsers( ctx context.Context, params oas.IndexLicenseUsersParams, ) (*oas.UserCollectionDocument, error)
IndexLicenseUsers implements GET …/licenses/{licenseId}/users.
func (*API) IndexLicenses ¶
func (a *API) IndexLicenses(ctx context.Context, _ oas.IndexLicensesParams) (*oas.LicenseListDocument, error)
IndexLicenses implements GET /v1/accounts/{account}/licenses.
func (*API) IndexMachineComponents ¶ added in v0.0.5
func (a *API) IndexMachineComponents( ctx context.Context, params oas.IndexMachineComponentsParams, ) (*oas.ComponentListDocument, error)
IndexMachineComponents implements GET …/machines/{id}/components.
func (*API) IndexMachineProcesses ¶ added in v0.0.5
func (a *API) IndexMachineProcesses( ctx context.Context, params oas.IndexMachineProcessesParams, ) (*oas.ProcessListDocument, error)
IndexMachineProcesses implements GET …/machines/{id}/processes.
func (*API) IndexMachines ¶ added in v0.0.5
func (a *API) IndexMachines(ctx context.Context, _ oas.IndexMachinesParams) (*oas.MachineListDocument, error)
IndexMachines implements GET …/machines.
func (*API) IndexPolicies ¶
func (a *API) IndexPolicies(ctx context.Context, _ oas.IndexPoliciesParams) (*oas.PolicyListDocument, error)
IndexPolicies implements GET /v1/accounts/{account}/policies.
func (*API) IndexPolicyEntitlements ¶
func (a *API) IndexPolicyEntitlements( ctx context.Context, params oas.IndexPolicyEntitlementsParams, ) (*oas.EntitlementListDocument, error)
IndexPolicyEntitlements implements GET /v1/accounts/{account}/policies/{policyId}/entitlements.
func (*API) IndexPolicyLicenses ¶
func (a *API) IndexPolicyLicenses( ctx context.Context, params oas.IndexPolicyLicensesParams, ) (*oas.LicenseListDocument, error)
IndexPolicyLicenses implements GET /v1/accounts/{account}/policies/{policyId}/licenses.
func (*API) IndexPolicyPool ¶
func (a *API) IndexPolicyPool( ctx context.Context, params oas.IndexPolicyPoolParams, ) (*oas.KeyListDocument, error)
IndexPolicyPool implements GET /v1/accounts/{account}/policies/{policyId}/pool.
func (*API) IndexProcesses ¶ added in v0.0.5
func (a *API) IndexProcesses(ctx context.Context, _ oas.IndexProcessesParams) (*oas.ProcessListDocument, error)
IndexProcesses implements GET …/processes.
func (*API) IndexProductLicenses ¶
func (a *API) IndexProductLicenses( ctx context.Context, params oas.IndexProductLicensesParams, ) (*oas.LicenseListDocument, error)
IndexProductLicenses implements GET /v1/accounts/{account}/products/{productId}/licenses: the right shape (an empty collection with links) until the licenses group lands.
func (*API) IndexProductMachines ¶
func (a *API) IndexProductMachines( ctx context.Context, params oas.IndexProductMachinesParams, ) (*oas.MachineListDocument, error)
IndexProductMachines implements GET /v1/accounts/{account}/products/{productId}/machines.
func (*API) IndexProductPolicies ¶
func (a *API) IndexProductPolicies( ctx context.Context, params oas.IndexProductPoliciesParams, ) (*oas.PolicyListDocument, error)
IndexProductPolicies implements GET /v1/accounts/{account}/products/{productId}/policies.
func (*API) IndexProductTokens ¶
func (a *API) IndexProductTokens( ctx context.Context, params oas.IndexProductTokensParams, ) (*oas.ProductTokenListDocument, error)
IndexProductTokens implements GET /v1/accounts/{account}/products/{productId}/tokens.
func (*API) IndexProductUsers ¶
func (a *API) IndexProductUsers( ctx context.Context, params oas.IndexProductUsersParams, ) (*oas.ProductUserListDocument, error)
IndexProductUsers implements GET /v1/accounts/{account}/products/{productId}/users.
func (*API) IndexProducts ¶
func (a *API) IndexProducts( ctx context.Context, _ oas.IndexProductsParams, ) (*oas.ProductListDocument, error)
IndexProducts implements GET /v1/accounts/{account}/products.
func (*API) ListGroupLicenses ¶
func (a *API) ListGroupLicenses( ctx context.Context, params oas.ListGroupLicensesParams, ) (*oas.LicenseListDocument, error)
ListGroupLicenses implements GET /groups/{groupId}/licenses.
func (*API) ListGroupMachines ¶
func (a *API) ListGroupMachines( ctx context.Context, params oas.ListGroupMachinesParams, ) (*oas.MachineListDocument, error)
ListGroupMachines implements GET /groups/{groupId}/machines.
func (*API) ListGroupOwners ¶
func (a *API) ListGroupOwners( ctx context.Context, params oas.ListGroupOwnersParams, ) (*oas.GroupOwnerCollectionDocument, error)
ListGroupOwners implements GET /groups/{groupId}/owners.
func (*API) ListGroupUsers ¶
func (a *API) ListGroupUsers( ctx context.Context, params oas.ListGroupUsersParams, ) (*oas.UserCollectionDocument, error)
ListGroupUsers implements GET /groups/{groupId}/users.
func (*API) ListGroups ¶
func (a *API) ListGroups(ctx context.Context, _ oas.ListGroupsParams) (*oas.GroupCollectionDocument, error)
ListGroups implements GET /v1/accounts/{account}/groups.
func (*API) ListTokens ¶
func (a *API) ListTokens(ctx context.Context, _ oas.ListTokensParams) (*oas.TokenCollectionDocument, error)
ListTokens implements GET /v1/accounts/{account}/tokens.
func (*API) ListUserLicenses ¶
func (a *API) ListUserLicenses( ctx context.Context, params oas.ListUserLicensesParams, ) (*oas.LicenseListDocument, error)
ListUserLicenses implements GET /users/{userId}/licenses.
func (*API) ListUserMachines ¶
func (a *API) ListUserMachines( ctx context.Context, params oas.ListUserMachinesParams, ) (*oas.MachineListDocument, error)
ListUserMachines implements GET /users/{userId}/machines.
func (*API) ListUserProducts ¶
func (a *API) ListUserProducts( ctx context.Context, params oas.ListUserProductsParams, ) (*oas.UserProductCollectionDocument, error)
ListUserProducts implements GET /users/{userId}/products.
func (*API) ListUserSecondFactors ¶
func (a *API) ListUserSecondFactors( ctx context.Context, params oas.ListUserSecondFactorsParams, ) (*oas.SecondFactorCollectionDocument, error)
ListUserSecondFactors implements GET /users/{userId}/second-factors.
func (*API) ListUserTokens ¶
func (a *API) ListUserTokens( ctx context.Context, params oas.ListUserTokensParams, ) (*oas.TokenCollectionDocument, error)
ListUserTokens implements GET /users/{userId}/tokens.
func (*API) ListUsers ¶
func (a *API) ListUsers(ctx context.Context, _ oas.ListUsersParams) (*oas.UserCollectionDocument, error)
ListUsers implements GET /v1/accounts/{account}/users.
func (*API) ListWebhookEndpoints ¶
func (a *API) ListWebhookEndpoints( ctx context.Context, _ oas.ListWebhookEndpointsParams, ) (*oas.WebhookEndpointListDocument, error)
ListWebhookEndpoints implements GET /v1/accounts/{account}/webhook-endpoints.
func (*API) ListWebhookEvents ¶
func (a *API) ListWebhookEvents( ctx context.Context, _ oas.ListWebhookEventsParams, ) (*oas.WebhookEventListDocument, error)
ListWebhookEvents implements GET /v1/accounts/{account}/webhook-events (the events[] filter narrows by exact event names).
func (*API) Me ¶
Me implements GET /v1/accounts/{account}/me: the authenticated user with, for token authentication, the current token in included.
func (*API) NewError ¶
NewError maps handler errors to Keygen error documents: the typed app error (or the 500 fallback) with the request id as meta.id.
func (*API) Ping ¶
Ping implements GET /v1/ping: a one-byte body the pipeline renders as text/plain.
func (*API) PingMachine ¶ added in v0.0.5
func (a *API) PingMachine(ctx context.Context, params oas.PingMachineParams) (*oas.MachineDocument, error)
PingMachine implements POST …/machines/{id}/actions/ping.
func (*API) PingMachineHeartbeat ¶ added in v0.0.5
func (a *API) PingMachineHeartbeat( ctx context.Context, _ oas.PingMachineHeartbeatReq, params oas.PingMachineHeartbeatParams, ) (*oas.MachineDocument, error)
PingMachineHeartbeat implements POST …/machines/{id}/actions/ping-heartbeat.
func (*API) PingProcess ¶ added in v0.0.5
func (a *API) PingProcess( ctx context.Context, _ oas.PingProcessReq, params oas.PingProcessParams, ) (*oas.ProcessDocument, error)
PingProcess implements POST …/processes/{id}/actions/ping.
func (*API) PopPolicyPool ¶
func (a *API) PopPolicyPool(ctx context.Context, params oas.PopPolicyPoolParams) (*oas.KeyDocument, error)
PopPolicyPool implements DELETE /v1/accounts/{account}/policies/{policyId}/pool.
func (*API) Profile ¶
func (a *API) Profile(ctx context.Context, _ oas.ProfileParams) (*oas.ProfileDocument, error)
Profile implements GET /v1/accounts/{account}/profile: the authenticated user with the current token's id in meta.
func (*API) QuickValidateLicense ¶
func (a *API) QuickValidateLicense( ctx context.Context, params oas.QuickValidateLicenseParams, ) (*oas.LicenseValidateDocument, error)
QuickValidateLicense implements GET …/licenses/{licenseId}/actions/validate.
func (*API) RegenerateCurrentToken ¶
func (a *API) RegenerateCurrentToken( ctx context.Context, _ oas.RegenerateCurrentTokenParams, ) (*oas.TokenDocument, error)
RegenerateCurrentToken implements the deprecated PUT /tokens.
func (*API) RegenerateToken ¶
func (a *API) RegenerateToken( ctx context.Context, params oas.RegenerateTokenParams, ) (*oas.TokenDocument, error)
RegenerateToken implements PUT /tokens/{tokenId}.
func (*API) ReinstateLicense ¶
func (a *API) ReinstateLicense(ctx context.Context, params oas.ReinstateLicenseParams) (*oas.LicenseDocument, error)
ReinstateLicense implements POST …/licenses/{licenseId}/actions/reinstate.
func (*API) RenewLicense ¶
func (a *API) RenewLicense(ctx context.Context, params oas.RenewLicenseParams) (*oas.LicenseDocument, error)
RenewLicense implements POST …/licenses/{licenseId}/actions/renew.
func (*API) ReplaceUserSecondFactor ¶
func (a *API) ReplaceUserSecondFactor( ctx context.Context, _ oas.ReplaceUserSecondFactorReq, params oas.ReplaceUserSecondFactorParams, ) (*oas.SecondFactorDocument, error)
ReplaceUserSecondFactor is the reference's PUT alias of PATCH.
func (*API) ReportMachineUsage ¶ added in v0.0.5
func (a *API) ReportMachineUsage( ctx context.Context, _ oas.ReportMachineUsageReq, params oas.ReportMachineUsageParams, ) (*oas.MachineUsageAckDocument, error)
ReportMachineUsage implements POST …/machines/{id}/actions/report-usage.
func (*API) RequestPasswordReset ¶
func (a *API) RequestPasswordReset( ctx context.Context, _ oas.RequestPasswordResetReq, _ oas.RequestPasswordResetParams, ) error
RequestPasswordReset implements POST /passwords: always 204.
func (*API) ResetLicenseUsage ¶
func (a *API) ResetLicenseUsage(ctx context.Context, params oas.ResetLicenseUsageParams) (*oas.LicenseDocument, error)
ResetLicenseUsage implements POST …/licenses/{licenseId}/actions/reset-usage.
func (*API) ResetMachine ¶ added in v0.0.5
func (a *API) ResetMachine(ctx context.Context, params oas.ResetMachineParams) (*oas.MachineDocument, error)
ResetMachine implements POST …/machines/{id}/actions/reset.
func (*API) ResetMachineHeartbeat ¶ added in v0.0.5
func (a *API) ResetMachineHeartbeat( ctx context.Context, _ oas.ResetMachineHeartbeatReq, params oas.ResetMachineHeartbeatParams, ) (*oas.MachineDocument, error)
ResetMachineHeartbeat implements POST …/machines/{id}/actions/reset-heartbeat.
func (*API) ResetUserPassword ¶
func (a *API) ResetUserPassword( ctx context.Context, _ oas.ResetUserPasswordReq, params oas.ResetUserPasswordParams, ) (*oas.UserDocument, error)
ResetUserPassword implements the reset-password action.
func (*API) RetryWebhookEvent ¶
func (a *API) RetryWebhookEvent( ctx context.Context, _ oas.RetryWebhookEventReq, params oas.RetryWebhookEventParams, ) (*oas.WebhookEventDocumentHeaders, error)
RetryWebhookEvent implements POST /v1/accounts/{account}/webhook-events/{webhookEventId}/actions/retry.
func (*API) RevokeLicense ¶
RevokeLicense implements DELETE …/licenses/{licenseId}/actions/revoke.
func (*API) RevokeToken ¶
RevokeToken implements DELETE /tokens/{tokenId}.
func (*API) Search ¶
Search implements POST /v1/accounts/{account}/search: the matches of one resource type, answered as that type's list document.
func (*API) ShowComponent ¶ added in v0.0.5
func (a *API) ShowComponent(ctx context.Context, params oas.ShowComponentParams) (*oas.ComponentDocument, error)
ShowComponent implements GET …/components/{id}.
func (*API) ShowComponentLicense ¶ added in v0.0.5
func (a *API) ShowComponentLicense( ctx context.Context, params oas.ShowComponentLicenseParams, ) (*oas.LicenseDocument, error)
ShowComponentLicense implements GET …/components/{id}/license.
func (*API) ShowComponentMachine ¶ added in v0.0.5
func (a *API) ShowComponentMachine( ctx context.Context, params oas.ShowComponentMachineParams, ) (*oas.MachineDocument, error)
ShowComponentMachine implements GET …/components/{id}/machine.
func (*API) ShowComponentProduct ¶ added in v0.0.5
func (a *API) ShowComponentProduct( ctx context.Context, params oas.ShowComponentProductParams, ) (*oas.ProductDocument, error)
ShowComponentProduct implements GET …/components/{id}/product.
func (*API) ShowEntitlement ¶
func (a *API) ShowEntitlement( ctx context.Context, params oas.ShowEntitlementParams, ) (*oas.EntitlementDocument, error)
ShowEntitlement implements GET /v1/accounts/{account}/entitlements/{entitlementId}.
func (*API) ShowGroup ¶
func (a *API) ShowGroup(ctx context.Context, params oas.ShowGroupParams) (*oas.GroupDocument, error)
ShowGroup implements GET /v1/accounts/{account}/groups/{groupId}.
func (*API) ShowGroupLicense ¶
func (a *API) ShowGroupLicense( ctx context.Context, params oas.ShowGroupLicenseParams, ) (*oas.LicenseDocument, error)
ShowGroupLicense implements GET /groups/{groupId}/licenses/{licenseId}.
func (*API) ShowGroupMachine ¶
func (a *API) ShowGroupMachine( ctx context.Context, params oas.ShowGroupMachineParams, ) (*oas.MachineDocument, error)
ShowGroupMachine implements GET /groups/{groupId}/machines/{machineId}.
func (*API) ShowGroupOwner ¶
func (a *API) ShowGroupOwner( ctx context.Context, params oas.ShowGroupOwnerParams, ) (*oas.GroupOwnerDocument, error)
ShowGroupOwner implements GET /groups/{groupId}/owners/{ownerId}.
func (*API) ShowGroupUser ¶
func (a *API) ShowGroupUser(ctx context.Context, params oas.ShowGroupUserParams) (*oas.UserDocument, error)
ShowGroupUser implements GET /groups/{groupId}/users/{userId}.
func (*API) ShowKey ¶
func (a *API) ShowKey(ctx context.Context, params oas.ShowKeyParams) (*oas.KeyDocument, error)
ShowKey implements GET /v1/accounts/{account}/keys/{keyId}.
func (*API) ShowKeyPolicy ¶
func (a *API) ShowKeyPolicy(ctx context.Context, params oas.ShowKeyPolicyParams) (*oas.PolicyDocument, error)
ShowKeyPolicy implements GET /v1/accounts/{account}/keys/{keyId}/policy.
func (*API) ShowKeyProduct ¶
func (a *API) ShowKeyProduct(ctx context.Context, params oas.ShowKeyProductParams) (*oas.ProductDocument, error)
ShowKeyProduct implements GET /v1/accounts/{account}/keys/{keyId}/product.
func (*API) ShowLicense ¶
func (a *API) ShowLicense(ctx context.Context, params oas.ShowLicenseParams) (*oas.LicenseDocument, error)
ShowLicense implements GET /v1/accounts/{account}/licenses/{licenseId}.
func (*API) ShowLicenseEntitlement ¶
func (a *API) ShowLicenseEntitlement( ctx context.Context, params oas.ShowLicenseEntitlementParams, ) (*oas.EntitlementDocument, error)
ShowLicenseEntitlement implements GET …/licenses/{licenseId}/entitlements/{entitlementId}.
func (*API) ShowLicenseGroup ¶
func (a *API) ShowLicenseGroup( ctx context.Context, params oas.ShowLicenseGroupParams, ) (*oas.GroupDocument, error)
ShowLicenseGroup implements GET …/licenses/{licenseId}/group.
func (*API) ShowLicenseMachine ¶
func (a *API) ShowLicenseMachine( ctx context.Context, params oas.ShowLicenseMachineParams, ) (*oas.MachineDocument, error)
ShowLicenseMachine implements GET …/licenses/{licenseId}/machines/{machineId}.
func (*API) ShowLicenseOwner ¶
func (a *API) ShowLicenseOwner( ctx context.Context, params oas.ShowLicenseOwnerParams, ) (*oas.LicenseOwnerDocument, error)
ShowLicenseOwner implements GET …/licenses/{licenseId}/owner.
func (*API) ShowLicensePolicy ¶
func (a *API) ShowLicensePolicy( ctx context.Context, params oas.ShowLicensePolicyParams, ) (*oas.PolicyDocument, error)
ShowLicensePolicy implements GET …/licenses/{licenseId}/policy.
func (*API) ShowLicenseProduct ¶
func (a *API) ShowLicenseProduct( ctx context.Context, params oas.ShowLicenseProductParams, ) (*oas.ProductDocument, error)
ShowLicenseProduct implements GET …/licenses/{licenseId}/product.
func (*API) ShowLicenseToken ¶
func (a *API) ShowLicenseToken( ctx context.Context, params oas.ShowLicenseTokenParams, ) (*oas.TokenDocument, error)
ShowLicenseToken implements GET …/licenses/{licenseId}/tokens/{tokenId}.
func (*API) ShowLicenseUser ¶
func (a *API) ShowLicenseUser( ctx context.Context, params oas.ShowLicenseUserParams, ) (*oas.LicenseOwnerDocument, error)
ShowLicenseUser implements GET …/licenses/{licenseId}/users/{userId}.
func (*API) ShowLicenseUserAlias ¶
func (a *API) ShowLicenseUserAlias( ctx context.Context, params oas.ShowLicenseUserAliasParams, ) (*oas.LicenseOwnerDocument, error)
ShowLicenseUserAlias implements GET …/licenses/{licenseId}/user (the v1.5 alias of owner).
func (*API) ShowMachine ¶ added in v0.0.5
func (a *API) ShowMachine(ctx context.Context, params oas.ShowMachineParams) (*oas.MachineDocument, error)
ShowMachine implements GET …/machines/{id}.
func (*API) ShowMachineComponent ¶ added in v0.0.5
func (a *API) ShowMachineComponent( ctx context.Context, params oas.ShowMachineComponentParams, ) (*oas.ComponentDocument, error)
ShowMachineComponent implements GET …/machines/{id}/components/{componentId}.
func (*API) ShowMachineGroup ¶ added in v0.0.5
func (a *API) ShowMachineGroup(ctx context.Context, params oas.ShowMachineGroupParams) (*oas.GroupDocument, error)
ShowMachineGroup implements GET …/machines/{id}/group.
func (*API) ShowMachineLicense ¶ added in v0.0.5
func (a *API) ShowMachineLicense( ctx context.Context, params oas.ShowMachineLicenseParams, ) (*oas.LicenseDocument, error)
ShowMachineLicense implements GET …/machines/{id}/license.
func (*API) ShowMachineOwner ¶ added in v0.0.5
func (a *API) ShowMachineOwner( ctx context.Context, params oas.ShowMachineOwnerParams, ) (*oas.LicenseOwnerDocument, error)
ShowMachineOwner implements GET …/machines/{id}/owner.
func (*API) ShowMachineProcess ¶ added in v0.0.5
func (a *API) ShowMachineProcess( ctx context.Context, params oas.ShowMachineProcessParams, ) (*oas.ProcessDocument, error)
ShowMachineProcess implements GET …/machines/{id}/processes/{processId}.
func (*API) ShowMachineProduct ¶ added in v0.0.5
func (a *API) ShowMachineProduct( ctx context.Context, params oas.ShowMachineProductParams, ) (*oas.ProductDocument, error)
ShowMachineProduct implements GET …/machines/{id}/product.
func (*API) ShowMachineUsage ¶ added in v0.0.5
func (a *API) ShowMachineUsage( ctx context.Context, params oas.ShowMachineUsageParams, ) (*oas.MachineUsageDocument, error)
ShowMachineUsage implements GET …/machines/{id}/usage.
func (*API) ShowMachineUserAlias ¶ added in v0.0.5
func (a *API) ShowMachineUserAlias( ctx context.Context, params oas.ShowMachineUserAliasParams, ) (*oas.LicenseOwnerDocument, error)
ShowMachineUserAlias implements GET …/machines/{id}/user (the v1.5 "user": the license's owner).
func (*API) ShowPolicy ¶
func (a *API) ShowPolicy(ctx context.Context, params oas.ShowPolicyParams) (*oas.PolicyDocument, error)
ShowPolicy implements GET /v1/accounts/{account}/policies/{policyId}.
func (*API) ShowPolicyEntitlement ¶
func (a *API) ShowPolicyEntitlement( ctx context.Context, params oas.ShowPolicyEntitlementParams, ) (*oas.EntitlementDocument, error)
ShowPolicyEntitlement implements GET /v1/accounts/{account}/policies/{policyId}/entitlements/{entitlementId}.
func (*API) ShowPolicyLicense ¶
func (a *API) ShowPolicyLicense( ctx context.Context, params oas.ShowPolicyLicenseParams, ) (*oas.LicenseDocument, error)
ShowPolicyLicense implements GET /v1/accounts/{account}/policies/{policyId}/licenses/{licenseId}.
func (*API) ShowPolicyPoolKey ¶
func (a *API) ShowPolicyPoolKey( ctx context.Context, params oas.ShowPolicyPoolKeyParams, ) (*oas.KeyDocument, error)
ShowPolicyPoolKey implements GET /v1/accounts/{account}/policies/{policyId}/pool/{keyId}.
func (*API) ShowPolicyProduct ¶
func (a *API) ShowPolicyProduct( ctx context.Context, params oas.ShowPolicyProductParams, ) (*oas.ProductDocument, error)
ShowPolicyProduct implements GET /v1/accounts/{account}/policies/{policyId}/product.
func (*API) ShowProcess ¶ added in v0.0.5
func (a *API) ShowProcess(ctx context.Context, params oas.ShowProcessParams) (*oas.ProcessDocument, error)
ShowProcess implements GET …/processes/{id}.
func (*API) ShowProcessLicense ¶ added in v0.0.5
func (a *API) ShowProcessLicense( ctx context.Context, params oas.ShowProcessLicenseParams, ) (*oas.LicenseDocument, error)
ShowProcessLicense implements GET …/processes/{id}/license.
func (*API) ShowProcessMachine ¶ added in v0.0.5
func (a *API) ShowProcessMachine( ctx context.Context, params oas.ShowProcessMachineParams, ) (*oas.MachineDocument, error)
ShowProcessMachine implements GET …/processes/{id}/machine.
func (*API) ShowProcessProduct ¶ added in v0.0.5
func (a *API) ShowProcessProduct( ctx context.Context, params oas.ShowProcessProductParams, ) (*oas.ProductDocument, error)
ShowProcessProduct implements GET …/processes/{id}/product.
func (*API) ShowProduct ¶
func (a *API) ShowProduct(ctx context.Context, params oas.ShowProductParams) (*oas.ProductDocument, error)
ShowProduct implements GET /v1/accounts/{account}/products/{productId}.
func (*API) ShowProductLicense ¶
func (a *API) ShowProductLicense( ctx context.Context, params oas.ShowProductLicenseParams, ) (*oas.LicenseDocument, error)
ShowProductLicense implements GET /v1/accounts/{account}/products/{productId}/licenses/{licenseId}: the licenses collection is empty until the group lands, so every show is the 404.
func (*API) ShowProductMachine ¶
func (a *API) ShowProductMachine( ctx context.Context, params oas.ShowProductMachineParams, ) (oas.ShowProductMachineOK, error)
ShowProductMachine implements GET /v1/accounts/{account}/products/{productId}/machines/{machineId} (404 until the machines group lands).
func (*API) ShowProductPolicy ¶
func (a *API) ShowProductPolicy( ctx context.Context, params oas.ShowProductPolicyParams, ) (*oas.PolicyDocument, error)
ShowProductPolicy implements GET /v1/accounts/{account}/products/{productId}/policies/{policyId}.
func (*API) ShowProductToken ¶
func (a *API) ShowProductToken( ctx context.Context, params oas.ShowProductTokenParams, ) (*oas.TokenDocument, error)
ShowProductToken implements GET /v1/accounts/{account}/products/{productId}/tokens/{tokenId}.
func (*API) ShowProductUser ¶
func (a *API) ShowProductUser( ctx context.Context, params oas.ShowProductUserParams, ) (*oas.UserDocument, error)
ShowProductUser implements GET /v1/accounts/{account}/products/{productId}/users/{userId}.
func (*API) ShowToken ¶
func (a *API) ShowToken(ctx context.Context, params oas.ShowTokenParams) (*oas.TokenDocument, error)
ShowToken implements GET /v1/accounts/{account}/tokens/{tokenId}.
func (*API) ShowUser ¶
func (a *API) ShowUser(ctx context.Context, params oas.ShowUserParams) (*oas.UserDocument, error)
ShowUser implements GET /v1/accounts/{account}/users/{userId}.
func (*API) ShowUserGroup ¶
func (a *API) ShowUserGroup(ctx context.Context, params oas.ShowUserGroupParams) (*oas.GroupDocument, error)
ShowUserGroup implements GET /users/{userId}/group.
func (*API) ShowUserLicense ¶
func (a *API) ShowUserLicense( ctx context.Context, params oas.ShowUserLicenseParams, ) (*oas.LicenseDocument, error)
ShowUserLicense implements GET /users/{userId}/licenses/{licenseId}.
func (*API) ShowUserMachine ¶
func (a *API) ShowUserMachine( ctx context.Context, params oas.ShowUserMachineParams, ) (*oas.MachineDocument, error)
ShowUserMachine implements GET /users/{userId}/machines/{machineId}.
func (*API) ShowUserProduct ¶
func (a *API) ShowUserProduct( ctx context.Context, params oas.ShowUserProductParams, ) (*oas.UserProductDocument, error)
ShowUserProduct implements GET /users/{userId}/products/{productId}.
func (*API) ShowUserSecondFactor ¶
func (a *API) ShowUserSecondFactor( ctx context.Context, params oas.ShowUserSecondFactorParams, ) (*oas.SecondFactorDocument, error)
ShowUserSecondFactor implements GET /users/{userId}/second-factors/{id}.
func (*API) ShowUserToken ¶
func (a *API) ShowUserToken( ctx context.Context, params oas.ShowUserTokenParams, ) (*oas.TokenDocument, error)
ShowUserToken implements GET /users/{userId}/tokens/{tokenId}.
func (*API) ShowWebhookEndpoint ¶
func (a *API) ShowWebhookEndpoint( ctx context.Context, params oas.ShowWebhookEndpointParams, ) (*oas.WebhookEndpointDocument, error)
ShowWebhookEndpoint implements GET /v1/accounts/{account}/webhook-endpoints/{webhookEndpointId}.
func (*API) ShowWebhookEvent ¶
func (a *API) ShowWebhookEvent( ctx context.Context, params oas.ShowWebhookEventParams, ) (*oas.WebhookEventDocument, error)
ShowWebhookEvent implements GET /v1/accounts/{account}/webhook-events/{webhookEventId}.
func (*API) SuspendLicense ¶
func (a *API) SuspendLicense(ctx context.Context, params oas.SuspendLicenseParams) (*oas.LicenseDocument, error)
SuspendLicense implements POST …/licenses/{licenseId}/actions/suspend.
func (*API) UnbanUser ¶
func (a *API) UnbanUser(ctx context.Context, params oas.UnbanUserParams) (*oas.UserDocument, error)
UnbanUser implements the unban action.
func (*API) UpdateComponent ¶ added in v0.0.5
func (a *API) UpdateComponent( ctx context.Context, _ oas.UpdateComponentReq, params oas.UpdateComponentParams, ) (*oas.ComponentDocument, error)
UpdateComponent implements PATCH …/components/{id}.
func (*API) UpdateEntitlement ¶
func (a *API) UpdateEntitlement( ctx context.Context, _ oas.UpdateEntitlementReq, params oas.UpdateEntitlementParams, ) (*oas.EntitlementDocument, error)
UpdateEntitlement implements PATCH /v1/accounts/{account}/entitlements/{entitlementId}.
func (*API) UpdateGroup ¶
func (a *API) UpdateGroup( ctx context.Context, _ oas.UpdateGroupReq, params oas.UpdateGroupParams, ) (*oas.GroupDocument, error)
UpdateGroup implements PATCH /v1/accounts/{account}/groups/{groupId}.
func (*API) UpdateKey ¶
func (a *API) UpdateKey( ctx context.Context, _ oas.UpdateKeyReq, params oas.UpdateKeyParams, ) (*oas.KeyDocument, error)
UpdateKey implements PATCH /v1/accounts/{account}/keys/{keyId}.
func (*API) UpdateLicense ¶
func (a *API) UpdateLicense( ctx context.Context, _ oas.UpdateLicenseReq, params oas.UpdateLicenseParams, ) (*oas.LicenseDocument, error)
UpdateLicense implements PATCH /v1/accounts/{account}/licenses/{licenseId}.
func (*API) UpdateLicenseGroup ¶
func (a *API) UpdateLicenseGroup( ctx context.Context, _ oas.UpdateLicenseGroupReq, params oas.UpdateLicenseGroupParams, ) (*oas.LicenseDocument, error)
UpdateLicenseGroup implements PATCH …/licenses/{licenseId}/group.
func (*API) UpdateLicenseOwner ¶
func (a *API) UpdateLicenseOwner( ctx context.Context, _ oas.UpdateLicenseOwnerReq, params oas.UpdateLicenseOwnerParams, ) (*oas.LicenseDocument, error)
UpdateLicenseOwner implements PATCH …/licenses/{licenseId}/owner.
func (*API) UpdateLicensePolicy ¶
func (a *API) UpdateLicensePolicy( ctx context.Context, _ oas.UpdateLicensePolicyReq, params oas.UpdateLicensePolicyParams, ) (*oas.LicenseDocument, error)
UpdateLicensePolicy implements PATCH …/licenses/{licenseId}/policy.
func (*API) UpdateLicenseUserAlias ¶
func (a *API) UpdateLicenseUserAlias( ctx context.Context, _ oas.UpdateLicenseUserAliasReq, params oas.UpdateLicenseUserAliasParams, ) (*oas.LicenseDocument, error)
UpdateLicenseUserAlias implements PATCH …/licenses/{licenseId}/user (the v1.5 alias).
func (*API) UpdateMachine ¶ added in v0.0.5
func (a *API) UpdateMachine( ctx context.Context, _ oas.UpdateMachineReq, params oas.UpdateMachineParams, ) (*oas.MachineDocument, error)
UpdateMachine implements PATCH …/machines/{id}.
func (*API) UpdateMachineGroup ¶ added in v0.0.5
func (a *API) UpdateMachineGroup( ctx context.Context, _ oas.UpdateMachineGroupReq, params oas.UpdateMachineGroupParams, ) (*oas.MachineDocument, error)
UpdateMachineGroup implements PATCH (and PUT) …/machines/{id}/group.
func (*API) UpdateMachineOwner ¶ added in v0.0.5
func (a *API) UpdateMachineOwner( ctx context.Context, _ oas.UpdateMachineOwnerReq, params oas.UpdateMachineOwnerParams, ) (*oas.MachineDocument, error)
UpdateMachineOwner implements PATCH (and PUT) …/machines/{id}/owner.
func (*API) UpdatePolicy ¶
func (a *API) UpdatePolicy( ctx context.Context, _ oas.UpdatePolicyReq, params oas.UpdatePolicyParams, ) (*oas.PolicyDocument, error)
UpdatePolicy implements PATCH /v1/accounts/{account}/policies/{policyId}.
func (*API) UpdateProcess ¶ added in v0.0.5
func (a *API) UpdateProcess( ctx context.Context, _ oas.UpdateProcessReq, params oas.UpdateProcessParams, ) (*oas.ProcessDocument, error)
UpdateProcess implements PATCH …/processes/{id}.
func (*API) UpdateProduct ¶
func (a *API) UpdateProduct( ctx context.Context, _ oas.UpdateProductReq, params oas.UpdateProductParams, ) (*oas.ProductDocument, error)
UpdateProduct implements PATCH /v1/accounts/{account}/products/{productId}.
func (*API) UpdateUser ¶
func (a *API) UpdateUser( ctx context.Context, _ oas.UpdateUserReq, params oas.UpdateUserParams, ) (*oas.UserDocument, error)
UpdateUser implements PATCH /v1/accounts/{account}/users/{userId}.
func (*API) UpdateUserGroup ¶
func (a *API) UpdateUserGroup( ctx context.Context, _ oas.UpdateUserGroupReq, params oas.UpdateUserGroupParams, ) (*oas.UserDocument, error)
UpdateUserGroup implements PUT /users/{userId}/group.
func (*API) UpdateUserPassword ¶
func (a *API) UpdateUserPassword( ctx context.Context, _ oas.UpdateUserPasswordReq, params oas.UpdateUserPasswordParams, ) (*oas.UserDocument, error)
UpdateUserPassword implements the update-password action.
func (*API) UpdateUserSecondFactor ¶
func (a *API) UpdateUserSecondFactor( ctx context.Context, _ oas.UpdateUserSecondFactorReq, params oas.UpdateUserSecondFactorParams, ) (*oas.SecondFactorDocument, error)
UpdateUserSecondFactor implements PATCH /users/{userId}/second-factors/{id}.
func (*API) UpdateWebhookEndpoint ¶
func (a *API) UpdateWebhookEndpoint( ctx context.Context, _ oas.UpdateWebhookEndpointReq, params oas.UpdateWebhookEndpointParams, ) (*oas.WebhookEndpointDocument, error)
UpdateWebhookEndpoint implements PATCH /v1/accounts/{account}/webhook-endpoints/{webhookEndpointId}.
func (*API) ValidateLicense ¶
func (a *API) ValidateLicense( ctx context.Context, _ oas.ValidateLicenseReq, params oas.ValidateLicenseParams, ) (*oas.LicenseValidateDocument, error)
ValidateLicense implements POST …/licenses/{licenseId}/actions/validate.
func (*API) ValidateLicenseKey ¶
func (a *API) ValidateLicenseKey( ctx context.Context, _ oas.ValidateLicenseKeyReq, _ oas.ValidateLicenseKeyParams, ) (*oas.LicenseValidateDocument, error)
ValidateLicenseKey implements POST /v1/accounts/{account}/licenses/actions/validate-key.
type Accounts ¶
type Accounts interface {
// Account loads the account by id.
Account(ctx context.Context, id uuid.UUID) (domain.Account, error)
}
Accounts is the consumer-side port of the account scenario.
type Deps ¶
type Deps struct {
SecondFactors secondfactors.Scenario
Passwords passwords.Scenario
Throttle Throttler
Accounts Accounts
Authn authn.Scenario
Users users.Scenario
Tokens tokens.Scenario
Groups groups.Scenario
Products products.Scenario
Policies policies.Scenario
Entitlements entitlements.Scenario
Keys keys.Scenario
Licenses licenses.Scenario
Machines machines.Scenario
Webhooks webhooks.Scenario
Search search.Scenario
Spec Spec
// Revision feeds the Keygen-Revision header (the build's commit).
Revision string
// DocsHost overrides the docs origin of error links; when empty it
// is derived from the request host (its last two labels).
DocsHost string
// TrustedProxies lists the proxy CIDRs whose X-Forwarded-For is
// honored when resolving the client IP (empty: RemoteAddr always).
TrustedProxies []string
Clock func() time.Time
// Log records the technical failures answered as 500.
Log *slog.Logger
}
Deps is everything the HTTP face is built from.
type MemoryThrottler ¶
type MemoryThrottler struct {
// contains filtered or unexported fields
}
func NewMemoryThrottler ¶
func NewMemoryThrottler(clock func() time.Time) *MemoryThrottler
NewMemoryThrottler builds the in-memory counter over the given clock (windows are aligned to it, like Rack::Attack periods).
type Spec ¶
Spec identifies the configured account: both its id and its slug address it on the wire.
type Throttler ¶
type Throttler interface {
// Inc increments the key's counter and answers the new count (an
// error fails open: the request is allowed through).
Inc(ctx context.Context, key string, window time.Duration) (int64, error)
}
Throttler counts attempts per key inside a fixed window, mirroring the reference's Rack::Attack counters (the password limiter: 5 per minute per account segment, IP and email hash).
type ValkeyThrottler ¶
type ValkeyThrottler struct {
// contains filtered or unexported fields
}
ValkeyThrottler counts through the cache's raw client (INCR with a window expiry), sharing the counter across replicas.
func NewValkeyThrottler ¶
func NewValkeyThrottler(client valkey.Client) *ValkeyThrottler
NewValkeyThrottler builds the shared counter.
Source Files
¶
- body.go
- catalog.go
- components.go
- console.go
- entitlements.go
- errors.go
- groups.go
- httpapi.go
- ids.go
- keys.go
- licenses.go
- licenses_body.go
- licenses_filters.go
- lists.go
- machine_usage.go
- machines.go
- metadata.go
- pipeline.go
- policies.go
- policies_body.go
- products.go
- search.go
- secondfactors.go
- throttle.go
- tokens.go
- users.go
- users_body.go
- webhooks.go