api

package
v0.0.0-...-d1cf776 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2020 License: LGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func User

func User(ctx context.Context) *core.User

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(debug bool,
	kernel core.KernelService,
	store core.Store,
	privView crypto.Key,
	cfg ServerConfig) Server

func (Server) CreateUser

func (s Server) CreateUser(w http.ResponseWriter, r *http.Request)

func (Server) Handler

func (s Server) Handler() http.Handler

func (Server) Info

func (s Server) Info(w http.ResponseWriter, r *http.Request)

func (Server) QuerySnapshots

func (s Server) QuerySnapshots(w http.ResponseWriter, r *http.Request)

func (Server) Transaction

func (s Server) Transaction(w http.ResponseWriter, r *http.Request)

func (Server) Transfer

func (s Server) Transfer(w http.ResponseWriter, r *http.Request)

type ServerConfig

type ServerConfig struct {
	VerifyAuthToken  bool   `json:"verify_auth_token"`
	VerifyRequestSig bool   `json:"verify_request_sig"`
	SessionPublicKey string `json:"session_pub_key"`
}

type SnapshotView

type SnapshotView struct {
	CreatedAt  time.Time       `json:"created_at"`
	Asset      string          `json:"asset"`
	UserID     string          `json:"user_id"`
	OpponentID string          `json:"opponent_id,omitempty"`
	Amount     decimal.Decimal `json:"amount"`
	Memo       string          `json:"memo"`
	Height     uint            `json:"height"`
}

func ConvertSnapshot

func ConvertSnapshot(snapshot *core.Snapshot) *SnapshotView

type UserView

type UserView struct {
	UserID    string    `json:"user_id"`
	CreatedAt time.Time `json:"created_at"`
	Address   string    `json:"address"`
	Keystore  string    `json:"keystore,omitempty"`
}

func ConvertUser

func ConvertUser(user *core.User, showPrivate ...bool) *UserView

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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