Documentation ¶
Overview ¶
Package app provides business logic.
Package app is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrContactExists = errors.New("contact already exists")
)
Errors.
var (
Metric def.Metrics // Common metrics used by all packages.
)
Functions ¶
func InitMetrics ¶ added in v1.0.0
func InitMetrics(reg *prometheus.Registry)
InitMetrics must be called once before using this package. It registers and initializes metrics used by this package.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App implements interface Appl.
func (*App) AddContact ¶
type Appl ¶ added in v1.0.0
type Appl interface { // Contacts returns all contacts. // Errors: none. Contacts(Ctx, Auth) ([]Contact, error) // AddContact adds new contact. // Errors: ErrContactExists. AddContact(_ Ctx, _ Auth, name string) (*Contact, error) }
Appl provides application features (use cases) service.
type MockAppl ¶ added in v1.0.0
type MockAppl struct {
// contains filtered or unexported fields
}
MockAppl is a mock of Appl interface
func NewMockAppl ¶ added in v1.0.0
func NewMockAppl(ctrl *gomock.Controller) *MockAppl
NewMockAppl creates a new mock instance
func (*MockAppl) AddContact ¶ added in v1.0.0
AddContact mocks base method
func (*MockAppl) EXPECT ¶ added in v1.0.0
func (m *MockAppl) EXPECT() *MockApplMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockApplMockRecorder ¶ added in v1.0.0
type MockApplMockRecorder struct {
// contains filtered or unexported fields
}
MockApplMockRecorder is the mock recorder for MockAppl
func (*MockApplMockRecorder) AddContact ¶ added in v1.0.0
func (mr *MockApplMockRecorder) AddContact(arg0, arg1, name interface{}) *gomock.Call
AddContact indicates an expected call of AddContact
func (*MockApplMockRecorder) Contacts ¶ added in v1.0.0
func (mr *MockApplMockRecorder) Contacts(arg0, arg1 interface{}) *gomock.Call
Contacts indicates an expected call of Contacts
type MockRepo ¶ added in v1.0.0
type MockRepo struct {
// contains filtered or unexported fields
}
MockRepo is a mock of Repo interface
func NewMockRepo ¶ added in v1.0.0
func NewMockRepo(ctrl *gomock.Controller) *MockRepo
NewMockRepo creates a new mock instance
func (*MockRepo) AddContact ¶ added in v1.0.0
AddContact mocks base method
func (*MockRepo) EXPECT ¶ added in v1.0.0
func (m *MockRepo) EXPECT() *MockRepoMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockRepoMockRecorder ¶ added in v1.0.0
type MockRepoMockRecorder struct {
// contains filtered or unexported fields
}
MockRepoMockRecorder is the mock recorder for MockRepo
func (*MockRepoMockRecorder) AddContact ¶ added in v1.0.0
func (mr *MockRepoMockRecorder) AddContact(arg0, arg1 interface{}) *gomock.Call
AddContact indicates an expected call of AddContact
func (*MockRepoMockRecorder) Contacts ¶ added in v1.0.0
func (mr *MockRepoMockRecorder) Contacts(arg0 interface{}) *gomock.Call
Contacts indicates an expected call of Contacts