usecase

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Overview

Package usecase account implementation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthclientUsecase

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

AuthclientUsecase provides bussiness logic for account access

func NewAuthclientUsecase

func NewAuthclientUsecase(repo authclient.Repository) *AuthclientUsecase

NewAuthclientUsecase object controller

func (*AuthclientUsecase) Count

func (a *AuthclientUsecase) Count(ctx context.Context, opts ...authclient.QOption) (int64, error)

Count of accounts by filter

func (*AuthclientUsecase) Create

func (a *AuthclientUsecase) Create(ctx context.Context, authclientObj *models.AuthClient, opts ...authclient.QOption) (string, error)

Create new object in database

func (*AuthclientUsecase) Delete

func (a *AuthclientUsecase) Delete(ctx context.Context, id string, opts ...authclient.QOption) error

Delete delites record by ID

func (*AuthclientUsecase) FetchList

func (a *AuthclientUsecase) FetchList(ctx context.Context, opts ...authclient.QOption) ([]*models.AuthClient, error)

FetchList of accounts by filter

func (*AuthclientUsecase) Get

Get returns the group by ID if have access

func (*AuthclientUsecase) Update

func (a *AuthclientUsecase) Update(ctx context.Context, id string, authclientObj *models.AuthClient, opts ...authclient.QOption) error

Update object in database

type SessionUsecase added in v0.5.2

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

SessionUsecase provides business logic for AuthSession access

func NewSessionUsecase added in v0.5.2

func NewSessionUsecase(repo authclient.SessionRepository) *SessionUsecase

NewSessionUsecase object controller

func (*SessionUsecase) Count added in v0.5.2

func (u *SessionUsecase) Count(ctx context.Context, opts ...authclient.QOption) (int64, error)

Count of sessions by filter

func (*SessionUsecase) Delete added in v0.5.2

func (u *SessionUsecase) Delete(ctx context.Context, id uint64, opts ...authclient.QOption) error

Delete removes a session by ID if the caller has delete access

func (*SessionUsecase) FetchList added in v0.5.2

func (u *SessionUsecase) FetchList(ctx context.Context, opts ...authclient.QOption) ([]*models.AuthSession, error)

FetchList of sessions by filter

func (*SessionUsecase) Get added in v0.5.2

Get returns the session by ID if the caller has view access

Jump to

Keyboard shortcuts

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