api

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: MIT Imports: 9 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 {
	Address string
}

func (*Client) GetPublicKeyByUsername

func (client *Client) GetPublicKeyByUsername(username string) (*rsa.PublicKey, *RequestError)

func (*Client) RegisterNewUsername

func (client *Client) RegisterNewUsername(username string, email string, publicKey string) *RequestError

type GetPublicKeyResponse

type GetPublicKeyResponse struct {
	Username  string `json:"username"`
	PublicKey string `json:"public_key"`
}

type RegisterUsernameRequest

type RegisterUsernameRequest struct {
	Username  string `json:"username"`
	PublicKey string `json:"public_key"`
	Email     string `json:"email"`
}

type RequestError

type RequestError struct {
	StatusCode int
	E          error
}

func (*RequestError) Error

func (err *RequestError) Error() string

Jump to

Keyboard shortcuts

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