controller

package
v0.0.0-...-b70bbfa Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller имплементирует сервис сессий.

func New

func New(repo sessionRepo, tracer trace.Tracer) *Controller

New создает новый Controller.

func (*Controller) Delete

func (ctrl *Controller) Delete(ctx context.Context, id uuid.UUID) error

Delete удаляет сессию по id.

func (*Controller) FindOne

func (ctrl *Controller) FindOne(ctx context.Context, id uuid.UUID, username string) (model.FindOneResp, error)

FindOne находит сессию по id.

func (*Controller) List

func (ctrl *Controller) List(ctx context.Context, username string) ([]model.SessionDto, error)

List возвращает список сессий пользователя.

func (*Controller) NewSession

func (ctrl *Controller) NewSession(ctx context.Context, id uuid.UUID, username string, tg bool, tgID int64) error

NewSession создает новую сессию.

func (*Controller) Rename

func (ctrl *Controller) Rename(ctx context.Context, params model.RenameReq) error

Rename переименовывает сессию.

Jump to

Keyboard shortcuts

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