data

package
v0.0.0-...-0e27891 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const MicroserviceUserPath = "http://microservice-user:9090"

Variables

View Source
var ErrorConversationNotFound = fmt.Errorf("conversation not found")

ErrorConversationNotFound : Conversation specific errors

View Source
var ErrorGameNotFound = fmt.Errorf("game not found")

ErrorGameNotFound : Game specific errors

View Source
var ErrorMessageNotFound = fmt.Errorf("message not found")

ErrorMessageNotFound : Message specific errors

View Source
var ErrorUserNotFound = fmt.Errorf("user not found")

ErrorUserNotFound : User specific errors

Functions

This section is empty.

Types

type Conversation

type Conversation struct {
	ID        string   `json:"id" bson:"_id"`
	UserID    []string `json:"user_id" validate:"required"`
	GameID    string   `json:"game_id"`
	CreatedOn string   `json:"created_on"`
	UpdatedOn string   `json:"updated_on"`
}

Conversation defines the structure for an API conversation.

func (*Conversation) ValidateConversation

func (conversation *Conversation) ValidateConversation() error

type Conversations

type Conversations []*Conversation

Conversations is a collection of Conversation

type Message

type Message struct {
	ID             string `json:"id" bson:"_id"`
	UserID         string `json:"user_id" validate:"required"`
	ConversationID string `json:"conversation_id" bson:"conversation_id" validate:"required"`
	Text           string `json:"text" validate:"required"`
	CreatedOn      string `json:"created_on"`
	UpdatedOn      string `json:"updated_on"`
}

Message defines the structure for an API message.

func (*Message) ValidateMessage

func (message *Message) ValidateMessage() error

type Messages

type Messages []*Message

Messages is a collection of Message

Jump to

Keyboard shortcuts

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