domain

package
v1.0.0-rc.5 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PostCreatedEventName       = "event:postCreated"
	UpdateNewsLinesCommandName = "command:updateNewsLines"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author struct {
	ID        uuid.UUID `db:"id" json:"id"`
	FirstName string    `db:"first_name" json:"first_name"`
	LastName  string    `db:"last_name" json:"last_name"`
}

type Post

type Post struct {
	ID        uuid.UUID  `db:"id" json:"id"`
	CreatedAt time.Time  `db:"created_at" json:"created_at"`
	UpdatedAt time.Time  `db:"updated_at" json:"updated_at"`
	DeletedAt *time.Time `db:"deleted_at" json:"deleted_at"`
	AuthorID  uuid.UUID  `db:"author_id" json:"author_id"`
	Author    Author     `db:"-" json:"author"`
	Text      string     `db:"text" json:"text"`
}

func NewPost

func NewPost(
	text string,
	authorID uuid.UUID,
) Post

type PostCreatedEvent

type PostCreatedEvent struct {
	Post Post `json:"post"`
}

type UpdateNewsLineCommand

type UpdateNewsLineCommand struct {
	Followers []uuid.UUID `json:"followers"`
}

Jump to

Keyboard shortcuts

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