Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewService ¶
func NewService(db *gorm.DB, client cortexCaller) domain.RuleService
NewService returns repository struct
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository talks to the store to read or insert data
func NewRepository ¶
func NewRepository(db *gorm.DB) *Repository
NewRepository returns repository struct
func (Repository) Migrate ¶
func (r Repository) Migrate() error
func (Repository) Upsert ¶
func (r Repository) Upsert(rule *Rule, client cortexCaller, templatesService domain.TemplatesService) (*Rule, error)
type RuleRepository ¶
type RuleRepository interface { Upsert(*Rule, cortexCaller, domain.TemplatesService) (*Rule, error) Get(string, string, string, string, string) ([]Rule, error) Migrate() error }
Repository interface
type RuleRepositoryMock ¶
RuleRepository is an autogenerated mock type for the RuleRepository type
func (*RuleRepositoryMock) Get ¶
func (_m *RuleRepositoryMock) Get(_a0 string, _a1 string, _a2 string, _a3 string, _a4 string) ([]Rule, error)
Get provides a mock function with given fields: _a0, _a1, _a2, _a3, _a4
func (*RuleRepositoryMock) Migrate ¶
func (_m *RuleRepositoryMock) Migrate() error
Migrate provides a mock function with given fields:
func (*RuleRepositoryMock) Upsert ¶
func (_m *RuleRepositoryMock) Upsert(_a0 *Rule, _a1 cortexCaller, service domain.TemplatesService) (*Rule, error)
Upsert provides a mock function with given fields: _a0, _a1
Click to show internal directories.
Click to hide internal directories.