balance

package
v0.0.0-...-82f7c04 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server is an impletation of the protobuf interface.

func New

func New() (*Server, error)

New initializes a new server instance.

func (*Server) GetBalance

func (s *Server) GetBalance(ctx context.Context, in *scrooge.Account) (*scrooge.Response, error)

GetBalance returns the balance of the account corresponding to the given id.

func (*Server) MakeTransaction

func (s *Server) MakeTransaction(ctx context.Context, in *scrooge.Transaction) (*scrooge.Response, error)

MakeTransaction updates the account corresponding to the given account ID by adding or subtracted the account's balance by the given amount. It returns a response containing the account id and the updated balance.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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