userapi

package
v0.0.0-...-08a8310 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package userapi provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSpec

func GetSpec() (swagger *openapi3.T, err error)

GetSpec returns the OpenAPI specification corresponding to the generated code in this file. External references in the spec are resolved through PathToRawSpec; externally-referenced files must be embedded in their corresponding Go packages (via the import-mapping feature). URL-based external refs are not supported.

func GetSpecJSON

func GetSpecJSON() ([]byte, error)

GetSpecJSON returns the raw JSON bytes of the embedded OpenAPI specification: decompressed but not unmarshaled. External references are not resolved here; the bytes are the spec exactly as embedded by codegen. The result is cached at package init time, so repeated calls are cheap.

func GetSwagger deprecated

func GetSwagger() (*openapi3.T, error)

GetSwagger returns the OpenAPI specification corresponding to the generated code in this file.

Deprecated: GetSwagger predates kin-openapi renaming openapi3.Swagger to openapi3.T. Use GetSpec instead. This wrapper is retained for backwards compatibility.

func NewDeleteUserRequest

func NewDeleteUserRequest(server string, userId openapi_types.UUID) (*http.Request, error)

NewDeleteUserRequest constructs an http.Request for the DeleteUser method

func NewGetSharedProfileRequest

func NewGetSharedProfileRequest(server string, handle string) (*http.Request, error)

NewGetSharedProfileRequest constructs an http.Request for the GetSharedProfile method

func NewGetSharedProfilesByIdsRequest

func NewGetSharedProfilesByIdsRequest(server string, params *GetSharedProfilesByIdsParams) (*http.Request, error)

NewGetSharedProfilesByIdsRequest constructs an http.Request for the GetSharedProfilesByIds method

func NewGetUserRequest

func NewGetUserRequest(server string, userId openapi_types.UUID) (*http.Request, error)

NewGetUserRequest constructs an http.Request for the GetUser method

func NewSearchSharedProfilesRequest

func NewSearchSharedProfilesRequest(server string, params *SearchSharedProfilesParams) (*http.Request, error)

NewSearchSharedProfilesRequest constructs an http.Request for the SearchSharedProfiles method

func NewUpdateUserRequest

func NewUpdateUserRequest(server string, userId openapi_types.UUID, body UpdateUserJSONRequestBody) (*http.Request, error)

NewUpdateUserRequest calls the generic UpdateUser builder with application/json body

func NewUpdateUserRequestWithBody

func NewUpdateUserRequestWithBody(server string, userId openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error)

NewUpdateUserRequestWithBody constructs an http.Request for the UpdateUser method, with any body, and a specified content type

func NewUpsertUserRequest

func NewUpsertUserRequest(server string, body UpsertUserJSONRequestBody) (*http.Request, error)

NewUpsertUserRequest calls the generic UpsertUser builder with application/json body

func NewUpsertUserRequestWithBody

func NewUpsertUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewUpsertUserRequestWithBody constructs an http.Request for the UpsertUser method, with any body, and a specified content type

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

type BadRequest

type BadRequest = externalRef0.Problem

BadRequest defines model for BadRequest.

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) DeleteUser

func (c *Client) DeleteUser(ctx context.Context, userId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

DeleteUser Delete a user account (self only); idempotent

Corresponds with DELETE /users/{userId} (the `DeleteUser` operationId).

func (*Client) GetSharedProfile

func (c *Client) GetSharedProfile(ctx context.Context, handle string, reqEditors ...RequestEditorFn) (*http.Response, error)

GetSharedProfile Resolve a handle to its profile card (any authenticated caller; non-private only)

Corresponds with GET /shared/profiles/{handle} (the `GetSharedProfile` operationId).

func (*Client) GetSharedProfilesByIds

func (c *Client) GetSharedProfilesByIds(ctx context.Context, params *GetSharedProfilesByIdsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

GetSharedProfilesByIds Batch profile cards for hydration (returned regardless of visibility - actions are signed; page access stays gated)

Corresponds with GET /shared/profiles/by-ids (the `GetSharedProfilesByIds` operationId).

func (*Client) GetUser

func (c *Client) GetUser(ctx context.Context, userId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

GetUser Fetch a user (self, a service credential, or admin)

Corresponds with GET /users/{userId} (the `GetUser` operationId).

func (*Client) SearchSharedProfiles

func (c *Client) SearchSharedProfiles(ctx context.Context, params *SearchSharedProfilesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

SearchSharedProfiles Substring search over listed profiles' folded handles

Corresponds with GET /shared/profiles/search (the `SearchSharedProfiles` operationId).

func (*Client) UpdateUser

func (c *Client) UpdateUser(ctx context.Context, userId openapi_types.UUID, body UpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

UpdateUser Self-service profile update (handle, avatar URL, currency, visibility)

Takes a body of the `application/json` content type.

Corresponds with PATCH /users/{userId} (the `UpdateUser` operationId).

func (*Client) UpdateUserWithBody

func (c *Client) UpdateUserWithBody(ctx context.Context, userId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

UpdateUserWithBody Self-service profile update (handle, avatar URL, currency, visibility)

Takes any type of body and a specified content type.

Corresponds with PATCH /users/{userId} (the `UpdateUser` operationId).

func (*Client) UpsertUser

func (c *Client) UpsertUser(ctx context.Context, body UpsertUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

UpsertUser Create-or-update a user at login time (auth service credential only)

Takes a body of the `application/json` content type.

Corresponds with POST /internal/users/upsert (the `UpsertUser` operationId).

func (*Client) UpsertUserWithBody

func (c *Client) UpsertUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

UpsertUserWithBody Create-or-update a user at login time (auth service credential only)

Takes any type of body and a specified content type.

Corresponds with POST /internal/users/upsert (the `UpsertUser` operationId).

type ClientInterface

type ClientInterface interface {

	// UpsertUserWithBody Create-or-update a user at login time (auth service credential only)
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /internal/users/upsert (the `UpsertUser` operationId).
	UpsertUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpsertUser Create-or-update a user at login time (auth service credential only)
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /internal/users/upsert (the `UpsertUser` operationId).
	UpsertUser(ctx context.Context, body UpsertUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetSharedProfilesByIds Batch profile cards for hydration (returned regardless of visibility - actions are signed; page access stays gated)
	//
	// Corresponds with GET /shared/profiles/by-ids (the `GetSharedProfilesByIds` operationId).
	GetSharedProfilesByIds(ctx context.Context, params *GetSharedProfilesByIdsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SearchSharedProfiles Substring search over listed profiles' folded handles
	//
	// Corresponds with GET /shared/profiles/search (the `SearchSharedProfiles` operationId).
	SearchSharedProfiles(ctx context.Context, params *SearchSharedProfilesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetSharedProfile Resolve a handle to its profile card (any authenticated caller; non-private only)
	//
	// Corresponds with GET /shared/profiles/{handle} (the `GetSharedProfile` operationId).
	GetSharedProfile(ctx context.Context, handle string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteUser Delete a user account (self only); idempotent
	//
	// Corresponds with DELETE /users/{userId} (the `DeleteUser` operationId).
	DeleteUser(ctx context.Context, userId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetUser Fetch a user (self, a service credential, or admin)
	//
	// Corresponds with GET /users/{userId} (the `GetUser` operationId).
	GetUser(ctx context.Context, userId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateUserWithBody Self-service profile update (handle, avatar URL, currency, visibility)
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with PATCH /users/{userId} (the `UpdateUser` operationId).
	UpdateUserWithBody(ctx context.Context, userId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateUser Self-service profile update (handle, avatar URL, currency, visibility)
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with PATCH /users/{userId} (the `UpdateUser` operationId).
	UpdateUser(ctx context.Context, userId openapi_types.UUID, body UpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

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) DeleteUserWithResponse

func (c *ClientWithResponses) DeleteUserWithResponse(ctx context.Context, userId openapi_types.UUID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error)

DeleteUserWithResponse Delete a user account (self only); idempotent

Returns a wrapper object for the known response body format(s).

Corresponds with DELETE /users/{userId} (the `DeleteUser` operationId).

func (*ClientWithResponses) GetSharedProfileWithResponse

func (c *ClientWithResponses) GetSharedProfileWithResponse(ctx context.Context, handle string, reqEditors ...RequestEditorFn) (*GetSharedProfileResponse, error)

GetSharedProfileWithResponse Resolve a handle to its profile card (any authenticated caller; non-private only)

Returns a wrapper object for the known response body format(s).

Corresponds with GET /shared/profiles/{handle} (the `GetSharedProfile` operationId).

func (*ClientWithResponses) GetSharedProfilesByIdsWithResponse

func (c *ClientWithResponses) GetSharedProfilesByIdsWithResponse(ctx context.Context, params *GetSharedProfilesByIdsParams, reqEditors ...RequestEditorFn) (*GetSharedProfilesByIdsResponse, error)

GetSharedProfilesByIdsWithResponse Batch profile cards for hydration (returned regardless of visibility - actions are signed; page access stays gated)

Returns a wrapper object for the known response body format(s).

Corresponds with GET /shared/profiles/by-ids (the `GetSharedProfilesByIds` operationId).

func (*ClientWithResponses) GetUserWithResponse

func (c *ClientWithResponses) GetUserWithResponse(ctx context.Context, userId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetUserResponse, error)

GetUserWithResponse Fetch a user (self, a service credential, or admin)

Returns a wrapper object for the known response body format(s).

Corresponds with GET /users/{userId} (the `GetUser` operationId).

func (*ClientWithResponses) SearchSharedProfilesWithResponse

func (c *ClientWithResponses) SearchSharedProfilesWithResponse(ctx context.Context, params *SearchSharedProfilesParams, reqEditors ...RequestEditorFn) (*SearchSharedProfilesResponse, error)

SearchSharedProfilesWithResponse Substring search over listed profiles' folded handles

Returns a wrapper object for the known response body format(s).

Corresponds with GET /shared/profiles/search (the `SearchSharedProfiles` operationId).

func (*ClientWithResponses) UpdateUserWithBodyWithResponse

func (c *ClientWithResponses) UpdateUserWithBodyWithResponse(ctx context.Context, userId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateUserResponse, error)

UpdateUserWithBodyWithResponse Self-service profile update (handle, avatar URL, currency, visibility)

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 /users/{userId} (the `UpdateUser` operationId).

func (*ClientWithResponses) UpdateUserWithResponse

func (c *ClientWithResponses) UpdateUserWithResponse(ctx context.Context, userId openapi_types.UUID, body UpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateUserResponse, error)

UpdateUserWithResponse Self-service profile update (handle, avatar URL, currency, visibility)

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with PATCH /users/{userId} (the `UpdateUser` operationId).

func (*ClientWithResponses) UpsertUserWithBodyWithResponse

func (c *ClientWithResponses) UpsertUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpsertUserResponse, error)

UpsertUserWithBodyWithResponse Create-or-update a user at login time (auth service credential only)

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 /internal/users/upsert (the `UpsertUser` operationId).

func (*ClientWithResponses) UpsertUserWithResponse

func (c *ClientWithResponses) UpsertUserWithResponse(ctx context.Context, body UpsertUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpsertUserResponse, error)

UpsertUserWithResponse Create-or-update a user at login time (auth service credential only)

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /internal/users/upsert (the `UpsertUser` operationId).

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {

	// UpsertUserWithBodyWithResponse Create-or-update a user at login time (auth service credential only)
	//
	// 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 /internal/users/upsert (the `UpsertUser` operationId).
	UpsertUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpsertUserResponse, error)

	// UpsertUserWithResponse Create-or-update a user at login time (auth service credential only)
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /internal/users/upsert (the `UpsertUser` operationId).
	UpsertUserWithResponse(ctx context.Context, body UpsertUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpsertUserResponse, error)

	// GetSharedProfilesByIdsWithResponse Batch profile cards for hydration (returned regardless of visibility - actions are signed; page access stays gated)
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /shared/profiles/by-ids (the `GetSharedProfilesByIds` operationId).
	GetSharedProfilesByIdsWithResponse(ctx context.Context, params *GetSharedProfilesByIdsParams, reqEditors ...RequestEditorFn) (*GetSharedProfilesByIdsResponse, error)

	// SearchSharedProfilesWithResponse Substring search over listed profiles' folded handles
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /shared/profiles/search (the `SearchSharedProfiles` operationId).
	SearchSharedProfilesWithResponse(ctx context.Context, params *SearchSharedProfilesParams, reqEditors ...RequestEditorFn) (*SearchSharedProfilesResponse, error)

	// GetSharedProfileWithResponse Resolve a handle to its profile card (any authenticated caller; non-private only)
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /shared/profiles/{handle} (the `GetSharedProfile` operationId).
	GetSharedProfileWithResponse(ctx context.Context, handle string, reqEditors ...RequestEditorFn) (*GetSharedProfileResponse, error)

	// DeleteUserWithResponse Delete a user account (self only); idempotent
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /users/{userId} (the `DeleteUser` operationId).
	DeleteUserWithResponse(ctx context.Context, userId openapi_types.UUID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error)

	// GetUserWithResponse Fetch a user (self, a service credential, or admin)
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /users/{userId} (the `GetUser` operationId).
	GetUserWithResponse(ctx context.Context, userId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetUserResponse, error)

	// UpdateUserWithBodyWithResponse Self-service profile update (handle, avatar URL, currency, visibility)
	//
	// 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 /users/{userId} (the `UpdateUser` operationId).
	UpdateUserWithBodyWithResponse(ctx context.Context, userId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateUserResponse, error)

	// UpdateUserWithResponse Self-service profile update (handle, avatar URL, currency, visibility)
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PATCH /users/{userId} (the `UpdateUser` operationId).
	UpdateUserWithResponse(ctx context.Context, userId openapi_types.UUID, body UpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateUserResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type Conflict

type Conflict = externalRef0.Problem

Conflict defines model for Conflict.

type DeleteUserResponse

type DeleteUserResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response
	ApplicationproblemJSON400 *BadRequest
	// ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response
	ApplicationproblemJSON401 *Unauthorized
	// ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response
	ApplicationproblemJSON403 *Forbidden
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *InternalError
}

func ParseDeleteUserResponse

func ParseDeleteUserResponse(rsp *http.Response) (*DeleteUserResponse, error)

ParseDeleteUserResponse parses an HTTP response from a DeleteUserWithResponse call

func (DeleteUserResponse) ContentType

func (r DeleteUserResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DeleteUserResponse) GetApplicationproblemJSON400

func (r DeleteUserResponse) GetApplicationproblemJSON400() *BadRequest

GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response

func (DeleteUserResponse) GetApplicationproblemJSON401

func (r DeleteUserResponse) GetApplicationproblemJSON401() *Unauthorized

GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response

func (DeleteUserResponse) GetApplicationproblemJSON403

func (r DeleteUserResponse) GetApplicationproblemJSON403() *Forbidden

GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response

func (DeleteUserResponse) GetApplicationproblemJSONDefault

func (r DeleteUserResponse) GetApplicationproblemJSONDefault() *InternalError

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (DeleteUserResponse) GetBody

func (r DeleteUserResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DeleteUserResponse) Status

func (r DeleteUserResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteUserResponse) StatusCode

func (r DeleteUserResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Forbidden

type Forbidden = externalRef0.Problem

Forbidden defines model for Forbidden.

type GetSharedProfileResponse

type GetSharedProfileResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *ProfileCard
	// ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response
	ApplicationproblemJSON401 *Unauthorized
	// ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response
	ApplicationproblemJSON404 *NotFound
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *InternalError
}

func ParseGetSharedProfileResponse

func ParseGetSharedProfileResponse(rsp *http.Response) (*GetSharedProfileResponse, error)

ParseGetSharedProfileResponse parses an HTTP response from a GetSharedProfileWithResponse call

func (GetSharedProfileResponse) ContentType

func (r GetSharedProfileResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetSharedProfileResponse) GetApplicationproblemJSON401

func (r GetSharedProfileResponse) GetApplicationproblemJSON401() *Unauthorized

GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response

func (GetSharedProfileResponse) GetApplicationproblemJSON404

func (r GetSharedProfileResponse) GetApplicationproblemJSON404() *NotFound

GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response

func (GetSharedProfileResponse) GetApplicationproblemJSONDefault

func (r GetSharedProfileResponse) GetApplicationproblemJSONDefault() *InternalError

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (GetSharedProfileResponse) GetBody

func (r GetSharedProfileResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetSharedProfileResponse) GetJSON200

func (r GetSharedProfileResponse) GetJSON200() *ProfileCard

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetSharedProfileResponse) Status

func (r GetSharedProfileResponse) Status() string

Status returns HTTPResponse.Status

func (GetSharedProfileResponse) StatusCode

func (r GetSharedProfileResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetSharedProfilesByIdsParams

type GetSharedProfilesByIdsParams struct {
	Ids []openapi_types.UUID `form:"ids" json:"ids"`
}

GetSharedProfilesByIdsParams defines parameters for GetSharedProfilesByIds.

type GetSharedProfilesByIdsResponse

type GetSharedProfilesByIdsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *struct {
		Profiles []ProfileCard `json:"profiles"`
	}
	// ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response
	ApplicationproblemJSON400 *BadRequest
	// ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response
	ApplicationproblemJSON401 *Unauthorized
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *InternalError
}

func ParseGetSharedProfilesByIdsResponse

func ParseGetSharedProfilesByIdsResponse(rsp *http.Response) (*GetSharedProfilesByIdsResponse, error)

ParseGetSharedProfilesByIdsResponse parses an HTTP response from a GetSharedProfilesByIdsWithResponse call

func (GetSharedProfilesByIdsResponse) ContentType

func (r GetSharedProfilesByIdsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetSharedProfilesByIdsResponse) GetApplicationproblemJSON400

func (r GetSharedProfilesByIdsResponse) GetApplicationproblemJSON400() *BadRequest

GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response

func (GetSharedProfilesByIdsResponse) GetApplicationproblemJSON401

func (r GetSharedProfilesByIdsResponse) GetApplicationproblemJSON401() *Unauthorized

GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response

func (GetSharedProfilesByIdsResponse) GetApplicationproblemJSONDefault

func (r GetSharedProfilesByIdsResponse) GetApplicationproblemJSONDefault() *InternalError

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (GetSharedProfilesByIdsResponse) GetBody

func (r GetSharedProfilesByIdsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetSharedProfilesByIdsResponse) GetJSON200

func (r GetSharedProfilesByIdsResponse) GetJSON200() *struct {
	Profiles []ProfileCard `json:"profiles"`
}

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetSharedProfilesByIdsResponse) Status

Status returns HTTPResponse.Status

func (GetSharedProfilesByIdsResponse) StatusCode

func (r GetSharedProfilesByIdsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetUserResponse

type GetUserResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *User
	// ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response
	ApplicationproblemJSON400 *BadRequest
	// ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response
	ApplicationproblemJSON401 *Unauthorized
	// ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response
	ApplicationproblemJSON403 *Forbidden
	// ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response
	ApplicationproblemJSON404 *NotFound
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *InternalError
}

func ParseGetUserResponse

func ParseGetUserResponse(rsp *http.Response) (*GetUserResponse, error)

ParseGetUserResponse parses an HTTP response from a GetUserWithResponse call

func (GetUserResponse) ContentType

func (r GetUserResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetUserResponse) GetApplicationproblemJSON400

func (r GetUserResponse) GetApplicationproblemJSON400() *BadRequest

GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response

func (GetUserResponse) GetApplicationproblemJSON401

func (r GetUserResponse) GetApplicationproblemJSON401() *Unauthorized

GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response

func (GetUserResponse) GetApplicationproblemJSON403

func (r GetUserResponse) GetApplicationproblemJSON403() *Forbidden

GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response

func (GetUserResponse) GetApplicationproblemJSON404

func (r GetUserResponse) GetApplicationproblemJSON404() *NotFound

GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response

func (GetUserResponse) GetApplicationproblemJSONDefault

func (r GetUserResponse) GetApplicationproblemJSONDefault() *InternalError

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (GetUserResponse) GetBody

func (r GetUserResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetUserResponse) GetJSON200

func (r GetUserResponse) GetJSON200() *User

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetUserResponse) Status

func (r GetUserResponse) Status() string

Status returns HTTPResponse.Status

func (GetUserResponse) StatusCode

func (r GetUserResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type InternalError

type InternalError = externalRef0.Problem

InternalError defines model for InternalError.

type NotFound

type NotFound = externalRef0.Problem

NotFound defines model for NotFound.

type ProfileCard

type ProfileCard = externalRef0.ProfileCard

ProfileCard The cross-user projection of a user. Never email, never roles.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type SearchSharedProfilesParams

type SearchSharedProfilesParams struct {
	Q externalRef0.UserSearchQ `form:"q" json:"q"`
}

SearchSharedProfilesParams defines parameters for SearchSharedProfiles.

type SearchSharedProfilesResponse

type SearchSharedProfilesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *struct {
		Profiles []ProfileCard `json:"profiles"`
	}
	// ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response
	ApplicationproblemJSON400 *BadRequest
	// ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response
	ApplicationproblemJSON401 *Unauthorized
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *InternalError
}

func ParseSearchSharedProfilesResponse

func ParseSearchSharedProfilesResponse(rsp *http.Response) (*SearchSharedProfilesResponse, error)

ParseSearchSharedProfilesResponse parses an HTTP response from a SearchSharedProfilesWithResponse call

func (SearchSharedProfilesResponse) ContentType

func (r SearchSharedProfilesResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (SearchSharedProfilesResponse) GetApplicationproblemJSON400

func (r SearchSharedProfilesResponse) GetApplicationproblemJSON400() *BadRequest

GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response

func (SearchSharedProfilesResponse) GetApplicationproblemJSON401

func (r SearchSharedProfilesResponse) GetApplicationproblemJSON401() *Unauthorized

GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response

func (SearchSharedProfilesResponse) GetApplicationproblemJSONDefault

func (r SearchSharedProfilesResponse) GetApplicationproblemJSONDefault() *InternalError

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (SearchSharedProfilesResponse) GetBody

func (r SearchSharedProfilesResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (SearchSharedProfilesResponse) GetJSON200

func (r SearchSharedProfilesResponse) GetJSON200() *struct {
	Profiles []ProfileCard `json:"profiles"`
}

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (SearchSharedProfilesResponse) Status

Status returns HTTPResponse.Status

func (SearchSharedProfilesResponse) StatusCode

func (r SearchSharedProfilesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type TooManyRequests

type TooManyRequests = externalRef0.Problem

TooManyRequests defines model for TooManyRequests.

type Unauthorized

type Unauthorized = externalRef0.Problem

Unauthorized defines model for Unauthorized.

type UpdateUserJSONRequestBody

type UpdateUserJSONRequestBody = UpdateUserRequest

UpdateUserJSONRequestBody defines body for UpdateUser for application/json ContentType.

type UpdateUserRequest

type UpdateUserRequest struct {
	AvatarUrl *string `json:"avatar_url,omitempty"`

	// Handle New typed form. Any change to the typed string, including a decoration-only edit (case or underscores only, same folded key), still consumes the cooldown: one change per cooldown window (429 handle_cooldown); folded-key collisions answer 409 handle_taken.
	Handle            *externalRef0.Handle       `json:"handle,omitempty"`
	LandingPage       *externalRef0.LandingPage  `json:"landing_page,omitempty"`
	PreferredCurrency *externalRef0.CurrencyCode `json:"preferred_currency,omitempty"`
	ProfileVisibility *externalRef0.Visibility   `json:"profile_visibility,omitempty"`
}

UpdateUserRequest Absent fields keep their value; an empty avatar_url clears it.

type UpdateUserResponse

type UpdateUserResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *User
	// ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response
	ApplicationproblemJSON400 *BadRequest
	// ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response
	ApplicationproblemJSON401 *Unauthorized
	// ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response
	ApplicationproblemJSON403 *Forbidden
	// ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response
	ApplicationproblemJSON404 *NotFound
	// ApplicationproblemJSON409 the response for an HTTP 409 `application/problem+json` response
	ApplicationproblemJSON409 *Conflict
	// ApplicationproblemJSON429 the response for an HTTP 429 `application/problem+json` response
	ApplicationproblemJSON429 *TooManyRequests
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *InternalError
}

func ParseUpdateUserResponse

func ParseUpdateUserResponse(rsp *http.Response) (*UpdateUserResponse, error)

ParseUpdateUserResponse parses an HTTP response from a UpdateUserWithResponse call

func (UpdateUserResponse) ContentType

func (r UpdateUserResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (UpdateUserResponse) GetApplicationproblemJSON400

func (r UpdateUserResponse) GetApplicationproblemJSON400() *BadRequest

GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response

func (UpdateUserResponse) GetApplicationproblemJSON401

func (r UpdateUserResponse) GetApplicationproblemJSON401() *Unauthorized

GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response

func (UpdateUserResponse) GetApplicationproblemJSON403

func (r UpdateUserResponse) GetApplicationproblemJSON403() *Forbidden

GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response

func (UpdateUserResponse) GetApplicationproblemJSON404

func (r UpdateUserResponse) GetApplicationproblemJSON404() *NotFound

GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response

func (UpdateUserResponse) GetApplicationproblemJSON409

func (r UpdateUserResponse) GetApplicationproblemJSON409() *Conflict

GetApplicationproblemJSON409 returns the response for an HTTP 409 `application/problem+json` response

func (UpdateUserResponse) GetApplicationproblemJSON429

func (r UpdateUserResponse) GetApplicationproblemJSON429() *TooManyRequests

GetApplicationproblemJSON429 returns the response for an HTTP 429 `application/problem+json` response

func (UpdateUserResponse) GetApplicationproblemJSONDefault

func (r UpdateUserResponse) GetApplicationproblemJSONDefault() *InternalError

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (UpdateUserResponse) GetBody

func (r UpdateUserResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (UpdateUserResponse) GetJSON200

func (r UpdateUserResponse) GetJSON200() *User

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (UpdateUserResponse) Status

func (r UpdateUserResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateUserResponse) StatusCode

func (r UpdateUserResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpsertUserJSONRequestBody

type UpsertUserJSONRequestBody = UpsertUserRequest

UpsertUserJSONRequestBody defines body for UpsertUser for application/json ContentType.

type UpsertUserRequest

type UpsertUserRequest struct {
	AvatarUrl *string `json:"avatar_url,omitempty"`

	// DisplayName The provider's display name. Used ONLY as the handle derivation seed when this upsert creates the account; it is not stored and never overwrites an existing handle.
	DisplayName string `json:"display_name"`
	Email       string `json:"email"`

	// LocaleHint BCP 47 language tag from the login request's Accept-Language header. Applied only when this upsert creates the account: it seeds preferred_currency and never touches an existing user.
	LocaleHint *string `json:"locale_hint,omitempty"`
}

UpsertUserRequest defines model for UpsertUserRequest.

type UpsertUserResponse

type UpsertUserResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *User
	// ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response
	ApplicationproblemJSON400 *BadRequest
	// ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response
	ApplicationproblemJSON401 *Unauthorized
	// ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response
	ApplicationproblemJSON403 *Forbidden
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *InternalError
}

func ParseUpsertUserResponse

func ParseUpsertUserResponse(rsp *http.Response) (*UpsertUserResponse, error)

ParseUpsertUserResponse parses an HTTP response from a UpsertUserWithResponse call

func (UpsertUserResponse) ContentType

func (r UpsertUserResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (UpsertUserResponse) GetApplicationproblemJSON400

func (r UpsertUserResponse) GetApplicationproblemJSON400() *BadRequest

GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response

func (UpsertUserResponse) GetApplicationproblemJSON401

func (r UpsertUserResponse) GetApplicationproblemJSON401() *Unauthorized

GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response

func (UpsertUserResponse) GetApplicationproblemJSON403

func (r UpsertUserResponse) GetApplicationproblemJSON403() *Forbidden

GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response

func (UpsertUserResponse) GetApplicationproblemJSONDefault

func (r UpsertUserResponse) GetApplicationproblemJSONDefault() *InternalError

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (UpsertUserResponse) GetBody

func (r UpsertUserResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (UpsertUserResponse) GetJSON200

func (r UpsertUserResponse) GetJSON200() *User

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (UpsertUserResponse) Status

func (r UpsertUserResponse) Status() string

Status returns HTTPResponse.Status

func (UpsertUserResponse) StatusCode

func (r UpsertUserResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type User

type User struct {
	AvatarUrl *string   `json:"avatar_url,omitempty"`
	CreatedAt time.Time `json:"created_at"`
	Email     string    `json:"email"`

	// Handle The user's single identity. 2-30 chars, alphanumeric plus interior underscores; case and underscores are decoration (uniqueness folds them).
	Handle externalRef0.Handle `json:"handle"`
	Id     openapi_types.UUID  `json:"id"`

	// LandingPage Where the app opens after sign-in. Private preference, defaulted to feed for every account; never on ProfileCard.
	LandingPage externalRef0.LandingPage `json:"landing_page"`

	// PreferredCurrency The display currency the SPA converts market values into. Defaulted from locale_hint at account creation, USD when no hint maps.
	PreferredCurrency externalRef0.CurrencyCode `json:"preferred_currency"`
	ProfileVisibility externalRef0.Visibility   `json:"profile_visibility"`
	Roles             []externalRef0.Role       `json:"roles"`
	UpdatedAt         time.Time                 `json:"updated_at"`
}

User defines model for User.

Jump to

Keyboard shortcuts

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