user

package
v0.0.0-...-b394ddd Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(api *operations.TutorAPI, db *ent.Client)

Init sets user route handlers.

Types

type Service

type Service struct {
	User *ent.UserClient
}

Service holds an ent user client.

func (*Service) CreateUser

func (s *Service) CreateUser(ctx context.Context, user *ent.User) (*ent.User, error)

CreateUser returns a new created user or an error.

func (*Service) DeleteUserByID

func (s *Service) DeleteUserByID(ctx context.Context, id uuid.UUID) error

DeleteUserByID returns an error.

func (*Service) DeleteUserByLogin

func (s *Service) DeleteUserByLogin(ctx context.Context, login string) error

DeleteUserByLogin returns an error.

func (*Service) ListUser

func (s *Service) ListUser(ctx context.Context, tutor *bool) ([]*ent.User, error)

ListUser returns a user list or an error.

func (*Service) ListUserEventsByID

func (s *Service) ListUserEventsByID(ctx context.Context, id uuid.UUID) ([]*ent.Event, error)

ListUserEventsByID returns an event list of a user or an error.

func (*Service) ListUserEventsByLogin

func (s *Service) ListUserEventsByLogin(ctx context.Context, login string) ([]*ent.Event, error)

ListUserEventsByLogin returns an event list of a user or an error.

func (*Service) ListUserRolesByID

func (s *Service) ListUserRolesByID(ctx context.Context, id uuid.UUID) ([]*ent.Role, error)

ListUserRolesByID returns a role list of a user or an error.

func (*Service) ListUserRolesByLogin

func (s *Service) ListUserRolesByLogin(ctx context.Context, login string) ([]*ent.Role, error)

ListUserRolesByLogin returns a role list of a user or an error.

func (*Service) ReadUserByID

func (s *Service) ReadUserByID(ctx context.Context, id uuid.UUID) (*ent.User, error)

ReadUserByID returns a user or an error.

func (*Service) ReadUserByLogin

func (s *Service) ReadUserByLogin(ctx context.Context, login string) (*ent.User, error)

ReadUserByLogin returns a user or an error.

func (*Service) SetUserOnLogin

func (s *Service) SetUserOnLogin(ctx context.Context, user *ent.User) (*ent.User, error)

SetUserOnLogin returns a new or an updated user.

func (*Service) SubscribeUserByID

func (s *Service) SubscribeUserByID(ctx context.Context, userId uuid.UUID, eventId uuid.UUID) ([]*ent.Event, error)

SubscribeUserByID returns an event list of a user or an error.

func (*Service) SubscribeUserByLogin

func (s *Service) SubscribeUserByLogin(ctx context.Context, login string, id uuid.UUID) ([]*ent.Event, error)

SubscribeUserByLogin returns an event list of a user or an error.

func (*Service) UnsubscribeUserByID

func (s *Service) UnsubscribeUserByID(ctx context.Context, userId uuid.UUID, eventId uuid.UUID) error

UnsubscribeUserByID returns an error.

func (*Service) UnsubscribeUserByLogin

func (s *Service) UnsubscribeUserByLogin(ctx context.Context, login string, id uuid.UUID) error

UnsubscribeUserByLogin returns an error.

func (*Service) UpdateUserByID

func (s *Service) UpdateUserByID(ctx context.Context, id uuid.UUID, user *ent.User) (*ent.User, error)

UpdateUserByID returns an existing updated user or an error.

func (*Service) UpdateUserByLogin

func (s *Service) UpdateUserByLogin(ctx context.Context, login string, userInfo *ent.User) (*ent.User, error)

UpdateUserByLogin returns an existing updated user or an error.

Jump to

Keyboard shortcuts

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