mock

package
v0.0.0-...-b7dcdf6 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommentRepository

type CommentRepository struct {
	Response struct {
		Get struct {
			Entity *comment.Comment
			Err    error
		}
		First struct {
			Entity *comment.Comment
			Err    error
		}
		Query struct {
			List []comment.Comment
			Err  error
		}
		Create struct {
			Entity *comment.Comment
			Err    error
		}
		Update struct {
			Err error
		}
		Delete struct {
			Err error
		}
	}
}

UserRepository is a mock for UserRepository

func (CommentRepository) Create

func (r CommentRepository) Create(ctx context.Context, entity *comment.Comment) error

func (CommentRepository) Delete

func (r CommentRepository) Delete(ctx context.Context, id uint) error

func (CommentRepository) First

func (CommentRepository) Get

func (CommentRepository) Query

func (r CommentRepository) Query(ctx context.Context, offset, limit uint) ([]comment.Comment, error)

func (CommentRepository) SetDefaultConditions

func (r CommentRepository) SetDefaultConditions(conditions map[string]interface{})

func (CommentRepository) Update

func (r CommentRepository) Update(ctx context.Context, entity *comment.Comment) error

type PostRepository

type PostRepository struct {
	Response struct {
		Get struct {
			Entity *post.Post
			Err    error
		}
		First struct {
			Entity *post.Post
			Err    error
		}
		Query struct {
			List []post.Post
			Err  error
		}
		Create struct {
			Entity *post.Post
			Err    error
		}
		Update struct {
			Entity *post.Post
			Err    error
		}
		Delete struct {
			Err error
		}
	}
}

UserRepository is a mock for UserRepository

func (PostRepository) Create

func (r PostRepository) Create(ctx context.Context, entity *post.Post) error

func (PostRepository) Delete

func (r PostRepository) Delete(ctx context.Context, id uint) error

func (PostRepository) First

func (r PostRepository) First(ctx context.Context, user *post.Post) (*post.Post, error)

func (PostRepository) Get

func (r PostRepository) Get(ctx context.Context, id uint) (*post.Post, error)

func (PostRepository) Query

func (r PostRepository) Query(ctx context.Context, offset, limit uint) ([]post.Post, error)

func (PostRepository) SetDefaultConditions

func (r PostRepository) SetDefaultConditions(conditions map[string]interface{})

func (PostRepository) Update

func (r PostRepository) Update(ctx context.Context, entity *post.Post) error

type SessionRepository

type SessionRepository struct {
	Response struct {
		NewEntity struct {
			Entity *session.Session
			Err    error
		}
		GetByUserID struct {
			Entity *session.Session
			Err    error
		}
		Create struct {
			Err error
		}
		Update struct {
			Err error
		}
		Delete struct {
			Err error
		}
		SetVar struct {
			Err error
		}
		GetVar struct {
			Val interface{}
			Ok  bool
		}
	}
}

UserRepository is a mock for UserRepository

func (SessionRepository) Create

func (r SessionRepository) Create(ctx context.Context, entity *session.Session) error

func (SessionRepository) Delete

func (r SessionRepository) Delete(ctx context.Context, id uint) error

func (SessionRepository) GetByUserID

func (r SessionRepository) GetByUserID(ctx context.Context, userId uint) (*session.Session, error)

func (SessionRepository) GetVar

func (r SessionRepository) GetVar(session *session.Session, name string) (interface{}, bool)

func (SessionRepository) NewEntity

func (r SessionRepository) NewEntity(ctx context.Context, userId uint) (*session.Session, error)

func (SessionRepository) SetDefaultConditions

func (r SessionRepository) SetDefaultConditions(conditions map[string]interface{})

func (SessionRepository) SetVar

func (r SessionRepository) SetVar(session *session.Session, name string, val interface{}) error

func (SessionRepository) Update

func (r SessionRepository) Update(ctx context.Context, entity *session.Session) error

type UserRepository

type UserRepository struct {
	Response struct {
		Get struct {
			Entity *user.User
			Err    error
		}
		First struct {
			Entity *user.User
			Err    error
		}
		Query struct {
			List []user.User
			Err  error
		}
		Create struct {
			Entity *user.User
			Err    error
		}
	}
}

UserRepository is a mock for UserRepository

func (UserRepository) Create

func (r UserRepository) Create(ctx context.Context, entity *user.User) error

func (UserRepository) First

func (r UserRepository) First(ctx context.Context, user *user.User) (*user.User, error)

func (UserRepository) Get

func (r UserRepository) Get(ctx context.Context, id uint) (*user.User, error)

func (UserRepository) Query

func (r UserRepository) Query(ctx context.Context, offset, limit uint) ([]user.User, error)

func (UserRepository) SetDefaultConditions

func (r UserRepository) SetDefaultConditions(conditions map[string]interface{})

type VoteRepository

type VoteRepository struct {
	Response struct {
		Get struct {
			Entity *vote.Vote
			Err    error
		}
		First struct {
			Entity *vote.Vote
			Err    error
		}
		Query struct {
			List []vote.Vote
			Err  error
		}
		Create struct {
			Err error
		}
		Update struct {
			Err error
		}
		Delete struct {
			Err error
		}
	}
}

UserRepository is a mock for UserRepository

func (VoteRepository) Create

func (r VoteRepository) Create(ctx context.Context, entity *vote.Vote) error

func (VoteRepository) Delete

func (r VoteRepository) Delete(ctx context.Context, entity *vote.Vote) error

func (VoteRepository) First

func (r VoteRepository) First(ctx context.Context, user *vote.Vote) (*vote.Vote, error)

func (VoteRepository) Get

func (r VoteRepository) Get(ctx context.Context, id uint) (*vote.Vote, error)

func (VoteRepository) Query

func (r VoteRepository) Query(ctx context.Context, offset, limit uint) ([]vote.Vote, error)

func (VoteRepository) SetDefaultConditions

func (r VoteRepository) SetDefaultConditions(conditions map[string]interface{})

func (VoteRepository) Update

func (r VoteRepository) Update(ctx context.Context, entity *vote.Vote) error

Jump to

Keyboard shortcuts

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