Documentation ¶
Overview ¶
Package app provides business logic.
Package app is a generated GoMock package.
Index ¶
Constants ¶
const ServiceName = "example"
ServiceName provides name of this microservice for logs/metrics.
Variables ¶
var ( ErrAccessDenied = errors.New("access denied") ErrNotFound = errors.New("not found") )
Errors.
var (
Metric def.Metrics // Common metrics used by all packages.
)
Functions ¶
func InitMetrics ¶
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.
type Appl ¶
type Appl interface { // Example returns ... // Errors: ErrAccessDenied, ErrNotFound. Example(Ctx, dom.Auth, dom.UserName) (*Example, error) // IncExample creates or increments ... // Errors: none. IncExample(Ctx, dom.Auth) error }
Appl provides application features (use cases) service.
type MockAppl ¶
type MockAppl struct {
// contains filtered or unexported fields
}
MockAppl is a mock of Appl interface.
func NewMockAppl ¶
func NewMockAppl(ctrl *gomock.Controller) *MockAppl
NewMockAppl creates a new mock instance.
func (*MockAppl) EXPECT ¶
func (m *MockAppl) EXPECT() *MockApplMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockApplMockRecorder ¶
type MockApplMockRecorder struct {
// contains filtered or unexported fields
}
MockApplMockRecorder is the mock recorder for MockAppl.
func (*MockApplMockRecorder) Example ¶
func (mr *MockApplMockRecorder) Example(arg0, arg1, arg2 interface{}) *gomock.Call
Example indicates an expected call of Example.
func (*MockApplMockRecorder) IncExample ¶
func (mr *MockApplMockRecorder) IncExample(arg0, arg1 interface{}) *gomock.Call
IncExample indicates an expected call of IncExample.
type MockRepo ¶
type MockRepo struct {
// contains filtered or unexported fields
}
MockRepo is a mock of Repo interface.
func NewMockRepo ¶
func NewMockRepo(ctrl *gomock.Controller) *MockRepo
NewMockRepo creates a new mock instance.
func (*MockRepo) EXPECT ¶
func (m *MockRepo) EXPECT() *MockRepoMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockRepoMockRecorder ¶
type MockRepoMockRecorder struct {
// contains filtered or unexported fields
}
MockRepoMockRecorder is the mock recorder for MockRepo.
func (*MockRepoMockRecorder) Example ¶
func (mr *MockRepoMockRecorder) Example(arg0, arg1 interface{}) *gomock.Call
Example indicates an expected call of Example.
func (*MockRepoMockRecorder) IncExample ¶
func (mr *MockRepoMockRecorder) IncExample(arg0, arg1 interface{}) *gomock.Call
IncExample indicates an expected call of IncExample.