usecase

package
v0.0.0-...-21f8c35 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package usecase acts as a bridge between the repository and the business logic

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New function instantiates a new usecase

Types

type UseCase

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

UseCase struct

func (*UseCase) DeleteClient

func (uc *UseCase) DeleteClient(name string) error

DeleteClient function deletes an existing client

func (*UseCase) GetClient

func (uc *UseCase) GetClient(name string) (models.Client, error)

GetClient function returns an existing client instance

func (*UseCase) RegisterClient

func (uc *UseCase) RegisterClient(client models.Client) (models.Client, error)

RegisterClient function creates a new client which was supplied as the argument

func (*UseCase) UpdateClient

func (uc *UseCase) UpdateClient(updateClient models.Client) error

UpdateClient function updates the client limits

func (*UseCase) VerifyLimit

func (uc *UseCase) VerifyLimit(name string) (*interfaces.Result, error)

VerifyLimit functions validates the rate limit of the specified client

Jump to

Keyboard shortcuts

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