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 ¶
Click to show internal directories.
Click to hide internal directories.