client

package
v0.9.16 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	BaseURL    string
	HTTPClient *http.Client
}

Client handles API requests to the seqre server

func New

func New(baseURL string) *Client

New creates a new API client

func (*Client) CreateEncryptedImage added in v0.4.0

func (c *Client) CreateEncryptedImage(encryptedData []byte, onetime bool) (string, error)

CreateEncryptedImage uploads an encrypted image blob

func (*Client) CreateImage added in v0.4.0

func (c *Client) CreateImage(imageData []byte, filename string, onetime bool) (string, error)

CreateImage uploads a raw image file

func (c *Client) CreateLink(url string, encrypted bool, onetime bool) (string, error)

CreateLink creates a shortened URL

func (*Client) CreatePaste added in v0.5.0

func (c *Client) CreatePaste(content string, language string, encrypted bool, onetime bool) (string, error)

CreatePaste creates a new text paste

func (*Client) CreateSecret

func (c *Client) CreateSecret(encryptedData string) (string, error)

CreateSecret creates a new secret and returns the full URL

func (*Client) GetIP

func (c *Client) GetIP() (string, error)

GetIP retrieves the public IP address

func (*Client) GetImage added in v0.4.0

func (c *Client) GetImage(short string) (string, error)

GetImage retrieves an encrypted image by short code (returns base64 encoded data)

func (*Client) GetImageRaw added in v0.4.0

func (c *Client) GetImageRaw(short string) ([]byte, error)

GetImageRaw retrieves a raw (unencrypted) image by short code

func (c *Client) GetLink(short string) (*models.LinkResponse, error)

GetLink retrieves link information by short code

func (*Client) GetPaste added in v0.5.0

func (c *Client) GetPaste(short string) (string, error)

GetPaste retrieves an encrypted paste by short code (returns base64 encoded data)

func (*Client) GetPasteRaw added in v0.5.0

func (c *Client) GetPasteRaw(short string) (string, error)

GetPasteRaw retrieves a raw (unencrypted) paste by short code

func (*Client) GetSecret

func (c *Client) GetSecret(short string) (string, error)

GetSecret retrieves a secret by short code

func (*Client) GetVersion

func (c *Client) GetVersion() (*models.VersionResponse, error)

GetVersion retrieves the server version information

Jump to

Keyboard shortcuts

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