domain

package
v0.0.0-...-7f86f56 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Code

type Code int

Error status code.

const (
	CodeInternal Code = iota
	CodeNotFound
	CodeAlreadyExists
	CodeInvalidArgument
)

Error status codes.

type Error

type Error struct {
	Code    Code
	Message string
}

Error structure.

func (*Error) Error

func (e *Error) Error() string

Getting error message.

type Post

type Post struct {
	Id        ksuid.KSUID
	AuthorId  ksuid.KSUID
	Text      string
	UpdatedAt *time.Time
}

Post structure.

func (Post) Validate

func (p Post) Validate() error

Validate post.

type SortOptions

type SortOptions struct {
	First  *int32
	Last   *int32
	Before ksuid.KSUID
	After  ksuid.KSUID
}

Query sorting options.

Jump to

Keyboard shortcuts

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