userep

package
v1.1.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetUserPhotoURLEndpoint

type GetUserPhotoURLEndpoint struct{}

Returns a temporary link that can be used to fetch the user's profile photo image.

The link expires one hour after it is issued, and no link is returned for a user who has never uploaded a photo. Users may always fetch their own photo; fetching another user's photo requires read access to team users.

func (*GetUserPhotoURLEndpoint) Materialize

type GetUserPhotoURLRequest

type GetUserPhotoURLRequest struct {
	// User ID.
	UserID string `path:"id" validate:"required"`
}

Request for a temporary link to a user's profile photo.

type RetrieveUserEndpoint

type RetrieveUserEndpoint struct{}

Retrieves a user's global profile.

The profile is shared across every account the user belongs to; account-specific details such as their status, role, and department live on the account user record instead.

func (*RetrieveUserEndpoint) Materialize

type RetrieveUserRequest

type RetrieveUserRequest struct {
	// Identifier for the user.
	//
	// Accepts the user's ID, email address, or username, tried in that order.
	UserID string `path:"id" validate:"required"`
}

Request to retrieve a user.

type UpdateUserEndpoint

type UpdateUserEndpoint struct{}

Updates a user's global profile.

Changes apply everywhere the user appears, in every account they belong to. Account-specific details such as their status, role, and department are changed on the account user record instead.

func (*UpdateUserEndpoint) Materialize

type UpdateUserRequest

type UpdateUserRequest struct {
	// User ID.
	UserID string `path:"id" validate:"required"`
	// The user's full display name.
	Name field.Optional[string] `json:"name,omitzero" validate:"omitempty,max=255"`
	// Location of the user's profile image.
	//
	// Uploading a photo through Upload User Photo overwrites whatever is set here.
	ImageUrl field.Optional[string] `json:"image_url,omitzero" validate:"omitempty,max=2083"`
	// When the user's email address was verified.
	//
	// Setting this marks the address as verified outright; no verification email is sent and no verification link is checked.
	EmailVerified field.Optional[time.Time] `json:"email_verified,omitzero"`
}

Request to update a user.

func (*UpdateUserRequest) SchemaExample

func (*UpdateUserRequest) SchemaExample() any

type UploadUserPhotoEndpoint

type UploadUserPhotoEndpoint struct{}

Uploads a profile photo for a user.

The photo replaces any existing one, and the user's `image_url` is repointed at an internal path rather than a fetchable image URL. Because the stored image is not publicly readable, use Get User Photo URL to obtain a temporary link for displaying it.

type UploadUserPhotoRequest

type UploadUserPhotoRequest struct {
	// User ID.
	UserID string `path:"id" validate:"required"`
	// The image itself, sent as the raw request body rather than as JSON or a multipart form.
	RawBody []byte `rawbody:"true"`
	// MIME type of the image (e.g. `image/png`).
	ContentType string `header:"Content-Type"`
}

Request to upload a user profile photo.

type UserSvcConfig

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

Jump to

Keyboard shortcuts

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