Documentation ¶
Index ¶
- type CardDto
- type CardDtoWithoutPosition
- type CardRepository
- type CardUseCase
- func (uc CardUseCase) Create(ctx context.Context, dto *CreateCardRequest) (*CreateCardResponse, error)
- func (uc CardUseCase) Delete(ctx context.Context, cardId uuid.UUID) error
- func (uc CardUseCase) GetById(ctx context.Context, dto GetCardRequest) (*CardDtoWithoutPosition, error)
- func (uc CardUseCase) GetCardFromDto(cardRequest CreateCardRequest) (card *entity.Card, err error)
- func (uc CardUseCase) GetCardFromDtos(cardsRequest []CreateCardRequest, galleryId uuid.UUID) (cards []entity.GalleriesCards, err error)
- func (uc CardUseCase) GetCardFromUpdateDto(cardRequest *UpdateCardRequest) (card *entity.Card, err error)
- func (uc CardUseCase) GetDtoFromCard(card *entity.Card) (cardDto *CardDtoWithoutPosition, err error)
- func (uc CardUseCase) GetDtosFromCard(cards []entity.Card) (cardDtos []CardDtoWithoutPosition, err error)
- func (uc CardUseCase) GetDtosFromGalleriesCard(gallery []entity.GalleriesCards) (cardDtos []CardDto, err error)
- func (uc CardUseCase) GetGalleriesCardsFromIds(ctx context.Context, cardId uuid.UUID, galleryIds []uuid.UUID) []entity.GalleriesCards
- func (uc CardUseCase) GetListWithSearch(ctx context.Context, searchValue string, name string) ([]CardDtoWithoutPosition, error)
- func (uc CardUseCase) LinkTags(ctx context.Context, cardId uuid.UUID, tagIds []uuid.UUID) (error, bool)
- func (uc CardUseCase) PatchDetailText(ctx context.Context, dto *PatchDetailTextRequest) error
- func (uc CardUseCase) PatchLearnMoreUrl(ctx context.Context, dto *PatchLearnMoreUrlRequest) error
- func (uc CardUseCase) PatchPreviewText(ctx context.Context, dto *PatchPreviewTextRequest) error
- func (uc CardUseCase) PatchTags(ctx context.Context, cardId uuid.UUID, dtos []TagDtoRequest) error
- func (uc CardUseCase) PatchUser(ctx context.Context, dto *PatchUserRequest) error
- func (uc CardUseCase) UnlinkTags(ctx context.Context, cardId uuid.UUID, tagIds []uuid.UUID) error
- func (uc CardUseCase) Update(ctx context.Context, dto *UpdateCardRequest) error
- type CopierInterface
- type CreateCardRequest
- type CreateCardResponse
- type CreateFormCardRequest
- type CreateGalleryInPageRequest
- type CreateGalleryRequest
- type CreateGalleryResponse
- type CreateHtmlCardRequest
- type CreatePageRequest
- type CreatePageResponse
- type CreatePhotoCardRequest
- type CreateRegularCardRequest
- type CreateTagResponse
- type CreateVideoCardRequest
- type CreateVideoRequest
- type CreateVideoResponse
- type FormCardDto
- type FormDto
- type GalleryDto
- type GalleryDtoWithCardsTotal
- type GalleryInPageDto
- type GalleryRepository
- type GalleryUseCase
- func (uc GalleryUseCase) Create(ctx context.Context, dto *CreateGalleryRequest) (*CreateGalleryResponse, error)
- func (uc GalleryUseCase) DeleteList(ctx context.Context, galleryIds []uuid.UUID) error
- func (uc GalleryUseCase) GetByCode(ctx context.Context, code string) (*GalleryDto, error)
- func (uc GalleryUseCase) GetById(ctx context.Context, dto GetGalleryRequest) (*GalleryDto, error)
- func (uc GalleryUseCase) GetDtoFromGallery(gallery *entity.Gallery) (galleryDto *GalleryDto, err error)
- func (uc GalleryUseCase) GetDtosFromGallery(galleries []entity.Gallery) (galleryDtos []GalleryDto, err error)
- func (uc GalleryUseCase) GetGalleryDtos(galleries []entity.PagesGalleries) (galleryDtos []GalleryInPageDto, err error)
- func (uc GalleryUseCase) GetGalleryFromDto(galleryDto *CreateGalleryRequest) (gallery *entity.Gallery, err error)
- func (uc GalleryUseCase) GetGalleryFromDtos(galleryDtos []CreateGalleryInPageRequest, pageId uuid.UUID) (galleries []entity.PagesGalleries, err error)
- func (uc GalleryUseCase) GetGalleryFromUpdateDto(galleryDto *UpdateGalleryRequest) (gallery *entity.Gallery, err error)
- func (uc GalleryUseCase) GetListWithSearch(ctx context.Context, searchValue string) ([]GalleryDto, error)
- func (uc GalleryUseCase) LinkCards(ctx context.Context, galleryId uuid.UUID, cardIds []uuid.UUID) (error, bool)
- func (uc GalleryUseCase) PatchCardPosition(ctx context.Context, dto *PatchCardPosition) error
- func (uc GalleryUseCase) PatchName(ctx context.Context, dto *PatchGalleryNameRequest) error
- func (uc GalleryUseCase) UnlinkCards(ctx context.Context, galleryId uuid.UUID, cardIds []uuid.UUID) error
- func (uc GalleryUseCase) Update(ctx context.Context, dto *UpdateGalleryRequest) error
- type GetCardRequest
- type GetGalleryRequest
- type GetPageDto
- type GetPageListResponse
- type HtmlCardDto
- type PageDto
- type PageRepository
- type PageShort
- type PageUseCase
- func (uc PageUseCase) Create(ctx context.Context, dto *CreatePageRequest) (*CreatePageResponse, error)
- func (uc PageUseCase) Delete(ctx context.Context, pageId uuid.UUID) error
- func (uc PageUseCase) GetById(ctx context.Context, dto GetPageDto) (*PageDto, error)
- func (uc PageUseCase) GetList(ctx context.Context) (*GetPageListResponse, error)
- func (uc PageUseCase) GetPageDto(page entity.Page) (pageDto *PageDto, err error)
- func (uc PageUseCase) GetPageFromDto(pageDto CreatePageRequest) (page *entity.Page, err error)
- func (uc PageUseCase) GetPageFromPatchDto(pageDto PatchPageRequest) (page *entity.Page, err error)
- func (uc PageUseCase) LinkGalleries(ctx context.Context, pageId uuid.UUID, galleryIds []uuid.UUID) (error, bool)
- func (uc PageUseCase) PatchGalleryPosition(ctx context.Context, dto *PatchGalleryPosition) error
- func (uc PageUseCase) PatchProperties(ctx context.Context, dto *PatchPageRequest) error
- func (uc PageUseCase) UnlinkGalleries(ctx context.Context, pageId uuid.UUID, galleryIds []uuid.UUID) error
- type PatchCardPosition
- type PatchDetailTextRequest
- type PatchGalleryNameRequest
- type PatchGalleryPosition
- type PatchLearnMoreUrlRequest
- type PatchPageRequest
- type PatchPreviewTextRequest
- type PatchUserRequest
- type PhotoCardDto
- type RegularCardDto
- type SearchGalleryRequest
- type TagDto
- type TagDtoRequest
- type TagRepository
- type TagSearchDto
- type TagUseCase
- func (uc TagUseCase) Create(ctx context.Context, dto *TagDto) (*CreateTagResponse, error)
- func (uc TagUseCase) Delete(ctx context.Context, tagId uuid.UUID) error
- func (uc TagUseCase) GetDtosFromTags(tags []entity.Tag, tagCardsIds map[uuid.UUID][]uuid.UUID) ([]TagSearchDto, error)
- func (uc TagUseCase) GetListWithSearch(ctx context.Context, searchValue string) ([]TagSearchDto, error)
- func (uc TagUseCase) GetTagFromDto(tag TagDto) (*entity.Tag, error)
- func (uc TagUseCase) GetTagFromRequestDto(tag TagDtoRequest) (*entity.Tag, error)
- func (uc TagUseCase) Update(ctx context.Context, dto *TagDtoRequest) error
- type UpdateCardRequest
- type UpdateGalleryRequest
- type UserDto
- type UserRepository
- type VideoCardDto
- type VideoSamples
- type VideoUseCase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CardDto ¶
type CardDto struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Code string `json:"code"` Type string `json:"type"` Position int `json:"position"` IsPublished bool `json:"isPublished"` RegularCard *RegularCardDto `json:"regularCard"` VideoCard *VideoCardDto `json:"videoCard"` HtmlCard *HtmlCardDto `json:"htmlCard"` PhotoCard *PhotoCardDto `json:"photoCard"` FormCard *FormCardDto `json:"formCard"` Title string `json:"title"` Description string `json:"description"` OgType string `json:"ogType"` }
type CardDtoWithoutPosition ¶
type CardDtoWithoutPosition struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Code string `json:"code"` Type string `json:"type"` IsPublished bool `json:"isPublished"` RegularCard *RegularCardDto `json:"regularCard"` VideoCard *VideoCardDto `json:"videoCard"` HtmlCard *HtmlCardDto `json:"htmlCard"` PhotoCard *PhotoCardDto `json:"photoCard"` FormCard *FormCardDto `json:"formCard"` Title string `json:"title"` Description string `json:"description"` OgType string `json:"ogType"` }
type CardRepository ¶
type CardRepository interface { GetById(ctx context.Context, cardId uuid.UUID) (*entity.Card, error) GetByIdWithoutAssociate(ctx context.Context, cardId uuid.UUID) (*entity.Card, error) GetListByGalleryId(ctx context.Context, galleryId uuid.UUID) ([]entity.Card, error) Create(ctx context.Context, card *entity.Card, galleriesCards []entity.GalleriesCards) (*uuid.UUID, error) GetListWithSearch(ctx context.Context, searchValue string, name string) ([]entity.Card, error) Update(ctx context.Context, card *entity.Card, galleriesCards []entity.GalleriesCards) error Delete(ctx context.Context, cardId uuid.UUID) error PatchUser(ctx context.Context, card *entity.Card) error PatchPreviewText(ctx context.Context, card *entity.Card) error PatchDetailText(ctx context.Context, card *entity.Card) error PatchLearnMoreUrl(ctx context.Context, card *entity.Card) error PatchTags(ctx context.Context, cardId uuid.UUID, tags []entity.Tag) error CreateRegularTags(ctx context.Context, cardId uuid.UUID, tagIds []uuid.UUID) (error, bool) DeleteRegularTags(ctx context.Context, cardId uuid.UUID, tagIds []uuid.UUID) error UpdatePublish(ctx context.Context, cardID uuid.UUID, publish *bool) error GetLastPositionInGalley(ctx context.Context, galleryID uuid.UUID) (int, error) UpdateInverted(ctx context.Context, cardID uuid.UUID, inverted *bool) error }
type CardUseCase ¶
type CardUseCase struct {
// contains filtered or unexported fields
}
func NewCardUseCase ¶
func NewCardUseCase( cardRepository CardRepository, galleryRepository GalleryRepository, tagRepository TagRepository, mediaProvider actions.MediaProvider, formActions actions2.Forms, copierService CopierInterface, logger *zap.SugaredLogger, ) *CardUseCase
func (CardUseCase) Create ¶
func (uc CardUseCase) Create(ctx context.Context, dto *CreateCardRequest) ( *CreateCardResponse, error, )
func (CardUseCase) GetById ¶
func (uc CardUseCase) GetById(ctx context.Context, dto GetCardRequest) (*CardDtoWithoutPosition, error)
func (CardUseCase) GetCardFromDto ¶
func (uc CardUseCase) GetCardFromDto(cardRequest CreateCardRequest) ( card *entity.Card, err error, )
func (CardUseCase) GetCardFromDtos ¶
func (uc CardUseCase) GetCardFromDtos(cardsRequest []CreateCardRequest, galleryId uuid.UUID) ( cards []entity.GalleriesCards, err error, )
func (CardUseCase) GetCardFromUpdateDto ¶
func (uc CardUseCase) GetCardFromUpdateDto(cardRequest *UpdateCardRequest) ( card *entity.Card, err error, )
func (CardUseCase) GetDtoFromCard ¶
func (uc CardUseCase) GetDtoFromCard(card *entity.Card) (cardDto *CardDtoWithoutPosition, err error)
func (CardUseCase) GetDtosFromCard ¶
func (uc CardUseCase) GetDtosFromCard(cards []entity.Card) (cardDtos []CardDtoWithoutPosition, err error)
func (CardUseCase) GetDtosFromGalleriesCard ¶
func (uc CardUseCase) GetDtosFromGalleriesCard(gallery []entity.GalleriesCards) (cardDtos []CardDto, err error)
func (CardUseCase) GetGalleriesCardsFromIds ¶
func (uc CardUseCase) GetGalleriesCardsFromIds( ctx context.Context, cardId uuid.UUID, galleryIds []uuid.UUID, ) []entity.GalleriesCards
func (CardUseCase) GetListWithSearch ¶
func (uc CardUseCase) GetListWithSearch(ctx context.Context, searchValue string, name string) ( []CardDtoWithoutPosition, error, )
func (CardUseCase) PatchDetailText ¶
func (uc CardUseCase) PatchDetailText(ctx context.Context, dto *PatchDetailTextRequest) error
func (CardUseCase) PatchLearnMoreUrl ¶
func (uc CardUseCase) PatchLearnMoreUrl(ctx context.Context, dto *PatchLearnMoreUrlRequest) error
func (CardUseCase) PatchPreviewText ¶
func (uc CardUseCase) PatchPreviewText(ctx context.Context, dto *PatchPreviewTextRequest) error
func (CardUseCase) PatchTags ¶
func (uc CardUseCase) PatchTags(ctx context.Context, cardId uuid.UUID, dtos []TagDtoRequest) error
func (CardUseCase) PatchUser ¶
func (uc CardUseCase) PatchUser(ctx context.Context, dto *PatchUserRequest) error
func (CardUseCase) UnlinkTags ¶
func (CardUseCase) Update ¶
func (uc CardUseCase) Update(ctx context.Context, dto *UpdateCardRequest) error
type CopierInterface ¶
type CopierInterface interface {
Copy(toValue interface{}, fromValue interface{}) (err error)
}
type CreateCardRequest ¶
type CreateCardRequest struct { GalleryIds []uuid.UUID `json:"galleryIds"` Type string `json:"type" validate:"required"` Name string `json:"name"` Code string `json:"code"` Position int `json:"position"` IsPublished *bool `json:"isPublished" validate:"required"` RegularCard *CreateRegularCardRequest `json:"regularCard"` VideoCard *CreateVideoCardRequest `json:"videoCard"` HtmlCard *CreateHtmlCardRequest `json:"htmlCard"` PhotoCard *CreatePhotoCardRequest `json:"photoCard"` FormCard *CreateFormCardRequest `json:"formCard"` Title string `json:"title"` Description string `json:"description"` OgType string `json:"ogType"` }
type CreateCardResponse ¶
type CreateFormCardRequest ¶
type CreateGalleryRequest ¶
type CreateGalleryRequest struct { Name string `json:"name" validate:"required"` Code string `json:"code" validate:"required"` //Position int `json:"position"` CardsTotal int `json:"cardsTotal"` Cards []CreateCardRequest `json:"cards"` Hidden *bool `json:"hiddenMenu" validate:"required"` IsPublished *bool `json:"isPublished" validate:"required"` }
type CreateGalleryResponse ¶
type CreateHtmlCardRequest ¶
type CreateHtmlCardRequest struct {
Html string `json:"html"`
}
type CreatePageRequest ¶
type CreatePageRequest struct { Name string `json:"name" validate:"required"` Code string `json:"code" validate:"required"` Title string `json:"title" validate:"required"` Description string `json:"description"` TitleSeo string `json:"titleSeo"` DescriptionSeo string `json:"descriptionSeo"` Keywords string `json:"keywords"` IsPublished *bool `json:"isPublished" validate:"required"` Sort int `json:"sort"` Galleries []CreateGalleryInPageRequest `json:"galleries"` OgType string `json:"ogType"` }
type CreatePageResponse ¶
type CreatePhotoCardRequest ¶
type CreateRegularCardRequest ¶
type CreateRegularCardRequest struct { PreviewText string `json:"previewText"` DetailText string `json:"detailText"` Inverted *bool `json:"inverted"` VideoId *uuid.UUID `json:"videoId" validate:"required"` VideoLiteId *uuid.UUID `json:"videoLiteId" validate:"required"` VideoPreviewId *uuid.UUID `json:"videoPreviewId" validate:"required"` VideoPreviewBlurId *uuid.UUID `json:"videoPreviewBlurId" validate:"required"` Tags []uuid.UUID `json:"tags"` UserId *uuid.UUID `json:"userId"` LearnMoreUrl *string `json:"learnMoreUrl"` }
type CreateTagResponse ¶
type CreateVideoCardRequest ¶
type CreateVideoRequest ¶
type CreateVideoResponse ¶
type FormCardDto ¶
type GalleryDto ¶
type GalleryInPageDto ¶
type GalleryRepository ¶
type GalleryRepository interface { GetByCode(ctx context.Context, code string) (*entity.Gallery, error) GetById(ctx context.Context, id uuid.UUID) (*entity.Gallery, error) GetByIdWithoutAssociate(ctx context.Context, id uuid.UUID) (*entity.Gallery, error) GetListByPageId(ctx context.Context, pageId uuid.UUID) ([]entity.Gallery, error) Create(ctx context.Context, gallery *entity.Gallery) (*uuid.UUID, error) GetListWithSearch(ctx context.Context, searchValue string) ([]entity.Gallery, error) Update(ctx context.Context, gallery *entity.Gallery) error PatchName(ctx context.Context, gallery *entity.Gallery) error PatchCardPosition(ctx context.Context, dto *PatchCardPosition) error DeleteList(ctx context.Context, galleryIds []uuid.UUID) error GetLastPosition(ctx context.Context, galleryID uuid.UUID) (int, error) CreateGalleriesCards(ctx context.Context, galleriesCards []entity.GalleriesCards) (error, bool) DeleteGalleriesCards(ctx context.Context, galleryID uuid.UUID, cardIDs []uuid.UUID) error UpdateHidden(ctx context.Context, galleryID uuid.UUID, hidden *bool) error UpdatePublish(ctx context.Context, galleryID uuid.UUID, publish *bool) error }
type GalleryUseCase ¶
type GalleryUseCase struct {
// contains filtered or unexported fields
}
func NewGalleryUseCase ¶
func NewGalleryUseCase( galleryRepository GalleryRepository, cardRepository CardRepository, cardUseCase CardUseCase, copierService CopierInterface, logger *zap.SugaredLogger, ) *GalleryUseCase
func (GalleryUseCase) Create ¶
func (uc GalleryUseCase) Create(ctx context.Context, dto *CreateGalleryRequest) (*CreateGalleryResponse, error)
func (GalleryUseCase) DeleteList ¶
func (GalleryUseCase) GetByCode ¶
func (uc GalleryUseCase) GetByCode(ctx context.Context, code string) (*GalleryDto, error)
func (GalleryUseCase) GetById ¶
func (uc GalleryUseCase) GetById(ctx context.Context, dto GetGalleryRequest) (*GalleryDto, error)
func (GalleryUseCase) GetDtoFromGallery ¶
func (uc GalleryUseCase) GetDtoFromGallery(gallery *entity.Gallery) ( galleryDto *GalleryDto, err error, )
func (GalleryUseCase) GetDtosFromGallery ¶
func (uc GalleryUseCase) GetDtosFromGallery(galleries []entity.Gallery) ( galleryDtos []GalleryDto, err error, )
func (GalleryUseCase) GetGalleryDtos ¶
func (uc GalleryUseCase) GetGalleryDtos(galleries []entity.PagesGalleries) ( galleryDtos []GalleryInPageDto, err error, )
func (GalleryUseCase) GetGalleryFromDto ¶
func (uc GalleryUseCase) GetGalleryFromDto(galleryDto *CreateGalleryRequest) ( gallery *entity.Gallery, err error, )
func (GalleryUseCase) GetGalleryFromDtos ¶
func (uc GalleryUseCase) GetGalleryFromDtos(galleryDtos []CreateGalleryInPageRequest, pageId uuid.UUID) ( galleries []entity.PagesGalleries, err error, )
func (GalleryUseCase) GetGalleryFromUpdateDto ¶
func (uc GalleryUseCase) GetGalleryFromUpdateDto(galleryDto *UpdateGalleryRequest) ( gallery *entity.Gallery, err error, )
func (GalleryUseCase) GetListWithSearch ¶
func (uc GalleryUseCase) GetListWithSearch(ctx context.Context, searchValue string) ([]GalleryDto, error)
func (GalleryUseCase) PatchCardPosition ¶
func (uc GalleryUseCase) PatchCardPosition(ctx context.Context, dto *PatchCardPosition) error
func (GalleryUseCase) PatchName ¶
func (uc GalleryUseCase) PatchName(ctx context.Context, dto *PatchGalleryNameRequest) error
func (GalleryUseCase) UnlinkCards ¶
func (GalleryUseCase) Update ¶
func (uc GalleryUseCase) Update(ctx context.Context, dto *UpdateGalleryRequest) error
type GetCardRequest ¶
type GetCardRequest struct {
ID string `json:"id" validate:"required,sluggable"`
}
type GetGalleryRequest ¶
type GetGalleryRequest struct {
ID string `json:"id" validate:"required,sluggable"`
}
type GetPageDto ¶
type GetPageDto struct {
ID string `json:"id" validate:"required,sluggable"`
}
type GetPageListResponse ¶
type GetPageListResponse struct {
PageList []PageShort `json:"pageList"`
}
type HtmlCardDto ¶
type HtmlCardDto struct {
Html string `json:"html"`
}
type PageDto ¶
type PageDto struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Code string `json:"code"` Title string `json:"title"` TitleSeo string `json:"titleSeo"` Keywords string `json:"keywords"` Description string `json:"description"` DescriptionSeo string `json:"descriptionSeo"` IsPublished bool `json:"isPublished"` Sort int `json:"sort"` Galleries []GalleryInPageDto `json:"galleries"` OgType string `json:"ogType"` }
type PageRepository ¶
type PageRepository interface { GetById(ctx context.Context, id uuid.UUID) (*entity.Page, error) GetByIdWithoutAssociate(ctx context.Context, id uuid.UUID) (*entity.Page, error) GetList(ctx context.Context, fields []string, allowInactive bool) ([]PageShort, error) Create(ctx context.Context, page *entity.Page) (*uuid.UUID, error) Delete(ctx context.Context, pageID uuid.UUID) error PatchProperties(ctx context.Context, page *entity.Page) error PatchGalleryPosition(ctx context.Context, dto *PatchGalleryPosition) error GetLastPosition(ctx context.Context, pageID uuid.UUID) (int, error) CreatePagesGalleries(ctx context.Context, pagesGalleries []entity.PagesGalleries) (error, bool) DeletePagesGalleries(ctx context.Context, pageID uuid.UUID, galleryIDs []uuid.UUID) error UpdatePublish(ctx context.Context, pageID uuid.UUID, publish *bool) error }
type PageUseCase ¶
type PageUseCase struct {
// contains filtered or unexported fields
}
func NewPageUseCase ¶
func NewPageUseCase( pageRepository PageRepository, galleryRepository GalleryRepository, galleryUseCase GalleryUseCase, copierService CopierInterface, logger *zap.SugaredLogger, ) *PageUseCase
func (PageUseCase) Create ¶
func (uc PageUseCase) Create(ctx context.Context, dto *CreatePageRequest) (*CreatePageResponse, error)
func (PageUseCase) GetById ¶
func (uc PageUseCase) GetById(ctx context.Context, dto GetPageDto) (*PageDto, error)
func (PageUseCase) GetList ¶
func (uc PageUseCase) GetList(ctx context.Context) (*GetPageListResponse, error)
func (PageUseCase) GetPageDto ¶
func (uc PageUseCase) GetPageDto(page entity.Page) (pageDto *PageDto, err error)
func (PageUseCase) GetPageFromDto ¶
func (uc PageUseCase) GetPageFromDto(pageDto CreatePageRequest) (page *entity.Page, err error)
func (PageUseCase) GetPageFromPatchDto ¶
func (uc PageUseCase) GetPageFromPatchDto(pageDto PatchPageRequest) (page *entity.Page, err error)
func (PageUseCase) LinkGalleries ¶
func (PageUseCase) PatchGalleryPosition ¶
func (uc PageUseCase) PatchGalleryPosition(ctx context.Context, dto *PatchGalleryPosition) error
func (PageUseCase) PatchProperties ¶
func (uc PageUseCase) PatchProperties(ctx context.Context, dto *PatchPageRequest) error
func (PageUseCase) UnlinkGalleries ¶
type PatchCardPosition ¶
type PatchDetailTextRequest ¶
type PatchGalleryNameRequest ¶
type PatchGalleryPosition ¶
type PatchPageRequest ¶
type PatchPageRequest struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Code string `json:"code"` Title string `json:"title"` TitleSeo string `json:"titleSeo"` Keywords string `json:"keywords"` Description string `json:"description"` DescriptionSeo string `json:"descriptionSeo"` IsPublished *bool `json:"isPublished"` Sort int `json:"sort"` OgImageId *uuid.UUID `json:"ogImageId"` OgType string `json:"ogType"` }
type PatchPreviewTextRequest ¶
type PatchUserRequest ¶
type PhotoCardDto ¶
type RegularCardDto ¶
type RegularCardDto struct { PreviewText string `json:"previewText"` DetailText string `json:"detailText"` Inverted bool `json:"inverted"` Video *entity.Media `json:"video"` VideoLite *entity.Media `json:"videoLite"` VideoPreview *entity.Media `json:"videoPreview"` VideoPreviewBlur *entity.Media `json:"videoPreviewBlur"` User *UserDto `json:"user"` Tags []TagDto `json:"tags"` LearnMoreUrl *string `json:"learnMoreUrl"` }
type SearchGalleryRequest ¶
type TagDtoRequest ¶
type TagRepository ¶
type TagRepository interface { //GetListByCardId(ctx context.Context, regularCardId uuid.UUID) ([]entity.ExternalTag, []entity.InternalTag, error) UpdateIsDetailLink(ctx context.Context, tagID uuid.UUID, value *bool) error GetListWithSearch(ctx context.Context, searchValue string) ([]entity.Tag, map[uuid.UUID][]uuid.UUID, error) GetById(ctx context.Context, tagId uuid.UUID) (*entity.Tag, error) Create(ctx context.Context, tag *entity.Tag) (*uuid.UUID, error) Update(ctx context.Context, tag *entity.Tag) error Delete(ctx context.Context, tagId uuid.UUID) error }
type TagSearchDto ¶
type TagUseCase ¶
type TagUseCase struct {
// contains filtered or unexported fields
}
func NewTagUseCase ¶
func NewTagUseCase(tagRepository TagRepository, copierService CopierInterface, logger *zap.SugaredLogger) *TagUseCase
func (TagUseCase) Create ¶
func (uc TagUseCase) Create(ctx context.Context, dto *TagDto) ( *CreateTagResponse, error, )
func (TagUseCase) GetDtosFromTags ¶
func (uc TagUseCase) GetDtosFromTags(tags []entity.Tag, tagCardsIds map[uuid.UUID][]uuid.UUID) ([]TagSearchDto, error)
func (TagUseCase) GetListWithSearch ¶
func (uc TagUseCase) GetListWithSearch(ctx context.Context, searchValue string) ([]TagSearchDto, error)
func (TagUseCase) GetTagFromDto ¶
func (uc TagUseCase) GetTagFromDto(tag TagDto) (*entity.Tag, error)
func (TagUseCase) GetTagFromRequestDto ¶
func (uc TagUseCase) GetTagFromRequestDto(tag TagDtoRequest) (*entity.Tag, error)
func (TagUseCase) Update ¶
func (uc TagUseCase) Update(ctx context.Context, dto *TagDtoRequest) error
type UpdateCardRequest ¶
type UpdateCardRequest struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Code string `json:"code"` GalleryIds []uuid.UUID `json:"galleryIds"` Type string `json:"type"` //Position int `json:"position"` IsPublished *bool `json:"isPublished"` RegularCard *CreateRegularCardRequest `json:"regularCard"` VideoCard *CreateVideoCardRequest `json:"videoCard"` HtmlCard *CreateHtmlCardRequest `json:"htmlCard"` PhotoCard *CreatePhotoCardRequest `json:"photoCard"` FormCard *CreateFormCardRequest `json:"formCard"` Title string `json:"title"` Description string `json:"description"` OgType string `json:"ogType"` }
type UpdateGalleryRequest ¶
type UserRepository ¶
type VideoCardDto ¶
type VideoSamples ¶
type VideoUseCase ¶
type VideoUseCase struct {
// contains filtered or unexported fields
}
func NewVideoUseCase ¶
func NewVideoUseCase( medias *mediaActions.Medias, logger *zap.SugaredLogger, ) *VideoUseCase
func (VideoUseCase) Create ¶
func (uc VideoUseCase) Create(request CreateVideoRequest) (*CreateVideoResponse, error)
Click to show internal directories.
Click to hide internal directories.