api

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 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 {
	APIBaseURL     string
	BrowserBaseURL string
	// contains filtered or unexported fields
}

Client makes network API calls to cipherb.in

func NewClient

func NewClient(browserBaseURL, apiBaseURL string, client *http.Client) *Client

NewClient TODO

func (*Client) GetMessage

func (c *Client) GetMessage(url string) (*app.MessageResponse, error)

GetMessage simply takes a cipherb.in public URL string and returns the appropriate encrypted message

func (*Client) PostMessage

func (c *Client) PostMessage(msg *db.Message) error

PostMessage takes a msg of type *db.Message (this is what the server uses and will expect) and posts it to the live cipherbin api

Jump to

Keyboard shortcuts

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