model

package
v0.0.0-...-7669f62 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dialog

type Dialog struct {
	ID              DialogID       `validator:"nonzero"`
	ParticipantsIDs []*Participant `validator:"nonzero"`
}

func (*Dialog) Validate

func (d *Dialog) Validate() error

type DialogID

type DialogID string

func (DialogID) String

func (d DialogID) String() string

type Message

type Message struct {
	ID       MessageID `validator:"nonzero"`
	DialogID DialogID  `validator:"nonzero"`
	SenderID UserID    `validator:"nonzero"`
	Text     string    `validator:"nonzero"`
}

func (*Message) Validate

func (m *Message) Validate() error

type MessageID

type MessageID string

func (MessageID) String

func (m MessageID) String() string

type Participant

type Participant struct {
	ID     ParticipantID `validator:"nonzero"`
	UserID UserID        `validator:"nonzero"`
}

func (*Participant) Validate

func (p *Participant) Validate() error

type ParticipantID

type ParticipantID string

func (ParticipantID) String

func (p ParticipantID) String() string

type UserID

type UserID string

func (UserID) String

func (u UserID) String() string

Jump to

Keyboard shortcuts

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