Documentation ¶
Index ¶
- Constants
- Variables
- type AddOwnerCmd
- type CreateCmd
- type FakeSpaceBuilder
- func (f *FakeSpaceBuilder) Build() *Space
- func (f *FakeSpaceBuilder) BuildAndStore(ctx context.Context, db sqlstorage.Querier) *Space
- func (f *FakeSpaceBuilder) CreatedAt(at time.Time) *FakeSpaceBuilder
- func (f *FakeSpaceBuilder) CreatedBy(user *users.User) *FakeSpaceBuilder
- func (f *FakeSpaceBuilder) WithName(name string) *FakeSpaceBuilder
- func (f *FakeSpaceBuilder) WithOwners(users ...users.User) *FakeSpaceBuilder
- type MockService
- func (_m *MockService) AddOwner(ctx context.Context, cmd *AddOwnerCmd) (*Space, error)
- func (_m *MockService) Bootstrap(ctx context.Context, user *users.User) error
- func (_m *MockService) Create(ctx context.Context, cmd *CreateCmd) (*Space, error)
- func (_m *MockService) Delete(ctx context.Context, user *users.User, spaceID uuid.UUID) error
- func (_m *MockService) GetAllSpaces(ctx context.Context, user *users.User, cmd *sqlstorage.PaginateCmd) ([]Space, error)
- func (_m *MockService) GetAllUserSpaces(ctx context.Context, userID uuid.UUID, cmd *sqlstorage.PaginateCmd) ([]Space, error)
- func (_m *MockService) GetByID(ctx context.Context, spaceID uuid.UUID) (*Space, error)
- func (_m *MockService) GetUserSpace(ctx context.Context, userID uuid.UUID, spaceID uuid.UUID) (*Space, error)
- func (_m *MockService) RemoveOwner(ctx context.Context, cmd *RemoveOwnerCmd) (*Space, error)
- type Owners
- type RemoveOwnerCmd
- type Service
- type Space
Constants ¶
View Source
const BootstrapSpaceName = "Everyone"
Variables ¶
View Source
var ( ErrRootFSNotFound = errors.New("rootFS not found") ErrRootFSExist = errors.New("rootFS exists") ErrInvalidRootFS = errors.New("invalid rootFS") ErrNotFound = errors.New("space not found") ErrInvalidSpaceAccess = errors.New("no access to space") )
View Source
// contains filtered or unexported fields }
View Source
var ExampleAlicePersonalSpace = Space{ // contains filtered or unexported fields }
View Source
var ExampleBobPersonalSpace = Space{ // contains filtered or unexported fields }
Functions ¶
This section is empty.
Types ¶
type AddOwnerCmd ¶
type FakeSpaceBuilder ¶
type FakeSpaceBuilder struct {
// contains filtered or unexported fields
}
func NewFakeSpace ¶
func NewFakeSpace(t *testing.T) *FakeSpaceBuilder
func (*FakeSpaceBuilder) Build ¶
func (f *FakeSpaceBuilder) Build() *Space
func (*FakeSpaceBuilder) BuildAndStore ¶
func (f *FakeSpaceBuilder) BuildAndStore(ctx context.Context, db sqlstorage.Querier) *Space
func (*FakeSpaceBuilder) CreatedAt ¶
func (f *FakeSpaceBuilder) CreatedAt(at time.Time) *FakeSpaceBuilder
func (*FakeSpaceBuilder) CreatedBy ¶
func (f *FakeSpaceBuilder) CreatedBy(user *users.User) *FakeSpaceBuilder
func (*FakeSpaceBuilder) WithName ¶
func (f *FakeSpaceBuilder) WithName(name string) *FakeSpaceBuilder
func (*FakeSpaceBuilder) WithOwners ¶
func (f *FakeSpaceBuilder) WithOwners(users ...users.User) *FakeSpaceBuilder
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) AddOwner ¶
func (_m *MockService) AddOwner(ctx context.Context, cmd *AddOwnerCmd) (*Space, error)
AddOwner provides a mock function with given fields: ctx, cmd
func (*MockService) GetAllSpaces ¶
func (_m *MockService) GetAllSpaces(ctx context.Context, user *users.User, cmd *sqlstorage.PaginateCmd) ([]Space, error)
GetAllSpaces provides a mock function with given fields: ctx, user, cmd
func (*MockService) GetAllUserSpaces ¶
func (_m *MockService) GetAllUserSpaces(ctx context.Context, userID uuid.UUID, cmd *sqlstorage.PaginateCmd) ([]Space, error)
GetAllUserSpaces provides a mock function with given fields: ctx, userID, cmd
func (*MockService) GetUserSpace ¶
func (_m *MockService) GetUserSpace(ctx context.Context, userID uuid.UUID, spaceID uuid.UUID) (*Space, error)
GetUserSpace provides a mock function with given fields: ctx, userID, spaceID
func (*MockService) RemoveOwner ¶
func (_m *MockService) RemoveOwner(ctx context.Context, cmd *RemoveOwnerCmd) (*Space, error)
RemoveOwner provides a mock function with given fields: ctx, cmd
type RemoveOwnerCmd ¶
type Service ¶
type Service interface { Bootstrap(ctx context.Context, user *users.User) error Create(ctx context.Context, cmd *CreateCmd) (*Space, error) GetAllUserSpaces(ctx context.Context, userID uuid.UUID, cmd *sqlstorage.PaginateCmd) ([]Space, error) GetAllSpaces(ctx context.Context, user *users.User, cmd *sqlstorage.PaginateCmd) ([]Space, error) GetUserSpace(ctx context.Context, userID, spaceID uuid.UUID) (*Space, error) GetByID(ctx context.Context, spaceID uuid.UUID) (*Space, error) AddOwner(ctx context.Context, cmd *AddOwnerCmd) (*Space, error) RemoveOwner(ctx context.Context, cmd *RemoveOwnerCmd) (*Space, error) Delete(ctx context.Context, user *users.User, spaceID uuid.UUID) error }
Click to show internal directories.
Click to hide internal directories.