handlers

package
v0.0.0-...-2877753 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotAccountOwner         = errors.New("account doesn't belong to authenticated user")
	ErrEmailSameAsOld          = errors.New("new email is the same as old email")
	ErrBlockedRefreshToken     = errors.New("refresh token is blocked")
	ErrMismatchedRefreshTokens = errors.New("refresh token doesn't match with stored refresh token")
	ErrExpiredRefreshToken     = errors.New("refresh token has expired")
	ErrPasswordWrong           = errors.New("old password is different from the one stored in the database")

	ErrSameAccountTransfer = func(from, to int64) error {
		return fmt.Errorf(fmt.Sprintf("can't transfer to the same account, req.FromAccountId=%d, req.ToAccount=%d", from, to))
	}
	ErrCurrencyMismatch = func(from, to string) error {
		return fmt.Errorf(fmt.Sprintf("currency mismatch account1.currency=%s, account2.currency=%s", from, to))
	}

	ErrAccountDeleted = func(id int64) error {
		return fmt.Errorf("account %d is deleted", id)
	}
)

Functions

This section is empty.

Types

type GinServer

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

func NewServer

func NewServer(config *util.Config, store db.Store) (*GinServer, error)

func (*GinServer) Start

func (s *GinServer) Start(address string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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