Documentation ¶
Index ¶
- type CommentRepository
- func (r CommentRepository) Create(ctx context.Context, entity *comment.Comment) error
- func (r CommentRepository) Delete(ctx context.Context, id uint) error
- func (r CommentRepository) First(ctx context.Context, user *comment.Comment) (*comment.Comment, error)
- func (r CommentRepository) Get(ctx context.Context, id uint) (*comment.Comment, error)
- func (r CommentRepository) Query(ctx context.Context, offset, limit uint) ([]comment.Comment, error)
- func (r CommentRepository) SetDefaultConditions(conditions map[string]interface{})
- func (r CommentRepository) Update(ctx context.Context, entity *comment.Comment) error
- type PostRepository
- func (r PostRepository) Create(ctx context.Context, entity *post.Post) error
- func (r PostRepository) Delete(ctx context.Context, id uint) error
- func (r PostRepository) First(ctx context.Context, user *post.Post) (*post.Post, error)
- func (r PostRepository) Get(ctx context.Context, id uint) (*post.Post, error)
- func (r PostRepository) Query(ctx context.Context, offset, limit uint) ([]post.Post, error)
- func (r PostRepository) SetDefaultConditions(conditions map[string]interface{})
- func (r PostRepository) Update(ctx context.Context, entity *post.Post) error
- type SessionRepository
- func (r SessionRepository) Create(ctx context.Context, entity *session.Session) error
- func (r SessionRepository) Delete(ctx context.Context, id uint) error
- func (r SessionRepository) GetByUserID(ctx context.Context, userId uint) (*session.Session, error)
- func (r SessionRepository) GetVar(session *session.Session, name string) (interface{}, bool)
- func (r SessionRepository) NewEntity(ctx context.Context, userId uint) (*session.Session, error)
- func (r SessionRepository) SetDefaultConditions(conditions map[string]interface{})
- func (r SessionRepository) SetVar(session *session.Session, name string, val interface{}) error
- func (r SessionRepository) Update(ctx context.Context, entity *session.Session) error
- type UserRepository
- func (r UserRepository) Create(ctx context.Context, entity *user.User) error
- func (r UserRepository) First(ctx context.Context, user *user.User) (*user.User, error)
- func (r UserRepository) Get(ctx context.Context, id uint) (*user.User, error)
- func (r UserRepository) Query(ctx context.Context, offset, limit uint) ([]user.User, error)
- func (r UserRepository) SetDefaultConditions(conditions map[string]interface{})
- type VoteRepository
- func (r VoteRepository) Create(ctx context.Context, entity *vote.Vote) error
- func (r VoteRepository) Delete(ctx context.Context, entity *vote.Vote) error
- func (r VoteRepository) First(ctx context.Context, user *vote.Vote) (*vote.Vote, error)
- func (r VoteRepository) Get(ctx context.Context, id uint) (*vote.Vote, error)
- func (r VoteRepository) Query(ctx context.Context, offset, limit uint) ([]vote.Vote, error)
- func (r VoteRepository) SetDefaultConditions(conditions map[string]interface{})
- func (r VoteRepository) Update(ctx context.Context, entity *vote.Vote) error
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) Delete ¶
func (r CommentRepository) Delete(ctx context.Context, id uint) error
func (CommentRepository) SetDefaultConditions ¶
func (r CommentRepository) SetDefaultConditions(conditions map[string]interface{})
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) SetDefaultConditions ¶
func (r PostRepository) SetDefaultConditions(conditions map[string]interface{})
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) Delete ¶
func (r SessionRepository) Delete(ctx context.Context, id uint) error
func (SessionRepository) GetByUserID ¶
func (SessionRepository) GetVar ¶
func (r SessionRepository) GetVar(session *session.Session, name string) (interface{}, bool)
func (SessionRepository) SetDefaultConditions ¶
func (r SessionRepository) SetDefaultConditions(conditions map[string]interface{})
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) 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) SetDefaultConditions ¶
func (r VoteRepository) SetDefaultConditions(conditions map[string]interface{})
Click to show internal directories.
Click to hide internal directories.