model

package
v0.0.0-...-48bb83e Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pkg_model_message_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Message

type Message struct {

	// Id represents the message identifier.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// String content of message.
	Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	// Who sent the message.
	Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"`
	// Unix time when the message was sent.
	CreatedAt uint64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

func (*Message) Descriptor() ([]byte, []int)

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetContent

func (x *Message) GetContent() string

func (*Message) GetCreatedAt

func (x *Message) GetCreatedAt() uint64

func (*Message) GetId

func (x *Message) GetId() string

func (*Message) GetSender

func (x *Message) GetSender() string

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

func (x *Message) ProtoReflect() protoreflect.Message

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

func (*Message) Validate

func (m *Message) Validate() error

Validate checks the field values on Message with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type MessageValidationError

type MessageValidationError struct {
	// contains filtered or unexported fields
}

MessageValidationError is the validation error returned by Message.Validate if the designated constraints aren't met.

func (MessageValidationError) Cause

func (e MessageValidationError) Cause() error

Cause function returns cause value.

func (MessageValidationError) Error

func (e MessageValidationError) Error() string

Error satisfies the builtin error interface

func (MessageValidationError) ErrorName

func (e MessageValidationError) ErrorName() string

ErrorName returns error name.

func (MessageValidationError) Field

func (e MessageValidationError) Field() string

Field function returns field value.

func (MessageValidationError) Key

func (e MessageValidationError) Key() bool

Key function returns key value.

func (MessageValidationError) Reason

func (e MessageValidationError) Reason() string

Reason function returns reason value.

Jump to

Keyboard shortcuts

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