contracts

package
v0.0.0-...-f295edf Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsS3DownloaderFactory

type AwsS3DownloaderFactory interface {
	Create(sess *session.Session) (awsSdkS3Downloader s3manageriface.DownloaderAPI)
}

type AwsS3Factory

type AwsS3Factory interface {
	Create(sess *session.Session) (awsSdkS3 s3iface.S3API)
}

type AwsS3Parameters

type AwsS3Parameters interface {
	AccessKeyId() string
	SecretKeyId() string
	Bucket() string
	Region() string
}

type AwsS3UploaderFactory

type AwsS3UploaderFactory interface {
	Create(sess *session.Session) (awsSdkS3Uploader s3manageriface.UploaderAPI)
}

type AwsS3WriterProxy

type AwsS3WriterProxy interface {
	io.WriterAt
	Writer() io.Writer
}

type AwsS3WriterProxyFactory

type AwsS3WriterProxyFactory interface {
	Create(destination io.Writer) AwsS3WriterProxy
}

type BannerAggregator

type BannerAggregator interface {
	AggregateBanner(bannerEntity *entities.BannerEntity) *models.Banner
	AggregateBanners(bannerEntities []*entities.BannerEntity) []*models.Banner
	AggregatePaginationResult(entityPaginationResult *models.PaginationResult) *models.PaginationResult
}

type BannerApi

type BannerApi interface {
	ListBanners(bannerPaginationQuery *models.BannerPaginationQuery) (*models.PaginationResult, errors.Error)
	GetBanner(bannerId *models.BannerId) (banner *models.Banner, err errors.Error)
	CreateBanner(data *models.BannerCreate) (banner *models.Banner, err errors.Error)
	UpdateBanner(bannerId *models.BannerId, data *models.BannerUpdate) (err errors.Error)
	DeleteBanner(bannerId *models.BannerId) (err errors.Error)
}

type BannerController

type BannerController interface {
	ListBanners(httpContext HttpContext) (response interface{}, err errors.Error)
	GetBanner(httpContext HttpContext) (response interface{}, err errors.Error)
	CreateBanner(httpContext HttpContext) (response interface{}, err errors.Error)
	UpdateBanner(httpContext HttpContext) (_ interface{}, err errors.Error)
	DeleteBanner(httpContext HttpContext) (_ interface{}, err errors.Error)
}

type BannerEntityFactory

type BannerEntityFactory interface {
	CreateBannerEntity() *entities.BannerEntity
}

type BannerEvent

type BannerEvent interface {
	Event
	BannerEntity() *entities.BannerEntity
}

type BannerEventFactory

type BannerEventFactory interface {
	CreateBannerCreatedEvent(bannerEntity *entities.BannerEntity) BannerEvent
	CreateBannerUpdatedEvent(bannerEntity *entities.BannerEntity) BannerEvent
	CreateBannerDeletedEvent(bannerEntity *entities.BannerEntity) BannerEvent
}

type BannerHttpHelper

type BannerHttpHelper interface {
	ParseBannerId(httpContext HttpContext) (*models.BannerId, errors.Error)
}

type BannerModelFactory

type BannerModelFactory interface {
	CreateBannerPaginationQuery() *models.BannerPaginationQuery
	CreateBanner() *models.Banner
	CreateBannerCreate() *models.BannerCreate
	CreateBannerUpdate() *models.BannerUpdate
}

type BannerRepository

type BannerRepository interface {
	ListBanners(bannerPaginationQuery *models.BannerPaginationQuery) (*models.PaginationResult, errors.Error)
	GetBanner(bannerId *models.BannerId) (bannerEntity *entities.BannerEntity, err errors.Error)
	SaveBanner(bannerEntity *entities.BannerEntity) (err errors.Error)
	RemoveBanner(bannerEntity *entities.BannerEntity) (err errors.Error)
}

type BannerService

type BannerService interface {
	ListBanners(bannerPaginationQuery *models.BannerPaginationQuery) (*models.PaginationResult, errors.Error)
	GetBanner(bannerId *models.BannerId) (bannerEntity *entities.BannerEntity, err errors.Error)
	CreateBanner(data *models.BannerCreate) (bannerEntity *entities.BannerEntity, err errors.Error)
	UpdateBanner(bannerEntity *entities.BannerEntity, data *models.BannerUpdate) (err errors.Error)
	DeleteBanner(bannerEntity *entities.BannerEntity) (err errors.Error)
}

type CategoryAggregator

type CategoryAggregator interface {
	AggregateCategory(categoryEntity *entities.CategoryEntity) *models.Category
	AggregateCategoryTree(categoryEntityTree *entities.CategoryEntityTree) *models.CategoryTree
	AggregateCategories(categoryEntities []*entities.CategoryEntity) []*models.Category
	AggregateCategoriesTree(categoryEntityTree *entities.CategoryEntityTree) []*models.CategoryTree
	AggregatePaginationResult(entityPaginationResult *models.PaginationResult) *models.PaginationResult
}

type CategoryApi

type CategoryApi interface {
	ListCategories(categoryPaginationQuery *models.CategoryPaginationQuery) (*models.PaginationResult, errors.Error)
	GetCategoriesTree() ([]*models.CategoryTree, errors.Error)
	GetCategory(categoryId *models.CategoryId) (category *models.Category, err errors.Error)
	GetCategoryTree(categoryId *models.CategoryId) (*models.CategoryTree, errors.Error)
	CreateCategory(data *models.CategoryCreate) (category *models.Category, err errors.Error)
	UpdateCategory(categoryId *models.CategoryId, data *models.CategoryUpdate) (err errors.Error)
	ChangeCategoryParent(categoryId *models.CategoryId, parentCategoryId *models.CategoryId) errors.Error
	RemoveCategoryParent(categoryId *models.CategoryId) errors.Error
	DeleteCategory(categoryId *models.CategoryId) (err errors.Error)

	ListObjectCategories(models.Object, *models.CategoryPaginationQuery) (*models.PaginationResult, errors.Error)
}

type CategoryController

type CategoryController interface {
	ListCategories(httpContext HttpContext) (response interface{}, err errors.Error)
	GetCategoriesTree(httpContext HttpContext) (response interface{}, err errors.Error)
	GetCategory(httpContext HttpContext) (response interface{}, err errors.Error)
	GetCategoryTree(httpContext HttpContext) (response interface{}, err errors.Error)
	CreateCategory(httpContext HttpContext) (response interface{}, err errors.Error)
	UpdateCategory(httpContext HttpContext) (_ interface{}, err errors.Error)
	ChangeCategoryParent(httpContext HttpContext) (_ interface{}, err errors.Error)
	RemoveCategoryParent(httpContext HttpContext) (_ interface{}, err errors.Error)
	DeleteCategory(httpContext HttpContext) (_ interface{}, err errors.Error)
}

type CategoryEdgesBuilderJob

type CategoryEdgesBuilderJob interface {
	BuildCategoriesEdges() (err errors.Error)
}

type CategoryEntityFactory

type CategoryEntityFactory interface {
	CreateCategoryEntity() *entities.CategoryEntity
	CreateCategoryXrefEntity(*entities.CategoryEntity, models.Object) *entities.CategoryXrefEntity
}

type CategoryEvent

type CategoryEvent interface {
	Event
	CategoryEntity() *entities.CategoryEntity
}

type CategoryEventFactory

type CategoryEventFactory interface {
	CreateCategoryCreatedEvent(*entities.CategoryEntity) CategoryEvent
	CreateCategoryUpdatedEvent(*entities.CategoryEntity) CategoryEvent
	CreateCategoryDeletedEvent(*entities.CategoryEntity) CategoryEvent
	CreateCategoryParentChangedEvent(*entities.CategoryEntity) CategoryEvent
	CreateCategoryParentRemovedEvent(*entities.CategoryEntity) CategoryEvent
}

type CategoryHttpHelper

type CategoryHttpHelper interface {
	ParseCategoryId(HttpContext) (*models.CategoryId, errors.Error)
	ParseParentCategoryId(HttpContext) (*models.CategoryId, errors.Error)
}

type CategoryModelFactory

type CategoryModelFactory interface {
	CreateCategoryPaginationQuery() *models.CategoryPaginationQuery
	CreateCategory() *models.Category
	CreateCategoryTree() *models.CategoryTree
	CreateCategoryCreate() *models.CategoryCreate
	CreateCategoryUpdate() *models.CategoryUpdate
}

type CategoryNestedSetBuilder

type CategoryNestedSetBuilder interface {
	BuildCategoryEntityNestedSet(categoryEntities []*entities.CategoryEntity) (*entities.CategoryEntityNestedSet, errors.Error)
	BuildCategoryEntityNestedSetFromTree(categoryEntityTree *entities.CategoryEntityTree) *entities.CategoryEntityNestedSet
}

type CategoryRepository

type CategoryRepository interface {
	ListCategories(categoryPaginationQuery *models.CategoryPaginationQuery) (*models.PaginationResult, errors.Error)
	GetCategories() ([]*entities.CategoryEntity, errors.Error)
	GetCategoriesExcept(categoryEntity *entities.CategoryEntity) ([]*entities.CategoryEntity, errors.Error)
	GetCategoriesTree() (*entities.CategoryEntityTree, errors.Error)
	GetCategory(categoryId *models.CategoryId) (*entities.CategoryEntity, errors.Error)
	GetCategoryTree(categoryId *models.CategoryId) (*entities.CategoryEntityTree, errors.Error)
	SaveCategory(categoryEntity *entities.CategoryEntity) (err errors.Error)
	RemoveCategory(categoryEntity *entities.CategoryEntity) (err errors.Error)

	GetCategoryXrefs(*entities.CategoryEntity) ([]*entities.CategoryXrefEntity, errors.Error)
	GetCategoryObjectXrefs(models.Object) ([]*entities.CategoryXrefEntity, errors.Error)
	GetCategoryXref(*entities.CategoryEntity, models.Object) (*entities.CategoryXrefEntity, errors.Error)
	SaveCategoryXref(*entities.CategoryXrefEntity) errors.Error
	RemoveCategoryXref(*entities.CategoryXrefEntity) errors.Error

	ListObjectCategories(models.Object, *models.CategoryPaginationQuery) (*models.PaginationResult, errors.Error)
}

type CategoryService

type CategoryService interface {
	ListCategories(categoryPaginationQuery *models.CategoryPaginationQuery) (*models.PaginationResult, errors.Error)
	GetCategoriesTree() (*entities.CategoryEntityTree, errors.Error)
	GetCategory(categoryId *models.CategoryId) (*entities.CategoryEntity, errors.Error)
	GetCategoryTree(categoryId *models.CategoryId) (*entities.CategoryEntityTree, errors.Error)
	CreateCategory(data *models.CategoryCreate) (*entities.CategoryEntity, errors.Error)
	UpdateCategory(categoryEntity *entities.CategoryEntity, data *models.CategoryUpdate) errors.Error
	ChangeCategoryParent(categoryEntity *entities.CategoryEntity, parentCategoryEntity *entities.CategoryEntity) errors.Error
	RemoveCategoryParent(categoryEntity *entities.CategoryEntity) errors.Error
	DeleteCategory(categoryEntity *entities.CategoryEntity) errors.Error

	GetCategoryXrefs(*entities.CategoryEntity) ([]*entities.CategoryXrefEntity, errors.Error)
	GetCategoryObjectXrefs(models.Object) ([]*entities.CategoryXrefEntity, errors.Error)
	GetCategoryXref(*entities.CategoryEntity, models.Object) (*entities.CategoryXrefEntity, errors.Error)
	CreateCategoryXref(*entities.CategoryEntity, models.Object) (*entities.CategoryXrefEntity, errors.Error)
	DeleteCategoryXref(*entities.CategoryXrefEntity) errors.Error

	ListObjectCategories(models.Object, *models.CategoryPaginationQuery) (*models.PaginationResult, errors.Error)
}

type CategoryTreeBuilder

type CategoryTreeBuilder interface {
	BuildCategoryEntityTree(categoryEntities []*entities.CategoryEntity) (*entities.CategoryEntityTree, errors.Error)
}

type ChannelAggregator

type ChannelAggregator interface {
	AggregateChannel(channelEntity *entities.ChannelEntity) *models.Channel
	AggregateChannels(channelEntities []*entities.ChannelEntity) []*models.Channel
	AggregatePaginationResult(entityPaginationResult *models.PaginationResult) *models.PaginationResult
}

type ChannelApi

type ChannelApi interface {
	ListChannels(channelPaginationQuery *models.ChannelPaginationQuery) (*models.PaginationResult, errors.Error)
	GetChannel(channelId *models.ChannelId) (channel *models.Channel, err errors.Error)
	CreateChannel(data *models.ChannelCreate) (channel *models.Channel, err errors.Error)
	UpdateChannel(channelId *models.ChannelId, data *models.ChannelUpdate) (err errors.Error)
	DeleteChannel(channelId *models.ChannelId) (err errors.Error)
}

type ChannelController

type ChannelController interface {
	ListChannels(httpContext HttpContext) (response interface{}, err errors.Error)
	GetChannel(httpContext HttpContext) (response interface{}, err errors.Error)
	CreateChannel(httpContext HttpContext) (response interface{}, err errors.Error)
	UpdateChannel(httpContext HttpContext) (_ interface{}, err errors.Error)
	DeleteChannel(httpContext HttpContext) (_ interface{}, err errors.Error)
}

type ChannelEntityFactory

type ChannelEntityFactory interface {
	CreateChannelEntity() *entities.ChannelEntity
}

type ChannelEvent

type ChannelEvent interface {
	Event
	ChannelEntity() *entities.ChannelEntity
}

type ChannelEventFactory

type ChannelEventFactory interface {
	CreateChannelCreatedEvent(channelEntity *entities.ChannelEntity) ChannelEvent
	CreateChannelUpdatedEvent(channelEntity *entities.ChannelEntity) ChannelEvent
	CreateChannelDeletedEvent(channelEntity *entities.ChannelEntity) ChannelEvent
}

type ChannelHttpHelper

type ChannelHttpHelper interface {
	ParseChannelId(httpContext HttpContext) (*models.ChannelId, errors.Error)
}

type ChannelModelFactory

type ChannelModelFactory interface {
	CreateChannelPaginationQuery() *models.ChannelPaginationQuery
	CreateChannel() *models.Channel
	CreateChannelCreate() *models.ChannelCreate
	CreateChannelUpdate() *models.ChannelUpdate
}

type ChannelRepository

type ChannelRepository interface {
	ListChannels(channelPaginationQuery *models.ChannelPaginationQuery) (*models.PaginationResult, errors.Error)
	GetChannel(channelId *models.ChannelId) (channelEntity *entities.ChannelEntity, err errors.Error)
	SaveChannel(channelEntity *entities.ChannelEntity) (err errors.Error)
	RemoveChannel(channelEntity *entities.ChannelEntity) (err errors.Error)
}

type ChannelService

type ChannelService interface {
	ListChannels(channelPaginationQuery *models.ChannelPaginationQuery) (*models.PaginationResult, errors.Error)
	GetChannel(channelId *models.ChannelId) (channelEntity *entities.ChannelEntity, err errors.Error)
	CreateChannel(data *models.ChannelCreate) (channelEntity *entities.ChannelEntity, err errors.Error)
	UpdateChannel(channelEntity *entities.ChannelEntity, data *models.ChannelUpdate) (err errors.Error)
	DeleteChannel(channelEntity *entities.ChannelEntity) (err errors.Error)
}

type CommentAggregator

type CommentAggregator interface {
	AggregateComment(commentEntity *entities.CommentEntity) *models.Comment
	AggregateComments(commentEntities []*entities.CommentEntity) []*models.Comment
	AggregatePaginationResult(entityPaginationResult *models.PaginationResult) *models.PaginationResult
}

type CommentApi

type CommentApi interface {
	ListComments(commentPaginationQuery *models.CommentPaginationQuery) (*models.PaginationResult, errors.Error)
	GetComment(commentId *models.CommentId) (comment *models.Comment, err errors.Error)
	CreateComment(data *models.CommentCreate) (comment *models.Comment, err errors.Error)
	UpdateComment(commentId *models.CommentId, data *models.CommentUpdate) (err errors.Error)
	DeleteComment(commentId *models.CommentId) (err errors.Error)
}

type CommentController

type CommentController interface {
	ListComments(httpContext HttpContext) (response interface{}, err errors.Error)
	GetComment(httpContext HttpContext) (response interface{}, err errors.Error)
	CreateComment(httpContext HttpContext) (response interface{}, err errors.Error)
	UpdateComment(httpContext HttpContext) (_ interface{}, err errors.Error)
	DeleteComment(httpContext HttpContext) (_ interface{}, err errors.Error)
}

type CommentEntityFactory

type CommentEntityFactory interface {
	CreateCommentEntity() *entities.CommentEntity
}

type CommentEvent

type CommentEvent interface {
	Event
	CommentEntity() *entities.CommentEntity
}

type CommentEventFactory

type CommentEventFactory interface {
	CreateCommentCreatedEvent(commentEntity *entities.CommentEntity) CommentEvent
	CreateCommentUpdatedEvent(commentEntity *entities.CommentEntity) CommentEvent
	CreateCommentDeletedEvent(commentEntity *entities.CommentEntity) CommentEvent
}

type CommentHttpHelper

type CommentHttpHelper interface {
	ParseCommentId(httpContext HttpContext) (*models.CommentId, errors.Error)
}

type CommentModelFactory

type CommentModelFactory interface {
	CreateCommentPaginationQuery() *models.CommentPaginationQuery
	CreateComment() *models.Comment
	CreateCommentCreate() *models.CommentCreate
	CreateCommentUpdate() *models.CommentUpdate
}

type CommentRepository

type CommentRepository interface {
	ListComments(commentPaginationQuery *models.CommentPaginationQuery) (*models.PaginationResult, errors.Error)
	GetComment(commentId *models.CommentId) (commentEntity *entities.CommentEntity, err errors.Error)
	SaveComment(commentEntity *entities.CommentEntity) (err errors.Error)
	RemoveComment(commentEntity *entities.CommentEntity) (err errors.Error)
}

type CommentService

type CommentService interface {
	ListComments(commentPaginationQuery *models.CommentPaginationQuery) (*models.PaginationResult, errors.Error)
	GetComment(commentId *models.CommentId) (commentEntity *entities.CommentEntity, err errors.Error)
	CreateComment(data *models.CommentCreate) (commentEntity *entities.CommentEntity, err errors.Error)
	UpdateComment(commentEntity *entities.CommentEntity, data *models.CommentUpdate) (err errors.Error)
	DeleteComment(commentEntity *entities.CommentEntity) (err errors.Error)
}

type ContentTypeValidator

type ContentTypeValidator interface {
	ValidateImage(contentType string) errors.Error
	ValidateVideo(contentType string) errors.Error
	ValidateAudio(contentType string) errors.Error
}

type DbPaginator

type DbPaginator interface {
	Paginate(
		db *gorm.DB,
		paginationQuery *models.PaginationQuery,
		paginationData interface{},
		paginationTotal *int,
	) (err errors.Error)
}

type Event

type Event interface {
	Name() string
}

type EventDispatcher

type EventDispatcher interface {
	Dispatch(event Event)
	Subscribe(eventName string, eventSubscriberFunc EventSubscriberFunc)
}

type EventSubscriberFunc

type EventSubscriberFunc func(event Event) errors.Error

type FileAggregator

type FileAggregator interface {
	AggregateFile(fileEntity *entities.FileEntity) (file *models.File)
	AggregateFiles(fileEntities []*entities.FileEntity) (files []*models.File)
	AggregatePaginationResult(entityPaginationResult *models.PaginationResult) *models.PaginationResult
}

type FileApi

type FileApi interface {
	ListFiles(filePaginationQuery *models.FilePaginationQuery) (*models.PaginationResult, errors.Error)
	GetFile(fileId *models.FileId) (file *models.File, err errors.Error)
	UploadFile(fileSource io.Reader, data *models.FileUpload) (file *models.File, err errors.Error)
	DownloadFile(fileId *models.FileId, prepareFileDestination PrepareFileDestination) (err errors.Error)
	UpdateFile(fileId *models.FileId, data *models.FileUpdate) (err errors.Error)
	DeleteFile(fileId *models.FileId) (err errors.Error)
}

type FileController

type FileController interface {
	ListFiles(httpContext HttpContext) (response interface{}, err errors.Error)
	GetFile(httpContext HttpContext) (response interface{}, err errors.Error)
	UploadFile(httpContext HttpContext) (response interface{}, err errors.Error)
	DownloadFile(httpContext HttpContext) (_ interface{}, err errors.Error)
	UpdateFile(httpContext HttpContext) (_ interface{}, err errors.Error)
	DeleteFile(httpContext HttpContext) (_ interface{}, err errors.Error)
}

type FileEntityFactory

type FileEntityFactory interface {
	CreateFileEntity() (fileEntity *entities.FileEntity)
}

type FileEvent

type FileEvent interface {
	Event
	FileEntity() *entities.FileEntity
}

type FileEventFactory

type FileEventFactory interface {
	CreateFileUploadedEvent(fileEntity *entities.FileEntity) FileEvent
	CreateFileUpdatedEvent(fileEntity *entities.FileEntity) FileEvent
	CreateFileDeletedEvent(fileEntity *entities.FileEntity) FileEvent
}

type FileHttpHelper

type FileHttpHelper interface {
	ParseFileId(httpContext HttpContext) (fileId *models.FileId, err errors.Error)
	GetFileHeader(httpContext HttpContext) (formHeader *multipart.FileHeader, err errors.Error)
	OpenFormFile(httpContext *multipart.FileHeader) (formFile multipart.File, err errors.Error)
	PrepareFileDestination(httpContext HttpContext) (getFileDestination PrepareFileDestination)
}

type FileModelFactory

type FileModelFactory interface {
	CreateFilePaginationQuery() *models.FilePaginationQuery
	CreateFile() *models.File
	CreateFileUpload() *models.FileUpload
	CreateFileUpdate() *models.FileUpdate
}

type FilePathStrategy

type FilePathStrategy interface {
	BuildPath(fileEntity *entities.FileEntity) (filePath string, err errors.Error)
}

type FileRepository

type FileRepository interface {
	ListFiles(filePaginationQuery *models.FilePaginationQuery) (*models.PaginationResult, errors.Error)
	GetFile(fileId *models.FileId) (fileEntity *entities.FileEntity, err errors.Error)
	SaveFile(fileEntity *entities.FileEntity) (err errors.Error)
	RemoveFile(fileEntity *entities.FileEntity) (err errors.Error)
}

type FileService

type FileService interface {
	ListFiles(*models.FilePaginationQuery) (*models.PaginationResult, errors.Error)
	GetFile(fileId *models.FileId) (fileEntity *entities.FileEntity, err errors.Error)
	UploadFile(fileSource io.Reader, data *models.FileUpload) (fileEntity *entities.FileEntity, err errors.Error)
	DownloadFile(fileEntity *entities.FileEntity, fileDestination io.Writer) (err errors.Error)
	UpdateFile(fileEntity *entities.FileEntity, data *models.FileUpdate) (err errors.Error)
	DeleteFile(fileEntity *entities.FileEntity) (err errors.Error)
}

type Hasher

type Hasher interface {
	Make(password string) (string, errors.Error)
	Check(hashedPassword, password string) errors.Error
}

type HttpContext

type HttpContext interface {
	Request() *http.Request
	Response() http.ResponseWriter
	Parameter(parameterName string) string
	FormFile(formFileName string) (*multipart.FileHeader, errors.Error)
	BindModel(data interface{}) errors.Error
}

type HttpHandlerFunc

type HttpHandlerFunc func(httpContext HttpContext) (response interface{}, err errors.Error)

type ModelValidator

type ModelValidator interface {
	ValidateModel(model interface{}) errors.Error
}

type PaginationModelFactory

type PaginationModelFactory interface {
	CreatePaginationQuery() *models.PaginationQuery
	CreatePaginationResult() *models.PaginationResult
}

type PollAggregator

type PollAggregator interface {
	AggregatePoll(pollEntity *entities.PollEntity) *models.Poll
	AggregatePolls(pollEntities []*entities.PollEntity) []*models.Poll
	AggregatePaginationResult(entityPaginationResult *models.PaginationResult) *models.PaginationResult
}

type PollApi

type PollApi interface {
	ListPolls(pollPaginationQuery *models.PollPaginationQuery) (*models.PaginationResult, errors.Error)
	GetPoll(pollId *models.PollId) (poll *models.Poll, err errors.Error)
	CreatePoll(data *models.PollCreate) (poll *models.Poll, err errors.Error)
	UpdatePoll(pollId *models.PollId, data *models.PollUpdate) (err errors.Error)
	DeletePoll(pollId *models.PollId) (err errors.Error)
}

type PollController

type PollController interface {
	ListPolls(httpContext HttpContext) (response interface{}, err errors.Error)
	GetPoll(httpContext HttpContext) (response interface{}, err errors.Error)
	CreatePoll(httpContext HttpContext) (response interface{}, err errors.Error)
	UpdatePoll(httpContext HttpContext) (_ interface{}, err errors.Error)
	DeletePoll(httpContext HttpContext) (_ interface{}, err errors.Error)
}

type PollEntityFactory

type PollEntityFactory interface {
	CreatePollEntity() *entities.PollEntity
}

type PollEvent

type PollEvent interface {
	Event
	PollEntity() *entities.PollEntity
}

type PollEventFactory

type PollEventFactory interface {
	CreatePollCreatedEvent(pollEntity *entities.PollEntity) PollEvent
	CreatePollUpdatedEvent(pollEntity *entities.PollEntity) PollEvent
	CreatePollDeletedEvent(pollEntity *entities.PollEntity) PollEvent
}

type PollHttpHelper

type PollHttpHelper interface {
	ParsePollId(httpContext HttpContext) (*models.PollId, errors.Error)
}

type PollModelFactory

type PollModelFactory interface {
	CreatePollPaginationQuery() *models.PollPaginationQuery
	CreatePoll() *models.Poll
	CreatePollCreate() *models.PollCreate
	CreatePollUpdate() *models.PollUpdate
}

type PollRepository

type PollRepository interface {
	ListPolls(pollPaginationQuery *models.PollPaginationQuery) (*models.PaginationResult, errors.Error)
	GetPoll(pollId *models.PollId) (pollEntity *entities.PollEntity, err errors.Error)
	SavePoll(pollEntity *entities.PollEntity) (err errors.Error)
	RemovePoll(pollEntity *entities.PollEntity) (err errors.Error)
}

type PollService

type PollService interface {
	ListPolls(pollPaginationQuery *models.PollPaginationQuery) (*models.PaginationResult, errors.Error)
	GetPoll(pollId *models.PollId) (pollEntity *entities.PollEntity, err errors.Error)
	CreatePoll(data *models.PollCreate) (pollEntity *entities.PollEntity, err errors.Error)
	UpdatePoll(pollEntity *entities.PollEntity, data *models.PollUpdate) (err errors.Error)
	DeletePoll(pollEntity *entities.PollEntity) (err errors.Error)
}

type PostAggregator

type PostAggregator interface {
	AggregatePost(postEntity *entities.PostEntity) (post *models.Post)
	AggregatePosts(postEntities []*entities.PostEntity) (posts []*models.Post)
	AggregatePaginationResult(
		entityPaginationResult *models.PaginationResult,
	) (paginationResult *models.PaginationResult)
}

type PostApi

type PostApi interface {
	ListPosts(postPaginationQuery *models.PostPaginationQuery) (*models.PaginationResult, errors.Error)
	GetPost(postId *models.PostId) (post *models.Post, err errors.Error)
	CreatePost(postAuthor models.Subject, data *models.PostCreate) (post *models.Post, err errors.Error)
	UpdatePost(postId *models.PostId, data *models.PostUpdate) (err errors.Error)
	DeletePost(postId *models.PostId) (err errors.Error)
}

type PostAuthorApi

type PostAuthorApi interface {
	ChangePostAuthor(postId *models.PostId, postAuthorId *models.UserId) errors.Error
}

type PostAuthorController

type PostAuthorController interface {
	ChangePostAuthor(httpContext HttpContext) (_ interface{}, err errors.Error)
}

type PostAuthorEvent

type PostAuthorEvent interface {
	Event
	PostEntity() *entities.PostEntity
	PostAuthorEntity() *entities.UserEntity
}

type PostAuthorEventFactory

type PostAuthorEventFactory interface {
	CreatePostAuthorChangedEvent(postEntity *entities.PostEntity, postAuthorEntity *entities.UserEntity) PostAuthorEvent
}

type PostAuthorService

type PostAuthorService interface {
	ChangePostAuthor(postEntity *entities.PostEntity, postAuthorEntity *entities.UserEntity) errors.Error
}

type PostCategoryApi

type PostCategoryApi interface {
	ListPostCategories(*models.PostId, *models.CategoryPaginationQuery) (*models.PaginationResult, errors.Error)
	AddPostCategory(*models.PostId, *models.CategoryId) errors.Error
	RemovePostCategory(*models.PostId, *models.CategoryId) errors.Error
}

type PostCategoryController

type PostCategoryController interface {
	ListPostCategories(HttpContext) (interface{}, errors.Error)
	AddPostCategory(HttpContext) (interface{}, errors.Error)
	RemovePostCategory(HttpContext) (interface{}, errors.Error)
}

type PostCategoryEvent

type PostCategoryEvent interface {
	Event
	PostEntity() *entities.PostEntity
	CategoryEntity() *entities.CategoryEntity
}

type PostCategoryEventFactory

type PostCategoryEventFactory interface {
	CreatePostCategoryAddedEvent(*entities.PostEntity, *entities.CategoryEntity) PostCategoryEvent
	CreatePostCategoryRemovedEvent(*entities.PostEntity, *entities.CategoryEntity) PostCategoryEvent
}

type PostCategoryService

type PostCategoryService interface {
	ListPostCategories(*entities.PostEntity, *models.CategoryPaginationQuery) (*models.PaginationResult, errors.Error)
	AddPostCategory(*entities.PostEntity, *entities.CategoryEntity) errors.Error
	RemovePostCategory(*entities.PostEntity, *entities.CategoryEntity) errors.Error
}

type PostController

type PostController interface {
	ListPosts(httpContext HttpContext) (response interface{}, err errors.Error)
	GetPost(httpContext HttpContext) (response interface{}, err errors.Error)
	CreatePost(httpContext HttpContext) (response interface{}, err errors.Error)
	UpdatePost(httpContext HttpContext) (_ interface{}, err errors.Error)
	DeletePost(httpContext HttpContext) (_ interface{}, err errors.Error)
}

type PostEntityFactory

type PostEntityFactory interface {
	CreatePostEntity() (postEntity *entities.PostEntity)
}

type PostEvent

type PostEvent interface {
	Event
	PostEntity() *entities.PostEntity
}

type PostEventFactory

type PostEventFactory interface {
	CreatePostCreatedEvent(postEntity *entities.PostEntity) PostEvent
	CreatePostUpdatedEvent(postEntity *entities.PostEntity) PostEvent
	CreatePostDeletedEvent(postEntity *entities.PostEntity) PostEvent
	CreatePostPublishedEvent(postEntity *entities.PostEntity) PostEvent
	CreatePostConcealedEvent(postEntity *entities.PostEntity) PostEvent
}

type PostHttpHelper

type PostHttpHelper interface {
	ParsePostId(httpContext HttpContext) (postId *models.PostId, err errors.Error)
}

type PostModelFactory

type PostModelFactory interface {
	CreatePostPaginationQuery() *models.PostPaginationQuery
	CreatePost() *models.Post
	CreatePostCreate() *models.PostCreate
	CreatePostUpdate() *models.PostUpdate
}

type PostNormalizer

type PostNormalizer interface {
	NormalizePostEntity(postEntity *entities.PostEntity)
}

type PostPictureApi

type PostPictureApi interface {
	ChangePostPicture(postId *models.PostId, postPictureId *models.FileId) errors.Error
	RemovePostPicture(postId *models.PostId) errors.Error
}

type PostPictureController

type PostPictureController interface {
	ChangePostPicture(httpContext HttpContext) (_ interface{}, err errors.Error)
	RemovePostPicture(httpContext HttpContext) (_ interface{}, err errors.Error)
}

type PostPictureEvent

type PostPictureEvent interface {
	Event
	PostEntity() *entities.PostEntity
	PostPictureEntity() *entities.FileEntity
}

type PostPictureEventFactory

type PostPictureEventFactory interface {
	CreatePostPictureChangedEvent(postEntity *entities.PostEntity, postPictureEntity *entities.FileEntity) PostPictureEvent
	CreatePostPictureRemovedEvent(postEntity *entities.PostEntity) PostPictureEvent
}

type PostPictureService

type PostPictureService interface {
	ChangePostPicture(postEntity *entities.PostEntity, postPictureEntity *entities.FileEntity) errors.Error
	RemovePostPicture(postEntity *entities.PostEntity) errors.Error
}

type PostPublisherJob

type PostPublisherJob interface {
	PublishPost(postEntity *entities.PostEntity) errors.Error
}

type PostPublisherWorker

type PostPublisherWorker interface {
	Start() errors.Error
	Stop() errors.Error
}

type PostRepository

type PostRepository interface {
	ListPosts(postPaginationQuery *models.PostPaginationQuery) (*models.PaginationResult, errors.Error)
	GetScheduledPosts() (postEntities []*entities.PostEntity, err errors.Error)
	GetPost(postId *models.PostId) (postEntity *entities.PostEntity, err errors.Error)
	SavePost(postEntity *entities.PostEntity) (err errors.Error)
	RemovePost(postEntity *entities.PostEntity) (err errors.Error)
}

type PostService

type PostService interface {
	ListPosts(postPaginationQuery *models.PostPaginationQuery) (*models.PaginationResult, errors.Error)
	GetScheduledPosts() (postEntities []*entities.PostEntity, err errors.Error)
	GetPost(postId *models.PostId) (postEntity *entities.PostEntity, err errors.Error)
	CreatePost(postAuthor models.Subject, data *models.PostCreate) (postEntity *entities.PostEntity, err errors.Error)
	UpdatePost(postEntity *entities.PostEntity, data *models.PostUpdate) (err errors.Error)
	DeletePost(postEntity *entities.PostEntity) (err errors.Error)
}

type PostStatusValidator

type PostStatusValidator interface {
	ValidatePostCreate(data *models.PostCreate) errors.Error
	ValidatePostUpdate(data *models.PostUpdate) errors.Error
}

type PostTagApi

type PostTagApi interface {
	ListPostTags(*models.PostId, *models.TagPaginationQuery) (*models.PaginationResult, errors.Error)
	AddPostTag(*models.PostId, *models.TagId) errors.Error
	RemovePostTag(*models.PostId, *models.TagId) errors.Error
}

type PostTagController

type PostTagController interface {
	ListPostTags(HttpContext) (interface{}, errors.Error)
	AddPostTag(HttpContext) (interface{}, errors.Error)
	RemovePostTag(HttpContext) (interface{}, errors.Error)
}

type PostTagEvent

type PostTagEvent interface {
	Event
	PostEntity() *entities.PostEntity
	TagEntity() *entities.TagEntity
}

type PostTagEventFactory

type PostTagEventFactory interface {
	CreatePostTagAddedEvent(*entities.PostEntity, *entities.TagEntity) PostTagEvent
	CreatePostTagRemovedEvent(*entities.PostEntity, *entities.TagEntity) PostTagEvent
}

type PostVideoApi

type PostVideoApi interface {
	ChangePostVideo(postId *models.PostId, postVideoId *models.FileId) errors.Error
	RemovePostVideo(postId *models.PostId) errors.Error
}

type PostVideoController

type PostVideoController interface {
	ChangePostVideo(httpContext HttpContext) (_ interface{}, err errors.Error)
	RemovePostVideo(httpContext HttpContext) (_ interface{}, err errors.Error)
}

type PostVideoEvent

type PostVideoEvent interface {
	Event
	PostEntity() *entities.PostEntity
	PostVideoEntity() *entities.FileEntity
}

type PostVideoEventFactory

type PostVideoEventFactory interface {
	CreatePostVideoChangedEvent(postEntity *entities.PostEntity, postVideo *entities.FileEntity) PostVideoEvent
	CreatePostVideoRemovedEvent(postEntity *entities.PostEntity) PostVideoEvent
}

type PostVideoService

type PostVideoService interface {
	ChangePostVideo(postEntity *entities.PostEntity, postVideoEntity *entities.FileEntity) errors.Error
	RemovePostVideo(postEntity *entities.PostEntity) errors.Error
}

type PrepareFileDestination

type PrepareFileDestination func(file *models.File) (fileDestination io.Writer)

type Router

type Router interface {
	AddRoute(httpMethod string, routePath string, httpHandlerFunc HttpHandlerFunc)
}

type StorageProvider

type StorageProvider interface {
	UploadFile(fileEntity *entities.FileEntity, fileSource io.Reader) (err errors.Error)
	DownloadFile(fileEntity *entities.FileEntity, fileDestination io.Writer) (err errors.Error)
	DeleteFile(fileEntity *entities.FileEntity) (err errors.Error)
}

type SubjectResolver

type SubjectResolver interface {
	ResolveSubject(subjectId *models.SubjectId, subjectType models.SubjectType) (interface{}, errors.Error)
}

type TagAggregator

type TagAggregator interface {
	AggregateTag(tagEntity *entities.TagEntity) *models.Tag
	AggregateTags(tagEntities []*entities.TagEntity) []*models.Tag
	AggregatePaginationResult(entityPaginationResult *models.PaginationResult) *models.PaginationResult
}

type TagApi

type TagApi interface {
	ListTags(tagPaginationQuery *models.TagPaginationQuery) (*models.PaginationResult, errors.Error)
	GetTag(tagId *models.TagId) (tag *models.Tag, err errors.Error)
	CreateTag(data *models.TagCreate) (tag *models.Tag, err errors.Error)
	UpdateTag(tagId *models.TagId, data *models.TagUpdate) (err errors.Error)
	DeleteTag(tagId *models.TagId) (err errors.Error)

	ListObjectTags(models.Object, *models.TagPaginationQuery) (*models.PaginationResult, errors.Error)
}

type TagController

type TagController interface {
	ListTags(httpContext HttpContext) (response interface{}, err errors.Error)
	GetTag(httpContext HttpContext) (response interface{}, err errors.Error)
	CreateTag(httpContext HttpContext) (response interface{}, err errors.Error)
	UpdateTag(httpContext HttpContext) (_ interface{}, err errors.Error)
	DeleteTag(httpContext HttpContext) (_ interface{}, err errors.Error)
}

type TagEntityFactory

type TagEntityFactory interface {
	CreateTagEntity() *entities.TagEntity
	CreateTagXrefEntity(*entities.TagEntity, models.Object) *entities.TagXrefEntity
}

type TagEvent

type TagEvent interface {
	Event
	TagEntity() *entities.TagEntity
}

type TagEventFactory

type TagEventFactory interface {
	CreateTagCreatedEvent(tagEntity *entities.TagEntity) TagEvent
	CreateTagUpdatedEvent(tagEntity *entities.TagEntity) TagEvent
	CreateTagDeletedEvent(tagEntity *entities.TagEntity) TagEvent
}

type TagHttpHelper

type TagHttpHelper interface {
	ParseTagId(httpContext HttpContext) (*models.TagId, errors.Error)
}

type TagModelFactory

type TagModelFactory interface {
	CreateTagPaginationQuery() *models.TagPaginationQuery
	CreateTag() *models.Tag
	CreateTagCreate() *models.TagCreate
	CreateTagUpdate() *models.TagUpdate
}

type TagRepository

type TagRepository interface {
	ListTags(tagPaginationQuery *models.TagPaginationQuery) (*models.PaginationResult, errors.Error)
	GetTag(tagId *models.TagId) (tagEntity *entities.TagEntity, err errors.Error)
	SaveTag(tagEntity *entities.TagEntity) (err errors.Error)
	RemoveTag(tagEntity *entities.TagEntity) (err errors.Error)

	GetTagXrefs(*entities.TagEntity) ([]*entities.TagXrefEntity, errors.Error)
	GetTagObjectXrefs(models.Object) ([]*entities.TagXrefEntity, errors.Error)
	GetTagXref(*entities.TagEntity, models.Object) (*entities.TagXrefEntity, errors.Error)
	SaveTagXref(*entities.TagXrefEntity) errors.Error
	RemoveTagXref(*entities.TagXrefEntity) errors.Error

	ListObjectTags(models.Object, *models.TagPaginationQuery) (*models.PaginationResult, errors.Error)
}

type TagService

type TagService interface {
	ListTags(tagPaginationQuery *models.TagPaginationQuery) (*models.PaginationResult, errors.Error)
	GetTag(tagId *models.TagId) (tagEntity *entities.TagEntity, err errors.Error)
	CreateTag(data *models.TagCreate) (tagEntity *entities.TagEntity, err errors.Error)
	UpdateTag(tagEntity *entities.TagEntity, data *models.TagUpdate) (err errors.Error)
	DeleteTag(tagEntity *entities.TagEntity) (err errors.Error)

	GetTagXrefs(*entities.TagEntity) ([]*entities.TagXrefEntity, errors.Error)
	GetTagObjectXrefs(models.Object) ([]*entities.TagXrefEntity, errors.Error)
	GetTagXref(*entities.TagEntity, models.Object) (*entities.TagXrefEntity, errors.Error)
	CreateTagXref(*entities.TagEntity, models.Object) (*entities.TagXrefEntity, errors.Error)
	DeleteTagXref(*entities.TagXrefEntity) errors.Error

	ListObjectTags(models.Object, *models.TagPaginationQuery) (*models.PaginationResult, errors.Error)
}

type UserAggregator

type UserAggregator interface {
	AggregateUser(object *entities.UserEntity) *models.User
	AggregateUsers(collection []*entities.UserEntity) []*models.User
	AggregatePaginationResult(entityPaginationResult *models.PaginationResult) *models.PaginationResult
}

type UserApi

type UserApi interface {
	ListUsers(userPaginationQuery *models.UserPaginationQuery) (*models.PaginationResult, errors.Error)
	GetUser(userId *models.UserId) (user *models.User, err errors.Error)
	CreateUser(data *models.UserCreate) (user *models.User, err errors.Error)
	UpdateUser(userId *models.UserId, data *models.UserUpdate) (err errors.Error)
	VerifyUser(userId *models.UserId) (err errors.Error)
	ChangeUserIdentity(userId *models.UserId, data *models.UserChangeIdentity) (err errors.Error)
	ChangeUserPassword(userId *models.UserId, data *models.UserChangePassword) (err errors.Error)
	DeleteUser(userId *models.UserId) (err errors.Error)
}

type UserController

type UserController interface {
	ListUsers(httpContext HttpContext) (response interface{}, err errors.Error)
	GetUser(httpContext HttpContext) (response interface{}, err errors.Error)
	CreateUser(httpContext HttpContext) (response interface{}, err errors.Error)
	UpdateUser(httpContext HttpContext) (_ interface{}, err errors.Error)
	ChangeUserIdentity(httpContext HttpContext) (_ interface{}, err errors.Error)
	ChangeUserPassword(httpContext HttpContext) (_ interface{}, err errors.Error)
	DeleteUser(httpContext HttpContext) (_ interface{}, err errors.Error)
}

type UserEntityFactory

type UserEntityFactory interface {
	CreateUserEntity() (userEntity *entities.UserEntity)
}

type UserEvent

type UserEvent interface {
	Event
	UserEntity() *entities.UserEntity
}

type UserEventFactory

type UserEventFactory interface {
	CreateUserCreatedEvent(userEntity *entities.UserEntity) UserEvent
	CreateUserUpdatedEvent(userEntity *entities.UserEntity) UserEvent
	CreateUserVerifiedEvent(userEntity *entities.UserEntity) UserEvent
	CreateUserIdentityChangedEvent(userEntity *entities.UserEntity) UserEvent
	CreateUserPasswordChangedEvent(userEntity *entities.UserEntity) UserEvent
	CreateUserDeletedEvent(userEntity *entities.UserEntity) UserEvent
}

type UserHttpHelper

type UserHttpHelper interface {
	ParseUserId(httpContext HttpContext) (userId *models.UserId, err errors.Error)
}

type UserModelFactory

type UserModelFactory interface {
	CreateUserPaginationQuery() *models.UserPaginationQuery
	CreateUser() *models.User
	CreateUserCreate() *models.UserCreate
	CreateUserUpdate() *models.UserUpdate
	CreateUserChangeIdentity() *models.UserChangeIdentity
	CreateUserChangePassword() *models.UserChangePassword
}

type UserPictureApi

type UserPictureApi interface {
	ChangeUserPicture(userId *models.UserId, userPictureId *models.FileId) errors.Error
	RemoveUserPicture(userId *models.UserId) errors.Error
}

type UserPictureController

type UserPictureController interface {
	ChangeUserPicture(httpContext HttpContext) (_ interface{}, err errors.Error)
	RemoveUserPicture(httpContext HttpContext) (_ interface{}, err errors.Error)
}

type UserPictureEvent

type UserPictureEvent interface {
	Event
	UserEntity() *entities.UserEntity
	UserPictureEntity() *entities.FileEntity
}

type UserPictureEventFactory

type UserPictureEventFactory interface {
	CreateUserPictureChangedEvent(userEntity *entities.UserEntity, userPictureEntity *entities.FileEntity) UserPictureEvent
	CreateUserPictureRemovedEvent(userEntity *entities.UserEntity) UserPictureEvent
}

type UserPictureService

type UserPictureService interface {
	ChangeUserPicture(userEntity *entities.UserEntity, userPictureEntity *entities.FileEntity) errors.Error
	RemoveUserPicture(userEntity *entities.UserEntity) errors.Error
}

type UserRepository

type UserRepository interface {
	ListUsers(userPaginationQuery *models.UserPaginationQuery) (*models.PaginationResult, errors.Error)
	GetUser(userId *models.UserId) (*entities.UserEntity, errors.Error)
	LookupUser(userIdentity string) (*entities.UserEntity, errors.Error)
	SaveUser(userEntity *entities.UserEntity) errors.Error
	RemoveUser(userEntity *entities.UserEntity) errors.Error
}

type UserService

type UserService interface {
	ListUsers(userPaginationQuery *models.UserPaginationQuery) (*models.PaginationResult, errors.Error)
	GetUser(userId *models.UserId) (*entities.UserEntity, errors.Error)
	LookupUser(userIdentity string) (*entities.UserEntity, errors.Error)
	ChallengeUser(userEntity *entities.UserEntity, password string) errors.Error
	CreateUser(data *models.UserCreate) (*entities.UserEntity, errors.Error)
	VerifyUser(userEntity *entities.UserEntity) errors.Error
	ChangeUserIdentity(userEntity *entities.UserEntity, data *models.UserChangeIdentity) errors.Error
	ChangeUserPassword(userEntity *entities.UserEntity, data *models.UserChangePassword) errors.Error
	UpdateUser(userEntity *entities.UserEntity, data *models.UserUpdate) errors.Error
	DeleteUser(userEntity *entities.UserEntity) errors.Error
}

Source Files

Jump to

Keyboard shortcuts

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