Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExampleNew ¶
func ExampleNew()
ExampleNew показывает пример создания и запуска сервера с RestAPI
Types ¶
type ExampleApp ¶
type ExampleApp struct {
// contains filtered or unexported fields
}
ExapmleApp реализует интерфейс IApplication, который отдает серверу параметры подключения, секретный ключ шифрования токена авторизации, а так же обрабатывает поступающие запросы
var App *ExampleApp
func (*ExampleApp) Addr ¶
func (s *ExampleApp) Addr() string
func (*ExampleApp) GenerateID ¶
func (s *ExampleApp) GenerateID() int64
func (*ExampleApp) Secret ¶
func (s *ExampleApp) Secret() []byte
type ExampleGroup ¶
type ExampleRequestRegister ¶
type ExampleRequestRegister struct { ID int64 Name string `rest:"required"` Password string `rest:"required"` GroupID int64 `rest:"required"` // contains filtered or unexported fields }
type ExampleRequestSetAvatar ¶
type ExampleRequestSetAvatar struct {
// contains filtered or unexported fields
}
type ExampleRequestUserInfo ¶
type ExampleRequestUserInfo struct {
// contains filtered or unexported fields
}
type ExampleUser ¶
type ExampleUser struct { ID int64 `rest:"default"` Name string `rest:"default"` Group *ExampleGroup Avatar []byte `rest:"ignore"` // contains filtered or unexported fields }
func (*ExampleUser) RestFields ¶
func (s *ExampleUser) RestFields(result json.Map, files map[string]io.ReadCloser, names rest.FieldList)
Click to show internal directories.
Click to hide internal directories.