tangy

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

View Source
const DefaultLimit = 500
View Source
const DefaultMaxPoolLimit = 20

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	Name       string
	Host       string
	Port       int
	User       string
	Password   string
	CACertPath string `mapstructure:"ca_cert_path"`
	PoolLimit  int    `mapstructure:"pool_limit"`
}

Database configuration options for connection to a pulp database

func (Database) Url

func (d Database) Url() string

Url return url of database

type Logger

type Logger struct {
	Logger   *zerolog.Logger
	LogLevel string
	Enabled  bool
}

Logger configuration options for logger

type MockTangy

type MockTangy struct {
	mock.Mock
}

MockTangy is an autogenerated mock type for the Tangy type

func NewMockTangy

func NewMockTangy(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockTangy

NewMockTangy creates a new instance of MockTangy. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockTangy) Close

func (_m *MockTangy) Close()

Close provides a mock function with given fields:

func (*MockTangy) RpmRepositoryVersionPackageSearch

func (_m *MockTangy) RpmRepositoryVersionPackageSearch(ctx context.Context, hrefs []string, search string, limit int) ([]RpmPackageSearch, error)

RpmRepositoryVersionPackageSearch provides a mock function with given fields: ctx, hrefs, search, limit

type RpmPackageSearch

type RpmPackageSearch struct {
	Name    string
	Summary string
}

type Tangy

type Tangy interface {
	RpmRepositoryVersionPackageSearch(ctx context.Context, hrefs []string, search string, limit int) ([]RpmPackageSearch, error)
	Close()
}

func New

func New(dbConfig Database, logConfig Logger) (Tangy, error)

Jump to

Keyboard shortcuts

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