Documentation ¶
Index ¶
- type Auth
- type AuthBuilder
- type Resource
- type ResourceBuilder
- type User
- type UserBuilder
- func (b *UserBuilder) BuildAggFromCreateRequestDTO(reqDTO dto.CreateUserRequest) (*agg.User, error)
- func (b *UserBuilder) BuildAggFromUpdateRequestDTO(reqDTO dto.UpdateUserRequest) (*agg.User, error)
- func (b *UserBuilder) BuildCreateRequestDTOFromRequest(r *http.Request) (*dto.UserCreateRequestDTO, error)
- func (b *UserBuilder) BuildDeleteRequestDTOFromRequest(r *http.Request) (*dto.UserDeleteRequestDto, error)
- func (b *UserBuilder) BuildGetRequestDTOFromRequest(r *http.Request) (*dto.UserGetRequestDTO, error)
- func (b *UserBuilder) BuildUpdateRequestDTOFromRequest(r *http.Request) (*dto.UserUpdateRequestDTO, error)
- type Video
- type VideoBuilder
- func (b *VideoBuilder) BuildAggFromCreateRequestDTO(reqDTO dto.CreateVideoRequest) (*agg.Video, error)
- func (b *VideoBuilder) BuildAggFromUpdateRequestDTO(reqDTO dto.UpdateVideoRequest) (*agg.Video, error)
- func (b *VideoBuilder) BuildCreateRequestDTOFromRequest(r *http.Request) (*dto.VideoCreateRequestDTO, error)
- func (b *VideoBuilder) BuildDeleteRequestDTOFromRequest(r *http.Request) (*dto.VideoDeleteRequestDto, error)
- func (b *VideoBuilder) BuildGetRequestDTOFromRequest(r *http.Request) (*dto.VideoGetRequestDTO, error)
- func (b *VideoBuilder) BuildListRequestDTOFromRequest(r *http.Request) (*dto.VideoListRequestDTO, error)
- func (b *VideoBuilder) BuildUpdateRequestDTOFromRequest(r *http.Request) (*dto.VideoUpdateRequestDTO, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶ added in v0.0.4
type Auth interface {
BuildAuthRequestDTOFromRequest(r *http.Request) (dto.AuthRequest, error)
}
type AuthBuilder ¶ added in v0.0.4
type AuthBuilder struct {
// contains filtered or unexported fields
}
func NewAuthBuilder ¶ added in v0.0.4
func NewAuthBuilder(logger logger.Logger) *AuthBuilder
func (*AuthBuilder) BuildAuthRequestDTOFromRequest ¶ added in v0.0.4
func (b *AuthBuilder) BuildAuthRequestDTOFromRequest(r *http.Request) (dto.AuthRequest, error)
type Resource ¶ added in v0.0.4
type Resource interface { BuildUploadRequestDTOFromRequest(r *http.Request) (*dto.ResourceUploadRequestDTO, error) BuildAggFromUploadRequestDTO(reqDTO dto.UploadResourceRequest) *agg.Resource }
type ResourceBuilder ¶ added in v0.0.4
type ResourceBuilder struct {
// contains filtered or unexported fields
}
func NewResourceBuilder ¶ added in v0.0.4
func NewResourceBuilder( logger logger.Logger, formFilename string, inMemoryFileSizeThreshold int64, ) *ResourceBuilder
func (*ResourceBuilder) BuildAggFromUploadRequestDTO ¶ added in v0.0.4
func (b *ResourceBuilder) BuildAggFromUploadRequestDTO(reqDTO dto.UploadResourceRequest) *agg.Resource
BuildAggFromUploadRequestDTO will be make an agg.Resource from dto.UploadResourceRequest
func (*ResourceBuilder) BuildUploadRequestDTOFromRequest ¶ added in v0.0.4
func (b *ResourceBuilder) BuildUploadRequestDTOFromRequest(r *http.Request) (*dto.ResourceUploadRequestDTO, error)
BuildUploadRequestDTOFromRequest will be parse raw *http.Request and build a dto.UploadResourceRequest
type User ¶ added in v0.0.4
type User interface { BuildGetRequestDTOFromRequest(r *http.Request) (*dto.UserGetRequestDTO, error) BuildCreateRequestDTOFromRequest(r *http.Request) (*dto.UserCreateRequestDTO, error) BuildAggFromCreateRequestDTO(reqDTO dto.CreateUserRequest) (*agg.User, error) BuildUpdateRequestDTOFromRequest(r *http.Request) (*dto.UserUpdateRequestDTO, error) BuildAggFromUpdateRequestDTO(reqDTO dto.UpdateUserRequest) (*agg.User, error) BuildDeleteRequestDTOFromRequest(r *http.Request) (*dto.UserDeleteRequestDto, error) }
type UserBuilder ¶ added in v0.0.4
type UserBuilder struct {
// contains filtered or unexported fields
}
func NewUserBuilder ¶ added in v0.0.4
func NewUserBuilder( ctx context.Context, logger logger.Logger, extractor extractor.RequestParams, userRepository repository.User, ) *UserBuilder
NewUserBuilder is a constructor of UserBuilder
func (*UserBuilder) BuildAggFromCreateRequestDTO ¶ added in v0.0.4
func (b *UserBuilder) BuildAggFromCreateRequestDTO(reqDTO dto.CreateUserRequest) (*agg.User, error)
BuildAggFromCreateRequestDTO - build an agg.User from dto.CreateUserRequest
func (*UserBuilder) BuildAggFromUpdateRequestDTO ¶ added in v0.0.4
func (b *UserBuilder) BuildAggFromUpdateRequestDTO(reqDTO dto.UpdateUserRequest) (*agg.User, error)
BuildAggFromUpdateRequestDTO - build an agg.User from dto.UpdateUserRequest
func (*UserBuilder) BuildCreateRequestDTOFromRequest ¶ added in v0.0.4
func (b *UserBuilder) BuildCreateRequestDTOFromRequest(r *http.Request) (*dto.UserCreateRequestDTO, error)
BuildCreateRequestDTOFromRequest - build a dto.CreateUserRequest from raw *http.Request
func (*UserBuilder) BuildDeleteRequestDTOFromRequest ¶ added in v0.0.4
func (b *UserBuilder) BuildDeleteRequestDTOFromRequest(r *http.Request) (*dto.UserDeleteRequestDto, error)
BuildDeleteRequestDTOFromRequest - build a dto.DeleteVideoRequest from raw *http.Request
func (*UserBuilder) BuildGetRequestDTOFromRequest ¶ added in v0.0.4
func (b *UserBuilder) BuildGetRequestDTOFromRequest(r *http.Request) (*dto.UserGetRequestDTO, error)
BuildGetRequestDTOFromRequest - build a dto.GetUserRequest from raw *http.Request
func (*UserBuilder) BuildUpdateRequestDTOFromRequest ¶ added in v0.0.4
func (b *UserBuilder) BuildUpdateRequestDTOFromRequest(r *http.Request) (*dto.UserUpdateRequestDTO, error)
BuildUpdateRequestDTOFromRequest - build a dto.UserUpdateRequestDTO from raw *http.Request
type Video ¶
type Video interface { BuildGetRequestDTOFromRequest(r *http.Request) (*dto.VideoGetRequestDTO, error) BuildListRequestDTOFromRequest(r *http.Request) (*dto.VideoListRequestDTO, error) BuildCreateRequestDTOFromRequest(r *http.Request) (*dto.VideoCreateRequestDTO, error) BuildAggFromCreateRequestDTO(reqDTO dto.CreateVideoRequest) (*agg.Video, error) BuildUpdateRequestDTOFromRequest(r *http.Request) (*dto.VideoUpdateRequestDTO, error) BuildAggFromUpdateRequestDTO(reqDTO dto.UpdateVideoRequest) (*agg.Video, error) BuildDeleteRequestDTOFromRequest(r *http.Request) (*dto.VideoDeleteRequestDto, error) }
type VideoBuilder ¶
type VideoBuilder struct {
// contains filtered or unexported fields
}
func NewVideoBuilder ¶
func NewVideoBuilder( ctx context.Context, logger logger.Logger, extractor extractor.RequestParams, videoRepository repository.Video, resourceRepository repository.Resource, ) *VideoBuilder
NewVideoBuilder is a constructor of VideoBuilder
func (*VideoBuilder) BuildAggFromCreateRequestDTO ¶ added in v0.0.4
func (b *VideoBuilder) BuildAggFromCreateRequestDTO(reqDTO dto.CreateVideoRequest) (*agg.Video, error)
BuildAggFromCreateRequestDTO - build an agg.Video from dto.CreateVideoRequest
func (*VideoBuilder) BuildAggFromUpdateRequestDTO ¶ added in v0.0.4
func (b *VideoBuilder) BuildAggFromUpdateRequestDTO(reqDTO dto.UpdateVideoRequest) (*agg.Video, error)
BuildAggFromUpdateRequestDTO - build an agg.Video from dto.UpdateVideoRequest
func (*VideoBuilder) BuildCreateRequestDTOFromRequest ¶ added in v0.0.4
func (b *VideoBuilder) BuildCreateRequestDTOFromRequest(r *http.Request) (*dto.VideoCreateRequestDTO, error)
BuildCreateRequestDTOFromRequest - build a dto.CreateVideoRequest from raw *http.Request
func (*VideoBuilder) BuildDeleteRequestDTOFromRequest ¶ added in v0.0.4
func (b *VideoBuilder) BuildDeleteRequestDTOFromRequest(r *http.Request) (*dto.VideoDeleteRequestDto, error)
BuildDeleteRequestDTOFromRequest - build a dto.DeleteVideoRequest from raw *http.Request
func (*VideoBuilder) BuildGetRequestDTOFromRequest ¶ added in v0.0.4
func (b *VideoBuilder) BuildGetRequestDTOFromRequest(r *http.Request) (*dto.VideoGetRequestDTO, error)
BuildGetRequestDTOFromRequest - build a dto.GetVideoRequest from raw *http.Request
func (*VideoBuilder) BuildListRequestDTOFromRequest ¶ added in v0.0.4
func (b *VideoBuilder) BuildListRequestDTOFromRequest(r *http.Request) (*dto.VideoListRequestDTO, error)
BuildListRequestDTOFromRequest - build a dto.ListVideoRequest from raw *http.Request
func (*VideoBuilder) BuildUpdateRequestDTOFromRequest ¶ added in v0.0.4
func (b *VideoBuilder) BuildUpdateRequestDTOFromRequest(r *http.Request) (*dto.VideoUpdateRequestDTO, error)
BuildUpdateRequestDTOFromRequest - build a dto.UpdateVideoRequest from raw *http.Request