models

package
v0.0.0-...-cf2bd73 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2019 License: Apache-2.0 Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {

	// Текстовое описание ошибки.
	// В процессе проверки API никаких проверок на содерижимое данного описание не делается.
	//
	// Read Only: true
	Message string `json:"message,omitempty"`
}

func (*Error) MarshalBinary

func (m *Error) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Error) UnmarshalBinary

func (m *Error) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Error) Validate

func (m *Error) Validate(formats strfmt.Registry) error

Validate validates this error

type Forum

type Forum struct {

	// Общее кол-во сообщений в данном форуме.
	//
	// Read Only: true
	Posts int64 `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), уникальное поле.
	// Required: true
	// Pattern: ^(\d|\w|-|_)*(\w|-|_)(\d|\w|-|_)*$
	Slug string `json:"slug"`

	// Общее кол-во ветвей обсуждения в данном форуме.
	//
	// Read Only: true
	Threads int32 `json:"threads,omitempty"`

	// Название форума.
	// Required: true
	Title string `json:"title"`

	// Nickname пользователя, который отвечает за форум.
	// Required: true
	User string `json:"user"`
}

func (*Forum) MarshalBinary

func (m *Forum) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Forum) UnmarshalBinary

func (m *Forum) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Forum) Validate

func (m *Forum) Validate(formats strfmt.Registry) error

Validate validates this forum

type Post

type Post struct {

	// Автор, написавший данное сообщение.
	// Required: true
	Author string `json:"author"`

	// Дата создания сообщения на форуме.
	// Read Only: true
	Created *strfmt.DateTime `json:"created,omitempty"`

	// Идентификатор форума (slug) данного сообещния.
	// Read Only: true
	Forum string `json:"forum,omitempty"`

	// Идентификатор данного сообщения.
	// Read Only: true
	ID int64 `json:"id,omitempty"`

	// Истина, если данное сообщение было изменено.
	// Read Only: true
	IsEdited bool `json:"isEdited,omitempty"`

	// Собственно сообщение форума.
	// Required: true
	Message string `json:"message"`

	// Идентификатор родительского сообщения (0 - корневое сообщение обсуждения).
	//
	Parent int64 `json:"parent,omitempty"`

	// Идентификатор ветви (id) обсуждения данного сообещния.
	// Read Only: true
	Thread int32 `json:"thread,omitempty"`
}

func (*Post) MarshalBinary

func (m *Post) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Post) UnmarshalBinary

func (m *Post) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Post) Validate

func (m *Post) Validate(formats strfmt.Registry) error

Validate validates this post

type PostFull

type PostFull struct {

	// author
	Author *User `json:"author,omitempty"`

	// forum
	Forum *Forum `json:"forum,omitempty"`

	// post
	Post *Post `json:"post,omitempty"`

	// thread
	Thread *Thread `json:"thread,omitempty"`
}

func (*PostFull) MarshalBinary

func (m *PostFull) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*PostFull) UnmarshalBinary

func (m *PostFull) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

type PostUpdate

type PostUpdate struct {

	// Собственно сообщение форума.
	Message string `json:"message,omitempty"`
}

func (*PostUpdate) MarshalBinary

func (m *PostUpdate) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*PostUpdate) UnmarshalBinary

func (m *PostUpdate) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*PostUpdate) Validate

func (m *PostUpdate) Validate(formats strfmt.Registry) error

Validate validates this post update

type Posts

type Posts []*Post

func (Posts) Validate

func (m Posts) Validate(formats strfmt.Registry) error

Validate validates this posts

type Status

type Status struct {

	// Кол-во разделов в базе данных.
	// Required: true
	Forum int32 `json:"forum"`

	// Кол-во сообщений в базе данных.
	// Required: true
	Post int64 `json:"post"`

	// Кол-во веток обсуждения в базе данных.
	// Required: true
	Thread int32 `json:"thread"`

	// Кол-во пользователей в базе данных.
	// Required: true
	User int32 `json:"user"`
}

func (*Status) MarshalBinary

func (m *Status) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Status) UnmarshalBinary

func (m *Status) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Status) Validate

func (m *Status) Validate(formats strfmt.Registry) error

Validate validates this status

type Thread

type Thread struct {

	// Пользователь, создавший данную тему.
	// Required: true
	Author string `json:"author"`

	// Дата создания ветки на форуме.
	Created *strfmt.DateTime `json:"created,omitempty"`

	// Форум, в котором расположена данная ветка обсуждения.
	// Read Only: true
	Forum string `json:"forum,omitempty"`

	// Идентификатор ветки обсуждения.
	// Read Only: true
	ID int32 `json:"id,omitempty"`

	// Описание ветки обсуждения.
	// Required: true
	Message string `json:"message"`

	// Человекопонятный 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 опционален и не может быть числом.
	//
	// Read Only: true
	// Pattern: ^(\d|\w|-|_)*(\w|-|_)(\d|\w|-|_)*$
	Slug string `json:"slug,omitempty"`

	// Заголовок ветки обсуждения.
	// Required: true
	Title string `json:"title"`

	// Кол-во голосов непосредственно за данное сообщение форума.
	// Read Only: true
	Votes int32 `json:"votes,omitempty"`
}

func (*Thread) MarshalBinary

func (m *Thread) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Thread) UnmarshalBinary

func (m *Thread) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Thread) Validate

func (m *Thread) Validate(formats strfmt.Registry) error

Validate validates this thread

type ThreadUpdate

type ThreadUpdate struct {

	// Описание ветки обсуждения.
	Message string `json:"message,omitempty"`

	// Заголовок ветки обсуждения.
	Title string `json:"title,omitempty"`
}

func (*ThreadUpdate) MarshalBinary

func (m *ThreadUpdate) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ThreadUpdate) UnmarshalBinary

func (m *ThreadUpdate) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ThreadUpdate) Validate

func (m *ThreadUpdate) Validate(formats strfmt.Registry) error

Validate validates this thread update

type Threads

type Threads []*Thread

func (Threads) Validate

func (m Threads) Validate(formats strfmt.Registry) error

Validate validates this threads

type User

type User struct {

	// Описание пользователя.
	About string `json:"about,omitempty"`

	// Почтовый адрес пользователя (уникальное поле).
	// Required: true
	Email strfmt.Email `json:"email"`

	// Полное имя пользователя.
	// Required: true
	Fullname string `json:"fullname"`

	// Имя пользователя (уникальное поле).
	// Данное поле допускает только латиницу, цифры и знак подчеркивания.
	// Сравнение имени регистронезависимо.
	//
	// Read Only: true
	Nickname string `json:"nickname,omitempty"`
}

func (*User) MarshalBinary

func (m *User) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*User) UnmarshalBinary

func (m *User) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

type UserUpdate

type UserUpdate struct {

	// Описание пользователя.
	About string `json:"about,omitempty"`

	// Почтовый адрес пользователя (уникальное поле).
	Email strfmt.Email `json:"email,omitempty"`

	// Полное имя пользователя.
	Fullname string `json:"fullname,omitempty"`
}

func (*UserUpdate) MarshalBinary

func (m *UserUpdate) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UserUpdate) UnmarshalBinary

func (m *UserUpdate) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UserUpdate) Validate

func (m *UserUpdate) Validate(formats strfmt.Registry) error

Validate validates this user update

type Users

type Users []*User

type Vote

type Vote struct {

	// Идентификатор пользователя.
	// Required: true
	Nickname string `json:"nickname"`

	// Отданный голос.
	// Required: true
	Voice int32 `json:"voice"`
}

func (*Vote) MarshalBinary

func (m *Vote) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Vote) UnmarshalBinary

func (m *Vote) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Vote) Validate

func (m *Vote) Validate(formats strfmt.Registry) error

Validate validates this vote

Jump to

Keyboard shortcuts

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