Documentation ¶
Index ¶
- type CommentRepository
- func (r *CommentRepository) GetCommentByDocID(ctx context.Context, conditon map[string]interface{}) (comments []models.Comment, err error)
- func (r *CommentRepository) StoreComment(ctx context.Context, db *dbr.Tx, doc models.Comment) (idComment int64, err error)
- func (r *CommentRepository) Tx() (tx *dbr.Tx, err error)
- type DocumentActivityRepository
- type DocumentUserRepository
- func (r *DocumentUserRepository) CountDocByUser(ctx context.Context, userID int) (count models.CountDocUser, err error)
- func (r *DocumentUserRepository) GetDocByUser(ctx context.Context, conditon map[string]interface{}, paging helpers.PageReq, ...) (dataDocs []models.DocumentUserJoinDoc, total int, err error)
- func (r *DocumentUserRepository) GetSingleDocByUser(ctx context.Context, userID int, documentID int) (dataDoc models.DocumentUserJoinDoc, err error)
- func (r *DocumentUserRepository) StoreDocumentUser(ctx context.Context, db *dbr.Tx, doc models.DocumentUser) (idDocUser int64, err error)
- func (r *DocumentUserRepository) UpdateDocUsers(ctx context.Context, db *dbr.Tx, Condition map[string]interface{}, ...) (affect int64, err error)
- type DocumentsRepository
- func (r *DocumentsRepository) CountNameByUserID(ctx context.Context, doc models.Documents) (totalID int64, err error)
- func (r *DocumentsRepository) GetDoc(ctx context.Context, conditon map[string]interface{}) (doc models.Documents, err error)
- func (r *DocumentsRepository) StoreDocuments(ctx context.Context, db *dbr.Tx, doc models.Documents) (idDoc int64, err error)
- func (r *DocumentsRepository) Tx() (tx *dbr.Tx, err error)
- func (r *DocumentsRepository) UpdateDoc(ctx context.Context, db *dbr.Tx, Condition map[string]interface{}, ...) (affect int64, err error)
- type EsignRepository
- type ICommentRepository
- type IDocumentActivityRepository
- type IDocumentUserRepository
- type IDocumentsRepository
- type IEsignRepository
- type IPlayerRepository
- type ISniperRepository
- type IUserRepository
- type PlayerRepository
- type SniperRepository
- type UserRepository
- func (r *UserRepository) FindOneUser(ctx context.Context, Condition map[string]interface{}) (User models.User, err error)
- func (r *UserRepository) GetAll(ctx context.Context) (user []models.ListUser, err error)
- func (r *UserRepository) GetUserByIDDPR(IDDpr int) (user models.User, err error)
- func (r *UserRepository) GetUserByNIPstore(nip string) (user models.User, err error)
- func (r *UserRepository) Login(l models.Login) (auth bool, user models.User, err error)
- func (r *UserRepository) LoginMehongUser(ctx context.Context, c models.EncryptedCookies) (response models.ResponseSniper, err error)
- func (r *UserRepository) StoreUser(user models.User) (count int64, err error)
- func (r *UserRepository) Tx() (tx *dbr.Tx, err error)
- func (r *UserRepository) UpdateUserByID(id int, user models.User) (err error)
- func (r *UserRepository) UpdateUserCond(ctx context.Context, db *dbr.Tx, Condition map[string]interface{}, ...) (affect int64, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommentRepository ¶
type CommentRepository struct {
DB infrastructures.ISQLConnection
}
CommentRepository is
func (*CommentRepository) GetCommentByDocID ¶
func (r *CommentRepository) GetCommentByDocID(ctx context.Context, conditon map[string]interface{}) (comments []models.Comment, err error)
GetCommentByDocID get document spesific user
type DocumentActivityRepository ¶
type DocumentActivityRepository struct {
DB infrastructures.ISQLConnection
}
DocumentActivityRepository is
func (*DocumentActivityRepository) GetActivityByDocID ¶
func (r *DocumentActivityRepository) GetActivityByDocID(ctx context.Context, documentID int) (activity []models.DocumentActivity, err error)
GetActivityByDocID get document spesific user
func (*DocumentActivityRepository) StoreDocumentActivity ¶
func (r *DocumentActivityRepository) StoreDocumentActivity(ctx context.Context, db *dbr.Tx, doc models.DocumentActivity) (idDocUser int64, err error)
StoreDocumentActivity store agent type data to database
type DocumentUserRepository ¶
type DocumentUserRepository struct {
DB infrastructures.ISQLConnection
}
DocumentUserRepository is
func (*DocumentUserRepository) CountDocByUser ¶
func (r *DocumentUserRepository) CountDocByUser(ctx context.Context, userID int) (count models.CountDocUser, err error)
CountDocByUser get document spesific user
func (*DocumentUserRepository) GetDocByUser ¶
func (r *DocumentUserRepository) GetDocByUser(ctx context.Context, conditon map[string]interface{}, paging helpers.PageReq, sorting string) (dataDocs []models.DocumentUserJoinDoc, total int, err error)
GetDocByUser get document spesific user
func (*DocumentUserRepository) GetSingleDocByUser ¶
func (r *DocumentUserRepository) GetSingleDocByUser(ctx context.Context, userID int, documentID int) (dataDoc models.DocumentUserJoinDoc, err error)
GetSingleDocByUser get document spesific user
func (*DocumentUserRepository) StoreDocumentUser ¶
func (r *DocumentUserRepository) StoreDocumentUser(ctx context.Context, db *dbr.Tx, doc models.DocumentUser) (idDocUser int64, err error)
StoreDocumentUser store agent type data to database
type DocumentsRepository ¶
type DocumentsRepository struct {
DB infrastructures.ISQLConnection
}
DocumentsRepository is
func (*DocumentsRepository) CountNameByUserID ¶
func (r *DocumentsRepository) CountNameByUserID(ctx context.Context, doc models.Documents) (totalID int64, err error)
CountNameByUserID count same filename by user ID
func (*DocumentsRepository) GetDoc ¶
func (r *DocumentsRepository) GetDoc(ctx context.Context, conditon map[string]interface{}) (doc models.Documents, err error)
GetDoc get document
func (*DocumentsRepository) StoreDocuments ¶
func (r *DocumentsRepository) StoreDocuments(ctx context.Context, db *dbr.Tx, doc models.Documents) (idDoc int64, err error)
StoreDocuments store agent type data to database
type EsignRepository ¶
type EsignRepository struct {
DB infrastructures.ISQLConnection
}
EsignRepository is
type ICommentRepository ¶
type ICommentRepository interface { Tx() (tx *dbr.Tx, err error) StoreComment(ctx context.Context, db *dbr.Tx, doc models.Comment) (idComment int64, err error) GetCommentByDocID(ctx context.Context, conditon map[string]interface{}) (comments []models.Comment, err error) }
ICommentRepository is
type IDocumentActivityRepository ¶
type IDocumentActivityRepository interface { StoreDocumentActivity(ctx context.Context, db *dbr.Tx, doc models.DocumentActivity) (idDocUser int64, err error) GetActivityByDocID(ctx context.Context, documentID int) (activity []models.DocumentActivity, err error) }
IDocumentActivityRepository is
type IDocumentUserRepository ¶
type IDocumentUserRepository interface { StoreDocumentUser(ctx context.Context, db *dbr.Tx, doc models.DocumentUser) (idDocUser int64, err error) GetDocByUser(ctx context.Context, conditon map[string]interface{}, paging helpers.PageReq, sorting string) (dataDocs []models.DocumentUserJoinDoc, total int, err error) UpdateDocUsers(ctx context.Context, db *dbr.Tx, Condition map[string]interface{}, Payload map[string]interface{}) (affect int64, err error) GetSingleDocByUser(ctx context.Context, userID int, documentID int) (dataDoc models.DocumentUserJoinDoc, err error) CountDocByUser(ctx context.Context, userID int) (count models.CountDocUser, err error) }
IDocumentUserRepository is
type IDocumentsRepository ¶
type IDocumentsRepository interface { Tx() (tx *dbr.Tx, err error) StoreDocuments(ctx context.Context, db *dbr.Tx, doc models.Documents) (idDoc int64, err error) CountNameByUserID(ctx context.Context, doc models.Documents) (totalID int64, err error) UpdateDoc(ctx context.Context, db *dbr.Tx, Condition map[string]interface{}, Payload map[string]interface{}) (affect int64, err error) GetDoc(ctx context.Context, conditon map[string]interface{}) (doc models.Documents, err error) }
IDocumentsRepository is
type IEsignRepository ¶
type IEsignRepository interface {
PostEsign(ctx context.Context, dataSign models.EsignReq) (result models.EsignResp, err error)
}
IEsignRepository is
type IPlayerRepository ¶
IPlayerRepository is
type ISniperRepository ¶
type ISniperRepository interface {
LoginMehong(ctx context.Context, c models.EncryptedCookies) (response models.ResponseSniper, err error)
}
ISniperRepository is
type IUserRepository ¶
type IUserRepository interface { GetUserByIDDPR(IDDpr int) (user models.User, err error) StoreUser(user models.User) (count int64, err error) UpdateUserByID(id int, user models.User) (err error) Login(l models.Login) (auth bool, user models.User, err error) GetUserByNIPstore(nip string) (user models.User, err error) FindOneUser(ctx context.Context, Condition map[string]interface{}) (User models.User, err error) UpdateUserCond(ctx context.Context, db *dbr.Tx, Condition map[string]interface{}, Payload map[string]interface{}) (affect int64, err error) Tx() (tx *dbr.Tx, err error) GetAll(ctx context.Context) (user []models.ListUser, err error) LoginMehongUser(ctx context.Context, c models.EncryptedCookies) (response models.ResponseSniper, err error) }
IUserRepository is
type PlayerRepository ¶
type PlayerRepository struct {
DB infrastructures.ISQLConnection
}
PlayerRepository is
func (*PlayerRepository) StorePlayer ¶
StorePlayer store agent type data to database
type SniperRepository ¶
type SniperRepository struct {
Redis infrastructures.IRedis
}
SniperRepository is
func (*SniperRepository) LoginMehong ¶
func (r *SniperRepository) LoginMehong(ctx context.Context, c models.EncryptedCookies) (response models.ResponseSniper, err error)
LoginMehong store agent type data to database
type UserRepository ¶
type UserRepository struct { DB infrastructures.ISQLConnection Redis infrastructures.IRedis }
UserRepository is
func (*UserRepository) FindOneUser ¶
func (r *UserRepository) FindOneUser(ctx context.Context, Condition map[string]interface{}) (User models.User, err error)
FindOneUser func
func (*UserRepository) GetUserByIDDPR ¶
func (r *UserRepository) GetUserByIDDPR(IDDpr int) (user models.User, err error)
GetUserByIDDPR store agent type data to database
func (*UserRepository) GetUserByNIPstore ¶
func (r *UserRepository) GetUserByNIPstore(nip string) (user models.User, err error)
GetUserByNIPstore agent type data to database
func (*UserRepository) LoginMehongUser ¶
func (r *UserRepository) LoginMehongUser(ctx context.Context, c models.EncryptedCookies) (response models.ResponseSniper, err error)
LoginMehongUser store agent type data to database
func (*UserRepository) StoreUser ¶
func (r *UserRepository) StoreUser(user models.User) (count int64, err error)
StoreUser store user data to database
func (*UserRepository) Tx ¶
func (r *UserRepository) Tx() (tx *dbr.Tx, err error)
Tx init a new transaction
func (*UserRepository) UpdateUserByID ¶
func (r *UserRepository) UpdateUserByID(id int, user models.User) (err error)
UpdateUserByID store agent type data to database