message

package
v0.0.0-...-1280531 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package message interfaces.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateInput

type CreateInput struct {
	Text string
}

CreateInput input arguments to create a message.

type GetByIDInput

type GetByIDInput struct {
	ID string
}

GetByIDInput input arguments to get a message by ID.

type Repository

type Repository interface {
	GetByID(ctx context.Context, input GetByIDInput) (*models.Message, error)
	Create(ctx context.Context, input CreateInput) (*models.Message, error)
}

Repository messages repository.

type Serializer

type Serializer interface {
	ToMessage(*models.Message) *service.Message
	ToMessages([]*models.Message) []*service.Message
}

Serializer messages serializer.

type Validator

type Validator interface {
	ValidateGetByID(*service.GetByIDRequest) (GetByIDInput, error)
	ValidateCreate(*service.CreateRequest) (CreateInput, error)
}

Validator messages input validator.

Directories

Path Synopsis
Package mocks messages mocks.
Package mocks messages mocks.
Package repository messages repository.
Package repository messages repository.
Package serializer messages serializer.
Package serializer messages serializer.
Package validator messages validator.
Package validator messages validator.

Jump to

Keyboard shortcuts

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