Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ContactEmptyErr = errors.New("contact is empty") NoUserProvidedErr = errors.New("no user provided") MissingBasicInfoErr = errors.New("advert is missing basic info") InvalidLanguages = errors.New("not enough valid languages provided") )
View Source
var ( AdvertAlreadyExists = errors.New("advert already exists in repository") AdvertNotFound = errors.New("advert not found in repository") )
Functions ¶
Types ¶
type Advert ¶
type Advert struct { ID uuid.UUID Details domain.AdvertDetails User *user.User CreatedAt time.Time UpdatedAt *time.Time DestroyedAt *time.Time }
func NewAdvert ¶
func NewAdvert(user *user.User, title MultilingualString, description MultilingualString, advertType domain.AdvertType, opts ...AdvertOption) (*Advert, error)
type AdvertLog ¶
type AdvertLog struct { AdvertID uuid.UUID Trigger AdvertLogTrigger Meta json.RawMessage }
type AdvertLogTrigger ¶
type AdvertLogTrigger string
const ( AdvertCreatedEvent AdvertLogTrigger = "created" AdvertUpdatedEvent AdvertLogTrigger = "updated" AdvertDeletedEvent AdvertLogTrigger = "deleted" )
type AdvertOption ¶
func WithContactDetails ¶
func WithContactDetails(contactDetails domain.ContactDetails) AdvertOption
Click to show internal directories.
Click to hide internal directories.