Documentation ¶
Index ¶
- Constants
- type CardRepository
- func (r *CardRepository) CheckLink(ctx context.Context, card *entity.Card, tagID uuid.UUID) bool
- func (r *CardRepository) Create(ctx context.Context, card *entity.Card, galleriesCards []entity.GalleriesCards) (*uuid.UUID, error)
- func (r *CardRepository) CreateRegularTags(ctx context.Context, cardId uuid.UUID, tagIds []uuid.UUID) (error, bool)
- func (r *CardRepository) Delete(ctx context.Context, cardId uuid.UUID) error
- func (r *CardRepository) DeleteRegularTags(ctx context.Context, cardId uuid.UUID, tagIds []uuid.UUID) error
- func (r *CardRepository) GetById(ctx context.Context, cardId uuid.UUID) (*entity.Card, error)
- func (r *CardRepository) GetByIdWithoutAssociate(ctx context.Context, cardId uuid.UUID) (*entity.Card, error)
- func (r *CardRepository) GetInternalCardId(ctx context.Context, cardId uuid.UUID) (*entity.Card, error)
- func (r *CardRepository) GetLastPositionInGalley(ctx context.Context, galleryID uuid.UUID) (int, error)
- func (r *CardRepository) GetListByGalleryId(ctx context.Context, galleryId uuid.UUID) ([]entity.Card, error)
- func (r *CardRepository) GetListWithSearch(ctx context.Context, searchValue string, name string) ([]entity.Card, error)
- func (r *CardRepository) GetRegularCardId(ctx context.Context, cardId uuid.UUID) (string, error)
- func (r *CardRepository) PatchDetailText(ctx context.Context, card *entity.Card) error
- func (r *CardRepository) PatchLearnMoreUrl(ctx context.Context, card *entity.Card) error
- func (r *CardRepository) PatchPreviewText(ctx context.Context, card *entity.Card) error
- func (r *CardRepository) PatchTags(ctx context.Context, cardId uuid.UUID, tags []entity.Tag) error
- func (r *CardRepository) PatchUser(ctx context.Context, card *entity.Card) error
- func (r *CardRepository) Update(ctx context.Context, card *entity.Card, galleriesCards []entity.GalleriesCards) error
- func (r *CardRepository) UpdateInverted(ctx context.Context, cardID uuid.UUID, inverted *bool) error
- func (r *CardRepository) UpdatePositionBeforeDelete(ctx context.Context, cardId uuid.UUID) error
- func (r *CardRepository) UpdatePublish(ctx context.Context, cardID uuid.UUID, publish *bool) error
- type GalleryRepository
- func (r *GalleryRepository) CheckLink(ctx context.Context, galleryID uuid.UUID, cardID uuid.UUID) bool
- func (r *GalleryRepository) Create(ctx context.Context, gallery *entity.Gallery) (*uuid.UUID, error)
- func (r *GalleryRepository) CreateGalleriesCards(ctx context.Context, galleriesCards []entity.GalleriesCards) (error, bool)
- func (r *GalleryRepository) DeleteGalleriesCards(ctx context.Context, galleryID uuid.UUID, cardIDs []uuid.UUID) error
- func (r *GalleryRepository) DeleteList(ctx context.Context, galleryIds []uuid.UUID) error
- func (r *GalleryRepository) GetByCode(ctx context.Context, code string) (*entity.Gallery, error)
- func (r *GalleryRepository) GetById(ctx context.Context, id uuid.UUID) (*entity.Gallery, error)
- func (r *GalleryRepository) GetByIdWithoutAssociate(ctx context.Context, id uuid.UUID) (*entity.Gallery, error)
- func (r *GalleryRepository) GetLastPosition(ctx context.Context, galleryID uuid.UUID) (int, error)
- func (r *GalleryRepository) GetListByPageId(ctx context.Context, pageId uuid.UUID) ([]entity.Gallery, error)
- func (r *GalleryRepository) GetListWithSearch(ctx context.Context, searchValue string) ([]entity.Gallery, error)
- func (r *GalleryRepository) PatchCardPosition(ctx context.Context, dto *actions.PatchCardPosition) error
- func (r *GalleryRepository) PatchName(ctx context.Context, gallery *entity.Gallery) error
- func (r *GalleryRepository) Update(ctx context.Context, gallery *entity.Gallery) error
- func (r *GalleryRepository) UpdateCardsPositionAfterDelete(ctx context.Context, galleryID uuid.UUID, ...) error
- func (r *GalleryRepository) UpdateCardsPositionAfterPatch(ctx context.Context, dto *actions.PatchCardPosition, tx *gorm.DB) error
- func (r *GalleryRepository) UpdateHidden(ctx context.Context, galleryID uuid.UUID, hidden *bool) error
- func (r *GalleryRepository) UpdatePositionBeforeDelete(ctx context.Context, galleryIds []uuid.UUID) error
- func (r *GalleryRepository) UpdatePublish(ctx context.Context, galleryID uuid.UUID, publish *bool) error
- type PageRepository
- func (r *PageRepository) CheckLink(ctx context.Context, pageID uuid.UUID, galleryID uuid.UUID) bool
- func (r *PageRepository) Create(ctx context.Context, page *entity.Page) (*uuid.UUID, error)
- func (r *PageRepository) CreatePagesGalleries(ctx context.Context, pagesGalleries []entity.PagesGalleries) (error, bool)
- func (r *PageRepository) Delete(ctx context.Context, pageId uuid.UUID) error
- func (r *PageRepository) DeletePagesGalleries(ctx context.Context, pageID uuid.UUID, galleryIDs []uuid.UUID) error
- func (r *PageRepository) GetById(ctx context.Context, id uuid.UUID) (*entity.Page, error)
- func (r *PageRepository) GetByIdWithoutAssociate(ctx context.Context, id uuid.UUID) (*entity.Page, error)
- func (r *PageRepository) GetLastPosition(ctx context.Context, pageID uuid.UUID) (int, error)
- func (r *PageRepository) GetList(ctx context.Context, fields []string, allowInactive bool) (list []actions.PageShort, err error)
- func (r *PageRepository) PatchGalleryPosition(ctx context.Context, dto *actions.PatchGalleryPosition) error
- func (r *PageRepository) PatchProperties(ctx context.Context, page *entity.Page) error
- func (r *PageRepository) UpdateGalleriesPositionAfterDelete(ctx context.Context, pageID uuid.UUID, pagesGalleries []entity.PagesGalleries, ...) error
- func (r *PageRepository) UpdateGalleriesPositionAfterPatch(ctx context.Context, dto *actions.PatchGalleryPosition, tx *gorm.DB) error
- func (r *PageRepository) UpdatePublish(ctx context.Context, pageId uuid.UUID, publish *bool) error
- type TagRepository
- func (r *TagRepository) Create(ctx context.Context, tag *entity.Tag) (*uuid.UUID, error)
- func (r *TagRepository) Delete(ctx context.Context, tagId uuid.UUID) error
- func (r *TagRepository) GetById(ctx context.Context, tagId uuid.UUID) (*entity.Tag, error)
- func (r *TagRepository) GetCardIdsByTagId(ctx context.Context, tagId uuid.UUID) ([]uuid.UUID, error)
- func (r *TagRepository) GetListWithSearch(ctx context.Context, searchValue string) ([]entity.Tag, map[uuid.UUID][]uuid.UUID, error)
- func (r *TagRepository) Update(ctx context.Context, tag *entity.Tag) error
- func (r *TagRepository) UpdateIsDetailLink(ctx context.Context, tagID uuid.UUID, value *bool) error
- type UserRepository
Constants ¶
View Source
const (
UniqueViolationErr = "23505"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CardRepository ¶
type CardRepository struct {
// contains filtered or unexported fields
}
func NewCardRepository ¶
func NewCardRepository(db *gorm.DB) *CardRepository
func (*CardRepository) Create ¶
func (r *CardRepository) Create( ctx context.Context, card *entity.Card, galleriesCards []entity.GalleriesCards, ) (*uuid.UUID, error)
func (*CardRepository) CreateRegularTags ¶
func (*CardRepository) DeleteRegularTags ¶
func (*CardRepository) GetByIdWithoutAssociate ¶
func (*CardRepository) GetInternalCardId ¶
func (*CardRepository) GetLastPositionInGalley ¶
func (*CardRepository) GetListByGalleryId ¶
func (*CardRepository) GetListWithSearch ¶
func (*CardRepository) GetRegularCardId ¶
func (*CardRepository) PatchDetailText ¶
func (*CardRepository) PatchLearnMoreUrl ¶
func (*CardRepository) PatchPreviewText ¶
func (*CardRepository) Update ¶
func (r *CardRepository) Update( ctx context.Context, card *entity.Card, galleriesCards []entity.GalleriesCards, ) error
func (*CardRepository) UpdateInverted ¶
func (*CardRepository) UpdatePositionBeforeDelete ¶
func (*CardRepository) UpdatePublish ¶
type GalleryRepository ¶
type GalleryRepository struct {
// contains filtered or unexported fields
}
func NewGalleryRepository ¶
func NewGalleryRepository(db *gorm.DB) *GalleryRepository
func (*GalleryRepository) CreateGalleriesCards ¶
func (r *GalleryRepository) CreateGalleriesCards(ctx context.Context, galleriesCards []entity.GalleriesCards) ( error, bool, )
func (*GalleryRepository) DeleteGalleriesCards ¶
func (*GalleryRepository) DeleteList ¶
func (*GalleryRepository) GetByIdWithoutAssociate ¶
func (*GalleryRepository) GetLastPosition ¶
func (*GalleryRepository) GetListByPageId ¶
func (*GalleryRepository) GetListWithSearch ¶
func (*GalleryRepository) PatchCardPosition ¶
func (r *GalleryRepository) PatchCardPosition(ctx context.Context, dto *actions.PatchCardPosition) error
func (*GalleryRepository) UpdateCardsPositionAfterDelete ¶
func (r *GalleryRepository) UpdateCardsPositionAfterDelete( ctx context.Context, galleryID uuid.UUID, galleriesCards []entity.GalleriesCards, err error, ) error
func (*GalleryRepository) UpdateCardsPositionAfterPatch ¶
func (r *GalleryRepository) UpdateCardsPositionAfterPatch( ctx context.Context, dto *actions.PatchCardPosition, tx *gorm.DB, ) error
func (*GalleryRepository) UpdateHidden ¶
func (*GalleryRepository) UpdatePositionBeforeDelete ¶
func (*GalleryRepository) UpdatePublish ¶
type PageRepository ¶
type PageRepository struct {
// contains filtered or unexported fields
}
func NewPageRepository ¶
func NewPageRepository(db *gorm.DB) *PageRepository
func (*PageRepository) CreatePagesGalleries ¶
func (r *PageRepository) CreatePagesGalleries(ctx context.Context, pagesGalleries []entity.PagesGalleries) ( error, bool, )
func (*PageRepository) DeletePagesGalleries ¶
func (*PageRepository) GetByIdWithoutAssociate ¶
func (*PageRepository) GetLastPosition ¶
func (*PageRepository) PatchGalleryPosition ¶
func (r *PageRepository) PatchGalleryPosition(ctx context.Context, dto *actions.PatchGalleryPosition) error
func (*PageRepository) PatchProperties ¶
func (*PageRepository) UpdateGalleriesPositionAfterDelete ¶
func (r *PageRepository) UpdateGalleriesPositionAfterDelete( ctx context.Context, pageID uuid.UUID, pagesGalleries []entity.PagesGalleries, err error, ) error
func (*PageRepository) UpdateGalleriesPositionAfterPatch ¶
func (r *PageRepository) UpdateGalleriesPositionAfterPatch( ctx context.Context, dto *actions.PatchGalleryPosition, tx *gorm.DB, ) error
func (*PageRepository) UpdatePublish ¶
type TagRepository ¶
type TagRepository struct {
// contains filtered or unexported fields
}
func NewTagRepository ¶
func NewTagRepository(db *gorm.DB) *TagRepository
func (*TagRepository) GetCardIdsByTagId ¶
func (*TagRepository) GetListWithSearch ¶
func (*TagRepository) UpdateIsDetailLink ¶
type UserRepository ¶
type UserRepository struct {
// contains filtered or unexported fields
}
func NewUserRepository ¶
func NewUserRepository(db *gorm.DB) *UserRepository
func (*UserRepository) GetById ¶
func (r *UserRepository) GetById(ctx context.Context, userId uuid.UUID) (*user_entity.User, error)
Click to show internal directories.
Click to hide internal directories.