repository

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2025 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 BoltDBAPIRequestRepository

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

BoltDBAPIRequestRepository implements APIRequestRepository using BoltDB

func NewBoltDBAPIRequestRepository

func NewBoltDBAPIRequestRepository(db *bbolt.DB) *BoltDBAPIRequestRepository

NewBoltDBAPIRequestRepository creates a new BoltDB repository instance

func (*BoltDBAPIRequestRepository) Close

func (r *BoltDBAPIRequestRepository) Close() error

Close closes the database connection

func (*BoltDBAPIRequestRepository) FindAll

FindAll retrieves all API requests (limited to prevent memory issues)

func (*BoltDBAPIRequestRepository) FindByPeriodWithLimit

func (r *BoltDBAPIRequestRepository) FindByPeriodWithLimit(period entity.Period, limit int, offset int) ([]entity.APIRequest, error)

FindByPeriodWithLimit retrieves API requests filtered by time period with limit and offset Use limit = 0 for no limit (fetch all records) Use offset = 0 when no offset is needed

func (*BoltDBAPIRequestRepository) Save

Save stores an API request entity

type GRPCAPIRequestRepository

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

GRPCAPIRequestRepository implements APIRequestRepository using gRPC client

func NewGRPCAPIRequestRepository

func NewGRPCAPIRequestRepository(serverAddress string) (*GRPCAPIRequestRepository, error)

NewGRPCAPIRequestRepository creates a new gRPC repository instance

func (*GRPCAPIRequestRepository) Close

func (r *GRPCAPIRequestRepository) Close() error

Close closes the gRPC connection

func (*GRPCAPIRequestRepository) FindAll

func (r *GRPCAPIRequestRepository) FindAll() ([]entity.APIRequest, error)

FindAll retrieves all API requests via gRPC

func (*GRPCAPIRequestRepository) FindByPeriodWithLimit

func (r *GRPCAPIRequestRepository) FindByPeriodWithLimit(period entity.Period, limit int, offset int) ([]entity.APIRequest, error)

FindByPeriodWithLimit retrieves API requests filtered by time period with limit and offset via gRPC Use limit = 0 for no limit (fetch all records) Use offset = 0 when no offset is needed

func (*GRPCAPIRequestRepository) Save

Save is not supported in monitor mode (read-only repository)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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