tangy

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 13 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 ErrataListFilters added in v0.0.5

type ErrataListFilters struct {
	Search   string
	Type     []string
	Severity []string
}

type ErrataListItem added in v0.0.5

type ErrataListItem struct {
	Id              string
	ErrataId        string
	Title           string
	Summary         string
	Description     string
	IssuedDate      string
	UpdatedDate     *string
	Type            string
	Severity        string
	RebootSuggested bool
}

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) RpmRepositoryVersionEnvironmentSearch added in v0.0.2

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

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

func (*MockTangy) RpmRepositoryVersionErrataList added in v0.0.5

func (_m *MockTangy) RpmRepositoryVersionErrataList(ctx context.Context, hrefs []string, filterOpts ErrataListFilters, pageOpts PageOptions) ([]ErrataListItem, int, error)

RpmRepositoryVersionErrataList provides a mock function with given fields: ctx, hrefs, filterOpts, pageOpts

func (*MockTangy) RpmRepositoryVersionPackageGroupSearch added in v0.0.2

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

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

func (*MockTangy) RpmRepositoryVersionPackageList added in v0.0.4

func (_m *MockTangy) RpmRepositoryVersionPackageList(ctx context.Context, hrefs []string, filterOpts RpmListFilters, pageOpts PageOptions) ([]RpmListItem, int, error)

RpmRepositoryVersionPackageList provides a mock function with given fields: ctx, hrefs, filterOpts, pageOpts

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 PageOptions added in v0.0.4

type PageOptions struct {
	Offset int
	Limit  int
}

type ParsedRepoVersion added in v0.0.4

type ParsedRepoVersion struct {
	RepositoryUUID string
	Version        int
}

type RpmEnvironmentSearch added in v0.0.2

type RpmEnvironmentSearch struct {
	ID          string
	Name        string
	Description string
}

type RpmListFilters added in v0.0.4

type RpmListFilters struct {
	Name string
}

type RpmListItem added in v0.0.4

type RpmListItem struct {
	Id      string
	Name    string // The rpm package name
	Arch    string // The Architecture of the rpm
	Version string // The version of the  rpm
	Release string // The release of the rpm
	Epoch   string // The epoch of the rpm
	Summary string // The summary of the rpm
}

type RpmPackageGroupSearch added in v0.0.2

type RpmPackageGroupSearch struct {
	ID          string
	Name        string
	Description string
	Packages    []string
}

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)
	RpmRepositoryVersionPackageGroupSearch(ctx context.Context, hrefs []string, search string, limit int) ([]RpmPackageGroupSearch, error)
	RpmRepositoryVersionEnvironmentSearch(ctx context.Context, hrefs []string, search string, limit int) ([]RpmEnvironmentSearch, error)
	RpmRepositoryVersionPackageList(ctx context.Context, hrefs []string, filterOpts RpmListFilters, pageOpts PageOptions) ([]RpmListItem, int, error)
	RpmRepositoryVersionErrataList(ctx context.Context, hrefs []string, filterOpts ErrataListFilters, pageOpts PageOptions) ([]ErrataListItem, int, 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