services

package
v0.0.0-...-10b8bc0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateNotification

func CreateNotification()

func ListNotifications

func ListNotifications()

func SendEmail

func SendEmail()

func SendMessage

func SendMessage()

Types

type Auth

type Auth interface {
	LoginService(string, string) *LoginResponse

	RefreshToken(Token, string) Token
	// contains filtered or unexported methods
}

type LoginResponse

type LoginResponse struct {
	Token Token `json:"token"`
}

func LoginService

func LoginService(username string, password string) *LoginResponse

type NotificatonService

type NotificatonService interface {
	CreateNotification()
	ListNotifications()
	SendEmail()
	SendMessage()
}

type SignUpResponse

type SignUpResponse struct {
	Token      Token `json:"token"`
	IsVerified bool  `json:"is_verified"`
}

func SignUpService

func SignUpService() *SignUpResponse

type Token

type Token string

type TransactionTxResult

type TransactionTxResult struct {
	Transfer    models.Transaction              `json:"transfer"`
	FromAccount models.Account                  `json:"from_account"`
	ToAccount   models.Account                  `json:"to_account"`
	FromEntry   models.AccountTransactionsEntry `json:"from_entry"`
	ToEntry     models.AccountTransactionsEntry `json:"to_entry"`
}

func TransferService

func TransferService(ctx context.Context, transaction models.CreateTransferRecordParams) (TransactionTxResult, error)

Executes a DB transaction for Transfer of money Should avoid deadlock and be atomic action

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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