mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-14 20:08:02 +00:00
81974b977d
* fix: font color * fix: assets from iam when policy is default * fix: remove multiple files * fix mock storage * doc: add asset api * build assets docs * fix operator test * docs * fix remove assets from org label policy and not default * fix remove label policy assets and feature downgrade correctly * fix storage mock * Update docs/docs/apis/apis.md Co-authored-by: fabi <fabienne.gerschwiler@gmail.com> Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com>
226 lines
8.6 KiB
Go
226 lines
8.6 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: storage.go
|
|
|
|
// Package mock is a generated GoMock package.
|
|
package mock
|
|
|
|
import (
|
|
context "context"
|
|
io "io"
|
|
url "net/url"
|
|
reflect "reflect"
|
|
time "time"
|
|
|
|
domain "github.com/caos/zitadel/internal/domain"
|
|
static "github.com/caos/zitadel/internal/static"
|
|
gomock "github.com/golang/mock/gomock"
|
|
)
|
|
|
|
// MockStorage is a mock of Storage interface.
|
|
type MockStorage struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockStorageMockRecorder
|
|
}
|
|
|
|
// MockStorageMockRecorder is the mock recorder for MockStorage.
|
|
type MockStorageMockRecorder struct {
|
|
mock *MockStorage
|
|
}
|
|
|
|
// NewMockStorage creates a new mock instance.
|
|
func NewMockStorage(ctrl *gomock.Controller) *MockStorage {
|
|
mock := &MockStorage{ctrl: ctrl}
|
|
mock.recorder = &MockStorageMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockStorage) EXPECT() *MockStorageMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// CreateBucket mocks base method.
|
|
func (m *MockStorage) CreateBucket(ctx context.Context, name, location string) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "CreateBucket", ctx, name, location)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// CreateBucket indicates an expected call of CreateBucket.
|
|
func (mr *MockStorageMockRecorder) CreateBucket(ctx, name, location interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateBucket", reflect.TypeOf((*MockStorage)(nil).CreateBucket), ctx, name, location)
|
|
}
|
|
|
|
// GetObject mocks base method.
|
|
func (m *MockStorage) GetObject(ctx context.Context, bucketName, objectName string) (io.Reader, func() (*domain.AssetInfo, error), error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetObject", ctx, bucketName, objectName)
|
|
ret0, _ := ret[0].(io.Reader)
|
|
ret1, _ := ret[1].(func() (*domain.AssetInfo, error))
|
|
ret2, _ := ret[2].(error)
|
|
return ret0, ret1, ret2
|
|
}
|
|
|
|
// GetObject indicates an expected call of GetObject.
|
|
func (mr *MockStorageMockRecorder) GetObject(ctx, bucketName, objectName interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetObject", reflect.TypeOf((*MockStorage)(nil).GetObject), ctx, bucketName, objectName)
|
|
}
|
|
|
|
// GetObjectInfo mocks base method.
|
|
func (m *MockStorage) GetObjectInfo(ctx context.Context, bucketName, objectName string) (*domain.AssetInfo, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetObjectInfo", ctx, bucketName, objectName)
|
|
ret0, _ := ret[0].(*domain.AssetInfo)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// GetObjectInfo indicates an expected call of GetObjectInfo.
|
|
func (mr *MockStorageMockRecorder) GetObjectInfo(ctx, bucketName, objectName interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetObjectInfo", reflect.TypeOf((*MockStorage)(nil).GetObjectInfo), ctx, bucketName, objectName)
|
|
}
|
|
|
|
// GetObjectPresignedURL mocks base method.
|
|
func (m *MockStorage) GetObjectPresignedURL(ctx context.Context, bucketName, objectName string, expiration time.Duration) (*url.URL, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetObjectPresignedURL", ctx, bucketName, objectName, expiration)
|
|
ret0, _ := ret[0].(*url.URL)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// GetObjectPresignedURL indicates an expected call of GetObjectPresignedURL.
|
|
func (mr *MockStorageMockRecorder) GetObjectPresignedURL(ctx, bucketName, objectName, expiration interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetObjectPresignedURL", reflect.TypeOf((*MockStorage)(nil).GetObjectPresignedURL), ctx, bucketName, objectName, expiration)
|
|
}
|
|
|
|
// ListBuckets mocks base method.
|
|
func (m *MockStorage) ListBuckets(ctx context.Context) ([]*domain.BucketInfo, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "ListBuckets", ctx)
|
|
ret0, _ := ret[0].([]*domain.BucketInfo)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// ListBuckets indicates an expected call of ListBuckets.
|
|
func (mr *MockStorageMockRecorder) ListBuckets(ctx interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListBuckets", reflect.TypeOf((*MockStorage)(nil).ListBuckets), ctx)
|
|
}
|
|
|
|
// ListObjectInfos mocks base method.
|
|
func (m *MockStorage) ListObjectInfos(ctx context.Context, bucketName, prefix string, recursive bool) ([]*domain.AssetInfo, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "ListObjectInfos", ctx, bucketName, prefix, recursive)
|
|
ret0, _ := ret[0].([]*domain.AssetInfo)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// ListObjectInfos indicates an expected call of ListObjectInfos.
|
|
func (mr *MockStorageMockRecorder) ListObjectInfos(ctx, bucketName, prefix, recursive interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListObjectInfos", reflect.TypeOf((*MockStorage)(nil).ListObjectInfos), ctx, bucketName, prefix, recursive)
|
|
}
|
|
|
|
// PutObject mocks base method.
|
|
func (m *MockStorage) PutObject(ctx context.Context, bucketName, objectName, contentType string, object io.Reader, objectSize int64, createBucketIfNotExisting bool) (*domain.AssetInfo, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "PutObject", ctx, bucketName, objectName, contentType, object, objectSize, createBucketIfNotExisting)
|
|
ret0, _ := ret[0].(*domain.AssetInfo)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// PutObject indicates an expected call of PutObject.
|
|
func (mr *MockStorageMockRecorder) PutObject(ctx, bucketName, objectName, contentType, object, objectSize, createBucketIfNotExisting interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutObject", reflect.TypeOf((*MockStorage)(nil).PutObject), ctx, bucketName, objectName, contentType, object, objectSize, createBucketIfNotExisting)
|
|
}
|
|
|
|
// RemoveBucket mocks base method.
|
|
func (m *MockStorage) RemoveBucket(ctx context.Context, name string) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "RemoveBucket", ctx, name)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// RemoveBucket indicates an expected call of RemoveBucket.
|
|
func (mr *MockStorageMockRecorder) RemoveBucket(ctx, name interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveBucket", reflect.TypeOf((*MockStorage)(nil).RemoveBucket), ctx, name)
|
|
}
|
|
|
|
// RemoveObject mocks base method.
|
|
func (m *MockStorage) RemoveObject(ctx context.Context, bucketName, objectName string) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "RemoveObject", ctx, bucketName, objectName)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// RemoveObject indicates an expected call of RemoveObject.
|
|
func (mr *MockStorageMockRecorder) RemoveObject(ctx, bucketName, objectName interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveObject", reflect.TypeOf((*MockStorage)(nil).RemoveObject), ctx, bucketName, objectName)
|
|
}
|
|
|
|
// RemoveObjects mocks base method.
|
|
func (m *MockStorage) RemoveObjects(ctx context.Context, bucketName, path string, recursive bool) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "RemoveObjects", ctx, bucketName, path, recursive)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// RemoveObjects indicates an expected call of RemoveObjects.
|
|
func (mr *MockStorageMockRecorder) RemoveObjects(ctx, bucketName, path, recursive interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveObjects", reflect.TypeOf((*MockStorage)(nil).RemoveObjects), ctx, bucketName, path, recursive)
|
|
}
|
|
|
|
// MockConfig is a mock of Config interface.
|
|
type MockConfig struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockConfigMockRecorder
|
|
}
|
|
|
|
// MockConfigMockRecorder is the mock recorder for MockConfig.
|
|
type MockConfigMockRecorder struct {
|
|
mock *MockConfig
|
|
}
|
|
|
|
// NewMockConfig creates a new mock instance.
|
|
func NewMockConfig(ctrl *gomock.Controller) *MockConfig {
|
|
mock := &MockConfig{ctrl: ctrl}
|
|
mock.recorder = &MockConfigMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockConfig) EXPECT() *MockConfigMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// NewStorage mocks base method.
|
|
func (m *MockConfig) NewStorage() (static.Storage, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "NewStorage")
|
|
ret0, _ := ret[0].(static.Storage)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// NewStorage indicates an expected call of NewStorage.
|
|
func (mr *MockConfigMockRecorder) NewStorage() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewStorage", reflect.TypeOf((*MockConfig)(nil).NewStorage))
|
|
}
|