MM-47420 - Add endpoint to fetch selfhosted products (#21678)
* created selfhosted endpoint * make autogenerated mocks * add test * add user id * remove user id requirement * add tests * send user id with request Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
ed3f3fec46
Коммит
966456567d
@@ -10,6 +10,7 @@ import (
|
||||
type CloudInterface interface {
|
||||
GetCloudProduct(userID string, productID string) (*model.Product, error)
|
||||
GetCloudProducts(userID string, includeLegacyProducts bool) ([]*model.Product, error)
|
||||
GetSelfHostedProducts(userID string) ([]*model.Product, error)
|
||||
GetCloudLimits(userID string) (*model.ProductLimits, error)
|
||||
|
||||
CreateCustomerPayment(userID string) (*model.StripeSetupIntent, error)
|
||||
|
||||
@@ -279,6 +279,29 @@ func (_m *CloudInterface) GetLicenseRenewalStatus(userID string, token string) e
|
||||
return r0
|
||||
}
|
||||
|
||||
// GetSelfHostedProducts provides a mock function with given fields: userID
|
||||
func (_m *CloudInterface) GetSelfHostedProducts(userID string) ([]*model.Product, error) {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 []*model.Product
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.Product); ok {
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.Product)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetSubscription provides a mock function with given fields: userID
|
||||
func (_m *CloudInterface) GetSubscription(userID string) (*model.Subscription, error) {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
Ссылка в новой задаче
Block a user