api

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoteNotFound      = errors.New("encrypted note not found")
	ErrNoteAlreadyExists = errors.New("encrypted note already exists")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	BaseURL   string
	VerifyTLS bool
	// contains filtered or unexported fields
}

func NewClient

func NewClient(baseURL string, verifyTLS bool) *Client

func (*Client) Close added in v0.1.3

func (c *Client) Close()

func (*Client) CreateNote added in v0.1.3

func (c *Client) CreateNote(ctx context.Context, passphrase []byte) (*Note, error)

func (*Client) GetNote added in v0.1.3

func (c *Client) GetNote(ctx context.Context, passphrase []byte) (*Note, error)

func (*Client) Health

func (c *Client) Health(ctx context.Context) error

func (*Client) UpdateNote

func (c *Client) UpdateNote(ctx context.Context, passphrase []byte, message string, version int) (*Note, error)

type Note

type Note struct {
	ID       string `json:"id"`
	Message  string `json:"-"`
	HasImage bool   `json:"hasImage"`
	Version  int    `json:"version"`
	Created  string `json:"created"`
	Updated  string `json:"updated"`
}

Jump to

Keyboard shortcuts

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