Documentation ¶
Index ¶
- type Bucket
- func (bucket *Bucket) Count() uint
- func (bucket *Bucket) DB() DB
- func (bucket *Bucket) Delete(idI any) Error
- func (bucket *Bucket) DeleteAll() Error
- func (bucket *Bucket) Get(id any) (Model, Error)
- func (bucket *Bucket) Manager() ManagerI
- func (bucket *Bucket) Model() Model
- func (bucket *Bucket) Name() string
- func (bucket *Bucket) Save(model Model) Error
- type DataBase
- type Form
- type Manager
- func (manager *Manager) All() []Model
- func (manager *Manager) Bucket() *Bucket
- func (manager *Manager) Copy() ManagerI
- func (manager *Manager) Count() uint
- func (manager *Manager) Delete(id any)
- func (manager *Manager) Filter(include Params, _ ...Params) ManagerI
- func (manager *Manager) First() Model
- func (manager *Manager) Get(idI any) Model
- func (manager *Manager) IsInstance() bool
- func (manager *Manager) Last() Model
- func (manager *Manager) Table() Table
- type PocketBase
- type Record
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bucket ¶
type Bucket struct { Objects *Manager // contains filtered or unexported fields }
Bucket
type DataBase ¶ added in v0.11.0
type DataBase struct {
// contains filtered or unexported fields
}
DB
func OpenWith ¶ added in v0.11.0
func OpenWith(pb *PocketBase, buckets map[string]*Bucket) *DataBase
func (*DataBase) ExistsTable ¶ added in v0.11.0
func (*DataBase) TableFromCache ¶ added in v0.12.1
type Form ¶
type Form struct {
// contains filtered or unexported fields
}
Form структура формы для создания или обновления записи
func NewForm ¶
func NewForm(app *PocketBase, record *Record) *Form
NewForm возвращает экземпляр *Form
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager
func (*Manager) IsInstance ¶
type PocketBase ¶
type PocketBase struct {
// contains filtered or unexported fields
}
Pocketbase структура с данными авторизации для pb
func New ¶
func New(address, identity, password string) *PocketBase
New возвращает экземпляр *Pocketbase с адресом `address`, индификатором `identity` и паролем `password`
address in format - http(s)://127.0.0.1(:8090)
func NewLocal ¶ added in v0.11.0
func NewLocal(identity, password string, port ...string) *PocketBase
func (*PocketBase) Delete ¶
func (pb *PocketBase) Delete(collectionNameOrId, id string) error
func (*PocketBase) Filter ¶
func (pb *PocketBase) Filter(collectionNameOrId string, data map[string]any, page ...uint) ([]*Record, error)
PocketBase.Filter возвращает список записей из pb удовлетворяющим фильтру `data`
func (*PocketBase) GetFileAsSliceByte ¶
func (pb *PocketBase) GetFileAsSliceByte(collentionNameOrId, recordId, fileName string) ([]byte, error)
PocketBase.GetFileAsSliceByte возвращает список байтов файла из pb
По id записи `recordId` в колекции `collentionNameOrId` и имени файла `fileName`
type Record ¶
type Record struct {
// contains filtered or unexported fields
}
Record структура записи в pb
func NewRecord ¶
func NewRecord(collectionNameOrId string, app *PocketBase) *Record
NewRecord возвращает экземпляр *Record
func (*Record) CollectionNameOrId ¶
Record.CollectionNameOrId возвращает имяИлиId колекции