rules

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RuleRepositoryMock

type RuleRepositoryMock struct {
	mock.Mock
}

RuleRepositoryMock is an autogenerated mock type for the RuleRepositoryMock type

func (*RuleRepositoryMock) Commit added in v0.4.0

func (_m *RuleRepositoryMock) Commit(ctx context.Context) error

Commit provides a mock function with given fields: ctx

func (*RuleRepositoryMock) Get

func (_m *RuleRepositoryMock) Get(_a0 context.Context, _a1 string, _a2 string, _a3 string, _a4 string, _a5 uint64) ([]domain.Rule, error)

Get provides a mock function with given fields: _a0, _a1, _a2, _a3, _a4, _a5

func (*RuleRepositoryMock) Migrate

func (_m *RuleRepositoryMock) Migrate() error

Migrate provides a mock function with given fields:

func (*RuleRepositoryMock) Rollback added in v0.4.0

func (_m *RuleRepositoryMock) Rollback(ctx context.Context) error

Rollback provides a mock function with given fields: ctx

func (*RuleRepositoryMock) Upsert

func (_m *RuleRepositoryMock) Upsert(_a0 context.Context, _a1 *domain.Rule) error

Upsert provides a mock function with given fields: _a0, _a1

func (*RuleRepositoryMock) WithTransaction added in v0.4.0

func (_m *RuleRepositoryMock) WithTransaction(ctx context.Context) context.Context

WithTransaction provides a mock function with given fields: ctx

type Service

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

Service handles business logic

func NewService

func NewService(
	repository store.RuleRepository,
	templateService domain.TemplatesService,
	namespaceService domain.NamespaceService,
	providerService domain.ProviderService,
) *Service

NewService returns repository struct

func (*Service) Get

func (s *Service) Get(ctx context.Context, name, namespace, groupName, template string, providerNamespace uint64) ([]domain.Rule, error)

func (*Service) Migrate

func (s *Service) Migrate() error

func (*Service) Upsert

func (s *Service) Upsert(ctx context.Context, rule *domain.Rule) error

type Variables

type Variables struct {
	Variables []variable `json:"variables"`
}

Jump to

Keyboard shortcuts

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