pocketbase

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidResponse = errors.New("invalid response")

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(url, email, password string) *Client

func (*Client) Create

func (c *Client) Create(collection string, body any) error

func (*Client) Delete

func (c *Client) Delete(collection string, id string) error

func (*Client) GetInterfacesFromSwitchName

func (c *Client) GetInterfacesFromSwitchName(name string) ([]models.Interface, error)

func (*Client) List

func (c *Client) List(collection string, params Params) ([]byte, error)

func (*Client) Update

func (c *Client) Update(collection string, id string, body any) error

func (*Client) View

func (c *Client) View(collection string, id string) ([]byte, error)

type Params

type Params struct {
	Page    int
	Size    int
	Filters string
	Sort    string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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