Documentation
¶
Index ¶
- type Component
- func NewHandlerComponent(logger abstraction.Logger, presentationType string, handlerName string) *Component
- func NewRepositoryComponent(logger abstraction.Logger, storageType string, repositoryName string) *Component
- func NewServerComponent(logger abstraction.Logger, presentationType string) *Component
- func NewServiceComponent(logger abstraction.Logger, serviceName string) *Component
- type Entity
- type HasID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component struct { Logger abstraction.Logger // contains filtered or unexported fields }
Component provides a base functionality for multiple components
func NewHandlerComponent ¶
func NewHandlerComponent(logger abstraction.Logger, presentationType string, handlerName string) *Component
NewHandlerComponent creates a new base component for a presentation handler
func NewRepositoryComponent ¶
func NewRepositoryComponent(logger abstraction.Logger, storageType string, repositoryName string) *Component
NewRepositoryComponent creates a new base component for a repository
func NewServerComponent ¶ added in v0.3.0
func NewServerComponent(logger abstraction.Logger, presentationType string) *Component
NewServerComponent creates a new base component for a presentation server
func NewServiceComponent ¶
func NewServiceComponent(logger abstraction.Logger, serviceName string) *Component
NewServiceComponent creates a new base component for a service
type Entity ¶
type Entity struct { ID uuid.UUID CreatedAt time.Time `validate:"required"` UpdatedAt time.Time `validate:"required,gtefield=CreatedAt"` }
Entity provides common elements for all entities
func LoadEntity ¶
LoadEntity loads data into a new instance of base entity
func (*Entity) GenerateNewID ¶
GenerateNewID generate and assigns a new ID to the entity
Click to show internal directories.
Click to hide internal directories.