models

package
v0.0.0-...-ef30428 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_api_models_forum_proto protoreflect.FileDescriptor
View Source
var File_api_models_post_proto protoreflect.FileDescriptor
View Source
var File_api_models_thread_proto protoreflect.FileDescriptor
View Source
var File_api_models_user_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Forum

type Forum struct {

	// Общее кол-во сообщений в данном форуме.
	Posts int64 `protobuf:"varint,1,opt,name=posts,proto3" json:"posts,omitempty"`
	// Человекопонятный URL (https://ru.wikipedia.org/wiki/%D0%A1%D0%B5%D0%BC%D0%B0%D0%BD%D1%82%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B8%D0%B9_URL), уникальное поле.
	Slug string `protobuf:"bytes,2,opt,name=slug,proto3" json:"slug,omitempty"`
	// Общее кол-во ветвей обсуждения в данном форуме.
	Threads int32 `protobuf:"varint,3,opt,name=threads,proto3" json:"threads,omitempty"`
	// Название форума.
	Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"`
	// Nickname пользователя, который отвечает за форум.
	User string `protobuf:"bytes,5,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

Информация о форуме.

func (*Forum) Descriptor deprecated

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

Deprecated: Use Forum.ProtoReflect.Descriptor instead.

func (*Forum) GetPosts

func (x *Forum) GetPosts() int64

func (*Forum) GetSlug

func (x *Forum) GetSlug() string

func (*Forum) GetThreads

func (x *Forum) GetThreads() int32

func (*Forum) GetTitle

func (x *Forum) GetTitle() string

func (*Forum) GetUser

func (x *Forum) GetUser() string

func (*Forum) ProtoMessage

func (*Forum) ProtoMessage()

func (*Forum) ProtoReflect

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

func (*Forum) Reset

func (x *Forum) Reset()

func (*Forum) String

func (x *Forum) String() string

type Post

type Post struct {

	// Автор, написавший данное сообщение.
	Author string `protobuf:"bytes,1,opt,name=author,proto3" json:"author,omitempty"`
	// Дата создания сообщения на форуме.
	Created string `protobuf:"bytes,2,opt,name=created,proto3" json:"created,omitempty"`
	// Идентификатор форума (slug) данного сообещния.
	Forum string `protobuf:"bytes,3,opt,name=forum,proto3" json:"forum,omitempty"`
	// Идентификатор данного сообщения.
	Id int64 `protobuf:"varint,4,opt,name=id,proto3" json:"id,omitempty"`
	// Истина, если данное сообщение было изменено.
	IsEdited bool `protobuf:"varint,5,opt,name=isEdited,proto3" json:"isEdited,omitempty"`
	// Собственно сообщение форума.
	Message string `protobuf:"bytes,6,opt,name=message,proto3" json:"message,omitempty"`
	// Идентификатор родительского сообщения (0 - корневое сообщение обсуждения).
	Parent int64 `protobuf:"varint,7,opt,name=parent,proto3" json:"parent,omitempty"`
	// Идентификатор ветви (id) обсуждения данного сообещния.
	Thread int32 `protobuf:"varint,8,opt,name=thread,proto3" json:"thread,omitempty"`
	// contains filtered or unexported fields
}

Сообщение внутри ветки обсуждения на форуме.

func (*Post) Descriptor deprecated

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

Deprecated: Use Post.ProtoReflect.Descriptor instead.

func (*Post) GetAuthor

func (x *Post) GetAuthor() string

func (*Post) GetCreated

func (x *Post) GetCreated() string

func (*Post) GetForum

func (x *Post) GetForum() string

func (*Post) GetId

func (x *Post) GetId() int64

func (*Post) GetIsEdited

func (x *Post) GetIsEdited() bool

func (*Post) GetMessage

func (x *Post) GetMessage() string

func (*Post) GetParent

func (x *Post) GetParent() int64

func (*Post) GetThread

func (x *Post) GetThread() int32

func (*Post) ProtoMessage

func (*Post) ProtoMessage()

func (*Post) ProtoReflect

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

func (*Post) Reset

func (x *Post) Reset()

func (*Post) String

func (x *Post) String() string

type PostFull

type PostFull struct {
	Author *User   `protobuf:"bytes,1,opt,name=author,proto3" json:"author,omitempty"`
	Forum  *Forum  `protobuf:"bytes,2,opt,name=forum,proto3" json:"forum,omitempty"`
	Post   *Post   `protobuf:"bytes,3,opt,name=post,proto3" json:"post,omitempty"`
	Thread *Thread `protobuf:"bytes,4,opt,name=thread,proto3" json:"thread,omitempty"`
	// contains filtered or unexported fields
}

Полная информация о сообщении, включая связанные объекты.

func (*PostFull) Descriptor deprecated

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

Deprecated: Use PostFull.ProtoReflect.Descriptor instead.

func (*PostFull) GetAuthor

func (x *PostFull) GetAuthor() *User

func (*PostFull) GetForum

func (x *PostFull) GetForum() *Forum

func (*PostFull) GetPost

func (x *PostFull) GetPost() *Post

func (*PostFull) GetThread

func (x *PostFull) GetThread() *Thread

func (*PostFull) ProtoMessage

func (*PostFull) ProtoMessage()

func (*PostFull) ProtoReflect

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

func (*PostFull) Reset

func (x *PostFull) Reset()

func (*PostFull) String

func (x *PostFull) String() string

type Profile

type Profile struct {

	// Описание пользователя.
	About string `protobuf:"bytes,1,opt,name=about,proto3" json:"about,omitempty"`
	// Почтовый адрес пользователя (уникальное поле).
	Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	// Полное имя пользователя.
	Fullname string `protobuf:"bytes,3,opt,name=fullname,proto3" json:"fullname,omitempty"`
	// contains filtered or unexported fields
}

Информация о пользователе.

func (*Profile) Descriptor deprecated

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

Deprecated: Use Profile.ProtoReflect.Descriptor instead.

func (*Profile) GetAbout

func (x *Profile) GetAbout() string

func (*Profile) GetEmail

func (x *Profile) GetEmail() string

func (*Profile) GetFullname

func (x *Profile) GetFullname() string

func (*Profile) ProtoMessage

func (*Profile) ProtoMessage()

func (*Profile) ProtoReflect

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

func (*Profile) Reset

func (x *Profile) Reset()

func (*Profile) String

func (x *Profile) String() string

type Thread

type Thread struct {

	// Пользователь, создавший данную тему.
	Author string `protobuf:"bytes,1,opt,name=author,proto3" json:"author,omitempty"`
	// Дата создания ветки на форуме.
	Created string `protobuf:"bytes,2,opt,name=created,proto3" json:"created,omitempty"`
	// Форум, в котором расположена данная ветка обсуждения.
	Forum string `protobuf:"bytes,3,opt,name=forum,proto3" json:"forum,omitempty"`
	// Идентификатор ветки обсуждения.
	Id int32 `protobuf:"varint,4,opt,name=id,proto3" json:"id,omitempty"`
	// Описание ветки обсуждения.
	Message string `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"`
	// Человекопонятный URL (https://ru.wikipedia.org/wiki/%D0%A1%D0%B5%D0%BC%D0%B0%D0%BD%D1%82%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B8%D0%B9_URL).
	// В данной структуре slug опционален и не может быть числом.
	Slug string `protobuf:"bytes,6,opt,name=slug,proto3" json:"slug,omitempty"`
	// Заголовок ветки обсуждения.
	Title string `protobuf:"bytes,7,opt,name=title,proto3" json:"title,omitempty"`
	// Кол-во голосов непосредственно за данное сообщение форума.
	Votes int32 `protobuf:"varint,8,opt,name=votes,proto3" json:"votes,omitempty"`
	// contains filtered or unexported fields
}

Ветка обсуждения на форуме.

func (*Thread) Descriptor deprecated

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

Deprecated: Use Thread.ProtoReflect.Descriptor instead.

func (*Thread) GetAuthor

func (x *Thread) GetAuthor() string

func (*Thread) GetCreated

func (x *Thread) GetCreated() string

func (*Thread) GetForum

func (x *Thread) GetForum() string

func (*Thread) GetId

func (x *Thread) GetId() int32

func (*Thread) GetMessage

func (x *Thread) GetMessage() string

func (*Thread) GetSlug

func (x *Thread) GetSlug() string

func (*Thread) GetTitle

func (x *Thread) GetTitle() string

func (*Thread) GetVotes

func (x *Thread) GetVotes() int32

func (*Thread) ProtoMessage

func (*Thread) ProtoMessage()

func (*Thread) ProtoReflect

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

func (*Thread) Reset

func (x *Thread) Reset()

func (*Thread) String

func (x *Thread) String() string

type User

type User struct {

	// Описание пользователя.
	About string `protobuf:"bytes,1,opt,name=about,proto3" json:"about,omitempty"`
	// Почтовый адрес пользователя (уникальное поле).
	Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	// Полное имя пользователя.
	Fullname string `protobuf:"bytes,3,opt,name=fullname,proto3" json:"fullname,omitempty"`
	// Имя пользователя (уникальное поле).
	// Данное поле допускает только латиницу, цифры и знак подчеркивания.
	// Сравнение имени регистронезависимо.
	Nickname string `protobuf:"bytes,4,opt,name=nickname,proto3" json:"nickname,omitempty"`
	// contains filtered or unexported fields
}

Информация о пользователе.

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetAbout

func (x *User) GetAbout() string

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetFullname

func (x *User) GetFullname() string

func (*User) GetNickname

func (x *User) GetNickname() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

type Vote

type Vote struct {

	// Идентификатор пользователя.
	Nickname string `protobuf:"bytes,1,opt,name=nickname,proto3" json:"nickname,omitempty"`
	// Отданный голос.
	Voice int32 `protobuf:"varint,2,opt,name=voice,proto3" json:"voice,omitempty"`
	// contains filtered or unexported fields
}

Информация о голосовании пользователя.

func (*Vote) Descriptor deprecated

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

Deprecated: Use Vote.ProtoReflect.Descriptor instead.

func (*Vote) GetNickname

func (x *Vote) GetNickname() string

func (*Vote) GetVoice

func (x *Vote) GetVoice() int32

func (*Vote) ProtoMessage

func (*Vote) ProtoMessage()

func (*Vote) ProtoReflect

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

func (*Vote) Reset

func (x *Vote) Reset()

func (*Vote) String

func (x *Vote) String() string

Jump to

Keyboard shortcuts

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