pocketbase_api

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collection

type Collection struct {
	Id     string            `json:"id"`
	Name   string            `json:"name"`
	Type   string            `json:"type"`
	System bool              `json:"system"`
	Fields []CollectionField `json:"fields"`
}

func (Collection) String

func (collection Collection) String() string

type CollectionField

type CollectionField struct {
	Id           string   `json:"id"`
	Name         string   `json:"name"`
	Type         string   `json:"type"`
	CollectionId string   `json:"collectionId"`
	MaxSelect    int      `json:"maxSelect"`
	Required     bool     `json:"required"`
	Hidden       bool     `json:"hidden"`
	Values       []string `json:"values"`
}

type CollectionsResponse

type CollectionsResponse struct {
	Items []Collection `json:"items"`
}

type PocketBase

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

func New

func New(Credentials *credentials.Credentials) *PocketBase

func (*PocketBase) Authenticate

func (pocketBase *PocketBase) Authenticate() error

func (*PocketBase) DoWithAuth

func (pocketBase *PocketBase) DoWithAuth(request *http.Request) (*http.Response, error)

func (*PocketBase) GetApiUrl

func (pocketBase *PocketBase) GetApiUrl(suffix string) string

func (*PocketBase) GetCollections

func (pocketBase *PocketBase) GetCollections() (*CollectionsResponse, error)

Jump to

Keyboard shortcuts

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