Documentation
¶
Index ¶
- Variables
- type FakeFileBuilder
- type FileMeta
- type MockService
- func (_m *MockService) Delete(ctx context.Context, fileID uuid.UUID) error
- func (_m *MockService) Download(ctx context.Context, file *FileMeta) (io.ReadSeekCloser, error)
- func (_m *MockService) GetMetadata(ctx context.Context, fileID uuid.UUID) (*FileMeta, error)
- func (_m *MockService) Upload(ctx context.Context, r io.Reader) (*FileMeta, error)
- type Result
- type Service
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidPath = errors.New("invalid path") ErrInodeNotAFile = errors.New("inode doesn't point to a file") ErrNotExist = errors.New("file not exists") )
View Source
var ExampleFile1 = FileMeta{ // contains filtered or unexported fields }
View Source
var ExampleFile2 = FileMeta{ // contains filtered or unexported fields }
View Source
var ExampleSealedKey secret.SealedKey
Functions ¶
This section is empty.
Types ¶
type FakeFileBuilder ¶
type FakeFileBuilder struct {
// contains filtered or unexported fields
}
func NewFakeFile ¶
func NewFakeFile(t *testing.T) *FakeFileBuilder
func (*FakeFileBuilder) Build ¶
func (f *FakeFileBuilder) Build() *FileMeta
func (*FakeFileBuilder) BuildAndStore ¶
func (f *FakeFileBuilder) BuildAndStore(ctx context.Context, db sqlstorage.Querier) *FileMeta
func (*FakeFileBuilder) WithContent ¶
func (f *FakeFileBuilder) WithContent(content []byte) *FakeFileBuilder
type FileMeta ¶
type FileMeta struct {
// contains filtered or unexported fields
}
func (*FileMeta) UploadedAt ¶
type MockService ¶
MockService is an autogenerated mock type for the Service type
func NewMockService ¶
func NewMockService(t interface { mock.TestingT Cleanup(func()) }) *MockService
NewMockService creates a new instance of MockService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockService) Download ¶
func (_m *MockService) Download(ctx context.Context, file *FileMeta) (io.ReadSeekCloser, error)
Download provides a mock function with given fields: ctx, file
func (*MockService) GetMetadata ¶
GetMetadata provides a mock function with given fields: ctx, fileID
Click to show internal directories.
Click to hide internal directories.