Documentation
¶
Overview ¶
Package webapi implements working with a specific WebAPI.
Code generated by MockGen. DO NOT EDIT. Source: ./internal/webapi/interfaces.go
Generated by this command:
mockgen -source=./internal/webapi/interfaces.go -destination=./internal/webapi/webapi_mocks.go -package=webapi
Package webapi is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockWebAPI ¶
type MockWebAPI struct {
// contains filtered or unexported fields
}
MockWebAPI is a mock of WebAPI interface.
func NewMockWebAPI ¶
func NewMockWebAPI(ctrl *gomock.Controller) *MockWebAPI
NewMockWebAPI creates a new mock instance.
func (*MockWebAPI) AddAbsenceStatus ¶
func (m *MockWebAPI) AddAbsenceStatus(arg0 *entity.User, arg1 [2]entity.CustomTime) error
AddAbsenceStatus mocks base method.
func (*MockWebAPI) EXPECT ¶
func (m *MockWebAPI) EXPECT() *MockWebAPIMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockWebAPIMockRecorder ¶
type MockWebAPIMockRecorder struct {
// contains filtered or unexported fields
}
MockWebAPIMockRecorder is the mock recorder for MockWebAPI.
func (*MockWebAPIMockRecorder) AddAbsenceStatus ¶
func (mr *MockWebAPIMockRecorder) AddAbsenceStatus(arg0, arg1 any) *gomock.Call
AddAbsenceStatus indicates an expected call of AddAbsenceStatus.
type UserWebAPI ¶
type UserWebAPI struct {
Credentials *entity.Credentials
AbsencesReasonList map[int]*entity.AbsenceReason
BasicAuthToken string
}
UserWebAPI implements WebAPI interface. It authenticates and works with a certain WebAPI.
func NewUserWebAPI ¶
func NewUserWebAPI(c *entity.Credentials) *UserWebAPI
NewUserWebAPI returns UserWebAPI entity and generates token for HTTP Basic Auth.
func (*UserWebAPI) AddAbsenceStatus ¶
func (a *UserWebAPI) AddAbsenceStatus(u *entity.User, p [2]entity.CustomTime) error
AddAbsenceStatus finds user absence status info for a time period p on a specific WebAPI and adds it to the user data.