rest

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2023 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QueryAccount

func QueryAccount(c *fiber.Ctx) error

Types

type HttpTransport

type HttpTransport struct {
	*fiber.App
	SessionStore  *session.Store
	ClientContext client.Context
}

func NewHttpTransport

func NewHttpTransport(ctx client.Context) *HttpTransport

func (*HttpTransport) CreateAccount

func (htt *HttpTransport) CreateAccount(c *fiber.Ctx) error

! ||--------------------------------------------------------------------------------|| ! || Accounts API Rest Implementation || ! ||--------------------------------------------------------------------------------||

func (*HttpTransport) GetAccount

func (htt *HttpTransport) GetAccount(c *fiber.Ctx) error

func (*HttpTransport) Keygen

func (htt *HttpTransport) Keygen(c *fiber.Ctx) error

func (*HttpTransport) ListAccounts

func (htt *HttpTransport) ListAccounts(c *fiber.Ctx) error

func (*HttpTransport) Login

func (htt *HttpTransport) Login(c *fiber.Ctx) error

func (*HttpTransport) QueryDocument

func (htt *HttpTransport) QueryDocument(c *fiber.Ctx) error

func (*HttpTransport) QueryService

func (htt *HttpTransport) QueryService(c *fiber.Ctx) error

func (*HttpTransport) ReadMail

func (htt *HttpTransport) ReadMail(c *fiber.Ctx) error

func (*HttpTransport) SendMail

func (htt *HttpTransport) SendMail(c *fiber.Ctx) error

func (*HttpTransport) SignMessage

func (htt *HttpTransport) SignMessage(c *fiber.Ctx) error

func (*HttpTransport) VerifyMessage

func (htt *HttpTransport) VerifyMessage(c *fiber.Ctx) error

type User

type User struct {
	// DID of the user
	Did string `json:"_id"`

	// DID document of the primary identity
	Username string `json:"username"`

	// Map of the dids of the keyshares to the dids of the accounts
	Accounts []string `json:"accounts"`

	// DidDocument of the primary identity
	PrimaryIdentity *types.DidDocument `json:"primaryIdentity"`
}

func LoadUser

func LoadUser(data []byte) (*User, error)

func NewUser

func NewUser(c controller.Controller) *User

func (*User) Marshal

func (u *User) Marshal() ([]byte, error)

Jump to

Keyboard shortcuts

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