Documentation
¶
Index ¶
- type BoltDBAPIRequestRepository
- func (r *BoltDBAPIRequestRepository) Close() error
- func (r *BoltDBAPIRequestRepository) FindAll() ([]entity.APIRequest, error)
- func (r *BoltDBAPIRequestRepository) FindByPeriodWithLimit(period entity.Period, limit int, offset int) ([]entity.APIRequest, error)
- func (r *BoltDBAPIRequestRepository) Save(req entity.APIRequest) error
- type GRPCAPIRequestRepository
- func (r *GRPCAPIRequestRepository) Close() error
- func (r *GRPCAPIRequestRepository) FindAll() ([]entity.APIRequest, error)
- func (r *GRPCAPIRequestRepository) FindByPeriodWithLimit(period entity.Period, limit int, offset int) ([]entity.APIRequest, error)
- func (r *GRPCAPIRequestRepository) Save(req entity.APIRequest) error
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 ¶
func (r *BoltDBAPIRequestRepository) FindAll() ([]entity.APIRequest, error)
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 ¶
func (r *BoltDBAPIRequestRepository) Save(req entity.APIRequest) error
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 ¶
func (r *GRPCAPIRequestRepository) Save(req entity.APIRequest) error
Save is not supported in monitor mode (read-only repository)