Documentation
¶
Overview ¶
Package auth provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.2 DO NOT EDIT.
Index ¶
- func NewAdminCreateUserRequest(server string, body AdminCreateUserJSONRequestBody) (*http.Request, error)
- func NewAdminCreateUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewAdminEndSessionRequest(server string, user string, session string, params *AdminEndSessionParams) (*http.Request, error)
- func NewAdminEndSessionsRequest(server string, user string, params *AdminEndSessionsParams) (*http.Request, error)
- func NewAdminGetUserRequest(server string, user string) (*http.Request, error)
- func NewAdminImportUsersRequest(server string, body AdminImportUsersJSONRequestBody) (*http.Request, error)
- func NewAdminImportUsersRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewAdminListSessionsRequest(server string, user string) (*http.Request, error)
- func NewAdminSearchUsersRequest(server string, body AdminSearchUsersJSONRequestBody) (*http.Request, error)
- func NewAdminSearchUsersRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewAdminSupportCodeRequest(server string, user string, body AdminSupportCodeJSONRequestBody) (*http.Request, error)
- func NewAdminSupportCodeRequestWithBody(server string, user string, contentType string, body io.Reader) (*http.Request, error)
- func NewAdminUpdateUserRequest(server string, user string, body AdminUpdateUserJSONRequestBody) (*http.Request, error)
- func NewAdminUpdateUserRequestWithBody(server string, user string, contentType string, body io.Reader) (*http.Request, error)
- func NewCompletePasswordResetRequest(server string, params *CompletePasswordResetParams, ...) (*http.Request, error)
- func NewCompletePasswordResetRequestWithBody(server string, params *CompletePasswordResetParams, contentType string, ...) (*http.Request, error)
- func NewRefreshRequest(server string, params *RefreshParams, body RefreshJSONRequestBody) (*http.Request, error)
- func NewRefreshRequestWithBody(server string, params *RefreshParams, contentType string, body io.Reader) (*http.Request, error)
- func NewRequestPasswordResetRequest(server string, params *RequestPasswordResetParams, ...) (*http.Request, error)
- func NewRequestPasswordResetRequestWithBody(server string, params *RequestPasswordResetParams, contentType string, ...) (*http.Request, error)
- func NewRevokeRequest(server string, params *RevokeParams, body RevokeJSONRequestBody) (*http.Request, error)
- func NewRevokeRequestWithBody(server string, params *RevokeParams, contentType string, body io.Reader) (*http.Request, error)
- func NewSendCodeRequest(server string, params *SendCodeParams, body SendCodeJSONRequestBody) (*http.Request, error)
- func NewSendCodeRequestWithBody(server string, params *SendCodeParams, contentType string, body io.Reader) (*http.Request, error)
- func NewSignInRequest(server string, params *SignInParams, body SignInJSONRequestBody) (*http.Request, error)
- func NewSignInRequestWithBody(server string, params *SignInParams, contentType string, body io.Reader) (*http.Request, error)
- func NewSignUpRequest(server string, params *SignUpParams, body SignUpJSONRequestBody) (*http.Request, error)
- func NewSignUpRequestWithBody(server string, params *SignUpParams, contentType string, body io.Reader) (*http.Request, error)
- func NewVerifyEmailRequest(server string, params *VerifyEmailParams, body VerifyEmailJSONRequestBody) (*http.Request, error)
- func NewVerifyEmailRequestWithBody(server string, params *VerifyEmailParams, contentType string, body io.Reader) (*http.Request, error)
- type Actor
- type AdminCreateUserJSONRequestBody
- type AdminCreateUserResponse
- func (r AdminCreateUserResponse) ContentType() string
- func (r AdminCreateUserResponse) GetBody() []byte
- func (r AdminCreateUserResponse) GetJSON201() ...
- func (r AdminCreateUserResponse) GetJSONDefault() *Failure
- func (r AdminCreateUserResponse) Status() string
- func (r AdminCreateUserResponse) StatusCode() int
- type AdminEndSessionParams
- type AdminEndSessionResponse
- func (r AdminEndSessionResponse) ContentType() string
- func (r AdminEndSessionResponse) GetBody() []byte
- func (r AdminEndSessionResponse) GetJSON200() *Done
- func (r AdminEndSessionResponse) GetJSONDefault() *Failure
- func (r AdminEndSessionResponse) Status() string
- func (r AdminEndSessionResponse) StatusCode() int
- type AdminEndSessionsParams
- type AdminEndSessionsResponse
- func (r AdminEndSessionsResponse) ContentType() string
- func (r AdminEndSessionsResponse) GetBody() []byte
- func (r AdminEndSessionsResponse) GetJSON200() *Done
- func (r AdminEndSessionsResponse) GetJSONDefault() *Failure
- func (r AdminEndSessionsResponse) Status() string
- func (r AdminEndSessionsResponse) StatusCode() int
- type AdminGetUserResponse
- type AdminImportUsersJSONRequestBody
- type AdminImportUsersResponse
- func (r AdminImportUsersResponse) ContentType() string
- func (r AdminImportUsersResponse) GetBody() []byte
- func (r AdminImportUsersResponse) GetJSON200() ...
- func (r AdminImportUsersResponse) GetJSONDefault() *Failure
- func (r AdminImportUsersResponse) Status() string
- func (r AdminImportUsersResponse) StatusCode() int
- type AdminListSessionsResponse
- func (r AdminListSessionsResponse) ContentType() string
- func (r AdminListSessionsResponse) GetBody() []byte
- func (r AdminListSessionsResponse) GetJSON200() ...
- func (r AdminListSessionsResponse) GetJSONDefault() *Failure
- func (r AdminListSessionsResponse) Status() string
- func (r AdminListSessionsResponse) StatusCode() int
- type AdminSearchUsersJSONRequestBody
- type AdminSearchUsersResponse
- func (r AdminSearchUsersResponse) ContentType() string
- func (r AdminSearchUsersResponse) GetBody() []byte
- func (r AdminSearchUsersResponse) GetJSON200() ...
- func (r AdminSearchUsersResponse) GetJSONDefault() *Failure
- func (r AdminSearchUsersResponse) Status() string
- func (r AdminSearchUsersResponse) StatusCode() int
- type AdminSupportCodeJSONRequestBody
- type AdminSupportCodeResponse
- func (r AdminSupportCodeResponse) ContentType() string
- func (r AdminSupportCodeResponse) GetBody() []byte
- func (r AdminSupportCodeResponse) GetJSON200() ...
- func (r AdminSupportCodeResponse) GetJSONDefault() *Failure
- func (r AdminSupportCodeResponse) Status() string
- func (r AdminSupportCodeResponse) StatusCode() int
- type AdminUpdateUserJSONRequestBody
- type AdminUpdateUserResponse
- func (r AdminUpdateUserResponse) ContentType() string
- func (r AdminUpdateUserResponse) GetBody() []byte
- func (r AdminUpdateUserResponse) GetJSON200() ...
- func (r AdminUpdateUserResponse) GetJSONDefault() *Failure
- func (r AdminUpdateUserResponse) Status() string
- func (r AdminUpdateUserResponse) StatusCode() int
- type Client
- func (c *Client) AdminCreateUser(ctx context.Context, body AdminCreateUserJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) AdminCreateUserWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) AdminEndSession(ctx context.Context, user string, session string, ...) (*http.Response, error)
- func (c *Client) AdminEndSessions(ctx context.Context, user string, params *AdminEndSessionsParams, ...) (*http.Response, error)
- func (c *Client) AdminGetUser(ctx context.Context, user string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) AdminImportUsers(ctx context.Context, body AdminImportUsersJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) AdminImportUsersWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) AdminListSessions(ctx context.Context, user string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) AdminSearchUsers(ctx context.Context, body AdminSearchUsersJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) AdminSearchUsersWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) AdminSupportCode(ctx context.Context, user string, body AdminSupportCodeJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) AdminSupportCodeWithBody(ctx context.Context, user string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) AdminUpdateUser(ctx context.Context, user string, body AdminUpdateUserJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) AdminUpdateUserWithBody(ctx context.Context, user string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CompletePasswordReset(ctx context.Context, params *CompletePasswordResetParams, ...) (*http.Response, error)
- func (c *Client) CompletePasswordResetWithBody(ctx context.Context, params *CompletePasswordResetParams, contentType string, ...) (*http.Response, error)
- func (c *Client) Refresh(ctx context.Context, params *RefreshParams, body RefreshJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) RefreshWithBody(ctx context.Context, params *RefreshParams, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) RequestPasswordReset(ctx context.Context, params *RequestPasswordResetParams, ...) (*http.Response, error)
- func (c *Client) RequestPasswordResetWithBody(ctx context.Context, params *RequestPasswordResetParams, contentType string, ...) (*http.Response, error)
- func (c *Client) Revoke(ctx context.Context, params *RevokeParams, body RevokeJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) RevokeWithBody(ctx context.Context, params *RevokeParams, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) SendCode(ctx context.Context, params *SendCodeParams, body SendCodeJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) SendCodeWithBody(ctx context.Context, params *SendCodeParams, contentType string, ...) (*http.Response, error)
- func (c *Client) SignIn(ctx context.Context, params *SignInParams, body SignInJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) SignInWithBody(ctx context.Context, params *SignInParams, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) SignUp(ctx context.Context, params *SignUpParams, body SignUpJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) SignUpWithBody(ctx context.Context, params *SignUpParams, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) VerifyEmail(ctx context.Context, params *VerifyEmailParams, ...) (*http.Response, error)
- func (c *Client) VerifyEmailWithBody(ctx context.Context, params *VerifyEmailParams, contentType string, ...) (*http.Response, error)
- type ClientAddress
- type ClientAgent
- type ClientCity
- type ClientCountry
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) AdminCreateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*AdminCreateUserResponse, error)
- func (c *ClientWithResponses) AdminCreateUserWithResponse(ctx context.Context, body AdminCreateUserJSONRequestBody, ...) (*AdminCreateUserResponse, error)
- func (c *ClientWithResponses) AdminEndSessionWithResponse(ctx context.Context, user string, session string, ...) (*AdminEndSessionResponse, error)
- func (c *ClientWithResponses) AdminEndSessionsWithResponse(ctx context.Context, user string, params *AdminEndSessionsParams, ...) (*AdminEndSessionsResponse, error)
- func (c *ClientWithResponses) AdminGetUserWithResponse(ctx context.Context, user string, reqEditors ...RequestEditorFn) (*AdminGetUserResponse, error)
- func (c *ClientWithResponses) AdminImportUsersWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*AdminImportUsersResponse, error)
- func (c *ClientWithResponses) AdminImportUsersWithResponse(ctx context.Context, body AdminImportUsersJSONRequestBody, ...) (*AdminImportUsersResponse, error)
- func (c *ClientWithResponses) AdminListSessionsWithResponse(ctx context.Context, user string, reqEditors ...RequestEditorFn) (*AdminListSessionsResponse, error)
- func (c *ClientWithResponses) AdminSearchUsersWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*AdminSearchUsersResponse, error)
- func (c *ClientWithResponses) AdminSearchUsersWithResponse(ctx context.Context, body AdminSearchUsersJSONRequestBody, ...) (*AdminSearchUsersResponse, error)
- func (c *ClientWithResponses) AdminSupportCodeWithBodyWithResponse(ctx context.Context, user string, contentType string, body io.Reader, ...) (*AdminSupportCodeResponse, error)
- func (c *ClientWithResponses) AdminSupportCodeWithResponse(ctx context.Context, user string, body AdminSupportCodeJSONRequestBody, ...) (*AdminSupportCodeResponse, error)
- func (c *ClientWithResponses) AdminUpdateUserWithBodyWithResponse(ctx context.Context, user string, contentType string, body io.Reader, ...) (*AdminUpdateUserResponse, error)
- func (c *ClientWithResponses) AdminUpdateUserWithResponse(ctx context.Context, user string, body AdminUpdateUserJSONRequestBody, ...) (*AdminUpdateUserResponse, error)
- func (c *ClientWithResponses) CompletePasswordResetWithBodyWithResponse(ctx context.Context, params *CompletePasswordResetParams, contentType string, ...) (*CompletePasswordResetResponse, error)
- func (c *ClientWithResponses) CompletePasswordResetWithResponse(ctx context.Context, params *CompletePasswordResetParams, ...) (*CompletePasswordResetResponse, error)
- func (c *ClientWithResponses) RefreshWithBodyWithResponse(ctx context.Context, params *RefreshParams, contentType string, body io.Reader, ...) (*RefreshResponse, error)
- func (c *ClientWithResponses) RefreshWithResponse(ctx context.Context, params *RefreshParams, body RefreshJSONRequestBody, ...) (*RefreshResponse, error)
- func (c *ClientWithResponses) RequestPasswordResetWithBodyWithResponse(ctx context.Context, params *RequestPasswordResetParams, contentType string, ...) (*RequestPasswordResetResponse, error)
- func (c *ClientWithResponses) RequestPasswordResetWithResponse(ctx context.Context, params *RequestPasswordResetParams, ...) (*RequestPasswordResetResponse, error)
- func (c *ClientWithResponses) RevokeWithBodyWithResponse(ctx context.Context, params *RevokeParams, contentType string, body io.Reader, ...) (*RevokeResponse, error)
- func (c *ClientWithResponses) RevokeWithResponse(ctx context.Context, params *RevokeParams, body RevokeJSONRequestBody, ...) (*RevokeResponse, error)
- func (c *ClientWithResponses) SendCodeWithBodyWithResponse(ctx context.Context, params *SendCodeParams, contentType string, ...) (*SendCodeResponse, error)
- func (c *ClientWithResponses) SendCodeWithResponse(ctx context.Context, params *SendCodeParams, body SendCodeJSONRequestBody, ...) (*SendCodeResponse, error)
- func (c *ClientWithResponses) SignInWithBodyWithResponse(ctx context.Context, params *SignInParams, contentType string, body io.Reader, ...) (*SignInResponse, error)
- func (c *ClientWithResponses) SignInWithResponse(ctx context.Context, params *SignInParams, body SignInJSONRequestBody, ...) (*SignInResponse, error)
- func (c *ClientWithResponses) SignUpWithBodyWithResponse(ctx context.Context, params *SignUpParams, contentType string, body io.Reader, ...) (*SignUpResponse, error)
- func (c *ClientWithResponses) SignUpWithResponse(ctx context.Context, params *SignUpParams, body SignUpJSONRequestBody, ...) (*SignUpResponse, error)
- func (c *ClientWithResponses) VerifyEmailWithBodyWithResponse(ctx context.Context, params *VerifyEmailParams, contentType string, ...) (*VerifyEmailResponse, error)
- func (c *ClientWithResponses) VerifyEmailWithResponse(ctx context.Context, params *VerifyEmailParams, ...) (*VerifyEmailResponse, error)
- type ClientWithResponsesInterface
- type CodeRequest
- type CompletePasswordResetJSONRequestBody
- type CompletePasswordResetParams
- type CompletePasswordResetResponse
- func (r CompletePasswordResetResponse) ContentType() string
- func (r CompletePasswordResetResponse) GetBody() []byte
- func (r CompletePasswordResetResponse) GetJSON200() *Done
- func (r CompletePasswordResetResponse) GetJSONDefault() *Failure
- func (r CompletePasswordResetResponse) Status() string
- func (r CompletePasswordResetResponse) StatusCode() int
- type DeviceSession
- type Done
- type EmailVerification
- type Envelope
- type Failure
- type HttpRequestDoer
- type Import
- type ImportResult
- type ImportedUser
- type ImportedUserPasswordHashAlgorithm
- type Message
- type NewUser
- type RefreshJSONRequestBody
- type RefreshParams
- type RefreshRequest
- type RefreshResponse
- type RequestEditorFn
- type RequestPasswordResetJSONRequestBody
- type RequestPasswordResetParams
- type RequestPasswordResetResponse
- func (r RequestPasswordResetResponse) ContentType() string
- func (r RequestPasswordResetResponse) GetBody() []byte
- func (r RequestPasswordResetResponse) GetJSON202() *Done
- func (r RequestPasswordResetResponse) GetJSONDefault() *Failure
- func (r RequestPasswordResetResponse) Status() string
- func (r RequestPasswordResetResponse) StatusCode() int
- type ResetCompletion
- type ResetRequest
- type RevokeJSONRequestBody
- type RevokeParams
- type RevokeResponse
- type SendCodeJSONRequestBody
- type SendCodeParams
- type SendCodeResponse
- type SignIn
- type SignInJSONRequestBody
- type SignInParams
- type SignInResponse
- type SignUp
- type SignUpJSONRequestBody
- type SignUpParams
- type SignUpResponse
- type SupportCode
- type Tokens
- type TokensTokenType
- type User
- type UserChange
- type UserSearch
- type VerifyEmailJSONRequestBody
- type VerifyEmailParams
- type VerifyEmailResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAdminCreateUserRequest ¶
func NewAdminCreateUserRequest(server string, body AdminCreateUserJSONRequestBody) (*http.Request, error)
NewAdminCreateUserRequest calls the generic AdminCreateUser builder with application/json body
func NewAdminCreateUserRequestWithBody ¶
func NewAdminCreateUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewAdminCreateUserRequestWithBody constructs an http.Request for the AdminCreateUser method, with any body, and a specified content type
func NewAdminEndSessionRequest ¶
func NewAdminEndSessionRequest(server string, user string, session string, params *AdminEndSessionParams) (*http.Request, error)
NewAdminEndSessionRequest constructs an http.Request for the AdminEndSession method
func NewAdminEndSessionsRequest ¶
func NewAdminEndSessionsRequest(server string, user string, params *AdminEndSessionsParams) (*http.Request, error)
NewAdminEndSessionsRequest constructs an http.Request for the AdminEndSessions method
func NewAdminGetUserRequest ¶
NewAdminGetUserRequest constructs an http.Request for the AdminGetUser method
func NewAdminImportUsersRequest ¶
func NewAdminImportUsersRequest(server string, body AdminImportUsersJSONRequestBody) (*http.Request, error)
NewAdminImportUsersRequest calls the generic AdminImportUsers builder with application/json body
func NewAdminImportUsersRequestWithBody ¶
func NewAdminImportUsersRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewAdminImportUsersRequestWithBody constructs an http.Request for the AdminImportUsers method, with any body, and a specified content type
func NewAdminListSessionsRequest ¶
NewAdminListSessionsRequest constructs an http.Request for the AdminListSessions method
func NewAdminSearchUsersRequest ¶
func NewAdminSearchUsersRequest(server string, body AdminSearchUsersJSONRequestBody) (*http.Request, error)
NewAdminSearchUsersRequest calls the generic AdminSearchUsers builder with application/json body
func NewAdminSearchUsersRequestWithBody ¶
func NewAdminSearchUsersRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewAdminSearchUsersRequestWithBody constructs an http.Request for the AdminSearchUsers method, with any body, and a specified content type
func NewAdminSupportCodeRequest ¶
func NewAdminSupportCodeRequest(server string, user string, body AdminSupportCodeJSONRequestBody) (*http.Request, error)
NewAdminSupportCodeRequest calls the generic AdminSupportCode builder with application/json body
func NewAdminSupportCodeRequestWithBody ¶
func NewAdminSupportCodeRequestWithBody(server string, user string, contentType string, body io.Reader) (*http.Request, error)
NewAdminSupportCodeRequestWithBody constructs an http.Request for the AdminSupportCode method, with any body, and a specified content type
func NewAdminUpdateUserRequest ¶
func NewAdminUpdateUserRequest(server string, user string, body AdminUpdateUserJSONRequestBody) (*http.Request, error)
NewAdminUpdateUserRequest calls the generic AdminUpdateUser builder with application/json body
func NewAdminUpdateUserRequestWithBody ¶
func NewAdminUpdateUserRequestWithBody(server string, user string, contentType string, body io.Reader) (*http.Request, error)
NewAdminUpdateUserRequestWithBody constructs an http.Request for the AdminUpdateUser method, with any body, and a specified content type
func NewCompletePasswordResetRequest ¶
func NewCompletePasswordResetRequest(server string, params *CompletePasswordResetParams, body CompletePasswordResetJSONRequestBody) (*http.Request, error)
NewCompletePasswordResetRequest calls the generic CompletePasswordReset builder with application/json body
func NewCompletePasswordResetRequestWithBody ¶
func NewCompletePasswordResetRequestWithBody(server string, params *CompletePasswordResetParams, contentType string, body io.Reader) (*http.Request, error)
NewCompletePasswordResetRequestWithBody constructs an http.Request for the CompletePasswordReset method, with any body, and a specified content type
func NewRefreshRequest ¶
func NewRefreshRequest(server string, params *RefreshParams, body RefreshJSONRequestBody) (*http.Request, error)
NewRefreshRequest calls the generic Refresh builder with application/json body
func NewRefreshRequestWithBody ¶
func NewRefreshRequestWithBody(server string, params *RefreshParams, contentType string, body io.Reader) (*http.Request, error)
NewRefreshRequestWithBody constructs an http.Request for the Refresh method, with any body, and a specified content type
func NewRequestPasswordResetRequest ¶
func NewRequestPasswordResetRequest(server string, params *RequestPasswordResetParams, body RequestPasswordResetJSONRequestBody) (*http.Request, error)
NewRequestPasswordResetRequest calls the generic RequestPasswordReset builder with application/json body
func NewRequestPasswordResetRequestWithBody ¶
func NewRequestPasswordResetRequestWithBody(server string, params *RequestPasswordResetParams, contentType string, body io.Reader) (*http.Request, error)
NewRequestPasswordResetRequestWithBody constructs an http.Request for the RequestPasswordReset method, with any body, and a specified content type
func NewRevokeRequest ¶
func NewRevokeRequest(server string, params *RevokeParams, body RevokeJSONRequestBody) (*http.Request, error)
NewRevokeRequest calls the generic Revoke builder with application/json body
func NewRevokeRequestWithBody ¶
func NewRevokeRequestWithBody(server string, params *RevokeParams, contentType string, body io.Reader) (*http.Request, error)
NewRevokeRequestWithBody constructs an http.Request for the Revoke method, with any body, and a specified content type
func NewSendCodeRequest ¶
func NewSendCodeRequest(server string, params *SendCodeParams, body SendCodeJSONRequestBody) (*http.Request, error)
NewSendCodeRequest calls the generic SendCode builder with application/json body
func NewSendCodeRequestWithBody ¶
func NewSendCodeRequestWithBody(server string, params *SendCodeParams, contentType string, body io.Reader) (*http.Request, error)
NewSendCodeRequestWithBody constructs an http.Request for the SendCode method, with any body, and a specified content type
func NewSignInRequest ¶
func NewSignInRequest(server string, params *SignInParams, body SignInJSONRequestBody) (*http.Request, error)
NewSignInRequest calls the generic SignIn builder with application/json body
func NewSignInRequestWithBody ¶
func NewSignInRequestWithBody(server string, params *SignInParams, contentType string, body io.Reader) (*http.Request, error)
NewSignInRequestWithBody constructs an http.Request for the SignIn method, with any body, and a specified content type
func NewSignUpRequest ¶
func NewSignUpRequest(server string, params *SignUpParams, body SignUpJSONRequestBody) (*http.Request, error)
NewSignUpRequest calls the generic SignUp builder with application/json body
func NewSignUpRequestWithBody ¶
func NewSignUpRequestWithBody(server string, params *SignUpParams, contentType string, body io.Reader) (*http.Request, error)
NewSignUpRequestWithBody constructs an http.Request for the SignUp method, with any body, and a specified content type
func NewVerifyEmailRequest ¶
func NewVerifyEmailRequest(server string, params *VerifyEmailParams, body VerifyEmailJSONRequestBody) (*http.Request, error)
NewVerifyEmailRequest calls the generic VerifyEmail builder with application/json body
func NewVerifyEmailRequestWithBody ¶
func NewVerifyEmailRequestWithBody(server string, params *VerifyEmailParams, contentType string, body io.Reader) (*http.Request, error)
NewVerifyEmailRequestWithBody constructs an http.Request for the VerifyEmail method, with any body, and a specified content type
Types ¶
type Actor ¶
type Actor struct {
// Actor Who this is for, for the event log.
Actor *string `json:"actor,omitempty"`
}
Actor defines model for Actor.
type AdminCreateUserJSONRequestBody ¶
type AdminCreateUserJSONRequestBody = NewUser
AdminCreateUserJSONRequestBody defines body for AdminCreateUser for application/json ContentType.
type AdminCreateUserResponse ¶
type AdminCreateUserResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON201 the response for an HTTP 201 `application/json` response
JSON201 *struct {
Errors []Message `json:"errors"`
Messages []Message `json:"messages"`
Result User `json:"result"`
Success bool `json:"success"`
}
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Failure
}
func ParseAdminCreateUserResponse ¶
func ParseAdminCreateUserResponse(rsp *http.Response) (*AdminCreateUserResponse, error)
ParseAdminCreateUserResponse parses an HTTP response from a AdminCreateUserWithResponse call
func (AdminCreateUserResponse) ContentType ¶
func (r AdminCreateUserResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (AdminCreateUserResponse) GetBody ¶
func (r AdminCreateUserResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (AdminCreateUserResponse) GetJSON201 ¶
func (r AdminCreateUserResponse) GetJSON201() *struct { Errors []Message `json:"errors"` Messages []Message `json:"messages"` Result User `json:"result"` Success bool `json:"success"` }
GetJSON201 returns the response for an HTTP 201 `application/json` response
func (AdminCreateUserResponse) GetJSONDefault ¶
func (r AdminCreateUserResponse) GetJSONDefault() *Failure
GetJSONDefault returns the response for an HTTP default `application/json` response
func (AdminCreateUserResponse) Status ¶
func (r AdminCreateUserResponse) Status() string
Status returns HTTPResponse.Status
func (AdminCreateUserResponse) StatusCode ¶
func (r AdminCreateUserResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type AdminEndSessionParams ¶
type AdminEndSessionParams struct {
// Actor Who this is for, for the event log.
Actor *string `form:"actor,omitempty" json:"actor,omitempty"`
}
AdminEndSessionParams defines parameters for AdminEndSession.
type AdminEndSessionResponse ¶
type AdminEndSessionResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Done
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Failure
}
func ParseAdminEndSessionResponse ¶
func ParseAdminEndSessionResponse(rsp *http.Response) (*AdminEndSessionResponse, error)
ParseAdminEndSessionResponse parses an HTTP response from a AdminEndSessionWithResponse call
func (AdminEndSessionResponse) ContentType ¶
func (r AdminEndSessionResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (AdminEndSessionResponse) GetBody ¶
func (r AdminEndSessionResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (AdminEndSessionResponse) GetJSON200 ¶
func (r AdminEndSessionResponse) GetJSON200() *Done
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (AdminEndSessionResponse) GetJSONDefault ¶
func (r AdminEndSessionResponse) GetJSONDefault() *Failure
GetJSONDefault returns the response for an HTTP default `application/json` response
func (AdminEndSessionResponse) Status ¶
func (r AdminEndSessionResponse) Status() string
Status returns HTTPResponse.Status
func (AdminEndSessionResponse) StatusCode ¶
func (r AdminEndSessionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type AdminEndSessionsParams ¶
type AdminEndSessionsParams struct {
// Except The sid of the session to keep.
Except *string `form:"except,omitempty" json:"except,omitempty"`
// Actor Who this is for, for the event log.
Actor *string `form:"actor,omitempty" json:"actor,omitempty"`
}
AdminEndSessionsParams defines parameters for AdminEndSessions.
type AdminEndSessionsResponse ¶
type AdminEndSessionsResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Done
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Failure
}
func ParseAdminEndSessionsResponse ¶
func ParseAdminEndSessionsResponse(rsp *http.Response) (*AdminEndSessionsResponse, error)
ParseAdminEndSessionsResponse parses an HTTP response from a AdminEndSessionsWithResponse call
func (AdminEndSessionsResponse) ContentType ¶
func (r AdminEndSessionsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (AdminEndSessionsResponse) GetBody ¶
func (r AdminEndSessionsResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (AdminEndSessionsResponse) GetJSON200 ¶
func (r AdminEndSessionsResponse) GetJSON200() *Done
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (AdminEndSessionsResponse) GetJSONDefault ¶
func (r AdminEndSessionsResponse) GetJSONDefault() *Failure
GetJSONDefault returns the response for an HTTP default `application/json` response
func (AdminEndSessionsResponse) Status ¶
func (r AdminEndSessionsResponse) Status() string
Status returns HTTPResponse.Status
func (AdminEndSessionsResponse) StatusCode ¶
func (r AdminEndSessionsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type AdminGetUserResponse ¶
type AdminGetUserResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *struct {
Errors []Message `json:"errors"`
Messages []Message `json:"messages"`
Result User `json:"result"`
Success bool `json:"success"`
}
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Failure
}
func ParseAdminGetUserResponse ¶
func ParseAdminGetUserResponse(rsp *http.Response) (*AdminGetUserResponse, error)
ParseAdminGetUserResponse parses an HTTP response from a AdminGetUserWithResponse call
func (AdminGetUserResponse) ContentType ¶
func (r AdminGetUserResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (AdminGetUserResponse) GetBody ¶
func (r AdminGetUserResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (AdminGetUserResponse) GetJSON200 ¶
func (r AdminGetUserResponse) GetJSON200() *struct { Errors []Message `json:"errors"` Messages []Message `json:"messages"` Result User `json:"result"` Success bool `json:"success"` }
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (AdminGetUserResponse) GetJSONDefault ¶
func (r AdminGetUserResponse) GetJSONDefault() *Failure
GetJSONDefault returns the response for an HTTP default `application/json` response
func (AdminGetUserResponse) Status ¶
func (r AdminGetUserResponse) Status() string
Status returns HTTPResponse.Status
func (AdminGetUserResponse) StatusCode ¶
func (r AdminGetUserResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type AdminImportUsersJSONRequestBody ¶
type AdminImportUsersJSONRequestBody = Import
AdminImportUsersJSONRequestBody defines body for AdminImportUsers for application/json ContentType.
type AdminImportUsersResponse ¶
type AdminImportUsersResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *struct {
Errors []Message `json:"errors"`
Messages []Message `json:"messages"`
Result ImportResult `json:"result"`
Success bool `json:"success"`
}
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Failure
}
func ParseAdminImportUsersResponse ¶
func ParseAdminImportUsersResponse(rsp *http.Response) (*AdminImportUsersResponse, error)
ParseAdminImportUsersResponse parses an HTTP response from a AdminImportUsersWithResponse call
func (AdminImportUsersResponse) ContentType ¶
func (r AdminImportUsersResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (AdminImportUsersResponse) GetBody ¶
func (r AdminImportUsersResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (AdminImportUsersResponse) GetJSON200 ¶
func (r AdminImportUsersResponse) GetJSON200() *struct { Errors []Message `json:"errors"` Messages []Message `json:"messages"` Result ImportResult `json:"result"` Success bool `json:"success"` }
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (AdminImportUsersResponse) GetJSONDefault ¶
func (r AdminImportUsersResponse) GetJSONDefault() *Failure
GetJSONDefault returns the response for an HTTP default `application/json` response
func (AdminImportUsersResponse) Status ¶
func (r AdminImportUsersResponse) Status() string
Status returns HTTPResponse.Status
func (AdminImportUsersResponse) StatusCode ¶
func (r AdminImportUsersResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type AdminListSessionsResponse ¶
type AdminListSessionsResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *struct {
Errors []Message `json:"errors"`
Messages []Message `json:"messages"`
Result []DeviceSession `json:"result"`
Success bool `json:"success"`
}
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Failure
}
func ParseAdminListSessionsResponse ¶
func ParseAdminListSessionsResponse(rsp *http.Response) (*AdminListSessionsResponse, error)
ParseAdminListSessionsResponse parses an HTTP response from a AdminListSessionsWithResponse call
func (AdminListSessionsResponse) ContentType ¶
func (r AdminListSessionsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (AdminListSessionsResponse) GetBody ¶
func (r AdminListSessionsResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (AdminListSessionsResponse) GetJSON200 ¶
func (r AdminListSessionsResponse) GetJSON200() *struct { Errors []Message `json:"errors"` Messages []Message `json:"messages"` Result []DeviceSession `json:"result"` Success bool `json:"success"` }
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (AdminListSessionsResponse) GetJSONDefault ¶
func (r AdminListSessionsResponse) GetJSONDefault() *Failure
GetJSONDefault returns the response for an HTTP default `application/json` response
func (AdminListSessionsResponse) Status ¶
func (r AdminListSessionsResponse) Status() string
Status returns HTTPResponse.Status
func (AdminListSessionsResponse) StatusCode ¶
func (r AdminListSessionsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type AdminSearchUsersJSONRequestBody ¶
type AdminSearchUsersJSONRequestBody = UserSearch
AdminSearchUsersJSONRequestBody defines body for AdminSearchUsers for application/json ContentType.
type AdminSearchUsersResponse ¶
type AdminSearchUsersResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *struct {
Errors []Message `json:"errors"`
Messages []Message `json:"messages"`
Result *User `json:"result"`
Success bool `json:"success"`
}
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Failure
}
func ParseAdminSearchUsersResponse ¶
func ParseAdminSearchUsersResponse(rsp *http.Response) (*AdminSearchUsersResponse, error)
ParseAdminSearchUsersResponse parses an HTTP response from a AdminSearchUsersWithResponse call
func (AdminSearchUsersResponse) ContentType ¶
func (r AdminSearchUsersResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (AdminSearchUsersResponse) GetBody ¶
func (r AdminSearchUsersResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (AdminSearchUsersResponse) GetJSON200 ¶
func (r AdminSearchUsersResponse) GetJSON200() *struct { Errors []Message `json:"errors"` Messages []Message `json:"messages"` Result *User `json:"result"` Success bool `json:"success"` }
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (AdminSearchUsersResponse) GetJSONDefault ¶
func (r AdminSearchUsersResponse) GetJSONDefault() *Failure
GetJSONDefault returns the response for an HTTP default `application/json` response
func (AdminSearchUsersResponse) Status ¶
func (r AdminSearchUsersResponse) Status() string
Status returns HTTPResponse.Status
func (AdminSearchUsersResponse) StatusCode ¶
func (r AdminSearchUsersResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type AdminSupportCodeJSONRequestBody ¶
type AdminSupportCodeJSONRequestBody = Actor
AdminSupportCodeJSONRequestBody defines body for AdminSupportCode for application/json ContentType.
type AdminSupportCodeResponse ¶
type AdminSupportCodeResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *struct {
Errors []Message `json:"errors"`
Messages []Message `json:"messages"`
Result SupportCode `json:"result"`
Success bool `json:"success"`
}
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Failure
}
func ParseAdminSupportCodeResponse ¶
func ParseAdminSupportCodeResponse(rsp *http.Response) (*AdminSupportCodeResponse, error)
ParseAdminSupportCodeResponse parses an HTTP response from a AdminSupportCodeWithResponse call
func (AdminSupportCodeResponse) ContentType ¶
func (r AdminSupportCodeResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (AdminSupportCodeResponse) GetBody ¶
func (r AdminSupportCodeResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (AdminSupportCodeResponse) GetJSON200 ¶
func (r AdminSupportCodeResponse) GetJSON200() *struct { Errors []Message `json:"errors"` Messages []Message `json:"messages"` Result SupportCode `json:"result"` Success bool `json:"success"` }
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (AdminSupportCodeResponse) GetJSONDefault ¶
func (r AdminSupportCodeResponse) GetJSONDefault() *Failure
GetJSONDefault returns the response for an HTTP default `application/json` response
func (AdminSupportCodeResponse) Status ¶
func (r AdminSupportCodeResponse) Status() string
Status returns HTTPResponse.Status
func (AdminSupportCodeResponse) StatusCode ¶
func (r AdminSupportCodeResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type AdminUpdateUserJSONRequestBody ¶
type AdminUpdateUserJSONRequestBody = UserChange
AdminUpdateUserJSONRequestBody defines body for AdminUpdateUser for application/json ContentType.
type AdminUpdateUserResponse ¶
type AdminUpdateUserResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *struct {
Errors []Message `json:"errors"`
Messages []Message `json:"messages"`
Result User `json:"result"`
Success bool `json:"success"`
}
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Failure
}
func ParseAdminUpdateUserResponse ¶
func ParseAdminUpdateUserResponse(rsp *http.Response) (*AdminUpdateUserResponse, error)
ParseAdminUpdateUserResponse parses an HTTP response from a AdminUpdateUserWithResponse call
func (AdminUpdateUserResponse) ContentType ¶
func (r AdminUpdateUserResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (AdminUpdateUserResponse) GetBody ¶
func (r AdminUpdateUserResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (AdminUpdateUserResponse) GetJSON200 ¶
func (r AdminUpdateUserResponse) GetJSON200() *struct { Errors []Message `json:"errors"` Messages []Message `json:"messages"` Result User `json:"result"` Success bool `json:"success"` }
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (AdminUpdateUserResponse) GetJSONDefault ¶
func (r AdminUpdateUserResponse) GetJSONDefault() *Failure
GetJSONDefault returns the response for an HTTP default `application/json` response
func (AdminUpdateUserResponse) Status ¶
func (r AdminUpdateUserResponse) Status() string
Status returns HTTPResponse.Status
func (AdminUpdateUserResponse) StatusCode ¶
func (r AdminUpdateUserResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) AdminCreateUser ¶
func (c *Client) AdminCreateUser(ctx context.Context, body AdminCreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
AdminCreateUser Make a user, with our ID or yours
For the cases sign-up can't cover. Without `id`, the user gets a UUIDv7, which is their tokens' sub. A taken email, phone or id is a 409.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/admin/users (the `AdminCreateUser` operationId).
func (*Client) AdminCreateUserWithBody ¶
func (c *Client) AdminCreateUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
AdminCreateUserWithBody Make a user, with our ID or yours
For the cases sign-up can't cover. Without `id`, the user gets a UUIDv7, which is their tokens' sub. A taken email, phone or id is a 409.
Takes any type of body and a specified content type.
Corresponds with POST /v1/admin/users (the `AdminCreateUser` operationId).
func (*Client) AdminEndSession ¶
func (c *Client) AdminEndSession(ctx context.Context, user string, session string, params *AdminEndSessionParams, reqEditors ...RequestEditorFn) (*http.Response, error)
AdminEndSession End one of a user's sessions
Its next refresh is refused. One that's gone, or ended, is done already.
Corresponds with DELETE /v1/admin/users/{user}/sessions/{session} (the `AdminEndSession` operationId).
func (*Client) AdminEndSessions ¶
func (c *Client) AdminEndSessions(ctx context.Context, user string, params *AdminEndSessionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
AdminEndSessions Sign a user out everywhere, or everywhere but one session
Their next refresh is refused, and their access tokens live out their few minutes. With `except`, the `sid` of an ID token the user signed in with, that one session goes on.
Corresponds with DELETE /v1/admin/users/{user}/sessions (the `AdminEndSessions` operationId).
func (*Client) AdminGetUser ¶
func (c *Client) AdminGetUser(ctx context.Context, user string, reqEditors ...RequestEditorFn) (*http.Response, error)
AdminGetUser A user
Corresponds with GET /v1/admin/users/{user} (the `AdminGetUser` operationId).
func (*Client) AdminImportUsers ¶
func (c *Client) AdminImportUsers(ctx context.Context, body AdminImportUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
AdminImportUsers Import up to 100 users, with their bcrypt hashes
Each user keeps its `id`. One whose id exists is skipped, so an import that stopped can run again. A taken or bad email or phone fails that user alone, and the rest go on.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/admin/imports (the `AdminImportUsers` operationId).
func (*Client) AdminImportUsersWithBody ¶
func (c *Client) AdminImportUsersWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
AdminImportUsersWithBody Import up to 100 users, with their bcrypt hashes
Each user keeps its `id`. One whose id exists is skipped, so an import that stopped can run again. A taken or bad email or phone fails that user alone, and the rest go on.
Takes any type of body and a specified content type.
Corresponds with POST /v1/admin/imports (the `AdminImportUsers` operationId).
func (*Client) AdminListSessions ¶
func (c *Client) AdminListSessions(ctx context.Context, user string, reqEditors ...RequestEditorFn) (*http.Response, error)
AdminListSessions A user's sessions, ended ones included
Newest use first, with why each ended one ended.
Corresponds with GET /v1/admin/users/{user}/sessions (the `AdminListSessions` operationId).
func (*Client) AdminSearchUsers ¶
func (c *Client) AdminSearchUsers(ctx context.Context, body AdminSearchUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
AdminSearchUsers The one user who holds an email or a phone
`result` is the user, or null when no one holds it. An email matches in any case. Two users holding one phone, which the engine allows, is a 409: never one of them. A POST, so the email or phone stays out of URLs and access logs.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/admin/users/search (the `AdminSearchUsers` operationId).
func (*Client) AdminSearchUsersWithBody ¶
func (c *Client) AdminSearchUsersWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
AdminSearchUsersWithBody The one user who holds an email or a phone
`result` is the user, or null when no one holds it. An email matches in any case. Two users holding one phone, which the engine allows, is a 409: never one of them. A POST, so the email or phone stays out of URLs and access logs.
Takes any type of body and a specified content type.
Corresponds with POST /v1/admin/users/search (the `AdminSearchUsers` operationId).
func (*Client) AdminSupportCode ¶
func (c *Client) AdminSupportCode(ctx context.Context, user string, body AdminSupportCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
AdminSupportCode A sign-in code for a user with a phone, handed to you instead of sent
The person types it into the app's usual phone sign-in within `expires_in` seconds. It counts towards the phone's send limits, and replaces any code sent before it. A user with no phone, or one who can't sign in now, is a 422.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/admin/users/{user}/codes (the `AdminSupportCode` operationId).
func (*Client) AdminSupportCodeWithBody ¶
func (c *Client) AdminSupportCodeWithBody(ctx context.Context, user string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
AdminSupportCodeWithBody A sign-in code for a user with a phone, handed to you instead of sent
The person types it into the app's usual phone sign-in within `expires_in` seconds. It counts towards the phone's send limits, and replaces any code sent before it. A user with no phone, or one who can't sign in now, is a 422.
Takes any type of body and a specified content type.
Corresponds with POST /v1/admin/users/{user}/codes (the `AdminSupportCode` operationId).
func (*Client) AdminUpdateUser ¶
func (c *Client) AdminUpdateUser(ctx context.Context, user string, body AdminUpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
AdminUpdateUser Change a user's email, phone, password, or whether they're disabled
An email or phone another user holds is a 409. A new phone is set verified, with sign-in by code; a new email is verified only if `email_verified` says so. The old email or phone stops signing in at once, and is free for someone else. A change signs nobody out: call `DELETE …/sessions` for that. Enabling a user does sign them out everywhere, so the sessions they had when disabled stay ended.
Takes a body of the `application/json` content type.
Corresponds with PATCH /v1/admin/users/{user} (the `AdminUpdateUser` operationId).
func (*Client) AdminUpdateUserWithBody ¶
func (c *Client) AdminUpdateUserWithBody(ctx context.Context, user string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
AdminUpdateUserWithBody Change a user's email, phone, password, or whether they're disabled
An email or phone another user holds is a 409. A new phone is set verified, with sign-in by code; a new email is verified only if `email_verified` says so. The old email or phone stops signing in at once, and is free for someone else. A change signs nobody out: call `DELETE …/sessions` for that. Enabling a user does sign them out everywhere, so the sessions they had when disabled stay ended.
Takes any type of body and a specified content type.
Corresponds with PATCH /v1/admin/users/{user} (the `AdminUpdateUser` operationId).
func (*Client) CompletePasswordReset ¶
func (c *Client) CompletePasswordReset(ctx context.Context, params *CompletePasswordResetParams, body CompletePasswordResetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CompletePasswordReset Set a new password with the code mailed
A wrong or expired code, too many wrong guesses, and an email with no account all get the same 422. A reset signs the user out everywhere.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/password-resets/complete (the `CompletePasswordReset` operationId).
func (*Client) CompletePasswordResetWithBody ¶
func (c *Client) CompletePasswordResetWithBody(ctx context.Context, params *CompletePasswordResetParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CompletePasswordResetWithBody Set a new password with the code mailed
A wrong or expired code, too many wrong guesses, and an email with no account all get the same 422. A reset signs the user out everywhere.
Takes any type of body and a specified content type.
Corresponds with POST /v1/password-resets/complete (the `CompletePasswordReset` operationId).
func (*Client) Refresh ¶
func (c *Client) Refresh(ctx context.Context, params *RefreshParams, body RefreshJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
Refresh Exchange a refresh token
The refresh token is rotated on every use.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/sessions/refresh (the `Refresh` operationId).
func (*Client) RefreshWithBody ¶
func (c *Client) RefreshWithBody(ctx context.Context, params *RefreshParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
RefreshWithBody Exchange a refresh token
The refresh token is rotated on every use.
Takes any type of body and a specified content type.
Corresponds with POST /v1/sessions/refresh (the `Refresh` operationId).
func (*Client) RequestPasswordReset ¶
func (c *Client) RequestPasswordReset(ctx context.Context, params *RequestPasswordResetParams, body RequestPasswordResetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
RequestPasswordReset Mail a password reset code
Always 202 within the limits, whether or not the email has an account. The code is mailed alone, for the app to ask for on its own screens.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/password-resets (the `RequestPasswordReset` operationId).
func (*Client) RequestPasswordResetWithBody ¶
func (c *Client) RequestPasswordResetWithBody(ctx context.Context, params *RequestPasswordResetParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
RequestPasswordResetWithBody Mail a password reset code
Always 202 within the limits, whether or not the email has an account. The code is mailed alone, for the app to ask for on its own screens.
Takes any type of body and a specified content type.
Corresponds with POST /v1/password-resets (the `RequestPasswordReset` operationId).
func (*Client) Revoke ¶
func (c *Client) Revoke(ctx context.Context, params *RevokeParams, body RevokeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
Revoke Sign out
Ends the session a refresh token belongs to, as OAuth token revocation (RFC 7009) does: the refresh token stops working at once, and the session's access token lives out its few minutes. Always 200, whether or not the token was valid.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/sessions/revoke (the `Revoke` operationId).
func (*Client) RevokeWithBody ¶
func (c *Client) RevokeWithBody(ctx context.Context, params *RevokeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
RevokeWithBody Sign out
Ends the session a refresh token belongs to, as OAuth token revocation (RFC 7009) does: the refresh token stops working at once, and the session's access token lives out its few minutes. Always 200, whether or not the token was valid.
Takes any type of body and a specified content type.
Corresponds with POST /v1/sessions/revoke (the `Revoke` operationId).
func (*Client) SendCode ¶
func (c *Client) SendCode(ctx context.Context, params *SendCodeParams, body SendCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
SendCode Send a sign-in code to a phone, or a verification code to an email
A phone gets a sign-in code. An email gets a verification code, if it has an unverified account; the message links to the app's verify page. Always 202 within the limits, whether or not there's an account, or anything to send. Over a limit, or when the limits can't be counted, it's refused and nothing is sent.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/codes (the `SendCode` operationId).
func (*Client) SendCodeWithBody ¶
func (c *Client) SendCodeWithBody(ctx context.Context, params *SendCodeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
SendCodeWithBody Send a sign-in code to a phone, or a verification code to an email
A phone gets a sign-in code. An email gets a verification code, if it has an unverified account; the message links to the app's verify page. Always 202 within the limits, whether or not there's an account, or anything to send. Over a limit, or when the limits can't be counted, it's refused and nothing is sent.
Takes any type of body and a specified content type.
Corresponds with POST /v1/codes (the `SendCode` operationId).
func (*Client) SignIn ¶
func (c *Client) SignIn(ctx context.Context, params *SignInParams, body SignInJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
SignIn Sign in with an email and password, or a phone and a code
Takes a body of the `application/json` content type.
Corresponds with POST /v1/sessions (the `SignIn` operationId).
func (*Client) SignInWithBody ¶
func (c *Client) SignInWithBody(ctx context.Context, params *SignInParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
SignInWithBody Sign in with an email and password, or a phone and a code
Takes any type of body and a specified content type.
Corresponds with POST /v1/sessions (the `SignIn` operationId).
func (*Client) SignUp ¶
func (c *Client) SignUp(ctx context.Context, params *SignUpParams, body SignUpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
SignUp Sign up with an email and password, or a phone
Always 202, whether or not the email or phone already has an account. A phone user then asks for a code and signs in with it.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/users (the `SignUp` operationId).
func (*Client) SignUpWithBody ¶
func (c *Client) SignUpWithBody(ctx context.Context, params *SignUpParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
SignUpWithBody Sign up with an email and password, or a phone
Always 202, whether or not the email or phone already has an account. A phone user then asks for a code and signs in with it.
Takes any type of body and a specified content type.
Corresponds with POST /v1/users (the `SignUp` operationId).
func (*Client) VerifyEmail ¶
func (c *Client) VerifyEmail(ctx context.Context, params *VerifyEmailParams, body VerifyEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
VerifyEmail Verify an email with the code sent to it
A wrong or expired code, too many wrong guesses, and an email with no account all get the same 422. Too many wrong guesses spend the code, so a new one must be sent.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/email-verifications (the `VerifyEmail` operationId).
func (*Client) VerifyEmailWithBody ¶
func (c *Client) VerifyEmailWithBody(ctx context.Context, params *VerifyEmailParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
VerifyEmailWithBody Verify an email with the code sent to it
A wrong or expired code, too many wrong guesses, and an email with no account all get the same 422. Too many wrong guesses spend the code, so a new one must be sent.
Takes any type of body and a specified content type.
Corresponds with POST /v1/email-verifications (the `VerifyEmail` operationId).
type ClientInterface ¶
type ClientInterface interface {
// AdminImportUsersWithBody Import up to 100 users, with their bcrypt hashes
//
// Each user keeps its `id`. One whose id exists is skipped, so an import
// that stopped can run again. A taken or bad email or phone fails that
// user alone, and the rest go on.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/admin/imports (the `AdminImportUsers` operationId).
AdminImportUsersWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// AdminImportUsers Import up to 100 users, with their bcrypt hashes
//
// Each user keeps its `id`. One whose id exists is skipped, so an import
// that stopped can run again. A taken or bad email or phone fails that
// user alone, and the rest go on.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/admin/imports (the `AdminImportUsers` operationId).
AdminImportUsers(ctx context.Context, body AdminImportUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// AdminCreateUserWithBody Make a user, with our ID or yours
//
// For the cases sign-up can't cover. Without `id`, the user gets a
// UUIDv7, which is their tokens' sub. A taken email, phone or id is a
// 409.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/admin/users (the `AdminCreateUser` operationId).
AdminCreateUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// AdminCreateUser Make a user, with our ID or yours
//
// For the cases sign-up can't cover. Without `id`, the user gets a
// UUIDv7, which is their tokens' sub. A taken email, phone or id is a
// 409.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/admin/users (the `AdminCreateUser` operationId).
AdminCreateUser(ctx context.Context, body AdminCreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// AdminSearchUsersWithBody The one user who holds an email or a phone
//
// `result` is the user, or null when no one holds it. An email matches in
// any case. Two users holding one phone, which the engine allows, is a
// 409: never one of them. A POST, so the email or phone stays out of
// URLs and access logs.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/admin/users/search (the `AdminSearchUsers` operationId).
AdminSearchUsersWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// AdminSearchUsers The one user who holds an email or a phone
//
// `result` is the user, or null when no one holds it. An email matches in
// any case. Two users holding one phone, which the engine allows, is a
// 409: never one of them. A POST, so the email or phone stays out of
// URLs and access logs.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/admin/users/search (the `AdminSearchUsers` operationId).
AdminSearchUsers(ctx context.Context, body AdminSearchUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// AdminGetUser A user
//
// Corresponds with GET /v1/admin/users/{user} (the `AdminGetUser` operationId).
AdminGetUser(ctx context.Context, user string, reqEditors ...RequestEditorFn) (*http.Response, error)
// AdminUpdateUserWithBody Change a user's email, phone, password, or whether they're disabled
//
// An email or phone another user holds is a 409. A new phone is set
// verified, with sign-in by code; a new email is verified only if
// `email_verified` says so. The old email or phone stops signing in at
// once, and is free for someone else. A change signs nobody out: call
// `DELETE …/sessions` for that. Enabling a user does sign them out
// everywhere, so the sessions they had when disabled stay ended.
//
// Takes any type of body and a specified content type.
//
// Corresponds with PATCH /v1/admin/users/{user} (the `AdminUpdateUser` operationId).
AdminUpdateUserWithBody(ctx context.Context, user string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// AdminUpdateUser Change a user's email, phone, password, or whether they're disabled
//
// An email or phone another user holds is a 409. A new phone is set
// verified, with sign-in by code; a new email is verified only if
// `email_verified` says so. The old email or phone stops signing in at
// once, and is free for someone else. A change signs nobody out: call
// `DELETE …/sessions` for that. Enabling a user does sign them out
// everywhere, so the sessions they had when disabled stay ended.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with PATCH /v1/admin/users/{user} (the `AdminUpdateUser` operationId).
AdminUpdateUser(ctx context.Context, user string, body AdminUpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// AdminSupportCodeWithBody A sign-in code for a user with a phone, handed to you instead of sent
//
// The person types it into the app's usual phone sign-in within
// `expires_in` seconds. It counts towards the phone's send limits, and
// replaces any code sent before it. A user with no phone, or one who
// can't sign in now, is a 422.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/admin/users/{user}/codes (the `AdminSupportCode` operationId).
AdminSupportCodeWithBody(ctx context.Context, user string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// AdminSupportCode A sign-in code for a user with a phone, handed to you instead of sent
//
// The person types it into the app's usual phone sign-in within
// `expires_in` seconds. It counts towards the phone's send limits, and
// replaces any code sent before it. A user with no phone, or one who
// can't sign in now, is a 422.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/admin/users/{user}/codes (the `AdminSupportCode` operationId).
AdminSupportCode(ctx context.Context, user string, body AdminSupportCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// AdminEndSessions Sign a user out everywhere, or everywhere but one session
//
// Their next refresh is refused, and their access tokens live out their
// few minutes. With `except`, the `sid` of an ID token the user signed
// in with, that one session goes on.
//
// Corresponds with DELETE /v1/admin/users/{user}/sessions (the `AdminEndSessions` operationId).
AdminEndSessions(ctx context.Context, user string, params *AdminEndSessionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// AdminListSessions A user's sessions, ended ones included
//
// Newest use first, with why each ended one ended.
//
// Corresponds with GET /v1/admin/users/{user}/sessions (the `AdminListSessions` operationId).
AdminListSessions(ctx context.Context, user string, reqEditors ...RequestEditorFn) (*http.Response, error)
// AdminEndSession End one of a user's sessions
//
// Its next refresh is refused. One that's gone, or ended, is done already.
//
// Corresponds with DELETE /v1/admin/users/{user}/sessions/{session} (the `AdminEndSession` operationId).
AdminEndSession(ctx context.Context, user string, session string, params *AdminEndSessionParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// SendCodeWithBody Send a sign-in code to a phone, or a verification code to an email
//
// A phone gets a sign-in code. An email gets a verification code, if it
// has an unverified account; the message links to the app's verify page.
// Always 202 within the limits, whether or not there's an account, or
// anything to send. Over a limit, or when the limits can't be counted,
// it's refused and nothing is sent.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/codes (the `SendCode` operationId).
SendCodeWithBody(ctx context.Context, params *SendCodeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// SendCode Send a sign-in code to a phone, or a verification code to an email
//
// A phone gets a sign-in code. An email gets a verification code, if it
// has an unverified account; the message links to the app's verify page.
// Always 202 within the limits, whether or not there's an account, or
// anything to send. Over a limit, or when the limits can't be counted,
// it's refused and nothing is sent.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/codes (the `SendCode` operationId).
SendCode(ctx context.Context, params *SendCodeParams, body SendCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// VerifyEmailWithBody Verify an email with the code sent to it
//
// A wrong or expired code, too many wrong guesses, and an email with no
// account all get the same 422. Too many wrong guesses spend the code, so
// a new one must be sent.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/email-verifications (the `VerifyEmail` operationId).
VerifyEmailWithBody(ctx context.Context, params *VerifyEmailParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// VerifyEmail Verify an email with the code sent to it
//
// A wrong or expired code, too many wrong guesses, and an email with no
// account all get the same 422. Too many wrong guesses spend the code, so
// a new one must be sent.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/email-verifications (the `VerifyEmail` operationId).
VerifyEmail(ctx context.Context, params *VerifyEmailParams, body VerifyEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// RequestPasswordResetWithBody Mail a password reset code
//
// Always 202 within the limits, whether or not the email has an account.
// The code is mailed alone, for the app to ask for on its own screens.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/password-resets (the `RequestPasswordReset` operationId).
RequestPasswordResetWithBody(ctx context.Context, params *RequestPasswordResetParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// RequestPasswordReset Mail a password reset code
//
// Always 202 within the limits, whether or not the email has an account.
// The code is mailed alone, for the app to ask for on its own screens.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/password-resets (the `RequestPasswordReset` operationId).
RequestPasswordReset(ctx context.Context, params *RequestPasswordResetParams, body RequestPasswordResetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// CompletePasswordResetWithBody Set a new password with the code mailed
//
// A wrong or expired code, too many wrong guesses, and an email with no
// account all get the same 422. A reset signs the user out everywhere.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/password-resets/complete (the `CompletePasswordReset` operationId).
CompletePasswordResetWithBody(ctx context.Context, params *CompletePasswordResetParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// CompletePasswordReset Set a new password with the code mailed
//
// A wrong or expired code, too many wrong guesses, and an email with no
// account all get the same 422. A reset signs the user out everywhere.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/password-resets/complete (the `CompletePasswordReset` operationId).
CompletePasswordReset(ctx context.Context, params *CompletePasswordResetParams, body CompletePasswordResetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// SignInWithBody Sign in with an email and password, or a phone and a code
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/sessions (the `SignIn` operationId).
SignInWithBody(ctx context.Context, params *SignInParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// SignIn Sign in with an email and password, or a phone and a code
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/sessions (the `SignIn` operationId).
SignIn(ctx context.Context, params *SignInParams, body SignInJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// RefreshWithBody Exchange a refresh token
//
// The refresh token is rotated on every use.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/sessions/refresh (the `Refresh` operationId).
RefreshWithBody(ctx context.Context, params *RefreshParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// Refresh Exchange a refresh token
//
// The refresh token is rotated on every use.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/sessions/refresh (the `Refresh` operationId).
Refresh(ctx context.Context, params *RefreshParams, body RefreshJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// RevokeWithBody Sign out
//
// Ends the session a refresh token belongs to, as OAuth token
// revocation (RFC 7009) does: the refresh token stops working at once,
// and the session's access token lives out its few minutes. Always 200,
// whether or not the token was valid.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/sessions/revoke (the `Revoke` operationId).
RevokeWithBody(ctx context.Context, params *RevokeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// Revoke Sign out
//
// Ends the session a refresh token belongs to, as OAuth token
// revocation (RFC 7009) does: the refresh token stops working at once,
// and the session's access token lives out its few minutes. Always 200,
// whether or not the token was valid.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/sessions/revoke (the `Revoke` operationId).
Revoke(ctx context.Context, params *RevokeParams, body RevokeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// SignUpWithBody Sign up with an email and password, or a phone
//
// Always 202, whether or not the email or phone already has an account.
// A phone user then asks for a code and signs in with it.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/users (the `SignUp` operationId).
SignUpWithBody(ctx context.Context, params *SignUpParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// SignUp Sign up with an email and password, or a phone
//
// Always 202, whether or not the email or phone already has an account.
// A phone user then asks for a code and signs in with it.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/users (the `SignUp` operationId).
SignUp(ctx context.Context, params *SignUpParams, body SignUpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) AdminCreateUserWithBodyWithResponse ¶
func (c *ClientWithResponses) AdminCreateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AdminCreateUserResponse, error)
AdminCreateUserWithBodyWithResponse Make a user, with our ID or yours
For the cases sign-up can't cover. Without `id`, the user gets a UUIDv7, which is their tokens' sub. A taken email, phone or id is a 409.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/admin/users (the `AdminCreateUser` operationId).
func (*ClientWithResponses) AdminCreateUserWithResponse ¶
func (c *ClientWithResponses) AdminCreateUserWithResponse(ctx context.Context, body AdminCreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*AdminCreateUserResponse, error)
AdminCreateUserWithResponse Make a user, with our ID or yours
For the cases sign-up can't cover. Without `id`, the user gets a UUIDv7, which is their tokens' sub. A taken email, phone or id is a 409.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/admin/users (the `AdminCreateUser` operationId).
func (*ClientWithResponses) AdminEndSessionWithResponse ¶
func (c *ClientWithResponses) AdminEndSessionWithResponse(ctx context.Context, user string, session string, params *AdminEndSessionParams, reqEditors ...RequestEditorFn) (*AdminEndSessionResponse, error)
AdminEndSessionWithResponse End one of a user's sessions
Its next refresh is refused. One that's gone, or ended, is done already.
Returns a wrapper object for the known response body format(s).
Corresponds with DELETE /v1/admin/users/{user}/sessions/{session} (the `AdminEndSession` operationId).
func (*ClientWithResponses) AdminEndSessionsWithResponse ¶
func (c *ClientWithResponses) AdminEndSessionsWithResponse(ctx context.Context, user string, params *AdminEndSessionsParams, reqEditors ...RequestEditorFn) (*AdminEndSessionsResponse, error)
AdminEndSessionsWithResponse Sign a user out everywhere, or everywhere but one session
Their next refresh is refused, and their access tokens live out their few minutes. With `except`, the `sid` of an ID token the user signed in with, that one session goes on.
Returns a wrapper object for the known response body format(s).
Corresponds with DELETE /v1/admin/users/{user}/sessions (the `AdminEndSessions` operationId).
func (*ClientWithResponses) AdminGetUserWithResponse ¶
func (c *ClientWithResponses) AdminGetUserWithResponse(ctx context.Context, user string, reqEditors ...RequestEditorFn) (*AdminGetUserResponse, error)
AdminGetUserWithResponse A user
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/admin/users/{user} (the `AdminGetUser` operationId).
func (*ClientWithResponses) AdminImportUsersWithBodyWithResponse ¶
func (c *ClientWithResponses) AdminImportUsersWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AdminImportUsersResponse, error)
AdminImportUsersWithBodyWithResponse Import up to 100 users, with their bcrypt hashes
Each user keeps its `id`. One whose id exists is skipped, so an import that stopped can run again. A taken or bad email or phone fails that user alone, and the rest go on.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/admin/imports (the `AdminImportUsers` operationId).
func (*ClientWithResponses) AdminImportUsersWithResponse ¶
func (c *ClientWithResponses) AdminImportUsersWithResponse(ctx context.Context, body AdminImportUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*AdminImportUsersResponse, error)
AdminImportUsersWithResponse Import up to 100 users, with their bcrypt hashes
Each user keeps its `id`. One whose id exists is skipped, so an import that stopped can run again. A taken or bad email or phone fails that user alone, and the rest go on.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/admin/imports (the `AdminImportUsers` operationId).
func (*ClientWithResponses) AdminListSessionsWithResponse ¶
func (c *ClientWithResponses) AdminListSessionsWithResponse(ctx context.Context, user string, reqEditors ...RequestEditorFn) (*AdminListSessionsResponse, error)
AdminListSessionsWithResponse A user's sessions, ended ones included
Newest use first, with why each ended one ended.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/admin/users/{user}/sessions (the `AdminListSessions` operationId).
func (*ClientWithResponses) AdminSearchUsersWithBodyWithResponse ¶
func (c *ClientWithResponses) AdminSearchUsersWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AdminSearchUsersResponse, error)
AdminSearchUsersWithBodyWithResponse The one user who holds an email or a phone
`result` is the user, or null when no one holds it. An email matches in any case. Two users holding one phone, which the engine allows, is a 409: never one of them. A POST, so the email or phone stays out of URLs and access logs.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/admin/users/search (the `AdminSearchUsers` operationId).
func (*ClientWithResponses) AdminSearchUsersWithResponse ¶
func (c *ClientWithResponses) AdminSearchUsersWithResponse(ctx context.Context, body AdminSearchUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*AdminSearchUsersResponse, error)
AdminSearchUsersWithResponse The one user who holds an email or a phone
`result` is the user, or null when no one holds it. An email matches in any case. Two users holding one phone, which the engine allows, is a 409: never one of them. A POST, so the email or phone stays out of URLs and access logs.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/admin/users/search (the `AdminSearchUsers` operationId).
func (*ClientWithResponses) AdminSupportCodeWithBodyWithResponse ¶
func (c *ClientWithResponses) AdminSupportCodeWithBodyWithResponse(ctx context.Context, user string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AdminSupportCodeResponse, error)
AdminSupportCodeWithBodyWithResponse A sign-in code for a user with a phone, handed to you instead of sent
The person types it into the app's usual phone sign-in within `expires_in` seconds. It counts towards the phone's send limits, and replaces any code sent before it. A user with no phone, or one who can't sign in now, is a 422.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/admin/users/{user}/codes (the `AdminSupportCode` operationId).
func (*ClientWithResponses) AdminSupportCodeWithResponse ¶
func (c *ClientWithResponses) AdminSupportCodeWithResponse(ctx context.Context, user string, body AdminSupportCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*AdminSupportCodeResponse, error)
AdminSupportCodeWithResponse A sign-in code for a user with a phone, handed to you instead of sent
The person types it into the app's usual phone sign-in within `expires_in` seconds. It counts towards the phone's send limits, and replaces any code sent before it. A user with no phone, or one who can't sign in now, is a 422.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/admin/users/{user}/codes (the `AdminSupportCode` operationId).
func (*ClientWithResponses) AdminUpdateUserWithBodyWithResponse ¶
func (c *ClientWithResponses) AdminUpdateUserWithBodyWithResponse(ctx context.Context, user string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AdminUpdateUserResponse, error)
AdminUpdateUserWithBodyWithResponse Change a user's email, phone, password, or whether they're disabled
An email or phone another user holds is a 409. A new phone is set verified, with sign-in by code; a new email is verified only if `email_verified` says so. The old email or phone stops signing in at once, and is free for someone else. A change signs nobody out: call `DELETE …/sessions` for that. Enabling a user does sign them out everywhere, so the sessions they had when disabled stay ended.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with PATCH /v1/admin/users/{user} (the `AdminUpdateUser` operationId).
func (*ClientWithResponses) AdminUpdateUserWithResponse ¶
func (c *ClientWithResponses) AdminUpdateUserWithResponse(ctx context.Context, user string, body AdminUpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*AdminUpdateUserResponse, error)
AdminUpdateUserWithResponse Change a user's email, phone, password, or whether they're disabled
An email or phone another user holds is a 409. A new phone is set verified, with sign-in by code; a new email is verified only if `email_verified` says so. The old email or phone stops signing in at once, and is free for someone else. A change signs nobody out: call `DELETE …/sessions` for that. Enabling a user does sign them out everywhere, so the sessions they had when disabled stay ended.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with PATCH /v1/admin/users/{user} (the `AdminUpdateUser` operationId).
func (*ClientWithResponses) CompletePasswordResetWithBodyWithResponse ¶
func (c *ClientWithResponses) CompletePasswordResetWithBodyWithResponse(ctx context.Context, params *CompletePasswordResetParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CompletePasswordResetResponse, error)
CompletePasswordResetWithBodyWithResponse Set a new password with the code mailed
A wrong or expired code, too many wrong guesses, and an email with no account all get the same 422. A reset signs the user out everywhere.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/password-resets/complete (the `CompletePasswordReset` operationId).
func (*ClientWithResponses) CompletePasswordResetWithResponse ¶
func (c *ClientWithResponses) CompletePasswordResetWithResponse(ctx context.Context, params *CompletePasswordResetParams, body CompletePasswordResetJSONRequestBody, reqEditors ...RequestEditorFn) (*CompletePasswordResetResponse, error)
CompletePasswordResetWithResponse Set a new password with the code mailed
A wrong or expired code, too many wrong guesses, and an email with no account all get the same 422. A reset signs the user out everywhere.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/password-resets/complete (the `CompletePasswordReset` operationId).
func (*ClientWithResponses) RefreshWithBodyWithResponse ¶
func (c *ClientWithResponses) RefreshWithBodyWithResponse(ctx context.Context, params *RefreshParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RefreshResponse, error)
RefreshWithBodyWithResponse Exchange a refresh token
The refresh token is rotated on every use.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/sessions/refresh (the `Refresh` operationId).
func (*ClientWithResponses) RefreshWithResponse ¶
func (c *ClientWithResponses) RefreshWithResponse(ctx context.Context, params *RefreshParams, body RefreshJSONRequestBody, reqEditors ...RequestEditorFn) (*RefreshResponse, error)
RefreshWithResponse Exchange a refresh token
The refresh token is rotated on every use.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/sessions/refresh (the `Refresh` operationId).
func (*ClientWithResponses) RequestPasswordResetWithBodyWithResponse ¶
func (c *ClientWithResponses) RequestPasswordResetWithBodyWithResponse(ctx context.Context, params *RequestPasswordResetParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RequestPasswordResetResponse, error)
RequestPasswordResetWithBodyWithResponse Mail a password reset code
Always 202 within the limits, whether or not the email has an account. The code is mailed alone, for the app to ask for on its own screens.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/password-resets (the `RequestPasswordReset` operationId).
func (*ClientWithResponses) RequestPasswordResetWithResponse ¶
func (c *ClientWithResponses) RequestPasswordResetWithResponse(ctx context.Context, params *RequestPasswordResetParams, body RequestPasswordResetJSONRequestBody, reqEditors ...RequestEditorFn) (*RequestPasswordResetResponse, error)
RequestPasswordResetWithResponse Mail a password reset code
Always 202 within the limits, whether or not the email has an account. The code is mailed alone, for the app to ask for on its own screens.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/password-resets (the `RequestPasswordReset` operationId).
func (*ClientWithResponses) RevokeWithBodyWithResponse ¶
func (c *ClientWithResponses) RevokeWithBodyWithResponse(ctx context.Context, params *RevokeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RevokeResponse, error)
RevokeWithBodyWithResponse Sign out
Ends the session a refresh token belongs to, as OAuth token revocation (RFC 7009) does: the refresh token stops working at once, and the session's access token lives out its few minutes. Always 200, whether or not the token was valid.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/sessions/revoke (the `Revoke` operationId).
func (*ClientWithResponses) RevokeWithResponse ¶
func (c *ClientWithResponses) RevokeWithResponse(ctx context.Context, params *RevokeParams, body RevokeJSONRequestBody, reqEditors ...RequestEditorFn) (*RevokeResponse, error)
RevokeWithResponse Sign out
Ends the session a refresh token belongs to, as OAuth token revocation (RFC 7009) does: the refresh token stops working at once, and the session's access token lives out its few minutes. Always 200, whether or not the token was valid.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/sessions/revoke (the `Revoke` operationId).
func (*ClientWithResponses) SendCodeWithBodyWithResponse ¶
func (c *ClientWithResponses) SendCodeWithBodyWithResponse(ctx context.Context, params *SendCodeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendCodeResponse, error)
SendCodeWithBodyWithResponse Send a sign-in code to a phone, or a verification code to an email
A phone gets a sign-in code. An email gets a verification code, if it has an unverified account; the message links to the app's verify page. Always 202 within the limits, whether or not there's an account, or anything to send. Over a limit, or when the limits can't be counted, it's refused and nothing is sent.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/codes (the `SendCode` operationId).
func (*ClientWithResponses) SendCodeWithResponse ¶
func (c *ClientWithResponses) SendCodeWithResponse(ctx context.Context, params *SendCodeParams, body SendCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*SendCodeResponse, error)
SendCodeWithResponse Send a sign-in code to a phone, or a verification code to an email
A phone gets a sign-in code. An email gets a verification code, if it has an unverified account; the message links to the app's verify page. Always 202 within the limits, whether or not there's an account, or anything to send. Over a limit, or when the limits can't be counted, it's refused and nothing is sent.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/codes (the `SendCode` operationId).
func (*ClientWithResponses) SignInWithBodyWithResponse ¶
func (c *ClientWithResponses) SignInWithBodyWithResponse(ctx context.Context, params *SignInParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SignInResponse, error)
SignInWithBodyWithResponse Sign in with an email and password, or a phone and a code
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/sessions (the `SignIn` operationId).
func (*ClientWithResponses) SignInWithResponse ¶
func (c *ClientWithResponses) SignInWithResponse(ctx context.Context, params *SignInParams, body SignInJSONRequestBody, reqEditors ...RequestEditorFn) (*SignInResponse, error)
SignInWithResponse Sign in with an email and password, or a phone and a code
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/sessions (the `SignIn` operationId).
func (*ClientWithResponses) SignUpWithBodyWithResponse ¶
func (c *ClientWithResponses) SignUpWithBodyWithResponse(ctx context.Context, params *SignUpParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SignUpResponse, error)
SignUpWithBodyWithResponse Sign up with an email and password, or a phone
Always 202, whether or not the email or phone already has an account. A phone user then asks for a code and signs in with it.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/users (the `SignUp` operationId).
func (*ClientWithResponses) SignUpWithResponse ¶
func (c *ClientWithResponses) SignUpWithResponse(ctx context.Context, params *SignUpParams, body SignUpJSONRequestBody, reqEditors ...RequestEditorFn) (*SignUpResponse, error)
SignUpWithResponse Sign up with an email and password, or a phone
Always 202, whether or not the email or phone already has an account. A phone user then asks for a code and signs in with it.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/users (the `SignUp` operationId).
func (*ClientWithResponses) VerifyEmailWithBodyWithResponse ¶
func (c *ClientWithResponses) VerifyEmailWithBodyWithResponse(ctx context.Context, params *VerifyEmailParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VerifyEmailResponse, error)
VerifyEmailWithBodyWithResponse Verify an email with the code sent to it
A wrong or expired code, too many wrong guesses, and an email with no account all get the same 422. Too many wrong guesses spend the code, so a new one must be sent.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/email-verifications (the `VerifyEmail` operationId).
func (*ClientWithResponses) VerifyEmailWithResponse ¶
func (c *ClientWithResponses) VerifyEmailWithResponse(ctx context.Context, params *VerifyEmailParams, body VerifyEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*VerifyEmailResponse, error)
VerifyEmailWithResponse Verify an email with the code sent to it
A wrong or expired code, too many wrong guesses, and an email with no account all get the same 422. Too many wrong guesses spend the code, so a new one must be sent.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/email-verifications (the `VerifyEmail` operationId).
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// AdminImportUsersWithBodyWithResponse Import up to 100 users, with their bcrypt hashes
//
// Each user keeps its `id`. One whose id exists is skipped, so an import
// that stopped can run again. A taken or bad email or phone fails that
// user alone, and the rest go on.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/admin/imports (the `AdminImportUsers` operationId).
AdminImportUsersWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AdminImportUsersResponse, error)
// AdminImportUsersWithResponse Import up to 100 users, with their bcrypt hashes
//
// Each user keeps its `id`. One whose id exists is skipped, so an import
// that stopped can run again. A taken or bad email or phone fails that
// user alone, and the rest go on.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/admin/imports (the `AdminImportUsers` operationId).
AdminImportUsersWithResponse(ctx context.Context, body AdminImportUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*AdminImportUsersResponse, error)
// AdminCreateUserWithBodyWithResponse Make a user, with our ID or yours
//
// For the cases sign-up can't cover. Without `id`, the user gets a
// UUIDv7, which is their tokens' sub. A taken email, phone or id is a
// 409.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/admin/users (the `AdminCreateUser` operationId).
AdminCreateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AdminCreateUserResponse, error)
// AdminCreateUserWithResponse Make a user, with our ID or yours
//
// For the cases sign-up can't cover. Without `id`, the user gets a
// UUIDv7, which is their tokens' sub. A taken email, phone or id is a
// 409.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/admin/users (the `AdminCreateUser` operationId).
AdminCreateUserWithResponse(ctx context.Context, body AdminCreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*AdminCreateUserResponse, error)
// AdminSearchUsersWithBodyWithResponse The one user who holds an email or a phone
//
// `result` is the user, or null when no one holds it. An email matches in
// any case. Two users holding one phone, which the engine allows, is a
// 409: never one of them. A POST, so the email or phone stays out of
// URLs and access logs.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/admin/users/search (the `AdminSearchUsers` operationId).
AdminSearchUsersWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AdminSearchUsersResponse, error)
// AdminSearchUsersWithResponse The one user who holds an email or a phone
//
// `result` is the user, or null when no one holds it. An email matches in
// any case. Two users holding one phone, which the engine allows, is a
// 409: never one of them. A POST, so the email or phone stays out of
// URLs and access logs.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/admin/users/search (the `AdminSearchUsers` operationId).
AdminSearchUsersWithResponse(ctx context.Context, body AdminSearchUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*AdminSearchUsersResponse, error)
// AdminGetUserWithResponse A user
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/admin/users/{user} (the `AdminGetUser` operationId).
AdminGetUserWithResponse(ctx context.Context, user string, reqEditors ...RequestEditorFn) (*AdminGetUserResponse, error)
// AdminUpdateUserWithBodyWithResponse Change a user's email, phone, password, or whether they're disabled
//
// An email or phone another user holds is a 409. A new phone is set
// verified, with sign-in by code; a new email is verified only if
// `email_verified` says so. The old email or phone stops signing in at
// once, and is free for someone else. A change signs nobody out: call
// `DELETE …/sessions` for that. Enabling a user does sign them out
// everywhere, so the sessions they had when disabled stay ended.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PATCH /v1/admin/users/{user} (the `AdminUpdateUser` operationId).
AdminUpdateUserWithBodyWithResponse(ctx context.Context, user string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AdminUpdateUserResponse, error)
// AdminUpdateUserWithResponse Change a user's email, phone, password, or whether they're disabled
//
// An email or phone another user holds is a 409. A new phone is set
// verified, with sign-in by code; a new email is verified only if
// `email_verified` says so. The old email or phone stops signing in at
// once, and is free for someone else. A change signs nobody out: call
// `DELETE …/sessions` for that. Enabling a user does sign them out
// everywhere, so the sessions they had when disabled stay ended.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PATCH /v1/admin/users/{user} (the `AdminUpdateUser` operationId).
AdminUpdateUserWithResponse(ctx context.Context, user string, body AdminUpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*AdminUpdateUserResponse, error)
// AdminSupportCodeWithBodyWithResponse A sign-in code for a user with a phone, handed to you instead of sent
//
// The person types it into the app's usual phone sign-in within
// `expires_in` seconds. It counts towards the phone's send limits, and
// replaces any code sent before it. A user with no phone, or one who
// can't sign in now, is a 422.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/admin/users/{user}/codes (the `AdminSupportCode` operationId).
AdminSupportCodeWithBodyWithResponse(ctx context.Context, user string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AdminSupportCodeResponse, error)
// AdminSupportCodeWithResponse A sign-in code for a user with a phone, handed to you instead of sent
//
// The person types it into the app's usual phone sign-in within
// `expires_in` seconds. It counts towards the phone's send limits, and
// replaces any code sent before it. A user with no phone, or one who
// can't sign in now, is a 422.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/admin/users/{user}/codes (the `AdminSupportCode` operationId).
AdminSupportCodeWithResponse(ctx context.Context, user string, body AdminSupportCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*AdminSupportCodeResponse, error)
// AdminEndSessionsWithResponse Sign a user out everywhere, or everywhere but one session
//
// Their next refresh is refused, and their access tokens live out their
// few minutes. With `except`, the `sid` of an ID token the user signed
// in with, that one session goes on.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with DELETE /v1/admin/users/{user}/sessions (the `AdminEndSessions` operationId).
AdminEndSessionsWithResponse(ctx context.Context, user string, params *AdminEndSessionsParams, reqEditors ...RequestEditorFn) (*AdminEndSessionsResponse, error)
// AdminListSessionsWithResponse A user's sessions, ended ones included
//
// Newest use first, with why each ended one ended.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/admin/users/{user}/sessions (the `AdminListSessions` operationId).
AdminListSessionsWithResponse(ctx context.Context, user string, reqEditors ...RequestEditorFn) (*AdminListSessionsResponse, error)
// AdminEndSessionWithResponse End one of a user's sessions
//
// Its next refresh is refused. One that's gone, or ended, is done already.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with DELETE /v1/admin/users/{user}/sessions/{session} (the `AdminEndSession` operationId).
AdminEndSessionWithResponse(ctx context.Context, user string, session string, params *AdminEndSessionParams, reqEditors ...RequestEditorFn) (*AdminEndSessionResponse, error)
// SendCodeWithBodyWithResponse Send a sign-in code to a phone, or a verification code to an email
//
// A phone gets a sign-in code. An email gets a verification code, if it
// has an unverified account; the message links to the app's verify page.
// Always 202 within the limits, whether or not there's an account, or
// anything to send. Over a limit, or when the limits can't be counted,
// it's refused and nothing is sent.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/codes (the `SendCode` operationId).
SendCodeWithBodyWithResponse(ctx context.Context, params *SendCodeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendCodeResponse, error)
// SendCodeWithResponse Send a sign-in code to a phone, or a verification code to an email
//
// A phone gets a sign-in code. An email gets a verification code, if it
// has an unverified account; the message links to the app's verify page.
// Always 202 within the limits, whether or not there's an account, or
// anything to send. Over a limit, or when the limits can't be counted,
// it's refused and nothing is sent.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/codes (the `SendCode` operationId).
SendCodeWithResponse(ctx context.Context, params *SendCodeParams, body SendCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*SendCodeResponse, error)
// VerifyEmailWithBodyWithResponse Verify an email with the code sent to it
//
// A wrong or expired code, too many wrong guesses, and an email with no
// account all get the same 422. Too many wrong guesses spend the code, so
// a new one must be sent.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/email-verifications (the `VerifyEmail` operationId).
VerifyEmailWithBodyWithResponse(ctx context.Context, params *VerifyEmailParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VerifyEmailResponse, error)
// VerifyEmailWithResponse Verify an email with the code sent to it
//
// A wrong or expired code, too many wrong guesses, and an email with no
// account all get the same 422. Too many wrong guesses spend the code, so
// a new one must be sent.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/email-verifications (the `VerifyEmail` operationId).
VerifyEmailWithResponse(ctx context.Context, params *VerifyEmailParams, body VerifyEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*VerifyEmailResponse, error)
// RequestPasswordResetWithBodyWithResponse Mail a password reset code
//
// Always 202 within the limits, whether or not the email has an account.
// The code is mailed alone, for the app to ask for on its own screens.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/password-resets (the `RequestPasswordReset` operationId).
RequestPasswordResetWithBodyWithResponse(ctx context.Context, params *RequestPasswordResetParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RequestPasswordResetResponse, error)
// RequestPasswordResetWithResponse Mail a password reset code
//
// Always 202 within the limits, whether or not the email has an account.
// The code is mailed alone, for the app to ask for on its own screens.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/password-resets (the `RequestPasswordReset` operationId).
RequestPasswordResetWithResponse(ctx context.Context, params *RequestPasswordResetParams, body RequestPasswordResetJSONRequestBody, reqEditors ...RequestEditorFn) (*RequestPasswordResetResponse, error)
// CompletePasswordResetWithBodyWithResponse Set a new password with the code mailed
//
// A wrong or expired code, too many wrong guesses, and an email with no
// account all get the same 422. A reset signs the user out everywhere.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/password-resets/complete (the `CompletePasswordReset` operationId).
CompletePasswordResetWithBodyWithResponse(ctx context.Context, params *CompletePasswordResetParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CompletePasswordResetResponse, error)
// CompletePasswordResetWithResponse Set a new password with the code mailed
//
// A wrong or expired code, too many wrong guesses, and an email with no
// account all get the same 422. A reset signs the user out everywhere.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/password-resets/complete (the `CompletePasswordReset` operationId).
CompletePasswordResetWithResponse(ctx context.Context, params *CompletePasswordResetParams, body CompletePasswordResetJSONRequestBody, reqEditors ...RequestEditorFn) (*CompletePasswordResetResponse, error)
// SignInWithBodyWithResponse Sign in with an email and password, or a phone and a code
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/sessions (the `SignIn` operationId).
SignInWithBodyWithResponse(ctx context.Context, params *SignInParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SignInResponse, error)
// SignInWithResponse Sign in with an email and password, or a phone and a code
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/sessions (the `SignIn` operationId).
SignInWithResponse(ctx context.Context, params *SignInParams, body SignInJSONRequestBody, reqEditors ...RequestEditorFn) (*SignInResponse, error)
// RefreshWithBodyWithResponse Exchange a refresh token
//
// The refresh token is rotated on every use.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/sessions/refresh (the `Refresh` operationId).
RefreshWithBodyWithResponse(ctx context.Context, params *RefreshParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RefreshResponse, error)
// RefreshWithResponse Exchange a refresh token
//
// The refresh token is rotated on every use.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/sessions/refresh (the `Refresh` operationId).
RefreshWithResponse(ctx context.Context, params *RefreshParams, body RefreshJSONRequestBody, reqEditors ...RequestEditorFn) (*RefreshResponse, error)
// RevokeWithBodyWithResponse Sign out
//
// Ends the session a refresh token belongs to, as OAuth token
// revocation (RFC 7009) does: the refresh token stops working at once,
// and the session's access token lives out its few minutes. Always 200,
// whether or not the token was valid.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/sessions/revoke (the `Revoke` operationId).
RevokeWithBodyWithResponse(ctx context.Context, params *RevokeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RevokeResponse, error)
// RevokeWithResponse Sign out
//
// Ends the session a refresh token belongs to, as OAuth token
// revocation (RFC 7009) does: the refresh token stops working at once,
// and the session's access token lives out its few minutes. Always 200,
// whether or not the token was valid.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/sessions/revoke (the `Revoke` operationId).
RevokeWithResponse(ctx context.Context, params *RevokeParams, body RevokeJSONRequestBody, reqEditors ...RequestEditorFn) (*RevokeResponse, error)
// SignUpWithBodyWithResponse Sign up with an email and password, or a phone
//
// Always 202, whether or not the email or phone already has an account.
// A phone user then asks for a code and signs in with it.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/users (the `SignUp` operationId).
SignUpWithBodyWithResponse(ctx context.Context, params *SignUpParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SignUpResponse, error)
// SignUpWithResponse Sign up with an email and password, or a phone
//
// Always 202, whether or not the email or phone already has an account.
// A phone user then asks for a code and signs in with it.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/users (the `SignUp` operationId).
SignUpWithResponse(ctx context.Context, params *SignUpParams, body SignUpJSONRequestBody, reqEditors ...RequestEditorFn) (*SignUpResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CodeRequest ¶
type CodeRequest struct {
ClientId string `json:"client_id"`
// Email Example: someone@example.com
Email *string `json:"email,omitempty"`
// Language The language the code's message should be in, passed to the sender.
//
// Example: ar
Language *string `json:"language,omitempty"`
// Phone E.164.
//
// Example: +9647701234567
Phone *string `json:"phone,omitempty"`
// TurnstileToken The Turnstile token, when the pool's bot check is on.
TurnstileToken *string `json:"turnstile_token,omitempty"`
}
CodeRequest A phone or an email, not both.
type CompletePasswordResetJSONRequestBody ¶
type CompletePasswordResetJSONRequestBody = ResetCompletion
CompletePasswordResetJSONRequestBody defines body for CompletePasswordReset for application/json ContentType.
type CompletePasswordResetParams ¶
type CompletePasswordResetParams struct {
// EdgescaleClientAddress The person's IP address, beside `Edgescale-Server-Secret`. It counts
// in the per-address limits. One that isn't an IP address isn't stored,
// and `messages` says so with code 3000; without the secret it's
// ignored, and `messages` says that too.
EdgescaleClientAddress *ClientAddress `json:"Edgescale-Client-Address,omitempty"`
// EdgescaleClientCity The person's city, beside `Edgescale-Server-Secret`, cut past 64 characters.
EdgescaleClientCity *ClientCity `json:"Edgescale-Client-City,omitempty"`
// EdgescaleClientCountry The person's country, an ISO 3166 code, beside
// `Edgescale-Server-Secret`. One that isn't two letters isn't stored,
// and `messages` says so with code 3000.
EdgescaleClientCountry *ClientCountry `json:"Edgescale-Client-Country,omitempty"`
// EdgescaleClientAgent The person's browser `User-Agent`, beside `Edgescale-Server-Secret`, cut past 64 characters.
EdgescaleClientAgent *ClientAgent `json:"Edgescale-Client-Agent,omitempty"`
}
CompletePasswordResetParams defines parameters for CompletePasswordReset.
type CompletePasswordResetResponse ¶
type CompletePasswordResetResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Done
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Failure
}
func ParseCompletePasswordResetResponse ¶
func ParseCompletePasswordResetResponse(rsp *http.Response) (*CompletePasswordResetResponse, error)
ParseCompletePasswordResetResponse parses an HTTP response from a CompletePasswordResetWithResponse call
func (CompletePasswordResetResponse) ContentType ¶
func (r CompletePasswordResetResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CompletePasswordResetResponse) GetBody ¶
func (r CompletePasswordResetResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (CompletePasswordResetResponse) GetJSON200 ¶
func (r CompletePasswordResetResponse) GetJSON200() *Done
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (CompletePasswordResetResponse) GetJSONDefault ¶
func (r CompletePasswordResetResponse) GetJSONDefault() *Failure
GetJSONDefault returns the response for an HTTP default `application/json` response
func (CompletePasswordResetResponse) Status ¶
func (r CompletePasswordResetResponse) Status() string
Status returns HTTPResponse.Status
func (CompletePasswordResetResponse) StatusCode ¶
func (r CompletePasswordResetResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeviceSession ¶
type DeviceSession struct {
// Address The last address it was used from, or empty.
Address string `json:"address"`
App struct {
ClientId string `json:"client_id"`
// Name The app's name on the Auth tab.
Name string `json:"name"`
// Version As the app sent it, or empty.
Version string `json:"version"`
} `json:"app"`
// Current The caller's own; always false on the server API.
Current bool `json:"current"`
Device struct {
// Name As the app sent it, a guess such as Chrome on macOS for a browser, or empty.
Name string `json:"name"`
Os string `json:"os"`
} `json:"device"`
// EndedAt The server API only.
EndedAt *time.Time `json:"ended_at,omitempty"`
// EndedReason The server API only: signed_out, ended, everywhere or stolen.
EndedReason *string `json:"ended_reason,omitempty"`
// Id The session's ID token's sid.
Id string `json:"id"`
// LastUsedAt Its last sign-in or refresh.
LastUsedAt time.Time `json:"last_used_at"`
Location struct {
City string `json:"city"`
// Country ISO 3166-1 alpha-2, or empty.
Country string `json:"country"`
} `json:"location"`
StartedAt time.Time `json:"started_at"`
}
DeviceSession defines model for DeviceSession.
type Done ¶
type Done struct {
Errors []Message `json:"errors"`
Messages []Message `json:"messages"`
Result interface{} `json:"result"`
Success bool `json:"success"`
}
Done defines model for Done.
type EmailVerification ¶
type EmailVerification struct {
ClientId string `json:"client_id"`
Code *string `json:"code,omitempty"`
// Email Example: someone@example.com
Email string `json:"email"`
}
EmailVerification defines model for EmailVerification.
type Envelope ¶
type Envelope struct {
Errors []Message `json:"errors"`
Messages []Message `json:"messages"`
Success bool `json:"success"`
}
Envelope defines model for Envelope.
type Failure ¶
type Failure struct {
Errors []Message `json:"errors"`
Messages []Message `json:"messages"`
Result interface{} `json:"result"`
Success bool `json:"success"`
}
Failure defines model for Failure.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type Import ¶
type Import struct {
// Actor Who this is for, for the event log.
Actor *string `json:"actor,omitempty"`
Users []ImportedUser `json:"users"`
}
Import defines model for Import.
type ImportResult ¶
type ImportResult struct {
Created int `json:"created"`
Failed []struct {
Id string `json:"id"`
Reason string `json:"reason"`
} `json:"failed"`
// Skipped Users whose id exists already.
Skipped int `json:"skipped"`
}
ImportResult defines model for ImportResult.
type ImportedUser ¶
type ImportedUser struct {
Email *string `json:"email,omitempty"`
EmailVerified *bool `json:"email_verified,omitempty"`
Id string `json:"id"`
Name *string `json:"name,omitempty"`
PasswordHash *struct {
Algorithm ImportedUserPasswordHashAlgorithm `json:"algorithm"`
// Value $2a$, $2b$ or $2y$.
Value *string `json:"value,omitempty"`
} `json:"password_hash,omitempty"`
Phone *string `json:"phone,omitempty"`
}
ImportedUser defines model for ImportedUser.
type ImportedUserPasswordHashAlgorithm ¶
type ImportedUserPasswordHashAlgorithm string
ImportedUserPasswordHashAlgorithm defines model for ImportedUser.PasswordHash.Algorithm.
const (
Bcrypt ImportedUserPasswordHashAlgorithm = "bcrypt"
)
Defines values for ImportedUserPasswordHashAlgorithm.
func (ImportedUserPasswordHashAlgorithm) Valid ¶
func (e ImportedUserPasswordHashAlgorithm) Valid() bool
Valid indicates whether the value is a known member of the ImportedUserPasswordHashAlgorithm enum.
type Message ¶
type Message struct {
Code int `json:"code"`
DocumentationUrl *string `json:"documentation_url,omitempty"`
Message string `json:"message"`
Source *struct {
// Pointer A JSON Pointer to the field at fault.
Pointer *string `json:"pointer,omitempty"`
} `json:"source,omitempty"`
}
Message defines model for Message.
type NewUser ¶
type NewUser struct {
// Actor Who this is for, for the event log.
Actor *string `json:"actor,omitempty"`
Email *string `json:"email,omitempty"`
EmailVerified *bool `json:"email_verified,omitempty"`
// Id 1 to 128 letters, digits, '-' or '_', such as a Firebase UID.
Id *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Password *string `json:"password,omitempty"`
// Phone E.164.
Phone *string `json:"phone,omitempty"`
}
NewUser An email, a phone, or both.
type RefreshJSONRequestBody ¶
type RefreshJSONRequestBody = RefreshRequest
RefreshJSONRequestBody defines body for Refresh for application/json ContentType.
type RefreshParams ¶
type RefreshParams struct {
// EdgescaleClientAddress The person's IP address, beside `Edgescale-Server-Secret`. It counts
// in the per-address limits. One that isn't an IP address isn't stored,
// and `messages` says so with code 3000; without the secret it's
// ignored, and `messages` says that too.
EdgescaleClientAddress *ClientAddress `json:"Edgescale-Client-Address,omitempty"`
// EdgescaleClientCity The person's city, beside `Edgescale-Server-Secret`, cut past 64 characters.
EdgescaleClientCity *ClientCity `json:"Edgescale-Client-City,omitempty"`
// EdgescaleClientCountry The person's country, an ISO 3166 code, beside
// `Edgescale-Server-Secret`. One that isn't two letters isn't stored,
// and `messages` says so with code 3000.
EdgescaleClientCountry *ClientCountry `json:"Edgescale-Client-Country,omitempty"`
// EdgescaleClientAgent The person's browser `User-Agent`, beside `Edgescale-Server-Secret`, cut past 64 characters.
EdgescaleClientAgent *ClientAgent `json:"Edgescale-Client-Agent,omitempty"`
}
RefreshParams defines parameters for Refresh.
type RefreshRequest ¶
type RefreshRequest struct {
// AppVersion Example: 13.2.2
AppVersion *string `json:"app_version,omitempty"`
ClientId string `json:"client_id"`
// DeviceName The device, as the app names it: up to 64 characters, cut past that.
//
// Example: iPhone 17 Pro
DeviceName *string `json:"device_name,omitempty"`
// DeviceOs Example: iOS 26.1
DeviceOs *string `json:"device_os,omitempty"`
RefreshToken *string `json:"refresh_token,omitempty"`
}
RefreshRequest defines model for RefreshRequest.
type RefreshResponse ¶
type RefreshResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *struct {
Errors []Message `json:"errors"`
Messages []Message `json:"messages"`
Result Tokens `json:"result"`
Success bool `json:"success"`
}
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Failure
}
func ParseRefreshResponse ¶
func ParseRefreshResponse(rsp *http.Response) (*RefreshResponse, error)
ParseRefreshResponse parses an HTTP response from a RefreshWithResponse call
func (RefreshResponse) ContentType ¶
func (r RefreshResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (RefreshResponse) GetBody ¶
func (r RefreshResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (RefreshResponse) GetJSON200 ¶
func (r RefreshResponse) GetJSON200() *struct { Errors []Message `json:"errors"` Messages []Message `json:"messages"` Result Tokens `json:"result"` Success bool `json:"success"` }
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (RefreshResponse) GetJSONDefault ¶
func (r RefreshResponse) GetJSONDefault() *Failure
GetJSONDefault returns the response for an HTTP default `application/json` response
func (RefreshResponse) Status ¶
func (r RefreshResponse) Status() string
Status returns HTTPResponse.Status
func (RefreshResponse) StatusCode ¶
func (r RefreshResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type RequestPasswordResetJSONRequestBody ¶
type RequestPasswordResetJSONRequestBody = ResetRequest
RequestPasswordResetJSONRequestBody defines body for RequestPasswordReset for application/json ContentType.
type RequestPasswordResetParams ¶
type RequestPasswordResetParams struct {
// EdgescaleClientAddress The person's IP address, beside `Edgescale-Server-Secret`. It counts
// in the per-address limits. One that isn't an IP address isn't stored,
// and `messages` says so with code 3000; without the secret it's
// ignored, and `messages` says that too.
EdgescaleClientAddress *ClientAddress `json:"Edgescale-Client-Address,omitempty"`
// EdgescaleClientCity The person's city, beside `Edgescale-Server-Secret`, cut past 64 characters.
EdgescaleClientCity *ClientCity `json:"Edgescale-Client-City,omitempty"`
// EdgescaleClientCountry The person's country, an ISO 3166 code, beside
// `Edgescale-Server-Secret`. One that isn't two letters isn't stored,
// and `messages` says so with code 3000.
EdgescaleClientCountry *ClientCountry `json:"Edgescale-Client-Country,omitempty"`
// EdgescaleClientAgent The person's browser `User-Agent`, beside `Edgescale-Server-Secret`, cut past 64 characters.
EdgescaleClientAgent *ClientAgent `json:"Edgescale-Client-Agent,omitempty"`
}
RequestPasswordResetParams defines parameters for RequestPasswordReset.
type RequestPasswordResetResponse ¶
type RequestPasswordResetResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON202 the response for an HTTP 202 `application/json` response
JSON202 *Done
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Failure
}
func ParseRequestPasswordResetResponse ¶
func ParseRequestPasswordResetResponse(rsp *http.Response) (*RequestPasswordResetResponse, error)
ParseRequestPasswordResetResponse parses an HTTP response from a RequestPasswordResetWithResponse call
func (RequestPasswordResetResponse) ContentType ¶
func (r RequestPasswordResetResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (RequestPasswordResetResponse) GetBody ¶
func (r RequestPasswordResetResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (RequestPasswordResetResponse) GetJSON202 ¶
func (r RequestPasswordResetResponse) GetJSON202() *Done
GetJSON202 returns the response for an HTTP 202 `application/json` response
func (RequestPasswordResetResponse) GetJSONDefault ¶
func (r RequestPasswordResetResponse) GetJSONDefault() *Failure
GetJSONDefault returns the response for an HTTP default `application/json` response
func (RequestPasswordResetResponse) Status ¶
func (r RequestPasswordResetResponse) Status() string
Status returns HTTPResponse.Status
func (RequestPasswordResetResponse) StatusCode ¶
func (r RequestPasswordResetResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ResetCompletion ¶
type ResetCompletion struct {
ClientId string `json:"client_id"`
Code *string `json:"code,omitempty"`
Email string `json:"email"`
Password *string `json:"password,omitempty"`
}
ResetCompletion defines model for ResetCompletion.
type ResetRequest ¶
type ResetRequest struct {
ClientId string `json:"client_id"`
Email string `json:"email"`
// Language Example: ar
Language *string `json:"language,omitempty"`
// TurnstileToken The Turnstile token, when the pool's bot check is on.
TurnstileToken *string `json:"turnstile_token,omitempty"`
}
ResetRequest defines model for ResetRequest.
type RevokeJSONRequestBody ¶
type RevokeJSONRequestBody = RefreshRequest
RevokeJSONRequestBody defines body for Revoke for application/json ContentType.
type RevokeParams ¶
type RevokeParams struct {
// EdgescaleClientAddress The person's IP address, beside `Edgescale-Server-Secret`. It counts
// in the per-address limits. One that isn't an IP address isn't stored,
// and `messages` says so with code 3000; without the secret it's
// ignored, and `messages` says that too.
EdgescaleClientAddress *ClientAddress `json:"Edgescale-Client-Address,omitempty"`
// EdgescaleClientCity The person's city, beside `Edgescale-Server-Secret`, cut past 64 characters.
EdgescaleClientCity *ClientCity `json:"Edgescale-Client-City,omitempty"`
// EdgescaleClientCountry The person's country, an ISO 3166 code, beside
// `Edgescale-Server-Secret`. One that isn't two letters isn't stored,
// and `messages` says so with code 3000.
EdgescaleClientCountry *ClientCountry `json:"Edgescale-Client-Country,omitempty"`
// EdgescaleClientAgent The person's browser `User-Agent`, beside `Edgescale-Server-Secret`, cut past 64 characters.
EdgescaleClientAgent *ClientAgent `json:"Edgescale-Client-Agent,omitempty"`
}
RevokeParams defines parameters for Revoke.
type RevokeResponse ¶
type RevokeResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Done
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Failure
}
func ParseRevokeResponse ¶
func ParseRevokeResponse(rsp *http.Response) (*RevokeResponse, error)
ParseRevokeResponse parses an HTTP response from a RevokeWithResponse call
func (RevokeResponse) ContentType ¶
func (r RevokeResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (RevokeResponse) GetBody ¶
func (r RevokeResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (RevokeResponse) GetJSON200 ¶
func (r RevokeResponse) GetJSON200() *Done
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (RevokeResponse) GetJSONDefault ¶
func (r RevokeResponse) GetJSONDefault() *Failure
GetJSONDefault returns the response for an HTTP default `application/json` response
func (RevokeResponse) Status ¶
func (r RevokeResponse) Status() string
Status returns HTTPResponse.Status
func (RevokeResponse) StatusCode ¶
func (r RevokeResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SendCodeJSONRequestBody ¶
type SendCodeJSONRequestBody = CodeRequest
SendCodeJSONRequestBody defines body for SendCode for application/json ContentType.
type SendCodeParams ¶
type SendCodeParams struct {
// EdgescaleClientAddress The person's IP address, beside `Edgescale-Server-Secret`. It counts
// in the per-address limits. One that isn't an IP address isn't stored,
// and `messages` says so with code 3000; without the secret it's
// ignored, and `messages` says that too.
EdgescaleClientAddress *ClientAddress `json:"Edgescale-Client-Address,omitempty"`
// EdgescaleClientCity The person's city, beside `Edgescale-Server-Secret`, cut past 64 characters.
EdgescaleClientCity *ClientCity `json:"Edgescale-Client-City,omitempty"`
// EdgescaleClientCountry The person's country, an ISO 3166 code, beside
// `Edgescale-Server-Secret`. One that isn't two letters isn't stored,
// and `messages` says so with code 3000.
EdgescaleClientCountry *ClientCountry `json:"Edgescale-Client-Country,omitempty"`
// EdgescaleClientAgent The person's browser `User-Agent`, beside `Edgescale-Server-Secret`, cut past 64 characters.
EdgescaleClientAgent *ClientAgent `json:"Edgescale-Client-Agent,omitempty"`
}
SendCodeParams defines parameters for SendCode.
type SendCodeResponse ¶
type SendCodeResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON202 the response for an HTTP 202 `application/json` response
JSON202 *Done
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Failure
}
func ParseSendCodeResponse ¶
func ParseSendCodeResponse(rsp *http.Response) (*SendCodeResponse, error)
ParseSendCodeResponse parses an HTTP response from a SendCodeWithResponse call
func (SendCodeResponse) ContentType ¶
func (r SendCodeResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (SendCodeResponse) GetBody ¶
func (r SendCodeResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (SendCodeResponse) GetJSON202 ¶
func (r SendCodeResponse) GetJSON202() *Done
GetJSON202 returns the response for an HTTP 202 `application/json` response
func (SendCodeResponse) GetJSONDefault ¶
func (r SendCodeResponse) GetJSONDefault() *Failure
GetJSONDefault returns the response for an HTTP default `application/json` response
func (SendCodeResponse) Status ¶
func (r SendCodeResponse) Status() string
Status returns HTTPResponse.Status
func (SendCodeResponse) StatusCode ¶
func (r SendCodeResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SignIn ¶
type SignIn struct {
// AppVersion Example: 13.2.2
AppVersion *string `json:"app_version,omitempty"`
ClientId string `json:"client_id"`
Code *string `json:"code,omitempty"`
// DeviceName The device, as the app names it: up to 64 characters, cut past that.
//
// Example: iPhone 17 Pro
DeviceName *string `json:"device_name,omitempty"`
// DeviceOs Example: iOS 26.1
DeviceOs *string `json:"device_os,omitempty"`
Email *string `json:"email,omitempty"`
Password *string `json:"password,omitempty"`
Phone *string `json:"phone,omitempty"`
}
SignIn An email and a password, or a phone and the code sent to it.
type SignInJSONRequestBody ¶
type SignInJSONRequestBody = SignIn
SignInJSONRequestBody defines body for SignIn for application/json ContentType.
type SignInParams ¶
type SignInParams struct {
// EdgescaleClientAddress The person's IP address, beside `Edgescale-Server-Secret`. It counts
// in the per-address limits. One that isn't an IP address isn't stored,
// and `messages` says so with code 3000; without the secret it's
// ignored, and `messages` says that too.
EdgescaleClientAddress *ClientAddress `json:"Edgescale-Client-Address,omitempty"`
// EdgescaleClientCity The person's city, beside `Edgescale-Server-Secret`, cut past 64 characters.
EdgescaleClientCity *ClientCity `json:"Edgescale-Client-City,omitempty"`
// EdgescaleClientCountry The person's country, an ISO 3166 code, beside
// `Edgescale-Server-Secret`. One that isn't two letters isn't stored,
// and `messages` says so with code 3000.
EdgescaleClientCountry *ClientCountry `json:"Edgescale-Client-Country,omitempty"`
// EdgescaleClientAgent The person's browser `User-Agent`, beside `Edgescale-Server-Secret`, cut past 64 characters.
EdgescaleClientAgent *ClientAgent `json:"Edgescale-Client-Agent,omitempty"`
}
SignInParams defines parameters for SignIn.
type SignInResponse ¶
type SignInResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON201 the response for an HTTP 201 `application/json` response
JSON201 *struct {
Errors []Message `json:"errors"`
Messages []Message `json:"messages"`
Result Tokens `json:"result"`
Success bool `json:"success"`
}
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Failure
}
func ParseSignInResponse ¶
func ParseSignInResponse(rsp *http.Response) (*SignInResponse, error)
ParseSignInResponse parses an HTTP response from a SignInWithResponse call
func (SignInResponse) ContentType ¶
func (r SignInResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (SignInResponse) GetBody ¶
func (r SignInResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (SignInResponse) GetJSON201 ¶
func (r SignInResponse) GetJSON201() *struct { Errors []Message `json:"errors"` Messages []Message `json:"messages"` Result Tokens `json:"result"` Success bool `json:"success"` }
GetJSON201 returns the response for an HTTP 201 `application/json` response
func (SignInResponse) GetJSONDefault ¶
func (r SignInResponse) GetJSONDefault() *Failure
GetJSONDefault returns the response for an HTTP default `application/json` response
func (SignInResponse) Status ¶
func (r SignInResponse) Status() string
Status returns HTTPResponse.Status
func (SignInResponse) StatusCode ¶
func (r SignInResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SignUp ¶
type SignUp struct {
ClientId string `json:"client_id"`
// Email Example: someone@example.com
Email *string `json:"email,omitempty"`
Name *string `json:"name,omitempty"`
Password *string `json:"password,omitempty"`
// Phone E.164.
//
// Example: +9647701234567
Phone *string `json:"phone,omitempty"`
// TurnstileToken The Turnstile token, when the pool's bot check is on and the sign-up has an email.
TurnstileToken *string `json:"turnstile_token,omitempty"`
}
SignUp An email and a password, or a phone alone.
type SignUpJSONRequestBody ¶
type SignUpJSONRequestBody = SignUp
SignUpJSONRequestBody defines body for SignUp for application/json ContentType.
type SignUpParams ¶
type SignUpParams struct {
// EdgescaleClientAddress The person's IP address, beside `Edgescale-Server-Secret`. It counts
// in the per-address limits. One that isn't an IP address isn't stored,
// and `messages` says so with code 3000; without the secret it's
// ignored, and `messages` says that too.
EdgescaleClientAddress *ClientAddress `json:"Edgescale-Client-Address,omitempty"`
// EdgescaleClientCity The person's city, beside `Edgescale-Server-Secret`, cut past 64 characters.
EdgescaleClientCity *ClientCity `json:"Edgescale-Client-City,omitempty"`
// EdgescaleClientCountry The person's country, an ISO 3166 code, beside
// `Edgescale-Server-Secret`. One that isn't two letters isn't stored,
// and `messages` says so with code 3000.
EdgescaleClientCountry *ClientCountry `json:"Edgescale-Client-Country,omitempty"`
// EdgescaleClientAgent The person's browser `User-Agent`, beside `Edgescale-Server-Secret`, cut past 64 characters.
EdgescaleClientAgent *ClientAgent `json:"Edgescale-Client-Agent,omitempty"`
}
SignUpParams defines parameters for SignUp.
type SignUpResponse ¶
type SignUpResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON202 the response for an HTTP 202 `application/json` response
JSON202 *Done
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Failure
}
func ParseSignUpResponse ¶
func ParseSignUpResponse(rsp *http.Response) (*SignUpResponse, error)
ParseSignUpResponse parses an HTTP response from a SignUpWithResponse call
func (SignUpResponse) ContentType ¶
func (r SignUpResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (SignUpResponse) GetBody ¶
func (r SignUpResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (SignUpResponse) GetJSON202 ¶
func (r SignUpResponse) GetJSON202() *Done
GetJSON202 returns the response for an HTTP 202 `application/json` response
func (SignUpResponse) GetJSONDefault ¶
func (r SignUpResponse) GetJSONDefault() *Failure
GetJSONDefault returns the response for an HTTP default `application/json` response
func (SignUpResponse) Status ¶
func (r SignUpResponse) Status() string
Status returns HTTPResponse.Status
func (SignUpResponse) StatusCode ¶
func (r SignUpResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SupportCode ¶
type SupportCode struct {
Code string `json:"code"`
// ExpiresIn Seconds.
ExpiresIn int `json:"expires_in"`
// Phone The phone it signs in with.
Phone string `json:"phone"`
}
SupportCode defines model for SupportCode.
type Tokens ¶
type Tokens struct {
// AccessToken A JWT.
AccessToken string `json:"access_token"`
// ExpiresIn The access token's lifetime in seconds.
ExpiresIn int `json:"expires_in"`
// IdToken A JWT: sub, amr and auth_time, with email and phone_number when real.
IdToken string `json:"id_token"`
RefreshToken string `json:"refresh_token"`
TokenType TokensTokenType `json:"token_type"`
}
Tokens defines model for Tokens.
type TokensTokenType ¶
type TokensTokenType string
TokensTokenType defines model for Tokens.TokenType.
const (
Bearer TokensTokenType = "Bearer"
)
Defines values for TokensTokenType.
func (TokensTokenType) Valid ¶
func (e TokensTokenType) Valid() bool
Valid indicates whether the value is a known member of the TokensTokenType enum.
type User ¶
type User struct {
CreatedAt time.Time `json:"created_at"`
// Disabled Refused sign-in and refresh until enabled again.
Disabled bool `json:"disabled"`
// Email Empty for a phone user with no email.
Email string `json:"email"`
EmailVerified bool `json:"email_verified"`
HasPassword bool `json:"has_password"`
// Id The ID tokens' sub.
Id string `json:"id"`
// Phone E.164, or empty.
Phone string `json:"phone"`
// PhoneCodesPausedUntil Until then no sign-in code goes to the phone, after a stolen report.
PhoneCodesPausedUntil *time.Time `json:"phone_codes_paused_until,omitempty"`
}
User defines model for User.
type UserChange ¶
type UserChange struct {
// Actor Who this is for, for the event log.
Actor *string `json:"actor,omitempty"`
Disabled *bool `json:"disabled,omitempty"`
// Email Example: someone@example.com
Email *string `json:"email,omitempty"`
EmailVerified *bool `json:"email_verified,omitempty"`
Password *string `json:"password,omitempty"`
// Phone E.164.
//
// Example: +9647701234567
Phone *string `json:"phone,omitempty"`
// PhoneCodesPaused false lifts a stolen report's pause on the phone's codes; true is a 422.
PhoneCodesPaused *bool `json:"phone_codes_paused,omitempty"`
}
UserChange Each field left out stays as it is.
type UserSearch ¶
type UserSearch struct {
// Email Example: someone@example.com
Email *string `json:"email,omitempty"`
// Phone E.164.
//
// Example: +9647701234567
Phone *string `json:"phone,omitempty"`
}
UserSearch An email or a phone, not both.
type VerifyEmailJSONRequestBody ¶
type VerifyEmailJSONRequestBody = EmailVerification
VerifyEmailJSONRequestBody defines body for VerifyEmail for application/json ContentType.
type VerifyEmailParams ¶
type VerifyEmailParams struct {
// EdgescaleClientAddress The person's IP address, beside `Edgescale-Server-Secret`. It counts
// in the per-address limits. One that isn't an IP address isn't stored,
// and `messages` says so with code 3000; without the secret it's
// ignored, and `messages` says that too.
EdgescaleClientAddress *ClientAddress `json:"Edgescale-Client-Address,omitempty"`
// EdgescaleClientCity The person's city, beside `Edgescale-Server-Secret`, cut past 64 characters.
EdgescaleClientCity *ClientCity `json:"Edgescale-Client-City,omitempty"`
// EdgescaleClientCountry The person's country, an ISO 3166 code, beside
// `Edgescale-Server-Secret`. One that isn't two letters isn't stored,
// and `messages` says so with code 3000.
EdgescaleClientCountry *ClientCountry `json:"Edgescale-Client-Country,omitempty"`
// EdgescaleClientAgent The person's browser `User-Agent`, beside `Edgescale-Server-Secret`, cut past 64 characters.
EdgescaleClientAgent *ClientAgent `json:"Edgescale-Client-Agent,omitempty"`
}
VerifyEmailParams defines parameters for VerifyEmail.
type VerifyEmailResponse ¶
type VerifyEmailResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Done
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Failure
}
func ParseVerifyEmailResponse ¶
func ParseVerifyEmailResponse(rsp *http.Response) (*VerifyEmailResponse, error)
ParseVerifyEmailResponse parses an HTTP response from a VerifyEmailWithResponse call
func (VerifyEmailResponse) ContentType ¶
func (r VerifyEmailResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (VerifyEmailResponse) GetBody ¶
func (r VerifyEmailResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (VerifyEmailResponse) GetJSON200 ¶
func (r VerifyEmailResponse) GetJSON200() *Done
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (VerifyEmailResponse) GetJSONDefault ¶
func (r VerifyEmailResponse) GetJSONDefault() *Failure
GetJSONDefault returns the response for an HTTP default `application/json` response
func (VerifyEmailResponse) Status ¶
func (r VerifyEmailResponse) Status() string
Status returns HTTPResponse.Status
func (VerifyEmailResponse) StatusCode ¶
func (r VerifyEmailResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode