user

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func New

func New(p newParams) *Handler

New returns an implementation of the proto Users.Users interface (service).

func (*Handler) Build

func (h *Handler) Build(opts ...connect.HandlerOption) (string, http.Handler)

func (*Handler) Create

func (h *Handler) Create(ctx context.Context, req *connect.Request[user.CreateRequest]) (*connect.Response[user.CreateResponse], error)

Create inserts a user in the database using the specified project project.

func (*Handler) Delete

func (h *Handler) Delete(ctx context.Context, req *connect.Request[user.DeleteRequest]) (*connect.Response[user.DeleteResponse], error)

Delete will delete a user from the database in valid project.

func (*Handler) Get

func (h *Handler) Get(ctx context.Context, req *connect.Request[user.GetRequest]) (*connect.Response[user.GetResponse], error)

Get retries a user from the database from a specific project.

func (Handler) GetByIdentifier

func (h Handler) GetByIdentifier(ctx context.Context, req *connect.Request[user.GetByIdentifierRequest]) (*connect.Response[user.GetByIdentifierResponse], error)

func (*Handler) GetSettings

func (h *Handler) GetSettings(ctx context.Context, req *connect.Request[settings.GetSettingsRequest]) (*connect.Response[settings.GetSettingsResponse], error)

func (*Handler) List

func (h *Handler) List(ctx context.Context, req *connect.Request[user.ListRequest]) (*connect.Response[user.ListResponse], error)

List fetches a list of users in the database together with a count of total users in the database.

func (*Handler) ListSessions

func (h *Handler) ListSessions(ctx context.Context, req *connect.Request[user.ListSessionsRequest]) (*connect.Response[user.ListSessionsResponse], error)

ListSessions returns information about all tokens for a specific user.

func (*Handler) ServiceName

func (h *Handler) ServiceName() string

func (*Handler) Update

func (h *Handler) Update(ctx context.Context, req *connect.Request[user.UpdateRequest]) (*connect.Response[user.UpdateResponse], error)

Update updates profile and/or extra data information of a specific user; email, phone, and/or username.

func (*Handler) UpdateSettings

func (h *Handler) UpdateSettings(ctx context.Context, req *connect.Request[settings.UpdateSettingsRequest]) (*connect.Response[settings.UpdateSettingsResponse], error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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