modelmock

package
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompositionWriter

type CompositionWriter struct {
	mock.Mock
}

CompositionWriter is an autogenerated mock type for the CompositionWriter type

func (*CompositionWriter) WriteComposition

func (_m *CompositionWriter) WriteComposition(_a0 string, _a1 *model.Composer, _a2 *model.CompositionOpts) error

WriteComposition provides a mock function with given fields: _a0, _a1, _a2

type GroupPermissionsProvider

type GroupPermissionsProvider struct {
	mock.Mock
}

GroupPermissionsProvider is an autogenerated mock type for the GroupPermissionsProvider type

func (*GroupPermissionsProvider) Insert

Insert provides a mock function with given fields: _a0, _a1

type GroupProvider

type GroupProvider struct {
	mock.Mock
}

GroupProvider is an autogenerated mock type for the GroupProvider type

func (*GroupProvider) Create

func (_m *GroupProvider) Create(ctx context.Context, createdBy int64, name string, description *ntypes.String) (*model.GroupEntity, error)

Create provides a mock function with given fields: ctx, createdBy, name, description

func (*GroupProvider) DeleteOneByID

func (_m *GroupProvider) DeleteOneByID(_a0 context.Context, _a1 int64) (int64, error)

DeleteOneByID provides a mock function with given fields: _a0, _a1

func (*GroupProvider) Find

Find provides a mock function with given fields: _a0, _a1

func (*GroupProvider) FindByUserID

func (_m *GroupProvider) FindByUserID(_a0 context.Context, _a1 int64) ([]*model.GroupEntity, error)

FindByUserID provides a mock function with given fields: _a0, _a1

func (*GroupProvider) FindOneByID

func (_m *GroupProvider) FindOneByID(_a0 context.Context, _a1 int64) (*model.GroupEntity, error)

FindOneByID provides a mock function with given fields: _a0, _a1

func (*GroupProvider) Insert

Insert provides a mock function with given fields: _a0, _a1

func (*GroupProvider) IsGranted

func (_m *GroupProvider) IsGranted(_a0 context.Context, _a1 int64, _a2 charon.Permission) (bool, error)

IsGranted provides a mock function with given fields: _a0, _a1, _a2

func (*GroupProvider) SetPermissions

func (_m *GroupProvider) SetPermissions(_a0 context.Context, _a1 int64, _a2 ...charon.Permission) (int64, int64, error)

SetPermissions provides a mock function with given fields: _a0, _a1, _a2

func (*GroupProvider) UpdateOneByID

func (_m *GroupProvider) UpdateOneByID(_a0 context.Context, _a1 int64, _a2 *model.GroupPatch) (*model.GroupEntity, error)

UpdateOneByID provides a mock function with given fields: _a0, _a1, _a2

type PermissionProvider

type PermissionProvider struct {
	mock.Mock
}

PermissionProvider is an autogenerated mock type for the PermissionProvider type

func (*PermissionProvider) Find

Find provides a mock function with given fields: ctx, criteria

func (*PermissionProvider) FindByGroupID

func (_m *PermissionProvider) FindByGroupID(ctx context.Context, groupID int64) ([]*model.PermissionEntity, error)

FindByGroupID provides a mock function with given fields: ctx, groupID

func (*PermissionProvider) FindByUserID

func (_m *PermissionProvider) FindByUserID(ctx context.Context, userID int64) ([]*model.PermissionEntity, error)

FindByUserID provides a mock function with given fields: ctx, userID

func (*PermissionProvider) FindOneByID

func (_m *PermissionProvider) FindOneByID(ctx context.Context, id int64) (*model.PermissionEntity, error)

FindOneByID provides a mock function with given fields: ctx, id

func (*PermissionProvider) Insert

Insert provides a mock function with given fields: ctx, entity

func (*PermissionProvider) InsertMissing

func (_m *PermissionProvider) InsertMissing(ctx context.Context, permissions charon.Permissions) (int64, error)

InsertMissing provides a mock function with given fields: ctx, permissions

func (*PermissionProvider) Register

func (_m *PermissionProvider) Register(ctx context.Context, permissions charon.Permissions) (int64, int64, int64, error)

Register provides a mock function with given fields: ctx, permissions

type PermissionRegistry

type PermissionRegistry struct {
	mock.Mock
}

PermissionRegistry is an autogenerated mock type for the PermissionRegistry type

func (*PermissionRegistry) Exists

func (_m *PermissionRegistry) Exists(ctx context.Context, permission charon.Permission) bool

Exists provides a mock function with given fields: ctx, permission

func (*PermissionRegistry) Register

func (_m *PermissionRegistry) Register(ctx context.Context, permissions charon.Permissions) (int64, int64, int64, error)

Register provides a mock function with given fields: ctx, permissions

type RefreshTokenProvider

type RefreshTokenProvider struct {
	mock.Mock
}

RefreshTokenProvider is an autogenerated mock type for the RefreshTokenProvider type

func (*RefreshTokenProvider) Create

Create provides a mock function with given fields: _a0, _a1

func (*RefreshTokenProvider) Find

Find provides a mock function with given fields: _a0, _a1

func (*RefreshTokenProvider) FindOneByToken

func (_m *RefreshTokenProvider) FindOneByToken(_a0 context.Context, _a1 string) (*model.RefreshTokenEntity, error)

FindOneByToken provides a mock function with given fields: _a0, _a1

func (*RefreshTokenProvider) FindOneByTokenAndUserID

func (_m *RefreshTokenProvider) FindOneByTokenAndUserID(ctx context.Context, token string, userID int64) (*model.RefreshTokenEntity, error)

FindOneByTokenAndUserID provides a mock function with given fields: ctx, token, userID

func (*RefreshTokenProvider) UpdateOneByToken

UpdateOneByToken provides a mock function with given fields: _a0, _a1, _a2

type Rows

type Rows struct {
	mock.Mock
}

Rows is an autogenerated mock type for the Rows type

func (*Rows) Close

func (_m *Rows) Close() error

Close provides a mock function with given fields:

func (*Rows) ColumnTypes

func (_m *Rows) ColumnTypes() ([]*sql.ColumnType, error)

ColumnTypes provides a mock function with given fields:

func (*Rows) Columns

func (_m *Rows) Columns() ([]string, error)

Columns provides a mock function with given fields:

func (*Rows) Err

func (_m *Rows) Err() error

Err provides a mock function with given fields:

func (*Rows) Next

func (_m *Rows) Next() bool

Next provides a mock function with given fields:

func (*Rows) NextResultSet

func (_m *Rows) NextResultSet() bool

NextResultSet provides a mock function with given fields:

func (*Rows) Scan

func (_m *Rows) Scan(dst ...interface{}) error

Scan provides a mock function with given fields: dst

type UserGroupsProvider

type UserGroupsProvider struct {
	mock.Mock
}

UserGroupsProvider is an autogenerated mock type for the UserGroupsProvider type

func (*UserGroupsProvider) DeleteByUserID

func (_m *UserGroupsProvider) DeleteByUserID(ctx context.Context, id int64) (int64, error)

DeleteByUserID provides a mock function with given fields: ctx, id

func (*UserGroupsProvider) Exists

func (_m *UserGroupsProvider) Exists(ctx context.Context, userID int64, groupID int64) (bool, error)

Exists provides a mock function with given fields: ctx, userID, groupID

func (*UserGroupsProvider) Find

Find provides a mock function with given fields: ctx, expr

func (*UserGroupsProvider) Insert

Insert provides a mock function with given fields: ctx, ent

func (*UserGroupsProvider) Set

func (_m *UserGroupsProvider) Set(ctx context.Context, userID int64, groupIDs []int64) (int64, int64, error)

Set provides a mock function with given fields: ctx, userID, groupIDs

type UserPermissionsProvider

type UserPermissionsProvider struct {
	mock.Mock
}

UserPermissionsProvider is an autogenerated mock type for the UserPermissionsProvider type

func (*UserPermissionsProvider) DeleteByUserID

func (_m *UserPermissionsProvider) DeleteByUserID(_a0 context.Context, _a1 int64) (int64, error)

DeleteByUserID provides a mock function with given fields: _a0, _a1

func (*UserPermissionsProvider) Insert

Insert provides a mock function with given fields: _a0, _a1

type UserProvider

type UserProvider struct {
	mock.Mock
}

UserProvider is an autogenerated mock type for the UserProvider type

func (*UserProvider) ChangePassword

func (_m *UserProvider) ChangePassword(ctx context.Context, id int64, password string) error

ChangePassword provides a mock function with given fields: ctx, id, password

func (*UserProvider) Count

func (_m *UserProvider) Count(_a0 context.Context) (int64, error)

Count provides a mock function with given fields: _a0

func (*UserProvider) Create

func (_m *UserProvider) Create(_a0 context.Context, _a1 *model.UserEntity) (*model.UserEntity, error)

Create provides a mock function with given fields: _a0, _a1

func (*UserProvider) CreateSuperuser

func (_m *UserProvider) CreateSuperuser(ctx context.Context, username string, password []byte, FirstName string, LastName string) (*model.UserEntity, error)

CreateSuperuser provides a mock function with given fields: ctx, username, password, FirstName, LastName

func (*UserProvider) DeleteOneByID

func (_m *UserProvider) DeleteOneByID(_a0 context.Context, _a1 int64) (int64, error)

DeleteOneByID provides a mock function with given fields: _a0, _a1

func (*UserProvider) Exists

func (_m *UserProvider) Exists(_a0 context.Context, _a1 int64) (bool, error)

Exists provides a mock function with given fields: _a0, _a1

func (*UserProvider) Find

func (_m *UserProvider) Find(_a0 context.Context, _a1 *model.UserFindExpr) ([]*model.UserEntity, error)

Find provides a mock function with given fields: _a0, _a1

func (*UserProvider) FindOneByID

func (_m *UserProvider) FindOneByID(_a0 context.Context, _a1 int64) (*model.UserEntity, error)

FindOneByID provides a mock function with given fields: _a0, _a1

func (*UserProvider) FindOneByUsername

func (_m *UserProvider) FindOneByUsername(_a0 context.Context, _a1 string) (*model.UserEntity, error)

FindOneByUsername provides a mock function with given fields: _a0, _a1

func (*UserProvider) Insert

func (_m *UserProvider) Insert(_a0 context.Context, _a1 *model.UserEntity) (*model.UserEntity, error)

Insert provides a mock function with given fields: _a0, _a1

func (*UserProvider) IsGranted

func (_m *UserProvider) IsGranted(ctx context.Context, id int64, permission charon.Permission) (bool, error)

IsGranted provides a mock function with given fields: ctx, id, permission

func (*UserProvider) RegistrationConfirmation

func (_m *UserProvider) RegistrationConfirmation(ctx context.Context, id int64, confirmationToken string) (int64, error)

RegistrationConfirmation provides a mock function with given fields: ctx, id, confirmationToken

func (*UserProvider) SetPermissions

func (_m *UserProvider) SetPermissions(ctx context.Context, id int64, permissions ...charon.Permission) (int64, int64, error)

SetPermissions provides a mock function with given fields: ctx, id, permissions

func (*UserProvider) UpdateLastLoginAt

func (_m *UserProvider) UpdateLastLoginAt(ctx context.Context, id int64) (int64, error)

UpdateLastLoginAt provides a mock function with given fields: ctx, id

func (*UserProvider) UpdateOneByID

func (_m *UserProvider) UpdateOneByID(_a0 context.Context, _a1 int64, _a2 *model.UserPatch) (*model.UserEntity, error)

UpdateOneByID provides a mock function with given fields: _a0, _a1, _a2

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL