mock

package
v1.7.0-beta2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

type Entity[ID repo.IDType] interface {
	comparable
	GetID() ID
}

type Matter

type Matter struct {
	// contains filtered or unexported fields
}

func NewMatter

func NewMatter() *Matter

func (*Matter) Copy

func (mk *Matter) Copy(ctx context.Context, id int64, to string) (*entity.Matter, error)

func (*Matter) Create

func (ms *Matter) Create(ctx context.Context, t T) error

func (*Matter) Delete

func (ms *Matter) Delete(ctx context.Context, id ID) error

func (*Matter) Find

func (ms *Matter) Find(ctx context.Context, id ID) (T, error)

func (*Matter) FindAll

func (ms *Matter) FindAll(ctx context.Context, opts O) ([]T, int64, error)

func (*Matter) FindByAlias

func (mk *Matter) FindByAlias(ctx context.Context, alias string) (*entity.Matter, error)

func (*Matter) FindWith

func (mk *Matter) FindWith(ctx context.Context, opt *repo.MatterFindWithOption) (*entity.Matter, error)

func (*Matter) GetObjects

func (mk *Matter) GetObjects(ctx context.Context, id int64) ([]string, error)

func (*Matter) PathExist

func (mk *Matter) PathExist(ctx context.Context, filepath string) bool

func (*Matter) Recovery

func (mk *Matter) Recovery(ctx context.Context, id int64) error

func (*Matter) Update

func (ms *Matter) Update(ctx context.Context, id ID, t T) error

type RecycleBin

type RecycleBin struct {
	// contains filtered or unexported fields
}

func NewRecycleBin

func NewRecycleBin() *RecycleBin

func (*RecycleBin) Create

func (ms *RecycleBin) Create(ctx context.Context, t T) error

func (*RecycleBin) Delete

func (ms *RecycleBin) Delete(ctx context.Context, id ID) error

func (*RecycleBin) Find

func (ms *RecycleBin) Find(ctx context.Context, id ID) (T, error)

func (*RecycleBin) FindAll

func (ms *RecycleBin) FindAll(ctx context.Context, opts O) ([]T, int64, error)

func (*RecycleBin) Update

func (ms *RecycleBin) Update(ctx context.Context, id ID, t T) error

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

func NewStorage

func NewStorage() *Storage

func (*Storage) Create

func (ms *Storage) Create(ctx context.Context, t T) error

func (*Storage) Delete

func (ms *Storage) Delete(ctx context.Context, id ID) error

func (*Storage) Find

func (ms *Storage) Find(ctx context.Context, id ID) (T, error)

func (*Storage) FindAll

func (ms *Storage) FindAll(ctx context.Context, opts O) ([]T, int64, error)

func (*Storage) Update

func (ms *Storage) Update(ctx context.Context, id ID, t T) error

type User

type User struct {
}

func NewUser

func NewUser() *User

func (*User) GetUserStorage

func (u *User) GetUserStorage(ctx context.Context, uid int64) (*entity.UserStorage, error)

func (*User) UserStorageUsedDecr

func (u *User) UserStorageUsedDecr(ctx context.Context, matter *entity.Matter) error

func (*User) UserStorageUsedIncr

func (u *User) UserStorageUsedIncr(ctx context.Context, matter *entity.Matter) error

Jump to

Keyboard shortcuts

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