tangy

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2025 License: Apache-2.0 Imports: 14 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
	CVEs            []string
}

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 (_mock *MockTangy) Close()

Close provides a mock function for the type MockTangy

func (*MockTangy) EXPECT added in v0.0.16

func (_m *MockTangy) EXPECT() *MockTangy_Expecter

func (*MockTangy) RpmRepositoryVersionEnvironmentSearch added in v0.0.2

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

RpmRepositoryVersionEnvironmentSearch provides a mock function for the type MockTangy

func (*MockTangy) RpmRepositoryVersionErrataList added in v0.0.5

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

RpmRepositoryVersionErrataList provides a mock function for the type MockTangy

func (*MockTangy) RpmRepositoryVersionModuleStreamsList added in v0.0.11

func (_mock *MockTangy) RpmRepositoryVersionModuleStreamsList(ctx context.Context, hrefs []string, filterOpts ModuleStreamListFilters, sortBy string) ([]ModuleStreams, error)

RpmRepositoryVersionModuleStreamsList provides a mock function for the type MockTangy

func (*MockTangy) RpmRepositoryVersionPackageGroupSearch added in v0.0.2

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

RpmRepositoryVersionPackageGroupSearch provides a mock function for the type MockTangy

func (*MockTangy) RpmRepositoryVersionPackageList added in v0.0.4

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

RpmRepositoryVersionPackageList provides a mock function for the type MockTangy

func (*MockTangy) RpmRepositoryVersionPackageSearch

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

RpmRepositoryVersionPackageSearch provides a mock function for the type MockTangy

type MockTangy_Close_Call added in v0.0.16

type MockTangy_Close_Call struct {
	*mock.Call
}

MockTangy_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'

func (*MockTangy_Close_Call) Return added in v0.0.16

func (*MockTangy_Close_Call) Run added in v0.0.16

func (_c *MockTangy_Close_Call) Run(run func()) *MockTangy_Close_Call

func (*MockTangy_Close_Call) RunAndReturn added in v0.0.16

func (_c *MockTangy_Close_Call) RunAndReturn(run func()) *MockTangy_Close_Call

type MockTangy_Expecter added in v0.0.16

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

func (*MockTangy_Expecter) Close added in v0.0.16

Close is a helper method to define mock.On call

func (*MockTangy_Expecter) RpmRepositoryVersionEnvironmentSearch added in v0.0.16

func (_e *MockTangy_Expecter) RpmRepositoryVersionEnvironmentSearch(ctx interface{}, hrefs interface{}, search interface{}, limit interface{}) *MockTangy_RpmRepositoryVersionEnvironmentSearch_Call

RpmRepositoryVersionEnvironmentSearch is a helper method to define mock.On call

  • ctx context.Context
  • hrefs []string
  • search string
  • limit int

func (*MockTangy_Expecter) RpmRepositoryVersionErrataList added in v0.0.16

func (_e *MockTangy_Expecter) RpmRepositoryVersionErrataList(ctx interface{}, hrefs interface{}, filterOpts interface{}, pageOpts interface{}) *MockTangy_RpmRepositoryVersionErrataList_Call

RpmRepositoryVersionErrataList is a helper method to define mock.On call

  • ctx context.Context
  • hrefs []string
  • filterOpts ErrataListFilters
  • pageOpts PageOptions

func (*MockTangy_Expecter) RpmRepositoryVersionModuleStreamsList added in v0.0.16

func (_e *MockTangy_Expecter) RpmRepositoryVersionModuleStreamsList(ctx interface{}, hrefs interface{}, filterOpts interface{}, sortBy interface{}) *MockTangy_RpmRepositoryVersionModuleStreamsList_Call

RpmRepositoryVersionModuleStreamsList is a helper method to define mock.On call

  • ctx context.Context
  • hrefs []string
  • filterOpts ModuleStreamListFilters
  • sortBy string

func (*MockTangy_Expecter) RpmRepositoryVersionPackageGroupSearch added in v0.0.16

func (_e *MockTangy_Expecter) RpmRepositoryVersionPackageGroupSearch(ctx interface{}, hrefs interface{}, search interface{}, limit interface{}) *MockTangy_RpmRepositoryVersionPackageGroupSearch_Call

RpmRepositoryVersionPackageGroupSearch is a helper method to define mock.On call

  • ctx context.Context
  • hrefs []string
  • search string
  • limit int

func (*MockTangy_Expecter) RpmRepositoryVersionPackageList added in v0.0.16

func (_e *MockTangy_Expecter) RpmRepositoryVersionPackageList(ctx interface{}, hrefs interface{}, filterOpts interface{}, pageOpts interface{}) *MockTangy_RpmRepositoryVersionPackageList_Call

RpmRepositoryVersionPackageList is a helper method to define mock.On call

  • ctx context.Context
  • hrefs []string
  • filterOpts RpmListFilters
  • pageOpts PageOptions

func (*MockTangy_Expecter) RpmRepositoryVersionPackageSearch added in v0.0.16

func (_e *MockTangy_Expecter) RpmRepositoryVersionPackageSearch(ctx interface{}, hrefs interface{}, search interface{}, limit interface{}) *MockTangy_RpmRepositoryVersionPackageSearch_Call

RpmRepositoryVersionPackageSearch is a helper method to define mock.On call

  • ctx context.Context
  • hrefs []string
  • search string
  • limit int

type MockTangy_RpmRepositoryVersionEnvironmentSearch_Call added in v0.0.16

type MockTangy_RpmRepositoryVersionEnvironmentSearch_Call struct {
	*mock.Call
}

MockTangy_RpmRepositoryVersionEnvironmentSearch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RpmRepositoryVersionEnvironmentSearch'

func (*MockTangy_RpmRepositoryVersionEnvironmentSearch_Call) Return added in v0.0.16

func (*MockTangy_RpmRepositoryVersionEnvironmentSearch_Call) Run added in v0.0.16

func (*MockTangy_RpmRepositoryVersionEnvironmentSearch_Call) RunAndReturn added in v0.0.16

type MockTangy_RpmRepositoryVersionErrataList_Call added in v0.0.16

type MockTangy_RpmRepositoryVersionErrataList_Call struct {
	*mock.Call
}

MockTangy_RpmRepositoryVersionErrataList_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RpmRepositoryVersionErrataList'

func (*MockTangy_RpmRepositoryVersionErrataList_Call) Return added in v0.0.16

func (*MockTangy_RpmRepositoryVersionErrataList_Call) Run added in v0.0.16

func (*MockTangy_RpmRepositoryVersionErrataList_Call) RunAndReturn added in v0.0.16

type MockTangy_RpmRepositoryVersionModuleStreamsList_Call added in v0.0.16

type MockTangy_RpmRepositoryVersionModuleStreamsList_Call struct {
	*mock.Call
}

MockTangy_RpmRepositoryVersionModuleStreamsList_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RpmRepositoryVersionModuleStreamsList'

func (*MockTangy_RpmRepositoryVersionModuleStreamsList_Call) Return added in v0.0.16

func (*MockTangy_RpmRepositoryVersionModuleStreamsList_Call) Run added in v0.0.16

func (*MockTangy_RpmRepositoryVersionModuleStreamsList_Call) RunAndReturn added in v0.0.16

type MockTangy_RpmRepositoryVersionPackageGroupSearch_Call added in v0.0.16

type MockTangy_RpmRepositoryVersionPackageGroupSearch_Call struct {
	*mock.Call
}

MockTangy_RpmRepositoryVersionPackageGroupSearch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RpmRepositoryVersionPackageGroupSearch'

func (*MockTangy_RpmRepositoryVersionPackageGroupSearch_Call) Return added in v0.0.16

func (*MockTangy_RpmRepositoryVersionPackageGroupSearch_Call) Run added in v0.0.16

func (*MockTangy_RpmRepositoryVersionPackageGroupSearch_Call) RunAndReturn added in v0.0.16

type MockTangy_RpmRepositoryVersionPackageList_Call added in v0.0.16

type MockTangy_RpmRepositoryVersionPackageList_Call struct {
	*mock.Call
}

MockTangy_RpmRepositoryVersionPackageList_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RpmRepositoryVersionPackageList'

func (*MockTangy_RpmRepositoryVersionPackageList_Call) Return added in v0.0.16

func (*MockTangy_RpmRepositoryVersionPackageList_Call) Run added in v0.0.16

func (*MockTangy_RpmRepositoryVersionPackageList_Call) RunAndReturn added in v0.0.16

type MockTangy_RpmRepositoryVersionPackageSearch_Call added in v0.0.16

type MockTangy_RpmRepositoryVersionPackageSearch_Call struct {
	*mock.Call
}

MockTangy_RpmRepositoryVersionPackageSearch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RpmRepositoryVersionPackageSearch'

func (*MockTangy_RpmRepositoryVersionPackageSearch_Call) Return added in v0.0.16

func (*MockTangy_RpmRepositoryVersionPackageSearch_Call) Run added in v0.0.16

func (*MockTangy_RpmRepositoryVersionPackageSearch_Call) RunAndReturn added in v0.0.16

type ModuleStreamListFilters added in v0.0.11

type ModuleStreamListFilters struct {
	RpmNames []string
	Search   string
}

type ModuleStreams added in v0.0.11

type ModuleStreams struct {
	Name        string              // Name of the module
	Stream      string              // Module stream version
	Version     string              // The version of the rpm
	Context     string              // Context of the module
	Arch        string              // The Architecture of the rpm
	Description string              // Module description
	Profiles    map[string][]string // Module profile data
}

type PageOptions added in v0.0.4

type PageOptions struct {
	Offset int
	Limit  int
	SortBy string
}

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)
	RpmRepositoryVersionModuleStreamsList(ctx context.Context, hrefs []string, filterOpts ModuleStreamListFilters, sortBy string) ([]ModuleStreams, 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